Subject: netboot via native bootloader
To: None <port-cobalt@NetBSD.org>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: port-cobalt
Date: 10/27/2007 04:19:12
Today I've been trying to add netboot support to the cobalt
native bootloader, using a standalone tulip (2114x Ethernet)
driver for sandpoint which has been committed by Tohru Nishimura:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/sandpoint/stand/netboot/tlp.c

After ~six hour debugging, now it can load a GENERIC kernel
via tlp0 and bootp properly :-)

---
Cobalt Microserver Diagnostics - 'We serve it, you surf it'
Built Tue May 25 15:58:41 PDT 1999

 1.LCD Test................................PASS
 2.Controller Test.........................PASS
 5.Bank 0:.................................64M
 6.Bank 1:.................................64M
 7.Bank 2:.................................64M
 8.Bank 3:.................................64M
 9.Serial Test.............................PASS
10.PCI Expansion Slot....................**EMPTY**
12.IDE Test................................PASS
13.Ethernet Test...........................PASS
16.RTC Test................................PASS

Cobalt: bfd /boot.gz nfsroot=/r/export/NetBSD/cobalt/root
Decompressing done
Executing bootloader kernel...
Decompressing - done.

>> NetBSD/cobalt 4.99.34 Bootloader, Revision 0.4 [@0x80f00000]
>> (tsutsui@mirage, Sat Oct 27 03:27:29 JST 2007)
>> Memory:		262144 k
>> PROM boot string:	root=/dev/hda1 ro nfsroot=/r/export/NetBSD/cobalt/root 
bootstr_dev = wd0a, bootstr_kname = <NULL>
Boot [wd0a:netbsd]: nfs:netbsd.gz
prompt_dev = nfs, prompt_kname = netbsd.gz
dev = nfs, kname = netbsd.gz
kernel: netbsd.gz
Kernel names: 0x80f0e7c0
Loading: nfs:netbsd.gz
patch_bootstring: nfs:netbsd.gz
patch_bootstring: 0, 0
patch_bootstring: [ ro nfsroot=/r/export/NetBSD/cobalt/root ]
patch_bootstring: ->  ro nfsroot=/r/export/NetBSD/cobalt/root  root=/dev/hda1
devopen(nfs:netbsd.gz)
loading nfs:/netbsd.gz
tlp_init: CSR = 0x10100000
trying BOOTP...
3499856+195416 [198416+193153]=0x3e6058
Adding 2 of size 88 @0x80f0f2ec
Adding 3 of size 20 @0x80f0f344
Adding 4 of size 12 @0x80f0f358
Adding 5 of size 12 @0x80f0f364
Bootinfo @ 0x80f0f2e0
Starting at 0x80001000

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007
    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 4.99.34 (GENERIC) #18: Sat Oct 27 03:45:51 JST 2007
	tsutsui@mirage:/usr/src/sys/arch/cobalt/compile/GENERIC
Cobalt RaQ 2
total memory = 256 MB
avail memory = 246 MB
mainbus0 (root)
com0 at mainbus0 addr 0x1c800000 level 3: st16650a, working fifo
com0: console
cpu0 at mainbus0: QED RM5200 CPU (0x28a0) Rev. 10.0 with built-in FPU Rev. 10.0
cpu0: 32KB/32B 2-way set-associative L1 Instruction cache, 48 TLB entries
cpu0: 32KB/32B 2-way set-associative write-back L1 Data cache
mcclock0 at mainbus0 addr 0x10000070: mc146818 compatible time-of-day clock
panel0 at mainbus0 addr 0x1f000000
gt0 at mainbus0 addr 0x14000000
pci0 at gt0
pci0: i/o space, memory space enabled, rd/line, wr/inv ok
pchb0 at pci0 dev 0 function 0: Galileo GT-64111 System Controller, rev 1
tlp0 at pci0 dev 7 function 0: DECchip 21143 Ethernet, pass 4.1
tlp0: interrupting at level 1
tlp0: Ethernet address 00:10:e0:00:5e:95
lxtphy0 at tlp0 phy 1: LXT970 10/100 media interface, rev. 3
lxtphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
siop0 at pci0 dev 8 function 0: Symbios Logic 53c860 (ultra scsi)
siop0: interrupting at irq 4
scsibus0 at siop0: 8 targets, 8 luns per target
pcib0 at pci0 dev 9 function 0
pcib0: VIA Technologies VT82C586 PCI-ISA Bridge, rev 37
viaide0 at pci0 dev 9 function 1
viaide0: VIA Technologies VT82C586 (Apollo VP) ATA33 controller
viaide0: primary channel interrupting at irq 14
atabus0 at viaide0 channel 0
viaide0: secondary channel interrupting at irq 15
atabus1 at viaide0 channel 1
VIA Technologies VT83C572 USB Controller (USB serial bus, revision 0x02) at pci0 dev 9 function 2 not configured
tlp1 at pci0 dev 12 function 0: DECchip 21143 Ethernet, pass 4.1
tlp1: interrupting at level 2
tlp1: Ethernet address 00:10:e0:00:5e:97
lxtphy1 at tlp1 phy 1: LXT970 10/100 media interface, rev. 3
lxtphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
Kernelized RAIDframe activated
scsibus0: waiting 2 seconds for devices to settle...
wd0 at atabus0 drive 0: <IBM-DTTA-351680>
wd0: 16124 MB, 32760 cyl, 16 head, 63 sec, 512 bytes/sect x 33022080 sectors
boot device: tlp0
root on tlp0
nfs_boot: trying DHCP/BOOTP
nfs_boot: DHCP next-server: 192.168.20.1
nfs_boot: my_domain=ceres.dti.ne.jp
nfs_boot: my_addr=192.168.20.28
nfs_boot: my_mask=255.255.255.0
nfs_boot: gateway=192.168.20.1
root on mirage:/r/export/NetBSD/cobalt/root
root file system type: nfs
/etc/rc.conf is not configured.  Multiuser boot aborted.
Enter pathname of shell or RETURN for /bin/sh: 
Terminal type? [unknown] 
Terminal type is unknown.
We recommend creating a non-root account and using su(1) for root access.
# 

---

Current my working sources are too ugly so I'll post
a patch after some more cleanup in a few days.
---
Izumi Tsutsui