[OpenBIOS] [PATHC][RFC] OldWorld Booting Method

Laurent Vivier laurent at vivier.eu
Wed Aug 12 17:00:57 CEST 2009


>
>
>On 11.08.2009, at 23:13, Laurent Vivier <Laurent at 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
-- 
--------------------- Laurent at vivier.eu  ---------------------
"Tout ce qui est impossible reste à accomplir"    Jules Verne
"Things are only impossible until they're not" Jean-Luc Picard



More information about the OpenBIOS mailing list