6AJ SD card boot

From OMAPpedia

Jump to: navigation, search

Contents

[edit] Introduction

This page gives info on how to boot 6AJ.1.x images out of SD card.

[edit] Prerequisite

You have built all components by following the 6AJ.1.x release notes...


[edit] Preparing Android SD Card Image

[edit] Prepare boot partition files

cd $MYDROID/out/target/product/jacinto6evm
mkdir boot
cp ${YOUR_PATH}/kernel/android-3.8/arch/arm/boot/uImage boot/
cp ${YOUR_PATH}/kernel/android-3.8/arch/arm/boot/dts/dra7-evm.dtb boot/
cp ${YOUR_PATH}/u-boot/u-boot.img boot/
cp ${YOUR_PATH}/u-boot/MLO boot/

If you are using 6AJ.1.2 release, also copy the M4 binary for IPU1

cp ${YOUR_PATH}/mydroid/out/target/product/jacinto6evm/dra7-ipu1-fw.xem4 boot/

If you are using J6 Eco EVM, copy corresponding dtb file

cp ${YOUR_PATH}/kernel/android-3.8/arch/arm/boot/dts/dra72-evm.dtb boot/

[edit] Prepare file system

cd $MYDROID/out/target/product/jacinto6evm
mkdir fs
cp -Rfp root/* fs/
cp -Rfp system fs/
cp -Rfp data fs/

[edit] Hack change for SD card support in Android

Edit the $MYDROID/out/target/product/jacinto6evm/fs/init.jacinto6evmboard.rc file with below changes for SD card support

diff --git a/init.jacinto6evmboard.rc b/init.jacinto6evmboard.rc
index 204660a..64855ba 100644
--- a/init.jacinto6evmboard.rc
+++ b/init.jacinto6evmboard.rc
@@ -25,6 +25,11 @@ on init
     mkdir /storage/usb0 0000 system system
     mkdir /storage/usb1 0000 system system

+on post-fs
+    # HACK: for SD card boot mounting rootfs as rw and setuid for su
+    mount rootfs rootfs / rw remount
+    chmod 6755 /system/xbin/su
+
 on post-fs-data

     mkdir /data/media 0770 media_rw media_rw
@@ -53,7 +58,8 @@ on boot

 on fs
     mkdir /factory 0775 radio radio
-    mount_all /fstab.jacinto6evmboard
+    # HACK: Commenting out for SD card boot support
+    #mount_all /fstab.jacinto6evmboard

 # Make UART wake up capable
     write /sys/devices/ocp.2/4806a000.serial/tty/ttyO0/power/wakeup enabled

[edit] Formatting SD card

You will need to format your SD for the Linux file system. Connect your micro SD memory card reader with memory card inserted to a USB port on your Linux Ubuntu PC.

There is a shell script that performs all of the formatting required. Download it with:

$ wget http://cgit.openembedded.org/cgit.cgi/openembedded/plain/contrib/angstrom/omap3-mkcard.sh

Add execution permission:

$ chmod +x omap3-mkcard.sh

And you are ready to use it by just typing:

$sudo ./omap3-mkcard.sh <your_device (e.g. /dev/sdb)>

Once it has finished, remove and reinsert the micro SD card. If you are logged in graphically, "/media/boot" and "/media/Angstrom" will be automatically mounted. Otherwise you will need to mount them manually.

[edit] Installing the required files to micro SD

Assuming your micro SD card is mounted on "/media/boot" and "/media/Angstrom", use the following commands to populate the card:

cd $MYDROID/out/target/product/jacinto6evm
sudo cp -rf boot/* /media/boot/
sudo cp -rf fs/* /media/Angstrom/
sync

After copying the files to micro SD card, unmount the partitions and your SD card is ready for use.


[edit] Boot instructions for SD card

Hit any key to stop autoboot:  3
6AJ.1.1 Release 6AJ.1.2 Release 6AJ.1.3 Release 6AK.1.1 Release
fatload mmc 0:1 0x80300000 uImage
fatload mmc 0:1 0x80f80000 dra7-evm.dtb      
bootm 0x80300000 - 0x80f80000
fatload mmc 0:1 0x80300000 uImage
fatload mmc 0:1 0x81f80000 dra7-evm.dtb
fatload mmc 0:1 0xa0fff000 dra7-ipu1-fw.xem4
bootipu 0xa0fff000
bootm 0x80300000 - 0x81f80000
fatload mmc 0:1 0x80300000 uImage
fatload mmc 0:1 0x82f80000 dra7-evm.dtb
bootm 0x80300000 - 0x82f80000
fatload mmc 0:1 0x80300000 uImage
fatload mmc 0:1 0x82f80000 dra7-evm.dtb
bootm 0x80300000 - 0x82f80000
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox