Subject: Re: How to boot netBSD on the Intel IQ80321 board ...
To: David Francheski <davidf@caymas.com>
From: Jason R Thorpe <thorpej@wasabisystems.com>
List: port-arm
Date: 06/07/2002 20:23:16
On Mon, Jun 03, 2002 at 11:35:51AM -0700, David Francheski wrote:

 > Hello,

Hi :-)

 > I'm in the process of booting Jason Thorpe's netBSD implementation on
 > Intel's IQ80321 eval board.

 .
 .
 .

 > Can anybody help me with how to boot using netBSD?
 > 
 > I'm not that familiar with RedBoot (perhaps it's a simple matter).

Some basic RedBoot info can be found here:

	http://sources.redhat.com/ecos/docs-latest/redboot/redboot.html

...but here's a quick walk-through of how to set your machine up to
use BOOTP and TFTP.

Ethernet eth0: MAC address 00:07:e9:03:38:40
IP: 208.176.2.165, Default server: 208.176.2.162

RedBoot(tm) bootstrap and debug environment [ROM]
Non-certified release, version UNKNOWN - built 11:21:56, Feb  1 2002

Platform: IQ80321 (XScale) 
Copyright (C) 2000, 2001, 2002, Red Hat, Inc.

RAM: 0x00000000-0x08000000, 0x00017008-0x01ddd000 available
FLASH: 0xf0000000 - 0xf0800000, 64 blocks of 0x00020000 bytes each.
RedBoot> 

...this is my Verde board powered up.  Use the "fconfig" command
to configure the RedBoot params stored in flash:

RedBoot> fconfig
Run script at boot: false
Use BOOTP for network configuration: true
Console baud rate: 115200
DNS server IP address: 
GDB connection port: 9000
Force console for special debug messages: false
Network debug at boot time: false
Update RedBoot non-volatile configuration - are you sure (y/n)? y
... Unlock from 0xf07c0000-0xf07c1000: .
... Erase from 0xf07c0000-0xf07c1000: .
... Program from 0x01dde000-0x01ddf000 at 0xf07c0000: .
... Lock from 0xf07c0000-0xf07c1000: .
RedBoot> 

...now reset or power cycle the board again.

RedBoot> reset
... Resetting.+Ethernet eth0: MAC address 00:07:e9:03:38:40
IP: 208.176.2.165, Default server: 208.176.2.162

RedBoot(tm) bootstrap and debug environment [ROM]
Non-certified release, version UNKNOWN - built 11:21:56, Feb  1 2002

Platform: IQ80321 (XScale) 
Copyright (C) 2000, 2001, 2002, Red Hat, Inc.

RAM: 0x00000000-0x08000000, 0x00017008-0x01ddd000 available
FLASH: 0xf0000000 - 0xf0800000, 64 blocks of 0x00020000 bytes each.
RedBoot> 

Now, I generally load S-record versions of kernels, because it
saves me typing in the load address and entry point :-)  So, put
the S-record copy of the kernel you want to load on your TFTP
server:

   server# cp netbsd-wm0.srec /tftpboot/netbsd-verde.srec

..and load it on the client:

RedBoot> load netbsd-verde.srec
Entry point: 0x00200000, address range: 0x00200000-0x00396cb8

...and then start it:

RedBoot> go

NetBSD/evbarm (IQ80321) booting ...
initarm: Configuring system ...
physmemory: 32768 pages at 0xa0000000 -> 0xa7ffffff
init subsystems: stacks vectors undefined pmap irq done.
[ using 158764 bytes of netbsd ELF symbol table ]
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.6A (IQ80321) #203: Fri Jun  7 14:48:52 PDT 2002
    thorpej@yeah-baby.shagadelic.org:/u1/netbsd/src/sys/arch/evbarm/compile/IQ80321
total memory = 128 MB
avail memory = 113 MB
using 1228 buffers containing 6656 KB of memory
mainbus0 (root)
cpu0 at mainbus0: i80321 400MHz step A-0 (XScale core)
cpu0: DC enabled IC enabled WB enabled LABT
cpu0: 32KB/32B 32-way Instruction cache
cpu0: 32KB/32B 32-way write-back-locking Data cache
obio0 at mainbus0
com0 at obio0 addr 0xfe800000: ns16550a, working fifo
com0: console
iopxs0 at mainbus0: i80321 I/O Processor, acting as PCI host
iopxs0: configuring PCI bus
pci0 at iopxs0 bus 0
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
wm0 at pci0 dev 4 function 0: Intel i82544 1000BASE-T Ethernet, rev. 2
wm0: interrupting at iop321 irq 27
wm0: Ethernet address 00:07:e9:03:38:40
makphy0 at wm0 phy 1: Marvell 88E1000 Gigabit PHY, rev. 0
makphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
clock: hz=100 stathz=0 profhz=0
boot device: <unknown>
root on wm0
nfs_boot: trying DHCP/BOOTP
nfs_boot: DHCP next-server: 208.176.2.162
nfs_boot: my_name=groovy-jumbo-jet.shagadelic.org
nfs_boot: my_domain=shagadelic.org
nfs_boot: my_addr=208.176.2.165
nfs_boot: my_mask=255.255.255.240
nfs_boot: gateway=208.176.2.161
root on 208.176.2.162:/u1/diskless/verde
Sat Jun  8 03:17:54 UTC 2002
Starting file system checks:
Setting tty flags.
Setting sysctl variables:
Starting network.
Hostname: groovy-jumbo-jet.shagadelic.org
NIS domainname: SHAG-NET
default              208.176.2.161        done
IPv6 mode: autoconfigured host
Configuring network interfaces: wm0.
add net default: gateway gw.shagadelic.org
Adding interface aliases:
Building databases...
kvm_mkdb: machdep.booted_kernel: the value is not available: No such file or directory
Starting syslogd.
Checking for core dump...
savecore: no core dump (no dumpdev)
Setting date via ntp.
Starting rpcbind.
Starting ypbind.
Mounting all filesystems...
Clearing /tmp.
Starting amd.
Creating a.out runtime link editor directory cache.
Checking quotas: done.
Starting statd.
Starting lockd.
Setting securelevel: kern.securelevel: 0 -> 1
swapctl: adding /swapfile as swap device at priority 0
Starting virecover.
starting local daemons:.
Updating motd.
Starting ntpd.
Starting rtsold.
Starting sshd.
Starting inetd.
Starting cron.
Sat Jun  8 03:18:15 UTC 2002

NetBSD/evbarm (groovy-jumbo-jet.shagadelic.org) (console)

login: 

You can also find more information on setting up a server for
a diskless (NFS root) client at:

	http://www.netbsd.org/Documentation/network/netboot/

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>