Zoom3 Boot Instructions

=Setting up a bootable SD Card to Start= You will need to format your SD/MMC Card for the Linux file system, so with a card reader connect the card to your Linux Ubuntu PC and run the command: sudo fdisk –l  Match the device to the size of your memory card. Look for the /dev/**** device which matches the memory card in the memory card. Use the matching device’s letter prefix in the next command. For example if the device for memory card reader+ card example was: /dev/sdb1, then use only /dev/sdb in the fdisk command. Take note of the size in bytes of your SD Card. You will need this to calculate the number of cylinders in a future step. Run the step: fdisk /dev/sdb (replace “b” with the letter prefix for your device) Use these steps: (Delete all partitions on the card if they exist) Command (m for help): d  Partition number (1-4): 1  Command (m for help): d  Selected partition 2  Command (m for help): x  (Change the number of heads, sectors and cylinders on the device)<BR> Expert command (m for help): h<BR> Number of heads (1-256, default 255): 255 <BR> Expert command (m for help): s <BR> Number of sectors (1-63, default 63): 63 <BR> Expert command (m for help): c <BR> Number of cylinders (1-1048576, default 248): <You must calculate the number of cylinders for your SD card. To do this, use the following formula: <BR><BR>

new_cylinders = (Size in bytes from your fdisk –l command)/8225280 <BR> Drop any fractional values and enter the whole number in this command. Use this number all the steps that refer to the number of cylinders> <BR><BR>

Now return to the main menu) <BR> Expert command (m for help): r <BR>

(Create the first partition)<BR> Command (m for help): n <BR> Command action <BR> e  extended <BR> p  primary partition (1-4)<BR></ul> p <BR> Partition number (1-4): 1 <BR> First cylinder (1-248, default 1): 1 <BR> Last cylinder or +size or +sizeM or +sizeK (1-248, default 248): +64M <BR><BR>

(Create the second partition)<BR> Command (m for help): n <BR> Command action <BR> e  extended <BR> p  primary partition (1-4)<BR></ul> p <BR> Partition number (1-4): 2 <BR> First cylinder (10-248, default 10): 10 <BR> Last cylinder or +size or +sizeM or +sizeK (124-248, default 248): <use the cylinder value you calculated earlier> <BR><BR>

Change the first partition to at FAT32 partition)<BR> Command (m for help): t <BR> Partition number (1-4): 1 <BR> Hex code (type L to list codes): c <BR> Changed system type of partition 1 to c (W95 FAT32 (LBA)) <BR>

(Toggle the bootable flag for partition 1)<BR> Command (m for help): a <BR> Partition number (1-4): 1 <BR><BR>

Print the partition table to confirm your settings)<BR> Command (m for help): p <BR>

Sample Output – your output may differ depending on your SD card’s size and brand)<BR> Disk /dev/sdb: 2041 MB, 2041577472 bytes <BR> 255 heads, 63 sectors/track, 248 cylinders <BR> Units = cylinders of 16065 * 512 = 8225280 bytes <BR> Disk identifier: 0x00000000 <BR>

Device Boot     Start         End      Blocks   Id  System <BR> /dev/sdb1  *           1         9        72261     c  W95 FAT32 (LBA) <BR> /dev/sdb2             10       248     1919767+    83  Linux <BR></ul>

(Write your changes to the SD Card)<BR> Command (m for help): w <BR>

(You will see the following output) <BR> The partition table has been altered! <BR>

Calling ioctl to re-read partition table. <BR>

WARNING: If you have created or modified any DOS 6.x partitions, please see the fdisk manual page for additional information. Syncing disks. <BR>

Format your partitions typing the following commands (logged as root@ubuntu-box): <BR> $ mkfs.vfat -F 32 -n boot /dev/<your device’s first partition’s name – see the print output from the previous step> <BR> $ mkfs.ext3 /dev/<your device’s second partition’s name – see the print output from the previous step> <BR></ul>

NOTE: when you need to replace the content of one partition, it is strongly advised to re-format it using above commands, especially for boot partition. <BR>

Now type the following to mount your SD Card on your Linux box (logged as root@ubuntu-box): <BR> mkdir /tmp/mmc1 <BR> mkdir /tmp/mmc2 <BR> sudo mount /dev/sdb1 /tmp/mmc1 <BR> sudo mount /dev/sdb2 /tmp/mmc2 <BR></ul>

Load the appropriate software to the SD Card:<BR> $ sudo cp $POKY/build/tmp/deploy/images/MLO-zoom3-xxx /tmp/mmc1/MLO <BR> $ sudo cp $POKY/build/tmp/deploy/images/u-boot-zoom3-xxx.bin /tmp/mmc1/ u-boot-zoom3.bin <BR> $ sudo cp $POKY/build/tmp/deploy/images/uImage-xxx.bin /tmp/mmc1 <BR></ul>

Umount partitions prior to remove SD Card” <BR> $ cd / <BR> $ sudo umount /tmp/mmc1 <BR> $ sudo umount /tmp/mmc2 <BR><BR></ul>

=Booting everything on the SD Card= This is the steps to flash and boot the POKY file system on a Zoom3 from an SD card.

For the Image and File System on the SD Card<BR> Follow these steps by copying the poky file system located in ${POKY}/build/tmp/deploy/images The name is something like this omap-image-sato-zoom3-20100204184744.rootfs.tar.gz <BR> Uncompress as sudo user this file in the second partition for the SD card, if you followed the above steps the path for uncompress the tar file is /tmp/mmc2 or /media/disk

Now use this bootargs in order to load the image and file system from the SD card.

In teraterm or minicom insert this bootargs (IP address based on your setup.)

nand unlock nand ecc sw   setenv ipaddr 10.87.224.99 setenv gatewayip 10.87.224.1 setenv serverip 10.87.230.185 setenv ethaddr 08:00:EE:03:7D:C1 setenv video omap_vout_mod.video1_numbuffers=4 omap_vout_mod.vid1_static_vrfb_alloc=y omap_vout_mod.video2_numbuffers=4 omap_vout_mod.vid2_static_vrfb_alloc=y setenv bootargs=console=ttyS3,115200n8 noinitrd mem=256M root=/dev/mmcblk0p2 rw rootdelay=1 init=/sbin/init ip=dhcp omap_vout_mod.video1_numbuffers=4 omap_vout_mod.vid1_static_vrfb_alloc=y omap_vout_mod.video2_numbuffers=4 omap_vout_mod.vid2_static_vrfb_alloc=y setenv bootcmd=mmcinit 0; fatload mmc 0 80300000 uImage-zoom3.bin; bootm 0x80300000 set bootdelay 2 saveenv boot </ul>

=Boot uImage, u-boot, and x-loader from SD, filesystem via NFS=

NFS will allow you to access the root file system on a network location. The platform will access the remote file system using Ethernet ETH0 over the ZOOM3 Ethernet connector.<BR> Uncompress as sudo user this file omap-image-sato-zoom3-20100204184744.rootfs.tar.gz in your NFS folder.<BR> Change “home/nfs” in etc/exports to match your unzipped rootfs. If needed change permissions and owner.<BR> Use the next bootargs (IP address based on your setup.)

setenv ipaddr 10.87.224.99 setenv gatewayip 10.87.224.1 setenv serverip 10.87.230.185 setenv ethaddr 08:00:EE:03:7D:C1 setenv video omap_vout_mod.video1_numbuffers=4 omap_vout_mod.vid1_static_vrfb_alloc=y omap_vout_mod.video2_numbuffers=4 omap_vout_mod.vid2_static_vrfb_alloc=y setenv bootargs=mem=256M console=ttyS3,115200n8 noinitrd root=/dev/nfs rw nfsroot=128.247.79.194:/home/jmills/nfs.l23,nolock,devfs=mount ip=dhcp nfsvers=3,tcp omap_vout_mod.video1_numbuffers=4 omap_vout_mod.vid1_static_vrfb_alloc=y omap_vout_mod.video2_numbuffers=4 omap_vout_mod.vid2_static_vr_vrfb_alloc=y setenv bootcmd=mmcinit 0; fatload mmc 0 80300000 uImage-zoom3.bin; bootm 0x80300000 set bootdelay 2 saveenv boot

“nfsroot=128.247.79.194:/home/jmills/nfs.l23” changes this for your file system location.

=Boot uImage, u-boot, and x-loader from SD, filesystem from NAND=

Refer to Zoom_Flashing for information regarding uboot and xloader to flash in NAND.

First, boot using the filesystem omap-image-minimal-mtdutils and copy into it filesystem tarball to be flashed: omap-image-zoom3.tar.gz, then execute into the console:

cd / flash_eraseall -j /dev/mtd4 mkdir -p /mnt/nand mount -t jffs2 /dev/mtdblock4 /mnt/nand cd /mnt/nand tar -zxvf <poky-fs.tar.gz> sync cd / umount /mnt/nand

Then reboot the system using following bootargs (for zoom3):

bootcmd=mmcinit 0; fatload mmc 0 80300000 uImage-zoom3.bin; bootm 0x80300000 setenv video_settings omap_vout_mod.video1_numbuffers=4 omap_vout_mod.vid1_static_vrfb_alloc=y omap_vout_mod.video2_numbuffers=4 omap_vout_mod.vid2_static_vrfb_alloc=y setenv bootargs console=ttyS3,115200n8 noinitrd mem=256M root=/dev/mtdblock4 rw rootdelay=3 init=/sbin/init rootfstype=jffs2 devfs=mount ip=dhcp $video_settings