Das U-boot plug support
From PlugWiki
U-boot-1.1.4 support for SheevaPlug
The CDROM containing documentation and software that comes with SheevaPlug Dev Kit has u-boot source code, precompiled binaries and build information. This SheevaPlug u-boot port is based on u-boot-1.1.4 which is too old.
Open U-Boot support for SheevaPlug
Open U-Boot is an alternative to the official U-Boot release. The patches are already mainlined and one can pick latest stable release and build it for Sheevaplug as suggested below. There is a Marvell specific custodian repository. All the Marvell, Kirkwood, Sheevaplug related features/bugfixes patches to be mainlined on the top of latest u-boot are available here, I suggest to use this repository for picking up latest u-boot for Sheevaplug (testing or next branch).
How to download open u-boot with SheevaPlug support?
git clone git://git.denx.de/u-boot-marvell.git u-boot-marvell.git
How to build open u-boot for SheevaPlug on Linux host?
cd u-boot-marvell.git git checkout -b testing origin/testing make mrproper make sheevaplug_config make u-boot.kwb CROSS_COMPILE=<prefix_for_arm_compiler> (e.g. make u-boot.kwb CROSS_COMPILE=armv5tel-redhat-linux-gnueabi- )
How to download and execute open u-boot on SheevaPlug?
- On Linux host setup OpenOCD to download u-boot ELF image on to the board.
- On Linux host setup serial console to access u-boot prompt.
- Connect mini USB Jtag/serial debug cable between SheevaPlug and you Linux host.
- Make sure device nodes /dev/ttyUSB* are available.
- Execute following command with root/sudo privileges.
openocd -f /usr/local/lib/openocd/board/sheevaplug.cfg
- Start minicom or any other utility to access serial console. Use /dev/ttyUSB1, if /dev/ttyUSB0 and /dev/ttyUSB1 are detected as FTDI USB Serial devices for SheevaPlug mini USB debug connection.
- Open a telnet session in separate window and execute halt.
telnet localhost 4444 halt
- Execute following commands on telnet window to initialize, download and start u-boot from DRAM.
sheevaplug_init load_image <elf_u-boot_image_with_path> resume 0x00600000
- Check serial console. You should get u-boot prompt.
How to create flashable open u-boot binary?
- Execute following command to create flashable u-boot image in u-boot source tree. This will create a target u-boot.kwb, use this file to flash on the board.
make u-boot.kwb CROSS_COMPILE=<cross compiler sufix>
How to flash open u-boot binary to the on-board NAND flash?
- Make sure the native old u-boot or u-boot from DRAM is functional on the board and you can access u-boot prompt.
- On u-boot prompt execute following commands.
setenv ipaddr <ip_addr_for_sheevaplug> setenv serverip <tftp_server_ipaddr> tftp 0x6400000 u-boot.kwb nand erase 0x0 0x40000 (the length should be rounded to NAND sector size and filesize) nand write 0x6400000 0x0 0x40000
Reset the board, board should boot from newly flashed u-boot from NAND (check build date stamp on u-boot prompt).
How to boot Sheevaplug from USB Storage
- Download, build and flash the latest open u-boot on Sheevaplug.
- connect USB flash disk formatted with FAT32 filesystem and having uImage and RFS uimages stored in it.
- on u-boot command prompt, to initialize USB port, execute a command.
start usb
- Then to get the USB driver partition info, execute a command.
usb part
- Check the partition on which kernel image and RFS is sitting by executing a command.
fatls usb <usb_dev_no>:<partition_no> for ex: fatls usb 0:1
- At this stage you are ready with information to be passed to fatload command, execute a command to load kernel image from USB.
fatload usb <identified_usbdev>:<partition> <startaddr> <filename> for ex: fatload usb 0:1 0x6400000 uImage
- Similarly load RFS (initrd) or directly boot from USB (if your kernel supports) by setting bootargs and start the kernel.
- you can automate this process by using environment variables as done for boot from NANDF (x_boot..)
Advantages using open u-boot on SheevaPlug
- Always in sync with latest u-boot.
