Score
0
Watch 18 Star 60 Fork 7

Misa.Z / EwokOSCApache-2.0

Join us
Explore and code with more than 2 million developers,Free private repositories !:)
Sign up
一个基于arm架构微内核操作系统,用于微内核操作系统学习交流。支持mmu,进程、线程、虚拟文件系统、framebuffer等 spread retract

  • C 92.2%
  • Perl 3.4%
  • Makefile 2.0%
  • C++ 1.4%
  • Yacc 0.4%
  • Other 0.6%
Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

EwokOS

.Author

Misa.Z misa.zhu@gmail.com

.About

A microkernel OS for learning operating system. versatilepb ported well, raspi2 todo....
-mmu
-multi processes
-multi thread
-ipc
-virtual fs service(everythig is a file)
-very simple ramdisk for initrd
-framebuffer device service for graphics
-uart device service
-SD card

.Environment & Tools

Linux:	
	Ubuntu Linux 16.04 with "qemu-system-arm","gcc-arm-none-eabi","gdb-arm-none-eabi"
	installed(can install by "apt")

Mac OSX(with brew installed):	
	brew tap PX4/homebrew-px4
	brew install gcc-arm-none-eabi-49
	brew install qemu
	(set the right PATH environment after installed)

.make and run

"cd rootfs; make; ./mkfs.sh":
  build EwokOS root filesystem.
"cd kernel; make versatilepb_defconfig; make":
  build EwokOS kernel image.
"cd kernel; make run":
  run EwokOS;
  "qemu-system-arm -kernel build/EwokOS.bin -serial mon:stdio -sd ../rootfs/rootfs.ext2"
  boot kernel file and mount SD card.
"cd kernel; make debug":
  run EwokOS at debug server-mode.
"cd kernel; make gdb":
  debug EwokOS (debug client-mode).

.commands

Most of commands are in 'rootfs/sbin' directory, like:
ls, ps, pwd, test ......

.Source code read-guide

kernel/asm/boot.S
kernel/src/mm/kalloc.c
kernel/src/mm/mmu.c
kernel/src/mm/trunkmalloc.c
kernel/src/mm/kmalloc.c
kernel/src/proc.c 
kernel/src/sheduler.c
kernel/src/syscalls.c
kernel/src/mm/shm.c
kernel/src/ipc.c

rootfs/lib/src/stdlib.c
rootfs/lib/src/unistd.c
rootfs/lib/src/ipc.c
rootfs/lib/src/shm.c

rootfs/sbin/init/init.c
rootfs/sbin/vfsd/vfsd.c
rootfs/dev/initfs/initfs.c
rootfs/dev/fbd/fbd.c
rootfs/dev/ttyd/ttyd.c
rootfs/sbin/shell/shell.c

Tips: Don't fall in love with assembly too much;).

. Kernel init memory map

PhyMem        VMem         Desc
----------------------------------------------------
0x00000000    0xFFFF0000   interrupt table
0x00010000    0x80010000   Kernel start (load to)
***           ***          (_init_stack, _irq_stack, _startup_page_dir)
***           ***          Kernel end, Kernel PageDir Table start
+16KB         +16KB        Kernel PageDir Table end.
+32KB         +32KB        kernel malloc base
+2M           +2M          kernel malloc end (size=2M).
......
0x08000000    0x08000000   init ramdisk base (load initrd to)
0x08020000    0x08020000   init ramdisk end (size=2M).
......
physical ram top           Share memory start base               
......
MMIO_BASE_PHY MMIO_BASE    MMIO base (arch)
......

Comments ( 3 )

Sign in for post a comment

C
1
https://gitee.com/misaz/EwokOS.git
git@gitee.com:misaz/EwokOS.git
misaz
EwokOS
EwokOS
master

Help Search