All of lore.kernel.org
 help / color / mirror / Atom feed
* grub on ppc -- a CHRP script
@ 2005-05-25 16:49 Maurizio Boriani
  2005-05-26  1:30 ` Hollis Blanchard
  2005-05-26  6:47 ` Marco Gerards
  0 siblings, 2 replies; 8+ messages in thread
From: Maurizio Boriani @ 2005-05-25 16:49 UTC (permalink / raw)
  To: Grub Devel


Hi,
        I'm back after a period of hard work :)

I tried grub2 on my ppc (apple iBook g3) but I don't
like to change openfw boot-device var every time (I use
the same laptop for my daily stuff) as suggested in
grub wiki. 

So written a CHRP script which permit to choose 
yaboot or GRUB2, here it is:

-- cut

<CHRP-BOOT>
<COMPATIBLE>
MacRISC MacRISC3 MacRISC4
</COMPATIBLE>
<BOOT-SCRIPT>
: bx-boot-opts 2 ;
: bx-boot-wait d# 100 ; \ unit = 100 ms
: bx-boot-defopt 1 ;
: bx-display-menu ( -- )
  ." Boot Loaders menu"		cr
  ." 1: yaboot"			cr
  ." 2: GRUB2"			cr
;
: bx-boot-choose ( num -- )
  case
    1 of " /pci@f2000000/mac-io@17/ata-4@1f000/disk@0:2,\\yaboot"		endof
    2 of " /pci@f2000000/mac-io@17/ata-4@1f000/disk@0:2,\\grubof.modules"	endof
  endcase
  ['] $boot catch drop
  user-abort
;
: bx-read-num ( wait-period max-boot-num def-opt -- boot-num )
  1 \ loop-inc = 1
  3 pick 0 do
    0d emit
    ." press 1-"
    ( wait-period max-boot-num def-opt loop-inc )
    2 pick ascii 0 + emit
    dup 1 = if
      ."  within "
      3 pick i - d# 10 / .d
      ."  seconds"
    then
    ."  (default: "
    over ascii 0 + emit
    ." ) :                   "
    d# 100 ms
    key? if
       key
       ( wait-period max-boot-num def-opt loop-inc key )
       dup 0d = if \ return pressed
         drop leave
       then

       ascii 0 -
       ( wait-period max-boot-num def-opt loop-inc num )
       dup 0 5 pick
       ( wait-period max-boot-num def-opt loop-inc num num 0 max-boot-num )
       between if
         rot drop swap leave
       then

       ( wait-period max-boot-num def-opt loop-inc num )
       2drop 0  \ loop-inc = 0
    then
  dup +loop
  drop
  ( wait-period max-boot-num boot-num )
  nip nip
;

load-base release-load-area
stdout @ 0 = if
  false to _normal-boot install-console
then
true to use-console? false to ignore-output?
dev /multiboot
  flash-dev-icon-off
device-end
erase-screen

bx-display-menu
bx-boot-wait bx-boot-opts bx-boot-defopt bx-read-num
bx-boot-choose
</BOOT-SCRIPT>
</CHRP-BOOT>

-- cut

using hfs tools, overwrite this (after fix it with
your disk real path) on ofboot.b installed by
yaboot (use 'hcopy -r' and 'hattrib' to fix attributes),
reboot and a boot loader chooser will be displayed.

An example :

hmount /dev/<hfs partition"
hrcopy -r myofboot.b :ofboot.b
hrcopy -r grubof.modules :grubof.modules
hrcopy -r grub.cfg :grub.cfg

hattrib -t tbxi -c UNIX :ofboot.b
hattrib -t boot -c UNIX :grubof.modules
hattrib -t conf -c UNIX :grub.cfg

hattrib -b :
humount

This works for me, let me know if something wrong on your
hosts.

If someone isn't already doing, I'm going to write a reiserfs
module (let me know). 

Also what about multiboot specification support in grub2? 
Is available (on ppc and ia32)? If not why ? :)

thanks,


-- 
Maurizio Boriani 
GPG key: 0xCC0FBF8F
 => E429 A37C 5259 763C 9DEE  FC8B 5D61 C796 CC0F BF8F <=




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: grub on ppc -- a CHRP script
  2005-05-25 16:49 grub on ppc -- a CHRP script Maurizio Boriani
@ 2005-05-26  1:30 ` Hollis Blanchard
  2005-05-26  6:50   ` Marco Gerards
  2005-05-26  6:47 ` Marco Gerards
  1 sibling, 1 reply; 8+ messages in thread
From: Hollis Blanchard @ 2005-05-26  1:30 UTC (permalink / raw)
  To: The development of GRUB 2

Hi!

On May 25, 2005, at 11:49 AM, Maurizio Boriani wrote:
>
> I tried grub2 on my ppc (apple iBook g3) but I don't
> like to change openfw boot-device var every time (I use
> the same laptop for my daily stuff) as suggested in
> grub wiki.
>
> So written a CHRP script which permit to choose
> yaboot or GRUB2, here it is:
<snip>

Nice... I just wish such scripts could be simpler. :)

Personally I don't mind booting to OF and typing "boot hd:6,yaboot" as 
needed, but that's just me. Perhaps you could add your script to the 
wiki, maybe on its own page?

> If someone isn't already doing, I'm going to write a reiserfs
> module (let me know).

There has been at least one request for that already, so I think it 
would be welcome. Marco has done most of the filesystem stuff so far, 
but I think is unavailable for further work until July.

> Also what about multiboot specification support in grub2?
> Is available (on ppc and ia32)? If not why ? :)

The multiboot spec is still x86-specific. There is multiboot loader for 
x86 in GRUB2, but I don't know how much testing it's seen. I am working 
on a project which will eventually require multiboot for PPC, but as 
far as I know there have been no other requests for it...

If you are looking for things to work on, the PPC section of the TODO 
list (http://www.autistici.org/grub/moin.cgi/TodoList) is up-to-date. I 
have been working on the devalias filtering. Actually, I think the 
devalias filtering was misprioritized (my fault), but there are a lot 
of critical items on that list, some large, some small...

-Hollis




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: grub on ppc -- a CHRP script
  2005-05-25 16:49 grub on ppc -- a CHRP script Maurizio Boriani
  2005-05-26  1:30 ` Hollis Blanchard
@ 2005-05-26  6:47 ` Marco Gerards
  2005-05-26  7:26   ` Maurizio Boriani
  1 sibling, 1 reply; 8+ messages in thread
From: Marco Gerards @ 2005-05-26  6:47 UTC (permalink / raw)
  To: The development of GRUB 2

Maurizio Boriani <baux@gnu.org> writes:

> If someone isn't already doing, I'm going to write a reiserfs
> module (let me know). 

It was on my todo, but I won't have the time for it anytime soon.
So, feel free to work on this.

> Also what about multiboot specification support in grub2? 
> Is available (on ppc and ia32)? If not why ? :)

Not yet on the PPC.  This is something I'd like to work on during my
summer holidays.

Thanks,
Marco




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: grub on ppc -- a CHRP script
  2005-05-26  1:30 ` Hollis Blanchard
@ 2005-05-26  6:50   ` Marco Gerards
  0 siblings, 0 replies; 8+ messages in thread
From: Marco Gerards @ 2005-05-26  6:50 UTC (permalink / raw)
  To: The development of GRUB 2

Hollis Blanchard <hollis@penguinppc.org> writes:

>> Also what about multiboot specification support in grub2?
>> Is available (on ppc and ia32)? If not why ? :)
>
> The multiboot spec is still x86-specific. There is multiboot loader
> for x86 in GRUB2, but I don't know how much testing it's seen. I am
> working on a project which will eventually require multiboot for PPC,
> but as far as I know there have been no other requests for it...

Multiboot for the PC works for me.  I can boot GNU/Hurd with it.

There have been quite a lot requests for it, but I am not sure if that
was on the list or on IRC.  People want/need multiboot for the PPC.

Thanks,
Marco




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: grub on ppc -- a CHRP script
  2005-05-26  6:47 ` Marco Gerards
@ 2005-05-26  7:26   ` Maurizio Boriani
  2005-06-20  9:34     ` Maurizio Boriani
  2005-06-21  2:58     ` PPC multiboot Hollis Blanchard
  0 siblings, 2 replies; 8+ messages in thread
From: Maurizio Boriani @ 2005-05-26  7:26 UTC (permalink / raw)
  To: The development of GRUB 2

>>>>> "Marco" == Marco Gerards <metgerards@student.han.nl> writes:

    Marco> Maurizio Boriani <baux@gnu.org> writes:
    >> If someone isn't already doing, I'm going to write a reiserfs
    >> module (let me know).

    Marco> It was on my todo, but I won't have the time for it anytime
    Marco> soon.  So, feel free to work on this.

ok, apply for this :)

    >> Also what about multiboot specification support in grub2?  Is
    >> available (on ppc and ia32)? If not why ? :)

    Marco> Not yet on the PPC.  This is something I'd like to work on
    Marco> during my summer holidays.

ok :)

    Marco> Thanks, Marco

Thanks,

-- 
Maurizio Boriani 
GPG key: 0xCC0FBF8F
 => E429 A37C 5259 763C 9DEE  FC8B 5D61 C796 CC0F BF8F <=




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: grub on ppc -- a CHRP script
  2005-05-26  7:26   ` Maurizio Boriani
@ 2005-06-20  9:34     ` Maurizio Boriani
  2005-06-21  2:58     ` PPC multiboot Hollis Blanchard
  1 sibling, 0 replies; 8+ messages in thread
From: Maurizio Boriani @ 2005-06-20  9:34 UTC (permalink / raw)
  To: The development of GRUB 2

>>>>> "Maurizio" == Maurizio Boriani <baux@gnu.org> writes:

    >>> If someone isn't already doing, I'm going to write a reiserfs
    >>> module (let me know).

    Marco> It was on my todo, but I won't have the time for it anytime
    Marco> soon.  So, feel free to work on this.

    Maurizio> ok, apply for this :)

due to an heavy real life work activity, I will not be able to hack 
on this until September. So, feel free to work on reiserfs grub module.

bye


-- 
Maurizio Boriani 
GPG key: 0xCC0FBF8F
 => E429 A37C 5259 763C 9DEE  FC8B 5D61 C796 CC0F BF8F <=




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: PPC multiboot
  2005-05-26  7:26   ` Maurizio Boriani
  2005-06-20  9:34     ` Maurizio Boriani
@ 2005-06-21  2:58     ` Hollis Blanchard
  2005-06-21 11:46       ` Marco Gerards
  1 sibling, 1 reply; 8+ messages in thread
From: Hollis Blanchard @ 2005-06-21  2:58 UTC (permalink / raw)
  To: The development of GRUB 2

On May 26, 2005, at 2:26 AM, Maurizio Boriani wrote:
>
>>> Also what about multiboot specification support in grub2?  Is
>>> available (on ppc and ia32)? If not why ? :)
>
>     Marco> Not yet on the PPC.  This is something I'd like to work on
>     Marco> during my summer holidays.
>
> ok :)

Has anybody looked at multiboot for PPC yet? I think I'm getting close 
to needing it for work, so if not I may just temporarily hack 
something, using the existing x86-centric data structures.

-Hollis




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: PPC multiboot
  2005-06-21  2:58     ` PPC multiboot Hollis Blanchard
@ 2005-06-21 11:46       ` Marco Gerards
  0 siblings, 0 replies; 8+ messages in thread
From: Marco Gerards @ 2005-06-21 11:46 UTC (permalink / raw)
  To: The development of GRUB 2

Hollis Blanchard <hollis@penguinppc.org> writes:

> On May 26, 2005, at 2:26 AM, Maurizio Boriani wrote:
>>
>>>> Also what about multiboot specification support in grub2?  Is
>>>> available (on ppc and ia32)? If not why ? :)
>>
>>     Marco> Not yet on the PPC.  This is something I'd like to work on
>>     Marco> during my summer holidays.
>>
>> ok :)
>
> Has anybody looked at multiboot for PPC yet? I think I'm getting close
> to needing it for work, so if not I may just temporarily hack
> something, using the existing x86-centric data structures.

Not yet.

--
Marco




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-06-21 12:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-25 16:49 grub on ppc -- a CHRP script Maurizio Boriani
2005-05-26  1:30 ` Hollis Blanchard
2005-05-26  6:50   ` Marco Gerards
2005-05-26  6:47 ` Marco Gerards
2005-05-26  7:26   ` Maurizio Boriani
2005-06-20  9:34     ` Maurizio Boriani
2005-06-21  2:58     ` PPC multiboot Hollis Blanchard
2005-06-21 11:46       ` Marco Gerards

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.