0

I want to create a simple 32-bit text-based operating system.

Bootloader :

Firstly I want to create a multistage bootloader.

Stage 1 : Assembly code (NASM-Compiler)

Stage 2 : C (GCC-Compiler)

Kernel:

Then it should load Kernel which should be written in C (GCC-Compiler)

I would also like to know how to properly compile and execute it.

Emulator should be Qemu

A sample 32-bit Operating System that displays "Hello world" would be helpful.

Project-A
  • 133
  • 1
  • 2
  • 12
  • 2
    It sounds like you're asking how to write an entire bootloader from scratch. That's much too broad a question — the "answer" would involve someone writing most of one for you. There's no simple "here's how to write a bootloader" in a few sentences or paragraphs. – Wyzard Jul 28 '15 at 05:20

1 Answers1

2

Don't write your own bootloader. Configure and use an existing bootloader, probably GRUB. This would make using your toy OS much easier (both for you and for other users).

Read http://osdev.org/ since they have a lot of resources about OS building on PCs (including a hello world OS).

Read also some good operating system book (e.g. Operating Systems: Three Easy Pieces). You'll find out that there cannot be very simple OSes. See also this answer.

Also, be at least quite fluent with POSIX and with Linux system programming (read Advanced Linux Programming at first).

Basile Starynkevitch
  • 223,805
  • 18
  • 296
  • 547