.\" $NetBSD: bootmini2440.8,v 1.4 2012/06/02 14:04:34 njoly Exp $
.\"
.\" Copyright (c) 2012 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" This code is derived from software contributed to The NetBSD Foundation
.\" by Paul Fleischer <paul@xpg.dk>.
.\"
.\" 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.
.\"
.Dd January 31, 2012
.Dt BOOTMINI2440 8 evbarm
.Os
.Sh NAME
.Nm bootmini2440
.Nd bootloader for FriendlyARM MINI2440 evaluation board
.Sh DESCRIPTION
.Nm
is a program to load
.Tn ELF
.Nx
kernel, which works on top of
.Tn U-Boot .
It loads and executes a kernel from an SD memory card, or over
the network using the
.Tn NFS/TFTP
protocol.
.Pp
The
.Nm
bootloader can be loaded anywhere by
.Tn U-Boot ,
although care should be taken that the bootloader can load the
.Nx
kernel without overwriting itself.
The kernel is, by default, made to be loaded at 0x30200000.
The recommended location for
.Nm
is 0x30A00000.
.Pp
.Nm
takes a number of arguments, which all are optional:
.Dl Ar mac=xx:xx:xx:xx:xx:xx Ar opt1 ... Ar optN Ar bootname
.Bl -tag -width xx
.It Va mac=
is used to set the MAC-address of the on-board DM9000 Ethernet
chip.
As Mini2440 has no EEPROM to store DM9000 MAC-address, this
is necessary in order to have a working Ethernet controller.
If this argument is left unspecified, a default value of 08:08:11:18:12:27
is used.
.It Va opt1 ... Va optN
is one of single, kdb, ask, quiet, or verbose.
Their meaning is described in
.Xr boothowto 9 .
.It Va bootname
is one of the following:
.Pp
.Dl net: Ns Ar ip Ns : Ns Ar filename
.Dl net: Ns Ar filename
.Dl net:
.Dl tftp: Ns Ar filename
.Dl tftp:
.Dl ld0 Ns Ar p : Ns Ar filename
.Dl ld0 Ns Ar p :
.Pp
.Bl -tag -width xx
.It net: Ns Va ip Ns : Ns Va filename
use
.Tn DHCP
to determine own IP-address and load kernel specified by
.Ar filename
from the server specified by
.Ar ip
using
.Tn NFS .
.It net: Ns Ar filename
use
.Tn DHCP
to determine own IP-address and server IP-address.
Load kernel specified by
.Ar filename
from the server using
.Tn NFS .
.It net:
use
.Tn DHCP
to determine own IP-address, server IP-address, and kernel to load.
Load the kernel using
.Tn NFS .
.It tftp: Ns Ar filename
use
.Tn DHCP
to determine own IP-address and server IP-address.
Load kernel specified by
.Ar filename
from the server using
.Tn TFTP .
.It tftp:
use
.Tn DHCP
to determine own IP-address, server IP-address, and kernel to load.
Load kernel using
.Tn TFTP .
.It ld0 Ns Va p : Ns Va filename
load kernel from an SD card.
The kernel specified by
.Ar filename
is attempted loaded on the partition given by
.Ar p .
.It ld0 Ns Va p :
load kernel from an SD card.
The kernel will be loaded from the file
.Dq Pa netbsd
on the partition specified by
.Ar p .
.El
.El
.Sh EXAMPLES
.Ss Loading Nm
Use
.Tn U-Boot
to load
.Nm
at 0x30A00000 from an
.Tn NFS
share:
.Dl Uboot> nfs 30A00000 10.0.0.1:/srv/mini2440/bootmini2440
.Ss Booting Nx
Load the kernel from an
.Tn NFS
share, overwriting the default MAC-address, and
booting into single user-mode:
.Dl Uboot> go 30A00000 single mac=08:08:11:20:22:30 net:10.0.0.1:/srv/mini2440/netbsd
.Pp
Load the kernel from an SD card, overwriting the default
MAC-address, and booting into single user-mode:
.Dl Uboot> go 30A00000 single mac=08:08:11:20:22:30 ld0a:netbsd
.Sh SEE ALSO
.Xr dhcpd 8 ,
.Xr diskless 8 ,
.Xr nfsd 8 ,
.Xr tftpd 8 ,
.Xr boothowto 9
.Sh HISTORY
The
.Nx Ns Tn /evbarm
.Nm
first appeared in
.Nx 6.0 .
.Sh BUGS
.Nm
cannot currently function properly without
.Tn U-Boot
(or equivalent).
Although it performs clock and
.Tn UART
configuration, it cannot bootstrap itself from
.Tn NAND
flash.