Useful RedBoot Commands

From Cpre584
Revision as of 14:27, 2 March 2010 by 127.0.0.1 (talk) (→‎NFS Root)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Load kernel & ramdisk.gz via onboard flash

fis load ramdisk.gz <br>
fis load zImage <br>
exec -c "console=ttyAM0 root=/dev/ram" <br>

Load kernel from onboard flash, Root filesystem on USB flash

fis load zImage <br>
exec -c "console=ttyAM0 root=/dev/sda1 [rootdelay=10]" <br>

Load kernel via xmodem/ymodem

At RedBoot Shell (via Minicom)

 load -r -b 0x80000 -m {xmodem|ymodem} 

Minicom Commands

In Minicom: Type {Ctrl-a}{s}
Select {xmodem|ymodem} and locate file

Boot the kernel

 exec -c "console=ttyAM0 root=/path/to/root [rootdelay=10]" 

Note: rootdelay=10 is only necessary if root is located on USB drive
Note: xmodem/ymodem takes approximately 6 minutes to download

Load kernel via TFTP

ip_address [-l <local_ip_address>] -h <tftp_server_address> <br>
load -r -v -b 0x800000 ramdiskWebMod.gz <br>
load -r -v -b 0x80000  zImage9302_2.6.21 <br>
exec -r 0x800000 -s <size_of_ramdisk_in_hex> -c "console=ttyAM root=/dev/ram" <br>

NFS Root

Desktop PC Steps

Compile the Kernel

Compile the kernel according to the walkthrough.

Create NFS Root Filesystem on PC

mkdir -p /ep9302/<username>/nfsroot
cp /media/CS-EP930x_A/rootdir.tgz /ep9302/<username>/nfsroot
cd /ep9302/<username>/nfsroot
tar -xzf  rootdir.tgz
  • NOTE: The last line will result in errors trying to create the special files in the dev directory. You will need to contact CSG for access rights to create these files
  • NOTE: Optionally remove line about /dev/sda1 from /ep9302/<username>/nfsroot/dev/fstab. This will avoid a mounting error at boot time on the EP9302 board.

EP9302/RedBoot Steps

Load your compiled kernel
load -r -v -b 0x80000  zImage
Execute the kernel
exec -c "console=ttyAM0 root=/dev/nfs nfsroot=<server_ip>:/path/to/root/ ip=<board_ip>"
  • For me this line was exec -c "console=ttyAM0 root=/dev/nfs nfsroot=192.168.1.5:/ep9302/<username>/nfsroot ip=192.168.1.1"
  • NOTE: /path/to/root is path to your nfsroot directory on the desktop relative to the /ep9302 directory
  • NOTE: If you receive a warning saying no console found then you need to fix the dev directory as described above.

Links

RedBoot Online User Guide
EP9302 User Guide
Olimex Board Website
EP9302 Project Website
Kernel Build Walkthrough