[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: bootable CDs for mipsel [was: Reading fibmap]

On Wed, May 01, 2002 at 01:02:17AM +0200, Raphael Hertzog wrote:
> That would be cool. There's another thing that does worry me. All cd
> images should be buildable on i386 without root rights.
> That is: if you can avoid having to use the loopback mount, it would be
> great.

I guess we can't avoid it - Mips and mipsel booting is very much a hack
as both firmwares basically know nothing about a CDROM or iso9660.

On the Decstation a cdrom is a scsi block device with 512 byte blocking.
The first 512 bytes have extents on which blocks to load to which address
and where to jump to - So we basically need to rip off all ELF headers of
the IPL binary etc - load a raw instruction binary to a specific address
and jump to "_main" or equivalent (kernel_entry). To create those extents
one has to mount the iso image and issue a "fibmap" syscall to get the
blocks of the file to load from the first block (We assume all iso9660
files are contigues). Currently we dont have a bootloader which knows
about iso9660 so we directly load the kernel with the attached ramdisk
which contains the debian installer. Goal is to have a bootloader
(modified delo) which is already built as a non-elf-containing-binary)
put that on the disk and let delo deal as a 2nd. stage bootloader
with the iso9660 filesystem and elf loading.

On mips we are emulating a disk with an ordinary partition table.
In the SGI Volume Header there is some special space for boot binarys.
Those may be ECOFF and must be contigues. The volume header also
occupies the first 512 byte of the ISO and contains some informations
about a special partition "8" the volume headers file storage
and filenames + block start + size. Now - We create a fake "Volume
Header" with the special partition 8 covering the WHOLE iso9660
filesystem. Then we put a special file into the filestorages directory
which is basically the ECOFF kernel + ramdisk image. Goal is here
to also use arcboot to load the ELF kernels as we want to go away
from having to build ECOFF kernels. 

Booting the kernel directly from the first 512 byte is something
very ugly and hackish. It works as long as you know how this is supposed
to work - You dont even get a sensible error message if booted on the
wrong machine - I guess it simply crashes (Decstations may produce
something like - "This is a Decstation 5000/1xx - Please compile with 
correct options").

Florian Lohoff                  flo@rfc822.org             +49-5201-669912
Nine nineth on september the 9th              Welcome to the new billenium

Attachment: pgp3qO6uVolQf.pgp
Description: PGP signature

Reply to: