UBoot – Kurobox – Supported Commands

Supported Commands

?       – alias for ‘help’
base    – print or set address offset
bdinfo  – print Board Info structure
boot    – boot default, i.e., run ‘bootcmd’
bootd   – boot default, i.e., run ‘bootcmd’
bootm   – boot application image from memory
bootp   – boot image via network using BootP/TFTP protocol
cmp     – memory compare
coninfo – print console devices and information
cp      – memory copy
crc32   – checksum calculation
dhcp    – invoke DHCP client to obtain IP/boot params
diskboot- boot from IDE device
echo    – echo args to console
erase   – erase FLASH memory
ext2load- load binary file from a Ext2 filesystem
ext2ls  – list files in a directory (default /)
flinfo  – print FLASH memory information
go      – start application at address ‘addr’
help    – print online help
ide     – IDE sub-system
loadb   – load binary file over serial line (kermit mode)
loads   – load S-Record file over serial line
loop    – infinite loop on address range
md      – memory display
mm      – memory modify (auto-incrementing)
mtest   – simple RAM test
mw      – memory write (fill)
nfs     – boot image via network using NFS protocol
nm      – memory modify (constant address)
pci     – list and access PCI Configuration Space
ping    – send ICMP ECHO_REQUEST to network host
printenv- print environment variables
protect – enable or disable FLASH write protection
rarpboot- boot image via network using RARP/TFTP protocol
reset   – Perform RESET of the CPU
run     – run commands in an environment variable
saveenv – save environment variables to persistent storage
setenv  – set environment variables
tftpboot- boot image via network using TFTP protocol
version – print monitor version

UBoot – Kurobox

Net Console
The net console is the U-Boot driver which uses the UDP protocol with a default port of 6666 to send the console output to and receive the console input from a remote computer. You need to run netcat on the remote computer to communicate with the U-Boot net console. The communication is bidirectional. Netcat will display on your screen the console output received from U-Boot and will send your keyboard input back to U-Boot.
If U-Boot cannot contact the remote computer, it switches the console to the serial port. To show that it changed the console, U-Boot makes the HDD LED blink with the pattern corresponding to the serial console (see The Reset Button below). The timeout period is 20 sec.
Minimal Console
U-Boot for the LinkStation is designed to allow some control over the boot process even in the absence of a console. For this, it uses the power button (the big button at the front) and the reset button (the small red button at the back).
Before installing U-Boot, when the LinkStation is switched on, the power LED starts blinking, the original boot loader starts executing and, very quickly, it starts booting the kernel from flash. If U-Boot is installed, the power LED will change from blinking quickly to blinking very slowly. The blink pattern is the same as the one used to indicate sleep mode in normal operation. When the power LED starts blinking slowly at boot, U-Boot has taken over and it is counting down the boot delay before booting the kernel. The default boot delay is 10 sec. From the moment when the power LED starts blinking slowly and for the duration of the boot delay, you can control the boot process with the power and reset buttons.
The Power Button
If you push the power button and keep it pressed for more than 1 sec, the boot process will stop and the LinkStation will wait for a command. A stopped boot process is indicated by the power LED being lit solid. The effect is the same a pressing ‘s’ on the console.
A long push of the power button acts as a toggle. If the boot delay count down is in progress, a long push of the power button stops the boot process. If the boot process is stopped (U-Boot is at the command prompt, even if you can’t see it), a long push of the power button restarts the boot process resetting the boot delay to its original value. The restart of the boot process is indicated by the power LED blinking slowly.
By default U-Boot supports three pre-configured boot commands:
  1. The first boot command will attempt to load and boot a file named boot/vmlinux.UBoot from the first hard disk partition, /dev/hda1. The file can be in any of the U-Boot bootable formats but uImage is the preferred format. If the file is missing or corrupted, U-Boot will fall back to booting the original kernel from flash. 
  2. The second boot command will boot the original kernel from flash.
    Please note that the original kernel for the LinkStation 1 / KuroBox standard has a bug in the function that calibrates the decrementer and it will stop for up to 180 sec during boot. This bug is not an U-Boot bug but a kernel bug which is uncovered by the fact that U-Boot activates the decrementer where the original boot loader does not.
    The original kernel for LinkStation HG / KuroBox HG does not suffer from the above problem. 
  3. The third boot command will attempt to boot in emergency mode (EM). It does this by passing the argument root=/dev/ram0 to the kernel.
    LinkStation / LinkStation HG owners should avoid booting in EM mode as the root password for this mode on the LinkStation is unknown.
    The original kernel for the LinkStation / KuroBox standard and for some of the earlier LinkStation HG / KuroBox HG models ignores the root argument. These models will boot normally from the on-board flash when the EM boot command is used. Read the section on EM mode if your LinkStation HG / KuroBox HG has a kernel that doesn’t boot in EM mode using this boot command. 
You can cycle through the boot commands with the power button.
To see which of the three commands U-Boot is going to execute, press the power button quickly. The HDD LED (the third from the top) will start blinking. The number of times the LED blinks, shows the number of the active boot command. For example, a pattern short on – short off – short on – long off, means that the boot command number 2 is active. U-Boot will repeat the blinking cycle for a total duration of about 5 sec counting from the moment the power button is released.
A short press of the power button while the HDD LED is blinking will advance the boot command to the next one.
Changing the boot command does not change the boot status. If the boot is stopped, it will not be restarted. If the boot is in progress, it will not be stopped but the boot delay will be reset to the original value.
The Reset Button
Two consoles are currently configured, the serial console and the net console. The first console is the serial console and the second console is the net console (nc). The net console is the default console.
The reset button can be used, similarly to the power button, to switch consoles. A press on the reset button (here, it doesn’t matter how long you keep the button pressed) displays the currently active console using the HDD LED. Repeatedly pressing the reset button while the HDD LED is blinking will toggle between the two consoles. The blinking pattern is different from the one showing the boot command. The pattern which shows that the second (net) console is active is short off – short on – short off – long on. U-Boot will repeat the blinking cycle for a total duration of about 5 sec counting from the moment the reset button is released.
Furthur information at http://www.linuxnotincluded.pwp.blueyonder.co.uk/linkstation/u-bootinstall.html

Kurosheeva / Sheevaplug uboot

Connect USB cable to mini USB port on the sides of Kurosheeva device.
Fire up the serial communication interface using Teraterm / screen (in osx).
screen /dev/tty.usbserial-FTTI0TO6B 115200
Switch-on your device and following output can be seen on the terminal
__ __ _ _
| / | __ _ _ ____ _____| | |
| |/| |/ _` | ‘__ / / _ | |
| | | | (_| | | V / __/ | |
|_| |_|__,_|_| _/ ___|_|_|
_ _ ____ _
| | | | | __ ) ___ ___ | |_
| | | |___| _ / _ / _ | __|
| |_| |___| |_) | (_) | (_) | |_
___/ |____/ ___/ ___/ __|

U-Boot 1.1.4 (Jul 14 2009 – 06:46:57) Marvell version: 3.4.16

U-Boot code: 00600000 -> 0067FFF0 BSS: -> 006CF120

Soc: 88F6281 A0 (DDR2)
CPU running @ 1200Mhz L2 running @ 400Mhz
SysClock = 400Mhz , TClock = 200Mhz

DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000 size 256MB
DRAM CS[1] base 0x10000000 size 256MB
DRAM Total size 512MB 16bit width
Flash: 0 kB
Addresses 8M – 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M – 7M): Done

CPU : Marvell Feroceon (Rev 1)

Streaming disabled
Write allocate disabled

USB 0: host mode
PEX 0: interface detected no Link.
Net: egiga0 [PRIME], egiga1
Hit any key to stop autoboot: 0

Marvell>> printenv
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x1ff00000@0x100000(root)
bootargs_root=root=/dev/nfs rw
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
bootargs=console=ttyS0,115200 mtdparts=nand_mtd:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs) rw root=/dev/mtdblock1 rw ip=
bootcmd=nand read.e 0x800000 0x100000 0x400000; bootm 0x800000
Environment size: 1330/131068 bytes