Lina,
does below helps ??... could post the PDF but don't find a way to do
it, so I just copy & paste it
Simple Tutorial to Boot from Nand Flash
Contents
1 Preface
2 Precondition
3 Make Bootable SDCard
4 Make Binaries for TAO-3530
4.1 Setup and Installed the Toolchain
4.2 Setting Environments
4.3 Config Kernel
4.4 Make Binary files
5 Prepare Rootfs and Kernel in SDCARD
6 Boot and Install to Nand Flash
6.1 Flash Bootload and uImage in U-boot
6.2 Flash Root File System
7 DONE
Preface
This document is used to install and boot from nand flash for
TAO-3530.
Precondition
PC Installed with Linux Environment, Ubuntu or Fedora will be good.
U-boot# : Refers to commands executed under TAO-3503 U-boot
Tao# : Refers to commands executed under TAO-3530 Linux
Host# : Refers to commands executed at PC
Make Bootable SDCard
Current Working Directory : /root/tao-3530
Host# sudo su
Host# mkdir /root/tao-3530
Place the tao-20100625-all.tar.bz2 (
http://www.technexion.org/images/
stories/downloads/tao-series/tao-20100625-
all.tar.bz2) in /root/tao-3530
Host# cd /root/tao-3530
Host# tar xjvf tao-20100625-all.tar.bz2
Host# cd tao-20100625
Host# chmox +x mkcard.sh
Insert the empty SDCARD to Your Card Reader. If it is not empty, all
the datum inside will be destroyed.
Host# ./mkcard.sh
Choose the one SDCARD that you wanna to install.
Your Bootable SDCard is Ok to use.
Make Binaries for TAO-3530
Currently, our pre-build uImage is for Thunder. If you don't want to
recompile the kernel, please jump to Prepare
Rootfs and Kernel in SDCARD paragraph.
If you need to use WIFI, please choose the kernel in tao-20100625/
kernel/Mainline-2.6.33.4.
If you don't, tao-20100625/kernel/PSP-03.00.00.05 is
preferred(Currently, we got WIFI bug in this kernl, it will be
Simple Tutorial to Boot from Nand Flash - Technexionrd
http://10.20.30.21/mediawiki/index.php/Simple_Tutorial_to_Boot_from_Nan...
1 of 4 06/25/2010 04:26 PM
fixed latter.).
Setup and Installed the Toolchain
We currently use CodeSourcery (
http://www.codesourcery.com/) ARM GNU/
Linux tool chain
(
http://www.codesourcery.com/gnu_toolchains/arm/download.html) .
There are other toolchain you can choose. For example, BuildRoot
(
http://buildroot.uclibc.org/) .
Download and install it.
Setting Environments
We take CodeSourcery toolchain for example.
The installation folder we choose is /opt/Sourcery_G++_Lite
Export the environment parameter:
Host# export PATH=$PATH:/opt/Sourcery_G++_Lite/bin
Host# export ARCH=arm
Host# export CROSS_COMPILE=arm-none-linux-gnueabi-
Config Kernel
Please make sure your environment is setup as described before
Mainline-2.6.33.4:
Host# cd /root/tao-3530/tao-20100625/kernel/Mainline-2.6.33.4/
linux-2.6.33.4/
PSP-03.00.00.05:
Host# cd /root/tao-3530/tao-20100625/kernel/PSP-03.00.00.05/linux-
omap-2.6
Clean old settings,
Host# make distclean
Thunder:
Host# make omap3_thunder_defconfig
Inferno:
Host# make omap3_inferno_defconfig
Tsunami:
Host# make omap3_tsunami_defconfig
Make Binary files
Host# make uImage
If you can't not make uImage, you will need to install uboot-mkimage
package on your PC.
Host# make modules
Host# mkdir tmp
Host# make modules_install INSTALL_MOD_PATH=`pwd`/tmp
We now copy the kernel and modules to /root/tao-3530 folder
Host# cp arch/arm/boot/uImage /root/tao-3530/uImage.user
Host# cd tmp
Host# tar jcvf ko.tar.bz2 lib
Host# cp ko.tar.bz2 /root/tao-3530/
Done.
Simple Tutorial to Boot from Nand Flash - Technexionrd
http://10.20.30.21/mediawiki/index.php/Simple_Tutorial_to_Boot_from_Nan...
2 of 4 06/25/2010 04:26 PM
Prepare Rootfs and Kernel in SDCARD
Insert the Bootable SDCARD in your PC.
It will be mount to /media/boot and /media/roots by default.
We first make a copy of rootfs in SDCARD.
Host# cp -rfa /root/tao-3530/tao-20100625/rootfs/angstrom /media/
rootfs/home/root/
If you didn't recompile the kernel and modules, please jump to Boot
and Install to Nand Flash paragraph.
We copy the kernel to /media/boot
Host# cp /root/tao-3530/uImage.user /media/boot/
We replace the modules in /media/rootfs/home/root/angstrom
Host# rm -rf /media/rootfs/home/root/angstrom/lib/modules/2.6.32
Host# rm -rf /media/rootfs/home/root/angstrom/lib/modules/
2.6.33.4
Host# cd /media/rootfs/home/root/angstrom/
Host# tar xjvf /root/tao-3530/ko.tar.bz2
Host# sync
sync to make sure the file are wrote into the SD Card.
Boot and Install to Nand Flash
Insert SDCARD to TAO-3530. Power it on.
Connect RS-232 cable to TAO-3530 Start RS-232 Console
Flash Bootload and uImage in U-boot
press any key to stop boot process before count down.
Now, you are in U-boot(bootloader)
We first clean and set some parameter.
U-boot# nand erase clean
U-boot# setenv bootdelay '2'
U-boot# saveenv
Initial the the MMC to read from SDCARD
U-boot# mmc init
Flashing X-Loader
U-boot# fatload mmc 0:1 $loadaddr NAND_x-load.bin.ift
U-boot# nandecc hw ; nand erase 0 80000
U-boot# nand write $loadaddr 0 80000
Flashing U-Boot
U-boot# fatload mmc 0:1 $loadaddr u-boot.bin
U-boot# nandecc sw ; nand erase 80000 160000
U-boot# nand write $loadaddr 80000 160000
Flashing the kernel that you want to use.
Our prebuild kernel are uImage-2.6.33.4 and uImage-psp, they are built
for Thunder.
If you compile the kernel follow the instruction we gave, then you
will also have a uImage.user
Simple Tutorial to Boot from Nand Flash - Technexionrd
http://10.20.30.21/mediawiki/index.php/Simple_Tutorial_to_Boot_from_Nan...
3 of 4 06/25/2010 04:26 PM
Use the one that you preferred.
U-boot# fatload mmc 0:1 $loadaddr uImage-2.6.33.4
U-boot# nand erase 280000 400000
U-boot# nand write $loadaddr 280000 400000
U-boot parts are finished, we now boot from SDCARD.
U-boot# run bootcmd
Flash Root File System
Wait until the boot sequence complete. Type root to login.
We create a mount point for nand flash.
Tao# mkdir /mnt/nand
We will use JFFS2 file system for nand flash.
Tao# flash_eraseall -j /dev/mtd4
Now we mount it.
Tao# mount -t jffs2 /dev/mtdblock4 /mnt/nand
Install the rootfs into it.
Tao# cd /home/root/angstrom/
Tao# cp -rfa * /mnt/nand/
Tao# sync
Tao# umount /mnt/nand
Tao# poweroff
Wait until System halted.
Unplug the SDCARD and press the RESET BUTTOM
After you boot from nand flash. Don't forget to do depmod -a to make
sure all modules will work.
Tao# depmod -a
DONE
Retrieved from "
http://10.20.30.21/mediawiki/index.php/
Simple_Tutorial_to_Boot_from_Nand_Flash"
This page was last modified on 25 June 2010, at 08:23.
Simple Tutorial to Boot from Nand Flash - Technexionrd
http://10.20.30.21/mediawiki/index.php/Simple_Tutorial_to_Boot_from_Nan...
4 of 4 06/25/2010 04:26 PM