6AJ SD card boot

From OMAPpedia

Revision as of 21:59, 20 August 2013 by Vishalm (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Introduction

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

Prerequisite

You have built all components by following the release notes - http://omapedia.org/wiki/6AJ.1.1_Release_Notes


Preparing Android SD Card Image

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/
cp ${YOUR_PATH}/u-boot/boot.scr boot/

Prepare file system

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

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

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.

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.


Boot instructions for SD card

Hit any key to stop autoboot:  3
fatload mmc 0:1 0x80300000 uImage
fatload mmc 0:1 0x80f80000 dra7-evm.dtb
bootm 0x80300000 - 0x80f80000
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox