• village604@adultswim.fan
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 day ago

    How do you even get started on developing a new OS?

    I mean, I’m guessing you start with the bootloader, but I mean more conceptually.

    • just_an_average_joe@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 day ago

      You load a second bootloader from the first one.

      I made an OS in my bachelors cuz why not. First bootloader has to be 512 bytes so you do nothing there except loading the second in memory and then jump to it. Also the last 2 bytes have to be specific (0x1155 iirc) so you have like 510.

      You start in 16bit mode and there you have basic drivers to load stuff. Second bootloader has to define a bunch of things like interrupts and memory gates and also load the kernel then finally jump to 32bit (64 bit and 32 bit are pretty much same except size) and to kernel. Then the rest is kinda up to you

      I targetted a specific arch iirc it was i386 so there may be some differences now. But this was roughly 2015. I started from brokenthorn wiki but after running to some issues for drivers, i went to osdev wiki.