Zoom3 Boot Instructions
From OMAPpedia
Contents |
[edit] 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
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)
Expert command (m for help): h
Number of heads (1-256, default 255): 255
Expert command (m for help): s
Number of sectors (1-63, default 63): 63
Expert command (m for help): c
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:
new_cylinders = (Size in bytes from your fdisk –l command)/8225280
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>
Now return to the main menu)
Expert command (m for help): r
(Create the first partition)
Command (m for help): n
Command action
- e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-248, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-248, default 248): +64M
(Create the second partition)
Command (m for help): n
-
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (10-248, default 10): 10
Last cylinder or +size or +sizeM or +sizeK (124-248, default 248): <use the cylinder value you calculated earlier>
Change the first partition to at FAT32 partition)
Command (m for help): t
Partition number (1-4): 1
Hex code (type L to list codes): c
Changed system type of partition 1 to c (W95 FAT32 (LBA))
(Toggle the bootable flag for partition 1)
Command (m for help): a
Partition number (1-4): 1
Print the partition table to confirm your settings)
Command (m for help): p
Sample Output – your output may differ depending on your SD card’s size and brand)
Disk /dev/sdb: 2041 MB, 2041577472 bytes
255 heads, 63 sectors/track, 248 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
-
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 9 72261 c W95 FAT32 (LBA)
/dev/sdb2 10 248 1919767+ 83 Linux
(Write your changes to the SD Card)
Command (m for help): w
(You will see the following output)
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: If you have created or modified any DOS 6.x partitions, please see the fdisk manual page for additional information.
Syncing disks.
-
$ mkfs.vfat -F 32 -n boot /dev/<your device’s first partition’s name – see the print output from the previous step>
$ mkfs.ext3 /dev/<your device’s second partition’s name – see the print output from the previous step>
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.
-
mkdir /tmp/mmc1
mkdir /tmp/mmc2
sudo mount /dev/sdb1 /tmp/mmc1
sudo mount /dev/sdb2 /tmp/mmc2
-
$ sudo cp $POKY/build/tmp/deploy/images/MLO-zoom3-xxx /tmp/mmc1/MLO
$ sudo cp $POKY/build/tmp/deploy/images/u-boot-zoom3-xxx.bin /tmp/mmc1/ u-boot-zoom3.bin
$ sudo cp $POKY/build/tmp/deploy/images/uImage-xxx.bin /tmp/mmc1
-
$ cd /
$ sudo umount /tmp/mmc1
$ sudo umount /tmp/mmc2
[edit] 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
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
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
[edit] 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.
Uncompress as sudo user this file omap-image-sato-zoom3-20100204184744.rootfs.tar.gz in your NFS folder.
Change “home/nfs” in etc/exports to match your unzipped rootfs. If needed change permissions and owner.
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.
[edit] 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