Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: status for Marvell Orion support

>> I'm now happy to report that I've installed 6.0 on the box, and
>> both of these problems are now gone, and my Kurobox/PRO now
>> appears to be running stable.
> I'm having some trouble finding simple installation
> instructions.  Do you have any?

Here's an initial draft, based on the messages I sent and
received around the time when I first toyed with this, as well as
the serial console log from my box.  My box is currently busy on
a long-term mission, so I could not 100% verify every step, so if
there is someone else who are in possession of a Kurobox/Pro, who
wants to install NetBSD on it, and willing to validate the
instructions, that'd be appreciated.


- Håvard


Installing NetBSD on the Kurobox/Pro

First, you need to attach a serial console port to the Kurobox/Pro.

There are some instructions on

and they looked moderatly complicated.  As it turned out, my
Kurobox/Pro came with a 4-pin header already installed in the
right spot, on the "daughtercard" which is pulled out when you
install the disk, and I also seem to recall that the pins were in
the right order relative to the RS232-to-5V converters I had
bought.  The serial console runs at 115200 baud.

You'll of course want a 3.5" SATA hard drive mounted inside the box
to install on.

Next you'll want an install kernel with an embedded ramdisk with all
the installation tools, and with newfs_ext2fs and mount_ext2fs
included.  This was only recently added to NetBSD, you'll need the
changes in

If you use -current bits from sources after January 30 2013,
these should be included.  Note, you can use a -current kernel to
install a 6.0 user-land and later build and install a 6.0-era
kernel, if that's what you are aiming at.

Next, turn the box on, wait for it sending its banner on the serial
port, and interrupt its startup:

Orion1   CPU =  Low  Orion1   CPU =  Low 

=== KURO U-Boot. ===
 ** LOADER **

U-Boot 1.1.1 (Apr 10 2007 - 18:10:08) Marvell version: 1.12.1 - TINY

DRAM CS[0] base 0x00000000   size 128MB 
DRAM Total size 128MB 
[256kB@fffc0000] Flash: 256 kB
Addresses 20M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (20M - 16M): Done
NAND: 256 MB

Soc: 88F5182 A2
CPU: ARM926 (Rev 0) running @ 500Mhz 
Orion 1 streaming disabled 
SysClock = 250Mhz , TClock = 166Mhz 

USB 0: host mode
USB 1: host mode
PCI 0: PCI Express Root Complex Interface
PCI 1: Conventional PCI, speed = 33000000
Net:   egiga0 [PRIME]
Using 88E1118 phy
Found boot image 
hit any key to switch tftp boot.
Hit any key to stop autoboot:  0 
switched to TFTP boot.
Hit any key to stop autoboot:  0 

This will cause the buzzer inside the box to sound; touch the power
button briefly to make the buzzer be quiet again.

A "printenv" shows the environment variables it knows about and a
few you have to set to tftp-boot the install kernel, in particular:


Set these, and load the install kernel:

Marvell>> setenv serverip
Marvell>> setenv ipaddr
Marvell>> tftp 0x8000 netbsd-KUROBOX_PRO_INSTALL.bin
Using egiga0 device
TFTP from server; our IP address is
Filename 'netbsd-KUROBOX_PRO_INSTALL.bin'.
Load address: 0x8000
Loading: #################################################################
Bytes transferred = 8210384 (7d47d0 hex)
Marvell>> g 0x8000

and NetBSD should start up, eventually starting sysinst.

Next, you'll need to prepare the harddisk.  Sysinst has not (yet?)
been taught that on the Kurobox/PRO, U-Boot can load a kernel from
an ext2fs file system.  To create it, you'll need to exit sysinst
and use fdisk and newfs_ext2fs manually.  I set aside a 31MB-sized
partition for storing bootable kernels, and ran "fdisk -u -0 wd0"
and "fdisk -u -1 wd0", and ended up with this MBR partition table:

# fdisk wd0
Disk: /dev/rwd0c
NetBSD disklabel disk geometry:
cylinders: 620181, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
total sectors: 625142448

BIOS disk geometry:
cylinders: 1024, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 625142448

Partition table:
0: Linux native (sysid 131)
    start 63, size 64197 (31 MB, Cyls 0-3)
        PBR is not bootable: All bytes are identical (0x00)
1: NetBSD (sysid 169)
    start 64260, size 625078188 (305214 MB, Cyls 4-38913/80/63)
        PBR is not bootable: All bytes are identical (0x00)
No active partition.

Now restart sysinst, and start with "use existing" for the disk
label, and add any NetBSD partitions you'll need on the NetBSD
MBR partition.  Verify after installing all the sets with
sysinst, using "disklabel wd0" that you don't have overlap
between any of the other partitions and wd0e (default partition
for any "other" MBR partition, if I've understood correctly).

It's now time to prepare the boot file system, from which the
actual kernel binary is loaded by U-Boot:

# newfs_ext2fs /dev/rwd0e
# mkdir /k
# mount -t ext2fs /dev/wd0e /k

Now transfer a suitable netbsd-wd0.bin-KUROBOX_PRO to /k using
ftp.  The kernel image with this name corresponds to the "config
netbsd-wd0 root on wd0 type ffs" addition to the KUROBOX_PRO
kernel config.  This is so that you won't have to answer with the
location of the root file system on each and every boot-up of

Next, halt NetBSD, and set up U-Boot to boot from the kernel just
copied to the ext2fs file system.  You can first verify that it
is there:

Using 88E1118 phy
Found boot image 
hit any key to switch tftp boot.
Hit any key to stop autoboot:  0 
switched to TFTP boot.
Hit any key to stop autoboot:  0 
Marvell>> ide reset

Reset IDE: 
Marvell Serial ATA Adapter
Integrated Sata device found
  Device 0: OK
Model: WDC WD3200YS-01PGB0                      Firm: 21.00M21 Ser#:      
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 305245.3 MB = 298.0 GB (625142448 x 512)

Marvell>> ext2ls ide 0
Using device ide 0:1, directory: /
<DIR>       1024 .
<DIR>       1024 ..
<DIR>      12288 lost+found
         5061372 netbsd-wd0.bin-KUROBOX_PRO

Now, set up U-Boot to automatically load and run this kernel on

Marvell>>setenv bootcmd ide reset\; ext2load ide 0:1 0x8000 
/netbsd-wd0.bin-KUROBOX_PRO\; g 0x8000

and then just do "boot", and it should load and run NetBSD:


Reset IDE: 
Marvell Serial ATA Adapter
Integrated Sata device found
  Device 0: OK
Model: WDC WD3200YS-01PGB0                      Firm: 21.00M21 Ser#:      WD-WCA
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 305245.3 MB = 298.0 GB (625142448 x 512)

Using device ide0, partition 1

Loading from block device ide device 0, partition 1: Name: hda1
  Type: U-Boot  File:/netbsd-wd0.bin-KUROBOX_PRO

4945408 bytes read
## Starting application at 0x00008000 ...

NetBSD/evbarm (kurobox_pro) booting ...
Loaded initial symtab at 0xc03f6300, strtab at 0xc042f6f8, # entries 14573
pmap_postinit: Allocated 35 static L1 descriptor tables
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010, 2011, 2012
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.
total memory = 128 MB
avail memory = 120 MB
cprng kernel: WARNING insufficient entropy at creation.
mainbus0 (root)
cpu0 at mainbus0: ARM926EJ-S rev 0 (ARM9EJ-S core)
cpu0: DC enabled IC enabled WB enabled EABT branch prediction enabled
cpu0: 32KB/32B 1-way Instruction cache
cpu0: 32KB/32B 1-way write-back-locking-C Data cache
mvsoc0 at mainbus0: Marvell MV88F5182 Rev. A2  Orion1
mvsoc0: CPU Clock 400.000 MHz  SysClock 200.000 MHz  TClock 166.666 MHz
mvsoctmr0 at mvsoc0 unit 0 offset 0x20300-0x203ff: Marvell SoC Timer
mvsocgpp0 at mvsoc0 unit 0 offset 0x10100-0x101ff irq 6: Marvell SoC General 
Purpose I/O Port Interface
mvsocgpp0: 32 gpio pins
mvsocgpp0: interrupts 64..71, intr 6
mvsocgpp0: interrupts 72..79, intr 7
mvsocgpp0: interrupts 80..87, intr 8
mvsocgpp0: interrupts 88..95, intr 9
mvsocgpp0:   Data Out:                        0x00000000
mvsocgpp0:   Data Out Enable Control:         0xfc01000d
mvsocgpp0:   Data Blink Enable:               0x00000000
mvsocgpp0:   Data In Polarity:                0x00000000
mvsocgpp0:   Data In:                         0x00000005
mvsocgpp0:   Interrupt Cause:                 0x00000008
mvsocgpp0:   Interrupt Mask:                  0x00000000
mvsocgpp0:   Interrupt Level Mask:            0x00000000
gpio0 at mvsocgpp0: 32 pins
com0 at mvsoc0 unit 0 offset 0x12000-0x1201f irq 3: ns16550a, working fifo
com0: console
com1 at mvsoc0 unit 1 offset 0x12100-0x1211f irq 4: ns16550a, working fifo
ehci0 at mvsoc0 unit 0 offset 0x50000-0x51fff irq 17: Marvell USB 2.0 Interface
usb0 at ehci0: USB revision 2.0
ehci1 at mvsoc0 unit 1 offset 0xa0000-0xa1fff irq 12: Marvell USB 2.0 Interface
usb1 at ehci1: USB revision 2.0
gtidmac0 at mvsoc0 unit 0 offset 0x60000-0x60fff irq 24: Marvell IDMA 
Controller/XOR Engine
gtpci at mvsoc0 unit 0 not configured
gttwsi0 at mvsoc0 unit 0 offset 0x11000-0x11fff irq 5: Marvell TWSI controller
iic0 at gttwsi0: I2C bus
rs5c372rtc0 at iic0 addr 0x32: RICOH RS5C372[AB] Real-time Clock
mvgbec0 at mvsoc0 unit 0 offset 0x70000-0x73fff: Marvell Gigabit Ethernet 
mvgbe0 at mvgbec0 port 0 irq 21
mvgbe0: Ethernet address 00:16:01:a4:e2:e6
makphy0 at mvgbe0 phy 8: Marvell 88E1116 Gigabit PHY, rev. 1
makphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 
1000baseT-FDX, auto
mvsata0 at mvsoc0 unit 0 offset 0x80000-0x87fff irq 29: Marvell Serial-ATA Host 
Controller (SATAHC)
mvsata0: GenIIe, 1hc, 2port/hc
atabus0 at mvsata0 channel 0
atabus1 at mvsata0 channel 1
mvpex0 at mvsoc0 unit 0 offset 0x40000-0x41fff irq 11: Marvell PCI Express 
pci0 at mvpex0
pchb0 at pci0 dev 0 function 0
uhub0 at usb0: Marvell EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub1 at usb1: Marvell EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
mvsata0 port 0: device present, speed: 3.0Gb/s
wd0 at atabus0 drive 0
wd0: <WDC WD3200YS-01PGB0>
wd0: 298 GB, 620181 cyl, 16 head, 63 sec, 512 bytes/sect x 625142448 sectors
cprng sysctl: WARNING insufficient entropy at creation.
boot device: <unknown>
root on wd0a dumps on wd0b
init: copying out path `/sbin/init' 11
Mon Jan 21 14:14:40 GMT 2013

Home | Main Index | Thread Index | Old Index