Subject: port-macppc/11435: Open Firmware OS boot select support
To: None <gnats-bugs@gnats.netbsd.org>
From: Y. Takizawa <you@nightbreak.org>
List: netbsd-bugs
Date: 11/06/2000 20:47:09
>Number: 11435
>Category: port-macppc
>Synopsis: Open Firmware OS boot select support
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: port-macppc-maintainer
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Mon Nov 06 20:47:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator: Y. Takizawa
>Release: 1.5 current
>Organization:
>Environment:
>Description:
Installing NetBSD/macppc, LinuxPPC and MacOS to my PowerBook G3,
I wrote an OS boot select script using Forth.
(Thanks to Mr. Tsubai for Forth programming)
It is better to describe on the macppc install documents
for `NewWorld' Macintosh.
>How-To-Repeat:
Using SimpleText on MacOS or hfsutils on NetBSD/macppc,
create a text file with the following code and put on
the top directory of the first HFS partition (can not
write CRs on the first lines).
<CHRP-BOOT>
<COMPATIBLE>
PowerMac2,1 PowerBook3,1
</COMPATIBLE>
<DESCRIPTION>
Open Firmware OS Boot Selector
</DESCRIPTION>
<BOOT-SCRIPT>
" get-key-map" " keyboard" open-dev $call-method
l@
case
00008000 of " boot hd:,\\:tbxi" endof
00010000 of " boot hd:,yaboot" endof
00004000 of " boot enet:0" endof
02000000 of " boot cd:,\\:tbxi" endof
00002000 of " noop" eval endof
drop " boot hd:,ofwboot.elf hd:10" 0
endcase
eval
</BOOT-SCRIPT>
</CHRP-BOOT>
This IS only sample code. Maybe you need some changes
for adapting to your environments, especially COMPATIBLE
referring the Open Firmware boot messages.
The case values mean `0000ABCD EFGHIJKL MNOPQRST UVWXYZ00''
which holding down is `1', or `0'. `00008000' means `M', `00010000'
is `L' and `0C000000' is holding down both `A' and `B' keys,
for example (I don't know values for space-bar, command and etc.)
`drop' line is default case.
Then, boot into the Open Firmware prompt to press down
Command-Option-O-F keys while booting, type:
setenv boot-device hd:,bootinfo
setenv boot-command boot
shut-down
which the above text file is named `bootinfo'.
You can boot MacOS, for example, to hold down 'M' key
while booting.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: