grub-devel
[Top][All Lists]
Advanced

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

Re: [patch] set prefix on PPC


From: Hollis Blanchard
Subject: Re: [patch] set prefix on PPC
Date: Tue, 15 Feb 2005 10:39:04 -0600

On Feb 14, 2005, at 1:01 PM, Marco Gerards wrote:

Hollis Blanchard <address@hidden> writes:

2) HFS has a concept called "blessed"; basically the firmware can
automatically find and boot blessed executables without needing to
specify a file name or even partition. Some versions of Mac OS
allegedly will unbless a non-Mac OS blessed file. For that reason,
ybin  prefers the HFS "bootstrap" partition be of a type that Mac OS
will not  mount (and so will not alter).

How is the file blessed and why does that make it a problem to keep
/boot on a HFS partition?

The file is blessed with hfsutils, spefically hattrib(1). I do not know if the in-kernel HFS(+) drivers allow for such changes (via ioctls for example). That will be worth investigating.

Actually it seems I was mistaken, and "blessed" refers to the directory rather than the file itself. I believe then the proper file to be booted is found from its 4-byte HFS file type, "tbxi" being the magic "Mac OS kernel" type.

What I would prefer is this:

1)  Set prefix to whatever was set in the binary.

This would involve more post-compilation ELF manipulation. To
accomplish that, if we do decide to go that route, I think it would be
worth converting the existing module segment into a more
general-purpose segment, containing all the added arguments.

Ok.  If we use your patch, this is not that important, I guess.  If it
works right that is.

Ok. I assume you want to test my patch and review it further, so I will wait for more comments before committing it.

3)  Read the arguments and if a prefix was passed to GRUB, use it to
    override the prefix.

For #3 I wrote a patch, but I forgot to send it to grub-devel... It's
included with this email.  As far as I am concerned #1 is what is
really important for us.

2005-02-13  Marco Gerards  <address@hidden>

        * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize the
        prefix env variable with the bootargs when it has a valid value.

I don't like that this assumes bootargs only contains the prefix. For
example, if we ever get our fancy debugging support, it would be very
nice to boot grub with "debug=all" as an argument.

I don't want to add a fancy parser yet.  At the moment we just use a
single argument.  If more will be used, this code has to be changed.

And in that case, the format of "bootargs" will have to change too. It's never too early to think about backwards compatibility, especially if people are thinking of packaging and distributing a grub2.deb... :)

        * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Don't
        initialize `init_addr' yet, set it to 0 instead.

Confused... how is this related to bootargs and prefix?

It is required to make GNU/Linux boot here, just like the bootargs
stuff. ;)

It is separated with a blank line to make clear they do not serve the
same purpose.

I thought each ChangeLog entry represented a distinct "changeset", with changesets being logically different changes to a group of files. The ChangeLog was explained to me as emulating a changeset in version control systems that lack the concept (such as CVS).

Since I believe the ChangeLog is an anachronism, I don't really care what it looks like or what format it's in. But since these changes are logically distinct, I believe they should at least be committed with separate "cvs commit" commands.

-Hollis





reply via email to

[Prev in Thread] Current Thread [Next in Thread]