home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.os.development      Operating system development chatter      4,255 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 3,030 of 4,255   
   wolfgang kern to James Harris   
   Re: Format for the OS image   
   08 Jan 22 21:10:53   
   
   From: nowhere@nevernet.at   
      
   On 08/01/2022 13:30, James Harris wrote:   
   > On 05/01/2022 18:54, wolfgang kern wrote:   
   >> On 05/01/2022 17:39, James Harris wrote:   
   >>   
   >>>>     What formats of image file are best for the OS itself?   
   >   
   > ...   
   >   
   >>   
   >> I prefer a never fragmented (iow: always consecutive) Flat Binary image,   
   >> and as all M$-forms are prone to become distributed all over the disk   
   >> I'd avoid using any of their formats. Loonix may act quite similar...   
   >>   
   >> Even we are now forced to use UEFI and the FAT32 boot code, I'd have   
   >> all my OS including loader stages as a block of consecutive sectors on   
   >> disk.   
   >> So all I need to know is the LBA-Number of the start sector then.   
   >> This needs a certain (stupid easy) tool to "format" such an OS either   
   >> manually or full featured autonome.   
   >   
   > IIRC you load your OS image to 0x7e00 although you might move it later.   
   > Either way, does it always run from a specific location (in which case   
   > you won't need any fixups)?   
      
   Yes I let the BIOS load to 7e00 beginning with the sector after the MBR,   
   so my whole OS-image is a single block starting with the MBR (==VBR).   
   And my code starts already in the middle of the MBR and jumps over the   
   MBR+VBR-data (196 byte).   
      
   > I cannot load the image to a fixed location as I want to be able to   
   > adapt to different machine configs so it looks as though I have no   
   > choice but to relocate it after reading the file into memory.   
      
   Me too have the opportunity to boot several variants within partitions,   
   so the boot code "calculates" (adds a One) to the anyway known MBR-LBA   
   before asking the BIOS to load the rest.   
      
   But I move then the 32bit part always to the same address 1_0000_0000   
   because there isn't enough consecutive space below.   
      
   Earlier versions of my OS used self-relocation, and they were small   
   enough to fit into the first 640K. Not more since a while ...   
   __   
   wolfgang   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca