NetBSD-5.0.2/distrib/notes/evbarm/prep

.\"	$NetBSD: prep,v 1.9.2.1 2009/04/25 23:16:34 snj Exp $
.\"
.\" Copyright (c) 2001-2002 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.
First and foremost, before beginning the installation process,
.Em make sure you have a reliable backup
of any data on the target system that you wish to keep.
Mistakes in partitioning may lead to data loss.
.Ss2 Preparation for the Technologic Systems TS-7200
The TS-7200 uses RedBoot firmware which supports loading the kernel via
serial port and the on-chip Ethernet.
These notes assume that the Ethernet will be used to load the kernel.
RedBoot can either use TFTP or HTTP to load the kernel via the network.
.Pp
These notes also assume the the TS-7200 will be run from the CompactFlash;
that a FFS filesystem on the CompactFlash card will provide the root file
system.  The minimum size of the CompactFlash card is 64MB with 512MB being
the recommended minimum size if attempting a full installation.
.Pp
The first step to install 
.Nx
is to interrupt normal
system bootup and drop to the RedBoot prompt by hitting Ctrl-C immediately
after applying power.  To load both the installation kernel and the generic
post-installation TS7200 kernel you will need network connectivity from RedBoot which
you will have to configure using the RedBoot
.Ic fconfig 
command; see the RedBoot documentation for more information.
.Pp
A compressed kernel image and loader suitable for placing into
flash is provided with the distribution.
Use of this image is optional;
a kernel that can be directly loaded over the network
by RedBoot is also provided.
.Pp
The image for the TS-7200 can be found under the
.Nx*M
\*V distribution directory in
.Pa \*M/binary/gzimg/gzimg_TS7200_flash_0x60660000.gz ,
and corresponds to the kernel in
.Pa \*M/binary/kernel/netbsd-TS7200.gz .
The following steps
describe how to copy the compressed kernel image into flash.
.Pp
.(enum
Uncompress the gzimg file and place it into the TFTP server's
download area (note, the kernel inside the gzimg is still
compressed after this step).
.Pp
.Dl server# Ic gzcat gzimg_TS7200_flash_0x60660000.gz \*[Gt] /tftpboot/gzimg_TS7200_flash_0x60660000
.It
Load the gzimg from the TFTP server.
.Pp
.Bd -literal
RedBoot\*[Gt] load -r -b 0x00200000 gzimg_TS7200_flash_0x60660000
Raw file loaded 0x00200000-0x00605fe0
.Ed
.It
Use the RedBoot
.Ic fis
command to copy the image into flash.
For more information on the RedBoot
Flash Image System, see the RedBoot documentation.  The factory default
Linux image may already be present in flash and must be deleted before
continuing.
.Bd -literal
RedBoot\*[Gt] fis delete vmlinux
RedBoot\*[Gt] fis create -b 0x00200000 -f 0x60660000 -l 0x00160000 netbsd.gz
.Ed
.enum)
.Pp
Once the compressed kernel image has been copied into flash, it may
be started by jumping to the flash address of the image:
.Bd -literal
RedBoot\*[Gt] g 0x60660000
.Ed
.
.Ss2 Preparation for the Intel IQ80310
The IQ80310 uses RedBoot firmware from Red Hat, Inc.
RedBoot supports loading the kernel via the serial port and the on-board
Ethernet.
These notes assume that the Ethernet will be used to load the kernel.
RedBoot uses the Trivial File Transfer Protocol
(TFTP) to load the kernel via the network.
.Pp
These notes also assume that the IQ80310 will be run as a diskless
system; that an NFS server will provide the root file system.
The
.Nx
kernel uses the Dynamic Host Configuration Protocol (DHCP) to
obtain network address and root file system information.
.Pp
The first step is to configure your DHCP, NFS, and TFTP server
software.
You will need the MAC address for the on-board Ethernet,
which RedBoot can provide; see the RedBoot documentation for more
information.
.Pp
The next step is to configure RedBoot to obtain its IP address from
your DHCP server; see the RedBoot documentation for more information.
.Pp
Once your DHCP server and RedBoot are properly configured, you should
see information similar to the following when the IQ80310 is reset
or powered-up:
.Bd -literal
RedBoot(tm) debug environment - built 17:16:14, Feb 12 2001
Platform: IQ80310 (XScale)
Copyright (C) 2000, Red Hat, Inc.

RAM: 0xa0000000-0xa2000000
FLASH: 0x00000000 - 0x00800000, 64 blocks of 0x00020000 bytes each.
IP: 192.168.0.10, Default server: 192.168.0.1
RedBoot\*[Gt]
.Ed
.Pp
A compressed kernel image and loader suitable for placing into
flash is provided with the distribution.
Use of this image is optional;
a kernel that can be directly loaded over the network
by RedBoot is also provided.
.Pp
The image for the IQ80310 can be found under the
.Nx*M
\*V distribution directory in
.Pa \*M/binary/gzimg/gzimg_IQ80310_flash_0x00080000.gz ,
and corresponds to the kernel in
.Pa \*M/binary/kernel/netbsd-IQ80310.gz .
The following steps
describe how to copy the compressed kernel image into flash.
.Pp
.(enum
Uncompress the gzimg file and place it into the TFTP server's
download area (note, the kernel inside the gzimg is still
compressed after this step).
.Pp
.Dl server# Ic gzcat gzimg_IQ80310_flash_0x00080000.gz \*[Gt] /tftpboot/gzimg_IQ80310_flash_0x00080000
.It
Load the gzimg from the TFTP server.
.Pp
.Bd -literal
RedBoot\*[Gt] load -r -b 0xa0200000 gzimg_IQ80310_flash_0x00080000
Raw file loaded 0xa0200000-0xa0305fe0
.Ed
.It
Use the RedBoot
.Ic fis
command to copy the image into flash.
For more information on the RedBoot
Flash Image System, see the RedBoot documentation.
.Bd -literal
RedBoot\*[Gt] fis create -b 0xa0200000 -f 0x00080000 -l 0x00200000 netbsd.gz
.Ns ... Erase from 0x00080000-0x00280000: ....................
.Ns ... Program from 0xa0200000-0xa0400000 at 0x00080000: ....................
.Ns ... Unlock from 0x007e0000-0x00800000: .
.Ns ... Erase from 0x007e0000-0x00800000: .
.Ns ... Program from 0xa1fd0000-0xa1ff0000 at 0x007e0000: .
.Ns ... Lock from 0x007e0000-0x00800000: .
.Ed
.enum)
.Pp
Once the compressed kernel image has been copied into flash, it may
be started by jumping to the flash address of the image:
.Bd -literal
RedBoot\*[Gt] g 0x00080000

\*[Gt]\*[Gt] NetBSD/IQ80310 Gzip Boot, Revision 1.1
\*[Gt]\*[Gt] (root@tgm, Thu Mar 28 18:32:45 PST 2002)
\*[Gt]\*[Gt] RAM 0xa0000000 - 0xafffffff, heap at 0xaffd0000
\*[Gt]\*[Gt] Load address: 0xa0200000
\*[Gt]\*[Gt] Image size: 741244
Uncompressing image...done.
Jumping to image @ 0xa0200000...

NetBSD/evbarm (IQ80310) booting ...
Resetting secondary PCI bus...
initarm: Configuring system ...
physmemory: 65536 pages at 0xa0000000 -\*[Gt] 0xafffffff
init subsystems: stacks vectors undefined pmap irq done.
[ using 155084 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.5ZC (IQ80310) #20: Fri Mar 29 10:25:53 PST 2002
    root@tgm:/u1/netbsd/src/sys/arch/evbarm/compile/IQ80310
total memory = 256 MB
avail memory = 232 MB
using 1228 buffers containing 13208 KB of memory
mainbus0 (root)
cpu0 at mainbus0: i80200 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: board rev. F, CPLD rev. D, backplane present
com0 at obio0 addr 0xfe810000: ns16550a, working fifo
com0: console
com1 at obio0 addr 0xfe800000: ns16550a, working fifo
iopxs0 at mainbus0: i80312 Companion I/O, acting as PCI host
iopxs0: configuring Secondary PCI bus
pci0 at iopxs0 bus 1
pci0: i/o space, memory space enabled
ppb0 at pci0 dev 7 function 0: Digital Equipment DECchip 21154 PCI-PCI Bridge (rev. 0x05)
pci1 at ppb0 bus 2
pci1: i/o space, memory space enabled
fxp0 at pci1 dev 0 function 0: i82559S Ethernet, rev 9
fxp0: interrupting at iq80310 irq 1
fxp0: Ethernet address 00:80:4d:46:0b:b9
inphy0 at fxp0 phy 1: i82555 10/100 media interface, rev. 4
inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
clock: hz=100 stathz=0 profhz=0
boot device: \*[Lt]unknown\*[Gt]
root device:
.Ed
.
.Ss2 Preparation for the Intel IQ80321
The IQ80321 uses RedBoot firmware from Red Hat, Inc.
RedBoot supports loading the kernel via the serial port and the on-board
Ethernet.
These notes assume that the Ethernet will be used to load the kernel.
RedBoot uses the Trivial File Transfer Protocol
(TFTP) to load the kernel via the network.
.Pp
These notes also assume that the IQ80321 will be run as a diskless
system; that an NFS server will provide the root file system.
The
.Nx
kernel uses the Dynamic Host Configuration Protocol (DHCP) to
obtain network address and root file system information.
.Pp
The first step is to configure your DHCP, NFS, and TFTP server
software.
You will need the MAC address for the on-board Ethernet,
which RedBoot can provide; see the RedBoot documentation for more
information.
.Pp
The next step is to configure RedBoot to obtain its IP address from
your DHCP server; see the RedBoot documentation for more information.
.Pp
Once your DHCP server and RedBoot are properly configured, you should
see information similar to the following when the IQ80321 is reset
or powered-up:
.Bd -literal
Ethernet eth0: MAC address 00:07:e9:03:38:40
IP: 192.168.0.11, Default server: 192.168.0.1

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\*[Gt]
.Ed
.Pp
A compressed kernel image and loader suitable for placing into
flash is provided with the distribution.
Use of this image is optional;
a kernel that can be directly loaded over the network
by RedBoot is also provided.
.Pp
The image for the IQ80321 can be found under the
.Nx*M
\*V distribution directory in
.Pa \*M/binary/gzimg/gzimg_IQ80321_flash_0xf0080000.gz ,
and corresponds to the kernel in
.Pa \*M/binary/kernel/netbsd-IQ80321.gz .
The following steps
describe how to copy the compressed kernel image into flash.
.Pp
.(enum
Uncompress the gzimg file and place it into the TFTP server's
download area (note, the kernel inside the gzimg is still
compressed after this step).
.Pp
.Dl server# Ic gzcat gzimg_IQ80321_flash_0xf0080000.gz \*[Gt] /tftpboot/gzimg_IQ80321_flash_0xf0080000
.It
Load the gzimg from the TFTP server.
.Pp
.Bd -literal
RedBoot\*[Gt] load -r -b 0x00200000 gzimg_IQ80321_flash_0xf0080000
Raw file loaded 0x00200000-0x00305fe4
.Ed
.It
Use the RedBoot
.Ic fis
command to copy the image into flash.
For more information on the RedBoot
Flash Image System, see the RedBoot documentation.
.Bd -literal
RedBoot\*[Gt] fis create -b 0x00200000 -f 0xf0080000 -l 0x00200000 netbsd.gz
* CAUTION * about to program 'netbsd.gz'
            at 0xf0080000..0xf027ffff from 0x00200000 - are you sure (y/n)? y
.Ns ... Erase from 0xf0080000-0xf0280000: .......................
.Ns ... Program from 0x00200000-0x00400000 at 0xf0080000: ......................
.Ns ... Unlock from 0xf07e0000-0xf0800000: .
.Ns ... Erase from 0xf07e0000-0xf0800000: .
.Ns ... Program from 0x01ddf000-0x01dff000 at 0xf07e0000: .
.Ns ... Lock from 0xf07e0000-0xf0800000: .
.Ed
.enum)
.Pp
Once the compressed kernel image has been copied into flash, it may
be started by jumping to the flash address of the image:
.Bd -literal
RedBoot\*[Gt] g 0xf0080000

\*[Gt]\*[Gt] NetBSD/IQ80321 Gzip Boot, Revision 1.1
\*[Gt]\*[Gt] (root@tgm, Thu Mar 28 18:32:45 PST 2002)
\*[Gt]\*[Gt] RAM 0xa0000000 - 0xa7ffffff, heap at 0xa7fd0000
\*[Gt]\*[Gt] Load address: 0xa0200000
\*[Gt]\*[Gt] Image size: 739495
Uncompressing image...done.
Jumping to image @ 0xa0200000...

NetBSD/evbarm (IQ80321) booting ...
initarm: Configuring system ...
physmemory: 32768 pages at 0xa0000000 -\*[Gt] 0xa7ffffff
init subsystems: stacks vectors undefined pmap irq done.
[ using 155076 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.5ZC (IQ80321) #1: Thu Mar 28 18:31:58 PST 2002
    root@tgm:/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 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: \*[Lt]unknown\*[Gt]
root device:
.Ed