From: Maurizio Boriani <baux@gnu.org>
To: "Grub Devel" <grub-devel@gnu.org>
Subject: grub on ppc -- a CHRP script
Date: Wed, 25 May 2005 18:49:46 +0200 [thread overview]
Message-ID: <87ll63l07p.fsf@yahoo.it> (raw)
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 <=
next reply other threads:[~2005-05-25 16:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-25 16:49 Maurizio Boriani [this message]
2005-05-26 1:30 ` grub on ppc -- a CHRP script 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ll63l07p.fsf@yahoo.it \
--to=baux@gnu.org \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.