3630SDP Flashing

From OMAPpedia

(Difference between revisions)
Jump to: navigation, search
(Flash NAND)
(FileSystem flashing)
 
Line 119: Line 119:
OR ===>  fatload mmc 0 90000000 poky.jffs2
OR ===>  fatload mmc 0 90000000 poky.jffs2
nand write.i 0x90000000 0x780000 ${filesize}
nand write.i 0x90000000 0x780000 ${filesize}
-
 
</pre>
</pre>

Latest revision as of 10:54, 26 March 2010

Contents

[edit] Flash SD

The OMAP processor follows a 2 stage boot process. Details on the boot procedure can be found at the boot sequence page.

SD flashing seems to be the fastest way to load files into the zoom2. However, a SD card must be formatted with the correct partitions prior to flashing any device. Once the SD is configured it will contain two separate partitions that will be used to boot the device. The FAT32 partition is used for uboot, xloader, and kernel. The ext3 partitions is used for the actual file system. Once both of these are loaded onto an SD the device can boot up and run the selected file system.


[edit] SD Configuration

Refer to SD Configuration process for a complete walk though on creating and testing a SD card. Once a SD card is prepared uboot, xloader, and kernel can then be loaded on the SD correct partitions.


[edit] Loading Bootloader, Kernel and Filesystem

Loading Uboot

Copying uboot onto SD boot partition:

# sudo cp -rf <location_of_uboot.bin> /tmp/mmc1

Loading Xloader

Copying xloader (MLO) onto SD boot partition:

# sudo cp -rf <location_of_MLO> /tmp/mmc1

Loading Kernel

# sudo cp -rf <location_of_uImage> /tmp/mmc1

Loading Filesystem Select a file system to build. (Android, Linux, Poky, Angstrom, Busybox, etc...)

Copying filesystem onto SD disk partition:

# sudo cp -rf <location_of_rootfilesystem> /tmp/mmc2

[edit] Flash NAND

[edit] Setup

u-boot and xloader images should be built prior to flashing to NAND. Refer to Omap Omap Bootloader Project for instructions on building uboot and xloader images.

[edit] Flashing u-boot and xloader to nand for first time

First, you will need to get the u-boot image into memory card using steps explained above.

Switch settings: Make sure the switch settings are set according to below table to boot from memory card:

MMC Boot Switch settings

Switch 1 2 3 4 5 6 7 8
S10ONOFFOFFONONONONON
S9ONONONOFFOFFOFFOFFOFF
S8ONONOFFONONONONOFF
S6ONONONOFFONONONOFF
S4OFFOFFOFFOFFOFFOFFONON
S14OFFONONONONONONON

With above switch settings, insert the memory card with preloaded x-loader and u-boot images and boot the board. Run the following commands to flash boot loader into NAND flash.

mmcinit 0
[edit] u-boot flashing
fatload mmc 0  80008000 u-boot.bin
nand ecc hw
nand erase 80000 40000
nand write.i 80008000 80000 40000
[edit] X-loader flashing
fatload mmc 0  80008000 MLO
nand ecc hw
nand erase 0 40000
nand write.i 80008000 0 40000
[edit] uImage flashing
fatload mmc 0 90000000 uImage
nand ecc hw
nand write.i 90000000 0x280000 ${filesize}
[edit] FileSystem flashing
nand erase 0x780000 0x0A000000
tftp 90000000 poky.jffs2
OR ===>  fatload mmc 0 90000000 poky.jffs2
nand write.i 0x90000000 0x780000 ${filesize}

After successful write operation, change the switch settings according to below table to boot from NAND

NAND Boot Switch settings

Switch 1 2 3 4 5 6 7 8
S10ONOFFOFFONONONONON
S9 OFF OFFONOFFOFFOFFOFFOFF
S8ONONOFFONONONONOFF
S6ONONONOFFONONONOFF
S4OFFOFFOFFOFFOFFOFFONON
S14OFFONONONONONONON

[edit] Updating u-boot and xloader to nand

Fetching u-boot via tftp

You will need to have a tftp server on the network and a host running a tftp server with the file u-boot.bin.

setenv serverip 128.247.78.27
tftpboot 80008000 u-boot.bin

Flashing u-boot into the Nand (be careful with the number of zeros)

nand ecc hw
nand unlock 80000 80000
nand erase 80000 80000
nand write 80008000 80000 80000

Fetching x-loader via dhcp You will need to have a tftp server on the network and a host running a tftp server with the file MLO

setenv serverip 128.247.78.27
dhcp 80c00000 MLO

Flashing x-loader into the Nand (Note: need to use hw ecc for this)

nand ecc hw
nand unlock 0 80000
nand erase 0 80000
nand write 80c00000 0 20000

[edit] Flash TFTP Kernel and NFS

[edit] SETUP TFTP ON LINUX PC

# sudo apt-get install xinetd tftpd tftp
# sudo gedit /etc/xinetd.d/tftp

Add the following, save and exit

service tftp
{
protocol = udp
port = 69
socket_type = dgram
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = -s /home/user/tftpboot
disable = no
}


# sudo mkdir /home/user/tftpboot
# sudo chmod -R 777 /home/user/tftpboot
# sudo chown -R nobody /home/user/tftpboot
# sudo /etc/init.d/xinetd stop
# sudo /etc/init.d/xinetd start
# cd /home/user/tftpboot
# cp /home/user/l25.7/mydroid/bootloader/x-loader/MLO .
# cp /home/user/l25.7/mydroid/bootloader/u-boot/u-boot.bin .
# cp /home/user/l25.7/mydroid/kernel/arch/arm/boot/uImage .
// use ifconfig to determine ip address - and use this for bootargs and serverip
# ifconfig


[edit] SETUP NFS

# sudo aptitude -P install nfs-kernel-server nfs-common portmap
//Specifically choose "No Loopback" to enable listening on other IPs
# sudo dpkg-reconfigure portmap
# cd /etc
# gedit exports
//add this line
/home/user/l25.7/myfs *(rw,sync,no_subtree_check,no_root_squash)
//make changes effective
# sudo exportfs -a
# sudo /etc/init.d/nfs-kernel-server restart
 
WRITE XLOADER AND UBOOT TO NAND
// UBOOT and MLO (xloader) should be in tftpboot directory
//  setup to configure bootargs - like in tutorial #1
HT# nand unlock
HT# nand ecc sw
HT# setenv serverip 128.247.77.47
HT# dhcp 80008000 u-boot.bin
HT# nand unlock; nand ecc sw; nand erase 80000 40000; nand write 80008000 80000 40000
HT# nand unlock
HT# nand ecc sw
HT# setenv serverip 128.247.77.47
HT# dhcp 80008000 MLO
HT# nand unlock; nand ecc hw; nand erase 0 40000; nand write 80008000 0 40000
 
SET BOOTARGS TO USE NFS AND TFTP
HT# nand unlock
HT# nand ecc sw
HT# setenv serverip 128.247.77.47
HT# setenv bootfile 'uImage'
HT# setenv bootargs console=ttyS0,115200n8 root=/dev/nfs rw nfsroot=172.24.137.170:/home/manju/fs/fs-test target,nolock,tcp,rsize=1024,wsize=1024  mem=128M ip=dhcp;
HT# setenv bootcmd 'tftp 80300000;bootm 80300000'
HT# saveenv
HT# printenv
HT# boot



Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox