Zoom Flashing

From OMAPpedia

Jump to: navigation, search

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 / Zoom OMAP36x. 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 /tmp/mmc1

Loading Xloader

Copying xloader (MLO) onto SD boot partition:

# sudo cp -rf /tmp/mmc1

Loading Kernel

Copying uboot onto SD boot partition:

# sudo cp -rf /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 /tmp/mmc2

[edit] Flash NAND

[edit] Setup

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

[edit] Flashing u-boot and xloader to nand via dhcp

First, you will need to get the u-boot image into memory. Fetching u-boot via dhcp.

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

setenv serverip 128.247.78.27
dhcp 80008000 u-boot.bin

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

nand ecc sw
nand unlock 80000 80000
nand erase 80000 80000
nand write 80008000 80000 80000

Fetching x-loader via dhcp You will need to have a dhcp server on the network and a host running a tftp server with the nand version of the x-loader.

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
nand write 80c00000 20000 20000
nand write 80c00000 40000 20000
nand write 80c00000 60000 20000

[edit] Flashing u-boot and xloader to nand from MMC/SD card

Make a bootable MMC/SD card, 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
//gives the file sizes needed later
# fatls mmc 0

Flashing u-boot into the NAND:

fatload mmc 0  80008000 u-boot.bin
nand ecc hw
nand unlock
nand erase 80000 40000
nand write.i 80008000 80000 ${filesize}

Flashing x-loader into the NAND:

fatload mmc 0  80008000 MLO
nand ecc hw
nand unlock
nand erase 0 40000
nand write.i 80008000 0 ${filesize}

Flashing uImage into the NAND:

fatload mmc 0 90000000 uImage
nand ecc hw
nand unlock
nand write.i 90000000 0x280000 ${filesize}

[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 -rav
# 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# setenv serverip 128.247.77.47
HT# dhcp 80008000 u-boot.bin
HT# nand unlock; nand ecc hw; nand erase 80000 40000; nand write 80008000 80000 40000
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=ttyS3,115200n8 noinitrd mem=112M root=/dev/nfs rw nfsroot=128.247.77.43:/home/user/l25.7/myfs/,nolock,wsize=1024,rsize=1024 ip=dhcp init=/init
HT# setenv bootcmd 'dhcp 80300000 uImage; bootm'
HT# saveenv
HT# printenv
HT# boot

Note: Refer to Android Boot Args section for updated boot args for specific releases on Android (L25x).

The above steps can also be accomplished by loading the boot files from an SD card, using the fatload command. Simply copy the uboot, MLO and uImage to an SD card and connect it to the device. The below steps are completed within a Terminal:

//initialize the sd card
HT# mmc init 0
//list the files on the sd card (note the size of each file)            
HT# fatls mmc 0
HT# nand unlock
HT# nand ecc sw
//load uboot, replace 185360 with the file size (viewed when using fatls)
HT# fatload mmc 0 80008000 u-boot.bin 185360
HT# nand unlock; nand ecc sw; nand erase 80000 40000; nand write 80008000 80000 40000
HT# nand unlock
HT# nand ecc sw
//load MLO, replace 17948 with file size (viewed when using fatls)
HT# fatload mmc 0 80008000 mlo 17948
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 bootfile 'uImage'
HT# setenv bootargs console=ttyS3,115200n8 noinitrd mem=112M root=/dev/nfs rw nfsroot=128.247.77.43:/home/user/l25.7/myfs/,nolock,wsize=1024,rsize=1024 ip=dhcp init=/init
//set boot command, replace 1836076 with uImage file size (viewed when using fatls)
HT# setenv bootcmd 'mmc init 0; fatload mmc 0 80300000 uImage 1836076; bootm'
HT# saveenv
HT# printenv
HT# boot

[edit] Serial Boot Procedure

[edit] Software & Tools

This procedure is used for Zoom1 (LDP). The following software is needed:

- X-loader should be built accordingly to load a 2nd stage bootloader over a serial connection as in the note of 'Build X-loader' section.

- The u-boot should be built for Zoom1. Refer to 'Note'

- The serial-boot.pl script from the Zoom support-tools project. Please note that this perl script is dependent on the perl Device::SerialPort module which may or may not be included in your Linux host distribution. You can download SerialPort and install the module manually or use your Linux host's package manager to install it. For example...

To install this module on a Fedora Host execute:

 "yum install perl-Device-SerialPort"

To install this module on a Debian/Ubuntu execute:

  "apt-get install libdevice-serialport-perl"

- Kermit. For this example, we use C-Kermit.

- A Linux host with a serial port that supports the UART Status IOCTL (TIOCSERGETLSR) otherwise the serial-boot.pl script will not work. It was found that some usb-to-serial adaptors do not support this.


[edit] Downloading U-boot Over Serial

- Power-off the Zoom - Connect the Zoom to the host's serial port. - Execute the serial-boot.pl script as follows:

    ./serial-boot.pl -p  -s /x-load-serial.bin 
For example: ./serial-boot.pl -p /dev/ttyS0 -s /home/user/x-load-serial.binPower-on the Zoom and the x-loader download should start.

Once x-loader has been downloaded successfully, execute the following command to start the kermit transfer of u-boot.

    kermit -C "set line ,set speed 115200,set flow-control rts/cts,set carrier-watch off,set prefixing all,send u-boot.bin,connect" 
For example: kermit -C "set line /dev/ttyS0,set speed 115200,set flow-control rts/cts,set carrier-watch off,set prefixing all,send u-boot.bin,connect"

Once the kermit transfer has completed, you should see u-boot start-up. At this point you can follow the 'Flash NAND' procedure listed above in this page to flash an x-loader and u-boot into the nand.


[edit] Signing Tool

Simple GP device signing tool (right click and "save link as" omap3430gp-signer.pl) can be obtained here.



Personal tools
Namespaces
Variants
Views
  • Read
  • Edit
  • View history
Actions
Navigation
Toolbox
  • What links here
  • Related changes
  • Special pages
  • Printable version