Re: [Etherboot-developers] [RFC] Booting from disk....
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: <ke...@us...> - 2002-06-10 07:57:40
|
>To make this work under LinuxBIOS I need to do the following things. >1) Move the code for booting an x86 bootsector into osloader.c > So I can boot ELF image directly from disk. > >2) Modify bootdisk to take a download_kernel parameter. If > only a stock x86 bootsector is present it will be used see 1. > >3) Modify bootdisk to call my polled drivers. Should be ok. I've had a look and the code around loadkernel is a bit of a mess. Probably what should be done is: 1. downloadkernel is misnamed. It probably did the downloading ages ago, but really it should be called handleblock. In fact I've just done that name change in my version. The symbol's static and so has no ripple on effects. 2. loadkernel is either a macro or a routine depending on whether CAN_BOOT_DISK is defined. It should be taken out and shot. Ok, ok, just taken out. Into another file. Say it's called load.c. It should handle the sequencing of bootable devices. It would also separate the kernel name from the device name, which I assume is what you mean in 2. 3. floppy.c is also misnamed since it also handles hard disks now. The code there should be integrated into some disk driving routines, which is what I assume you are creating. I would like to see the disk modules optional so that those who don't use them don't have to pay for it. 3. Not sure how osloader comes into this. os_download is called from handleblock (formerly downloadkernel). Does it have to be involved? The convention for specifying the driver type, partition and filename is another can of worms. However, it's delegated to the disk driver. All load.c has to know is which driver to call and to pass the tail of the path to it. |