I don't know if it is the right place to post this question but...
I am writing a very simple o.s. which loads off a floppy. What it does is, it creates, edits partitions on hard drive connected to the system, and also formats the partitions.
Currently what i have is a boot-loader that loads the kernel, initializes GDT, switch to protected mode and executes the kernel. Since I planned it to load only from floppy, the kernel itself contains the code to read/write floppy and support FAT12 file system. I plan it to be extendable with drivers and user applications. The kernel itself will initiate paging and load all the drivers. I am using PE format for all executables and support for ELF can be added too. The os will supports PATA and SATA.
I am having trouble figuring out whether to give PCI support in kernel or as a driver and also if I need to support any ACPI related stuff. I plan on using IOAPIC and LAPIC to handle interrupts. Multiple processors will not be supported.
The second stage bootloader enables A20 gate, installs GDT, loads the kernel at physical address 0x00100000 (1 MB) and transfers control to it. Currently I have a blank kernel.
The memory map exists at physical address 0x00004000. The GDT and IDT exists at 0x00013000.
Any ideas what to do next.
A simple os to edit disk partations
Re: A simple os to edit disk partations
You don't need an entire OS to edit partition.
How about let the boot loader load a single-threaded "application", so you can skip most features of a full-featured kernel?
How about let the boot loader load a single-threaded "application", so you can skip most features of a full-featured kernel?
Re: A simple os to edit disk partations
I consider this as a starting point for a much bigger project i have in mind.
Re: A simple os to edit disk partations
I see. For starter, you may restrict your OS to:
- single processor
- 32-bit flat addressing
- support simple scheduling (round-robin is sufficient)
And built a kernel with basic stuff:
- memory management (physical page, logical address space, kmalloc)
- process management, address isolation, resource handling
- simple driver architecture, say, each driver has pre-defined interface per purpose.
- simple VFS layout
- syscall interface
- optionally libc support for convenience
Then you can launch application, and enrich the syscall to provide partition editing feature for application development.
Finally, you can throw away this kernel, as you gained better experience, you can seriously re-design your dream kernel.
- single processor
- 32-bit flat addressing
- support simple scheduling (round-robin is sufficient)
And built a kernel with basic stuff:
- memory management (physical page, logical address space, kmalloc)
- process management, address isolation, resource handling
- simple driver architecture, say, each driver has pre-defined interface per purpose.
- simple VFS layout
- syscall interface
- optionally libc support for convenience
Then you can launch application, and enrich the syscall to provide partition editing feature for application development.
Finally, you can throw away this kernel, as you gained better experience, you can seriously re-design your dream kernel.
Re: A simple os to edit disk partations
Yesberkus wrote:Do you have something like this in mind?
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
Re: A simple os to edit disk partations
Visopsys is a popular OSDev project that turned into a partition manager, Partition Logic.
Re: A simple os to edit disk partations
Yes, really. I built the partition tools I need to format a new harddrive, add partitions and write the boot loader. This can both be done from command-line, and from applications (it is a library). When things go really wrong, I either remove and recreate the partition, or let Windows repair it. I don't see much need for anything beyond that.berkus wrote:Pretty sad destiny for a hobby OS I would say.Brynet-Inc wrote:Visopsys is a popular OSDev project that turned into a partition manager, Partition Logic.