-
Notifications
You must be signed in to change notification settings - Fork 7
Software Setup
If you are upgrading from a previous version of the bootloader, all sections of the NAND will need to be reflashed due to a change in the ECC scheme used in the latest version.
Important changes from the previous version:
- The NAND driver now uses 1-bit Hardware ECC by default
- The serial console is now named ttyOn (instead of ttySn). This change is reflected in the kernel bootargs. The /etc/inittab file on the root filesystem should be modified accordingly.
- Connect a usb cable between the USB port on the Rhino board and your computer. Download the FTDI Driver if necessary.
- Run a terminal program (e.g. minicom), set to 115200 8N1 with no flow control. Connect to the third serial device (/dev/ttyUSB2) that was created by the FTDI driver.
Download the X-Loader and U-boot binary files.
- Format an SD/MMC card to allow for OMAP3 booting as described here: http://processors.wiki.ti.com/index.php/SD/MMC_format_for_OMAP3_boot
- Copy the X-Loader and U-boot binary files to the SD/MMC card from any computer, and then insert into the MMC slot on the Rhino
- Make sure the BOOT ORDER board jumpers are set to boot from MMC (SW1 = OFF, SW2 = ON). Turn on the power.
Once booted into u-boot from the MMC card, the bootloader can be written to the onboard NAND flash. Place the binary files on a TFTP server accessible by the Rhino board over the network.
Setting environment variables
-
Select the correct ECC scheme
nandecc hw 1
-
Set the appropriate environment variables (change according to your own network setup)
setenv ipaddr 192.168.0.2
setenv netmask 255.255.255.0
setenv serverip 192.168.0.1
setenv gatewayip 192.168.0.254
-
Note: You may need to set a MAC address for the board if the u-boot environment does not have one (you might see a message such as ERROR: 'ethaddr' not set). To do so, run the 'tools/gen_eth_addr' program found in the u-boot directory to obtain an address, and then apply it u-boot:
setenv ethaddr <insert_address_here>
-
Save the environment variables
saveenv
Writing X-Loader to NAND flash
- Erase all data in RAM
mw.b 0x82000000 0xff 0x2000000
- Erase NAND area for X-Loader
nand erase 0x0 0x50000
- Copy X-Loader binary into memory over tftp
tftp 0x82000000 MLO
- Set the NAND ECC scheme
nandecc hw 2
- Write X-Loader into NAND flash
nand write 0x82000000 0x0 0x50000
Writing U-boot to NAND flash
- Erase all data in RAM
mw.b 0x82000000 0xff 0x2000000
- Erase NAND area for U-boot
nand erase 0x80000 0x1C0000
- Copy U-boot binary into memory over tftp
tftp 0x82000000 u-boot.bin
- Set the NAND ECC scheme
nandecc hw 2
- Write U-boot into NAND flash
nand write 0x82000000 0x80000 0x1C0000
Download the BORPH kernel and Root filesystem binary files. Place them on the TFTP server for access from Rhino
Write the kernel into NAND flash
- Erase all data in RAM
mw.b 0x82000000 0xff 0x2000000
- Erase NAND area for kernel
nand erase 0x280000 0x500000
- Copy kernel image into memory over tftp
tftp 0x82000000 uImage
- Set the NAND ECC scheme
nandecc hw 1
- Write U-boot into NAND flash
nand write 0x82000000 0x280000 0x500000
Copy Root filesystem to NAND flash
- Erase all data in RAM
mw.b 0x82000000 0xff 0x2000000
- Erase NAND area for filesystem
nand erase 0x780000 0x2000000
- Copy filesystem into memory over tftp
tftp 0x82000000 rhinofs.jffs2
- Set the NAND ECC scheme
nandecc hw 1
- Write filesystem into NAND flash
nand write 0x82000000 0x780000 0x2000000
Setting boot parameters
-
Set the boot parameters for the kernel in u-boot
setenv nandargs 'setenv bootargs mem=256M console=ttyO0,115200n8 noinitrd root=/dev/mtdblock4 rw rootfstype=jffs2 ip=\${ipaddr}:\${serverip}:\${gatewayip}:\${netmask}:rhino:eth0:on'
`setenv nfsargs 'setenv bootargs mem=256M console=ttyO0,115200n8 noinitrd ip=\${ipaddr}:\${serverip}:\${gatewayip}:\${netmask}:rhino:eth0:on rw root=/dev/nfs nfsroot=\${serverip}:/opt/rhinofs,nolock panic=2'` `setenv nfsboot 'echo Booting from nfs ...; run nfsargs; nand read \${loadaddr} 280000 400000; bootm \${loadaddr}'`
-
Set the default boot commands
setenv bootcmd 'run nandargs; nand read.i 0x82000000 280000 500000; bootm 0x82000000'
setenv bootdelay 10
setenv bootkernel
setenv bootkernel_1
-
Save the boot parameters
nandecc hw 1
saveenv
- Make sure the BOOT ORDER board jumpers are set to boot from NAND (SW1 = OFF, SW2 = OFF). Turn the power off and back on.
- By default, the board will boot from the root filesystem contained on the NAND. If you wish to boot the filesystem over NFS, ensure the environment settings match your NFS configuration (by default assumes the filesystem is exported at /opt/rhinofs). Interrupt the boot process and
run nfsboot
.
The default username/password is: root/rhino
By default, the root filesystem will start an openssh server on startup. Connect to the Rhino board over the network from your computer
ssh [email protected]