Re: Bug#927892: grub-ieee1275-bin: Please add bootinfo.txt for sparc and sparc64
Hi!
On 4/27/19 5:02 PM, Mark Cave-Ayland wrote:
> Adrian: based upon this I think what you need to do is:
>
> - For consistency rename /boot/grub/sparc64.elf to /boot/grub/core.img to match
> the descriptions of the grub components in the documentation
Ok. But still generate it with grub-mkimage?
+ grub-mkimage -O sparc64-ieee1275-cdcore -p '()/boot/grub' \
+ -o $(TEMP_CD_INFO_DIR)/boot/grub/sparc64.elf \
+ $(GRUB_MODULES) $(GRUB_MODULES_CDROM)
> - Confirm that cdboot.img is the a.out executable generated by boot.S and diskboot.S
> (use dd and hexdump to check for the 0x01 0x03 0x01 0x07 signature in the first 4
> bytes)
glaubitz@kyoto:/usr/lib/grub/sparc64-ieee1275$ xxd cdboot.img |head -n2
00000000: 0103 0107 0000 01e0 0000 0000 0000 0000 ................
00000010: 0000 0000 0000 4000 0000 0000 0000 0000 ......@.........
glaubitz@kyoto:/usr/lib/grub/sparc64-ieee1275$
Yes.
> - In your second patch re-enable the -G/-B options but with -G set to cdboot.img:
> add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-G cdboot.img -B ..."
I set $CDDIR to the source directory which contains core.img? How does the initial
bootloader know that it has to boot core.img?
> Once this is done and the ISO image is generated, the basic setup can be checked as
> follows:
>
> - Use fdisk or similar tool to confirm that the Sun disk label exists at the
> start of the .iso with all 8 partitions starting at sector 0 with an end sector
> representing the contents of the whole CDROM image
>
> - Use dd and hexdump to confirm that cdboot.img appears 512 bytes into the .iso
> by checking for the 0x01 0x03 0x01 0x07 signature
>
> - Next check the offset and size of /boot/grub/core.img embedded in sector 1 using
> dd and hexdump. As per Thomas' message you should find the offset in bytes of
> the start of /boot/grub/core.img at offset 552 from the start of the .iso (64-bit
> big endian) and its size at offset 560 from the start of the .iso (32-bit big
> endian)
>
> - If everything is correct then again using dd and hexdump you should be able to
> see the ELF signature for core.img from the offset discovered above.
>
> Assuming all of this looks correct, then I believe that you should end up with a
> bootable CDROM image using grub...
Nice. I'll give it a shot tonight and report back.
Adrian
--
.''`. 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: