VOID001 / neu-os

Based on linux0.11, break it down, then reassemble (For NEU Lab use)
163 stars 65 forks source link

Some new thoughts on NEUOS #13

Open VOID001 opened 6 years ago

VOID001 commented 6 years ago

Current version of NEUOS contains many design problems, I will list them below

  1. Handmade bootup process now it use a custom hand-made bootloader that can only boot from floppy and harddik(maybe no hdd suport, I forgot) It will have problem booting up on bare metal. To ensure the bootloader works correctly even if run directly on bare metal, we need to use standard bootup process. Such as multiboot, for example grub. May be we will support EFI bootup
  2. Messy build system NEUOS now using Makefile alone to build the whole system, which is impractical for a normal C project. We need to use auto build systems, such as automake, kernel now using kconfig system, maybe we can learn from it. Also, we could add support for configurable build options, (for example kernel .config file) to allow users to build flexible customized image
  3. Lack of core function Currently, NEUOS supports following functions
    • multiprocess
    • paging
    • VGA and Serial Output
    • Keyboard IO
    • kernel syscall interface
    • scheduling and timer
    • some libraries

However these functions are not enough for a real operating system. At least the following funtion should be added:

  1. Hard and unnecessary coding for students. Many students are not familiar with AT&T assembly or the Intel Manual. Some assignments such as hardware init and floppy IO now require them to write in full AT&T assembly, thus make them frustrating. Learned from AIM-public, these unnecessary but complicated code need to be implemented by the NEUOS developer, and provide API to students, they could just use the API to issue disk IO commands, hardware init, etc. And for a cleaner codebase, we need to remove the hand-written assembly as much as possible, instead, use C inline assembly as an alternative.

  2. More formal debugging, cross building toolkit We now combined QEMU gdb and Bochs GUI together to debug the project, but these methods are not enough, for example we need to have some internal debug tool, debug function. And the toolchain for building NEUOS should be universal, from a specific architecture and ELF format, everyone can build NEUOS from its own toolchain, providing a Virtual Machine image is not a good choice for environment setup.

  3. To be continued

swordfeng commented 6 years ago

2 Maybe cleaner makefile (I actually believe no make systems are clean) 3 Always make it run first, make it better later

VOID001 commented 6 years ago

@swordfeng Yeah, now the system is in an "It works!" state. So I want to improve it. Any idea on what essential parts are needed for the OS?

Anduin2017 commented 6 years ago

I need a document about how to build it and how to run it on my machine.

VOID001 commented 6 years ago

@Anduin2017 that's fine cross build instructions will be provided later

QianYuan-master commented 5 years ago

汇编写起来实在是太吃力了。