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

Re: Any progress with grub-installer?



Dear Adrian,

On 1/6/19 20:52, John Paul Adrian Glaubitz wrote:
Hi!

I haven't been following the discussion regarding GRUB on PowerPC lately
as I was busy with upstream fixes on Rust, LibreOffice and some Debian
packages, so please apologize for my ignorance.

Has there been any progress made regarding GRUB on PowerPC?

Sure, I have a patch set ready that enables GRUB installation on PowerPC. It uses a different bootstrap method (from FAT16 on MBR partitioned disk instead of HFS on Apple partitioned disk, due to current issues with the ppc64 version of `hfsprogs` on G5 and the advantage of non-dependency on possibly unmaintained code/packages for the Debian installer). The patch set works well on Mac mini G4 and Power Mac G5 (11,2) so far and is pretty small - because it doesn't depend on HFS as bootstrap FS - compared to my earlier one from late 2017.

See the thread starting at [1] and [2] for information about the actual patch set for all details.

[1]: https://lists.debian.org/debian-powerpc/2018/12/msg00053.html

[2]: https://lists.debian.org/debian-powerpc/2018/12/msg00054.html

In particular,
do we have a solution for the "ofpath" script or should we just include the
working on from Yaboot into the Debian GRUB package.

Mathieu has provided patches to enable the use of GRUB's `grub-ofpathname` as replacement (linked from [3]). Up until these are in effect I'm using the still existing and installed `ofpath` in disguise. See [4] for the details.

[3]: https://lists.debian.org/debian-powerpc/2018/12/msg00041.html

[4]: https://salsa.debian.org/frank-scheiner-guest/grub-installer/commit/cfe145228adaa34aae780cbb527dce5408107083

Later we can patch [5] (which is part of `grub-install`) to use `grub-ofpathname` instead of IBM's `ofpathname`.

[5]: https://salsa.debian.org/grub-team/grub/blob/master/grub-core/osdep/unix/platform.c


Please note, you can just open pull request in Debian's Salsa project if you
have a patch ready :-).

I have opened one already, but would like to have my patches reviewed first or at least get some comments on them.


I think I will work on GRUB on SPARC next to address the build issues there.

Before re-enabling COFF for GRUB, we could look into GRUB as ELF on sparc64, because looking at OpenBSD, their second stage bootloader is actually an ELF binary:

```
root@nfs:/srv/nfs/openbsd/6.3/sparc64# file ofwboot.net
ofwboot.net: ELF 64-bit MSB executable, SPARC V9, relaxed memory ordering, version 1 (SYSV), statically linked, stripped

root@nfs:/srv/nfs/openbsd/6.3/sparc64# file bsd.mp
bsd.mp: ELF 64-bit MSB executable, SPARC V9, total store ordering, version 1 (SYSV), statically linked, not stripped
```

...so the sparc64 firmware seems to also support ELF binaries. And according to [6] this seems to work for a lot of systems. If an ELF version of GRUB can be provided by someone, I have a lot of sparc64 gear to test on - though not as many as OpenBSD supports ;-).

[6]: http://www.openbsd.org/sparc64.html

Cheers,
Frank


Reply to: