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

Re: Bug#927892: grub-ieee1275-bin: Please add bootinfo.txt for sparc and sparc64



On 4/25/19 9:30 AM, Mark Cave-Ayland wrote:
> Ah now I see - since your PROM supports gpt directly then that's how boot.S works.
> Presumably then it must be diskboot.S with blocklist support that gets used for older
> machines such as QEMU's sun4u?

Makes sense, yes.

> Okay so reviewing the genisoimage man page again I think you should be able to use
> the blocklist approach for the CDROM: install grub into /boot/grub/sparc64.elf on the
> ISO9660 partition, then generate a cdrom.img using diskboot.S that starts with your
> a.out bootloader and includes the block list for sparc64.elf taken from the ISO9660
> partition.

FWIW, the filename "sparc64.elf" is arbitrarily chosen by me and probably wrong
anyway. Looking at the sources for grub-install [1], the proper name would probably
be "boot.img".

> The part that needs to be checked here is whether diskboot.S (and indeed your PROM
> disk and cdrom aliases) contain the slice because the blocklist needs to come from
> the "raw" disk device since sparc64.elf is being pulled from a different slice.
> Adding some code to boot.S to display bootpath will be helpful here. But then
> presumably this is the same as the blocklist configuration above anyhow?

I have read the genisoimage manpage and I have to admit, I haven't fully understood
yet how it is supposed to work. It seems we have to specify the bootloader code
with -G, thus -G cdboot.img. But -B is apparently used to pass a whole directory
name which means I don't understand how genisoimage knows which is the second
stage bootloader.

For SILO, the design seems more obvious with the path of the second stage boot
loader hardcoded into the source code [2]. But for GRUB, I still don't understand
how it's supposed to work. Maybe it has "boot.img" hardcoded somewhere and tries
to load boot.img from the partition specified with -B.

Adrian

> [1] http://git.savannah.gnu.org/cgit/grub.git/tree/util/grub-install.c#n1719
> [2] https://git.kernel.org/pub/scm/linux/kernel/git/davem/silo.git/tree/first-isofs/isofs.c

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


Reply to: