Port-arm archive


Re: Dockstar question

On Tue, Jun 14, 2011 at 9:31 AM, John Klos <john%ziaspace.com@localhost> wrote:
> Hi,
> How does one boot NetBSD on a Dockstar without a serial cable? I've looked
> through the mailing list, but I don't see anything which explains it. Is it
> enough to ssh to GNU/Linux that comes with it and set a boot variable there?
> Any pointers to documentation would be most welcome.

I got this nice set of instructions from Jean-Yves Moulin who is on this list.

The basic steps are:

1. Load a modified uboot firmware, set the boot command, and
optionally set up a netconsole (it's nice, check the Jeff Doozan page
for info)

2. Set up the disk with a FAT partition to load the netbsd kernel from

3. Build a -current evbarm distribution (or you could download one
from nyftp.netbsd.org)

4. Build a kernel with a few specific options

5. Load all of that onto the disk, and boot it

The instructions below don't go through steps to be able to log into
NetBSD on the first boot. I would suggest that you edit inetd.conf to
allow telnet, and then edit ttys so that there is a secure tty for
root to log into. I can help out if needed. I've been meaning to write
this all down at some point.

Anyway, here's Jean-Yves's steps:

1) The first step is to boot the dockstar normally. You need to find
it's IP address (assigned by dhcp). Then, connect to it by ssh, with
root login (password is: stxadmin).

2) The second step is to install the modified uboot (described here:
http://jeff.doozan.com/debian/uboot/ ):

# cd /tmp
# wget http://jeff.doozan.com/debian/uboot/install_uboot_mtd0.sh
# chmod +x install_uboot_mtd0.sh
# ./install_uboot_mtd0.sh

3) The third step is to change the command line for boot loader. I use
the command from a FreeBSD howto (
http://cooltrainer.org/projects/freebsd-kirkwood/installation/ ) and I
change the address to 0x2000000 according to NetBSD sheevaplug howto
(in french: http://www.netbsdfr.org/wiki/doku.php?id=tips:netbsdsheevaplug
) . Two command:

# fw_setenv usb_boot 'fatload usb $usb_device 0x2000000 netbsd.ub;
bootm 0x2000000;'
# fw_setenv usb_init 'usb start; if fatload usb 0 0x2000000 netbsd.ub;
then setenv usb_device 0; elif fatload usb 1 0x2000000 netbsd.ub; then
setenv usb_device 1; elif fatload usb 2 0x2000000 netbsd.ub; then
setenv usb_device 2; elif fatload usb 3 0x2000000 netbsd.ub; then
setenv usb_device 3; elif fatload usb 4 0x2000000 netbsd.ub; then
setenv usb_device 4; else run pogo_bootcmd; fi;'

The uboot syntax is easy. You can load a kernel through tftp or nfs,
you can use a netconsole to see what happen without serial port...etc.

4) The four step is to prepare your disk (usb key or hardisk), as for
a sheevaplug: you need a small msdos partition for the kernel, and
other normal partitions for a normal installation. Install your
system, don't forget network config, account for ssh access and fstab.

Before compiling SHEEVAPLUG kernel, you need to force the root device:
config          netbsd          root on sd0a type ffs

and you need to remove all sd/mmc related stuff:
 # mvsdio* at mvsoc? offset ? irq ?
 # sdmmc*  at mvsdio?
 # ld*     at sdmmc?

You must copy the uboot kernel in the msdos partition (the uboot
kernel is built automaticaly for evbarm: netbsd.ub). You can also copy
the normal netbsd kernel to your root partition for system statistics

5) And thast'it! Now plug your usb drive and reboot dockstar.


Home | Main Index | Thread Index | Old Index