Setup the Host System
- On the host, you need to setup minicom with the following parameters
- Baud rate = 57600 bps.
- Data = 8 bits.
- Parity = None.
- Stop bit = 1.
- Flow control = None.
- Port = /dev/ttyS#.
- These are the default values in most cases.
- Configure the network on the host.
- Plug-in everything and let us start.
Build the Software
Build toolchain
Setup CPU Keys and
Utilities
Build zboot and zxenv2
- This step requires
sde-gcc , which can be freely
downloaded from MIPS at the .
- Untar and build
xmboot_ezboot .
- If you are not using a Sigma Reference Board,
you may need to modify the zxenv2 key values in the config file for
your particular board. Otherwise, skip this step and go to the next one.
The
922-E2.config serves as the basis for all
configurations, with patch files generating the xenv's for specific
chips/boards. If you have an SMP8654, you should see the 922-A2.config.patch
file. If you have the SMP8644, you should see the 946-E1.config.patch
file. You can find these configuration files and patches in the package
at xos/xboot2/xmasboot/configs . You can apply the patches
like this (substitute either 922-A2 or 946-E1 for
below):
host> cd xos/xboot2/xmasboot/configs/ host> cp 922-E2.config .config # If you have SMP8654, use this: host> patch .config < 922-A2.config.patch # ... otherwise, use this: host> patch .config < 946-E1.config.patch
# Then, use your favorite editor and you can modify the resulting config file: .config
- Setup your environment and build it:
host> export RMCFLAGS='-DEM86XX_CHIP=EM86XX_CHIPID_TANGO3 -DEM86XX_REVISION=1 -DDEMUX_PSF=1 -DEM86XX_MODE=EM86XX_MODEID_STANDALONE -DWITH_XLOADED_UCODE=1 -DGCC4_TOOLCHAIN -DXBOOT2_SMP865X=1' host> tar xf smp86xx_xmboot_ezboot_XYZ.tar.bz2 host> cd smp86xx_xmboot_ezboot_XYZ host> make zboot host> export RMCFLAGS=""
Build YAMON
Build the Linux kernel
(Overview)
Since the rootfs image will be linked together with Linux kernel for
various reasons (easiness, security, etc.), building the kernel involves
a few steps, as outlined below.
Build
rootfs (1)
Build
rootfs (2)
Build
the Kernel (1)
Build
the Kernel (2)
Build
the Kernel (3)
Build
the Kernel (4)
Build Proprietary
Drivers
Build MRUA SDK
- The kernel modules are now available under
modules/2.6.22.19-tango3-es1
or modules/mips-2.4.30 .
- The sample applications are now available under
bin .
MRUA Firmware
Binaries: Obtain and Uncompress the Package
Flash the Software Now all
binary files are ready. This page will show you how to flash zboot,
YAMON, and the kernel into NAND flash.
- Use YAMON's
nflash to flash into nand
- The process consists essentially in:
- Upload the binary from the PC to the board's memory.
- Ask YAMON to read the binary from the board's memory and write
it on the flash.
- The binaries can be safely uploaded to virtual address
0xa7000000 in the board's memory, because we know that there's nothing
there when YAMON is running.
- In this tutorial, we will upload the contents to the board's
memory using UART. Note: you may need to install
sharutils
package if host reports that you do not have uuencode .
* Some system might have gmime-uuencode instead uuencode .
Flash zboot and z-xenv2 (UART)
- The physical block 0 image is called
phyblock0-0x20000padded.922-A2
(for SMP8654) and phyblock0-0x20000padded.946-E1 (for
SMP8644). You should find this in the smp86xx_xmboot_ezboot_XX
release package, after building it (in the location specified in the
build section). Examples given below assume use of SMP8654, but you
should substitute the filename of the phyblock you are actually using if
necessary.
- Download the zboot image to the DRAM.
YAMON> load uu -z 0xa7000000 host> gzip -c phyblock0-0x20000padded.922-A2 | uuencode x > /dev/ttyS0 host> cksum phyblock0-0x20000padded.922-A2
- Flash the downloaded image to offset 0x0
YAMON> cksum 0xa7000000 0x20000 YAMON> nflash erase -p 0 0x20000 0 YAMON> nflash write -p 0 0xa7000000 0x20000 0 YAMON> nflash read -p 0 0xa7020000 0x20000 0 YAMON> cksum 0xa7020000 0x20000
- readback and verify the checksum.
Flash YAMON
Flash xos Here is the procedure to
update xos: YAMON> load uu 0xa7000000 host> uuencode xosu-xos2D2c-8644_ES1_dev_000a.xload x > /dev/ttyS0 host> cksum xosu-xos2D2c-8644_ES1_dev_000a.xload YAMON> cksum 0xa7000000
Verify that the checksum matches. Then: YAMON> xkc xload 0x1c505 0xa7000000 0xc4000000
Flash xmboot To update xmboot: YAMON> load uu 0xa7000000 host> uuencode xmasboot.bin.gz_8644_ES1_dev_000b.xload x > /dev/ttyS0 host> cksum xmasboot.bin.gz_8644_ES1_dev_000b.xload YAMON> cksum 0xa7000000
Verify that the checksum matches. Then: YAMON> xkc xload 0x1c58007 0xa7000000 0xc4000000
Flash Linux Kernel
Run the Software
Boot Linux
- After the kernel boots, enter
root at the login prompt
and press return.
- You are now logged in on the Linux system running on your
standalone SMP8654!
Load and Run MRUA
Driver and Sample Applications
- The following procedure assumes that the non-flashed software (MRUA
drivers, test applications and firmware) will be accessed through an NFS
mount. Other options include a USB or a SATA drive, but they are not
described here.
- Assume that you have burned the MIPSUtils (boot loader, Yamon
and kernel) into the parallel flash as shown earlier.
- Start the board, get a Yamon prompt and boot it to the kernel.
(See Boot Linux above)
YAMON> $b1
- Login as
root .
- Setup a network if necessary.
target$ ifconfig eth0 172.30.18.113 netmask 255.255.192.0 target$ route add default gw 172.30.0.3
- NFS mount to the host where MRUA was compiled. Note: you must
have setup NFS on the host first. For this example, we assume that your
MRUA packages are on the host under the
/export directory
and that your host's IP address is 172.30.18.64. Please modify the
command line as necessary.target$ mkdir sdk target$ modprobe nfs target$ mount -t nfs -o nolock 172.30.18.64:/export/ /sdk
- Setup some useful enviornment variables.
target$ export EM8XXX_SERVER=":0" target$ export MRUA_PACKAGE_DIR="/sdk/mrua_SMP8654_3_1_0.mips/" target$ export MRUAFW_PACKAGE_DIR="/sdk/mruafw_SMP8654_3_1_0.mips.dts/" target$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MRUA_PACKAGE_DIR/lib/ target$ export PATH=$PATH:$MRUA_PACKAGE_DIR/bin target$ export PATH=$PATH:$MRUA_PACKAGE_DIR/MRUA_src/llad_xtest target$ export PATH=$PATH:$MRUA_PACKAGE_DIR/MRUA_src/rmchannel/xos2k_client target$ export PATH=$PATH:$MRUA_PACKAGE_DIR/MRUA_src/llad_smallapps
- Create the nodes needed for Sigma's device drivers.
target$ mknod /dev/mum0 c 126 0 target$ mknod /dev/em8xxx0 c 127 0
- Insert the llad kernel module. Warning: the path may be
different depending on the settings of the UCLINUX_KERNEL that you used.
target$ insmod $MRUA_PACKAGE_DIR/modules/2.6.22/llad.ko
- The firmware is loaded using the xkc application.
- Load and run the microcode:
target$ DA=$(rmmalloc 0 2340777) target$ xkc xload 0xcafebbbb $MRUAFW_PACKAGE_DIR/video_*.xload $DA 0 target$ xkc xload 0xcafeaaaa $MRUAFW_PACKAGE_DIR/audio_*.xload $DA 0 target$ xkc xload 0xcafedddd $MRUAFW_PACKAGE_DIR/demux_*.xload $DA 0 target$ xkc ustart 0xcafedddd d target$ xkc ustart 0xcafedddd D target$ xkc ustart 0xcafebbbb v target$ xkc ustart 0xcafebbbb V target$ xkc ustart 0xcafeaaaa a target$ xkc ustart 0xcafeaaaa A target$ rmfree 0 $DA
- Insert the EM8xxx module. Warning: the path may be different
depending on the settings of the UCLINUX_KERNEL that you used.
target$ insmod $MRUA_PACKAGE_DIR/modules/2.6.22/em8xxx.ko
- Sanity test with a basic sample application.
target$ cd bin target$ ./colorbars You should see vertical colorbars on the TV
hooked up to composite and component output.
- Video playback with
test_rmfp (composite).target$ set_outports -analog -f NTSC_M target$ test_rmfp any_mpeg2_file.mpg
- Video playback with
test_rmfp (internal HDMI
720p).target$ set_outports -digital -f HDMI_720p59 -analog -f NTSC_M target$ test_rmfp any_mpeg2_file.mpg
|