On 11.08.2009, at 23:13, Laurent Vivier Laurent@vivier.eu wrote:
Hi,
the attached patch allows to boot using "boot hd:%BOOT". This is the method used by OldWorld bootloader, Quik.
As I've only tested it with PPC target, I'd like to have some comments before commiting it (If someone can test sparc, I'll be happy).
Since it is part of PPC only CHRP, I think it should be fine to make sure the code is only used on PPC, I believe...
It is not as simple as it seems...
All the work is made in mac-parts.c (only used by CHRP), but to do the work it needs to know the filename ("%BOOT"). Until now, disk-label.c (common part) sends a string with only the partition number to the partition module. So this patch modifies disk-label.c to pass the partition number AND the filename. This is the part which can break other architectures. But as it seems all partition managers are using atol() on the argument to find the partition number, it should work fine even if the partition number is followed by a filename.
I think I'll commit this this evening.
Regards, Laurent