fronty wrote:Why are you looking at some disassembly when you could just check
source code?
.. because I'm not so bsd-savvy ??
Thanks for the pointer though... very instructive
Now, after reviewing the said source code, I can confirm that the openbsd boot ELF file (32 bit) effectively contains a litlle 16-bit bootstrap part (entry point),
that switches to pmode and gives execution to the rest of the 32-bit code.
One interesting thing I found via the pointer you gave, is the 'biosboot' source code,
http://www.openbsd.org/cgi-bin/cvsweb/s ... S?rev=1.40
whose comments show how comparable it is to the goals of this contest,
except :
-apparently the file system used is not FAT1X but rather UFS (bsd standard ??) with inodes, direct block table, etc...
-many parameters are {hard coded/patched at install} in the boot loader (inodeblk, inodedbl, fs_bsize_p, etc...) whereas in this contest, we must compute them at run time
In particular :
* We would have liked biosboot to go from the superblock to
* the root directory to the inode for /boot, thence to read
* its blocks into memory.
*
* As code and data space is quite tight in the 512-byte
* partition boot sector, we instead get installboot to pass
* us some pre-processed fields.
hehe..
If somebody ever reaches the contest's goal, we won't need any installboot or any boot sector patcher anymore...