Subject: Re: new 8600 motherboard
To: None <port-macppc@NetBSD.org>
From: Tim Kelly <hockey@dialectronics.com>
List: port-macppc
Date: 08/26/2004 21:27:26
>> - At the risk of putting forth problematic information, I've sucessfully
>> booted the NetBSD installer by putting OFWBOOT.XCF on one disk and then
>> told it to boot the kernel from the install CD. I do not know if this
>> would work with OFW 1.X, though.
>It probably would work, but it requires a lot of specific instruction.
Actually, I may be of assistance here. I've been working on decoupling the bootloader location from the kernel location in the bootloader, so that it is not necessary to have both together, or even on the same type of media. At the bottom is a session capture on a 7300 with the bootloader with today's revisions. The bootloader is on a floppy and the install ramdisk is on a tftp server on the local network. I have tested it against OpenBSD's GENERIC, but I do not have a method at the moment for testing it against NetBSD. (I am trying to get that resolved.) If someone would like to test it, I would appreciate it.
In addition to the decoupling, I have added tftp loading of the kernel instead of NFS (easier for rapid testing of kernel changes) and dynamic enabling of backside L2 caches on aftermarket CPU cards that do not contain enough ROM code for Open Firmware to do this (as is the case with something like a ZIF Carrier card, where the CPU may have a wide range of possibilities).
The bootloader is at
http://www.dialectronics.com/bootloader/boot24z1.mac
It also has the change suggested by Izumi Tsutsui to use a bootloader local stack instead of the Open Firmware provided one.
The general approach that I use is to get Open Firmware to load the target kernel (GENERIC or RAMDISK) into memory first and then fake a file system to get libsa load it into the appropriate location. I have removed the hfs strategy completely and used this one for both network and block devices. I would characterize it as highly experimental, but I have tested it against 1.5.3 and 1.6.1 INSTALL in NetBSD and GENERIC 3.5 and my own RAMDISK kernel for Old World Macs in OpenBSD.
The code is at
http://www.dialectronics.com/bootloader/code/of_mfs.c
I don't have diffs - the code is OpenBSD based and wouldn't go cleanly into NetBSD. I'm working toward a true standalone product.
Comments and feedback appreciated.
tim
Open Firmware, 1.0.5
To continue booting the MacOS type:
BYE<return>
To continue booting from the default boot device type:
BOOT<return>
ok
0 > boot fd:,\boot24z1.mac enet:,\netbsd.rd loading XCOFF
tsize=A320 dsize=25C bsize=748 entry=24000
SECTIONS:
text 00024000 00024000 0000A320 000000E0
data 0002F000 0002F000 0000025C 0000A400
bss 0002F260 0002F260 00000748 00000000
loading .text, done..
loading .data, done..
clearing .bss, done..
>> OpenBSD/macppc Boot
configuring L1/L2/L3 caches...no backside L2 cache present...
unable to determine proper L2 cache value.
file: 192.168.10.99,/netbsd.rd
of_mfs.c: open
bootpath: fd:,\boot24z1.macs: enet:,\netbsd.rd
full path
load enet:,\netbsd.rd...
fi.10.99,/netbsd.rd
d.rd opened...
1500783 bytes loaded!
Kernel file opened...
Header read...
Executing ELF file...
Reading segment 0...3881664+147164
Zero out bss...
BSS maxp...
End of segment 0 pass...
FREE phdr...
ELF and Section Headers...
Frobbing...
Returned from elf_exec...=4176620 (0x3fbaecu)
chaining...Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002
The NetBSD Foundation, Inc. All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.
NetBSD 1.6.1 (INSTALL) #0: Tue Apr 8 15:11:16 UTC 2003
autobuild@tgm.daemon.org:/autobuild/netbsd-1-6/macppc/OBJ/autobuild/netbsd-
1-6/s
rc/sys/arch/macpp
c/compile/INSTALL
total memory = 128 MB
avail memory = 110 MB
using 1664 buffers containing 6656 KB of memory
no active packagemainbus0 (root)
cpu0 at mainbus0: 604ev (Revision 2.4), ID 0 (primary)
cpu0: HID0 8090c084<EMCP,DOZE,DPM,ICE,DCE,SGE,BHT>
bandit0 at mainbus0
pci0 at bandit0 bus 0
pci0: i/o space, memory space enabled
pchb0 at pci0 dev 11 function 0
pchb0: vendor 0x106b product 0x0001 (rev. 0x03)
sip0 at pci0 dev 15 function 0: NatSemi DP83815 10/100 Ethernet, rev 00
sip0: interrupting at irq 25
sip0: Ethernet address 00:00:94:cb:df:4c
nsphyter0 at sip0 phy 0: DP83815 10/100 media interface, rev. 1
nsphyter0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
obio0 at pci0 dev 16 function 0: addr 0xf3000000
esp0 at obio0 offset 0x10000 irq 12: NCR53C94, 25MHz, SCSI ID 7
scsibus0 at esp0: 8 targets, 8 luns per target
mc0 at obio0 offset 0x11000: irq 14,2,3: address 00:a0:40:71:3e:86
zsc0 at obio0 offset 0x13000: irq 15,16
zstty0 at zsc0 channel 0 (console)
zstty1 at zsc0 channel 1
awacs at obio0 offset 0x14000 not configured
swim3 at obio0 offset 0x15000 not configured
adb0 at obio0 offset 0x16000 irq 18: 2 targets
akbd0 at adb0 addr 2: extended keyboard
wskbd0 at akbd0 (mux ignored)
adb0 addr 3: relative positioning device (1) not configured
mesh0 at obio0 offset 0x18000 irq 13: 50MHz, SCSI ID 7
scsibus1 at mesh0: 8 targets, 8 luns per target
nvram0 at obio0 offset 0x1d000
bandit1 at mainbus0
pci1 at bandit1 bus 1
pci1: i/o space, memory space enabled
ofb0 at pci1 dev 11 function 0: vendor 0x106b product 0x0003
ofb0: 640 x 480, 8bpp
wsdisplay0 at ofb0 (kbdmux ignored)
scsibus0: waiting 2 seconds for devices to settle...
sd0 at scsibus0 target 5 lun 0: <IOMEGA, ZIP 100, D.09> SCSI2 0/direct
removable
sd0: 98304 KB, 96 cyl, 64 head, 32 sec, 512 bytes/sect x 196608 sectors
sd0: async, 8-bit transfers
scsibus1: waiting 2 seconds for devices to settle...
sd1 at scsibus1 target 0 lun 0: <SEAGATE, ST32430N, 0492> SCSI1 0/direct
fixed
sd1: 2047 MB, 3992 cyl, 9 head, 116 sec, 512 bytes/sect x 4193415 sectors
cd0 at scsibus1 target 3 lun 0: <MATSHITA, CD-ROM CR-8012, 1.0g> SCSI2
5/cdrom removable
sd2 at scsibus1 target 6 lun 0: <IBM, DNES-309170Y, SAK0> SCSI3 0/direct
fixed
sd2: 8748 MB, 11474 cyl, 5 head, 312 sec, 512 bytes/sect x 17916240 sectors
md0: internal 2048 KB image area
boot device: mc0
root on md0a dumps on md0b
WARNING: clock gained 506 days -- CHECK AND RESET THE DATE!
root file system type: ffs
erase ^H, werase ^W, kill ^U, intr ^C, status ^T
Terminal type? [vt100]
Erase is backspace.
(I)nstall, (S)hell or (H)alt ? s
# l
l: not found
# ls
profile dev etc mnt sbin tmp var
bin dist kern mnt2 sysinst usr
# reboot
Aug 26 17:03:04 reboot: rebooted by root
syncing disks... done
rebooting
--