6AL SD card boot

=Introduction=

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

=Prerequisite= You have built all components by following the 6AL.1.x 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.14/arch/arm/boot/uImage boot/ cp ${YOUR_PATH}/kernel/android-3.14/arch/arm/boot/dts/dra7*.dtb boot/ cp ${YOUR_PATH}/u-boot/u-boot.img boot/ cp ${YOUR_PATH}/u-boot/MLO 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,12 @@ 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 +   chown dhcp shell /system/etc/dhcpcd/dhcpcd-run-hooks + on post-fs-data

mkdir /data/media 0770 media_rw media_rw

diff --git a/fstab.jacinto6evmboard b/fstab.jacinto6evmboard index 1637a46..becf35e 100644 --- a/fstab.jacinto6evmboard +++ b/fstab.jacinto6evmboard @@ -3,12 +3,12 @@
 * Edit the $MYDROID/out/target/product/jacinto6evm/fs/fstab.jacinto6evmboard file with below changes for SD card support
 * 1) The filesystem that contains the filesystem checker binary (typically /system) cannot
 * 2) specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK

-/dev/block/mmcblk0p9          /system         ext4    ro                                              wait -/dev/block/mmcblk0p5          /factory        ext4    ro                                              wait -/dev/block/mmcblk0p10         /cache          ext4    noatime,nosuid,nodev    wait,check -/dev/block/mmcblk0p12         /data           ext4    noatime,nosuid,nodev    wait,check -/dev/block/mmcblk0p7          /recovery       emmc    defaults                defaults -/dev/block/mmcblk0p4          /misc           emmc    defaults                defaults +#/dev/block/mmcblk0p9         /system         ext4    ro                                              wait +#/dev/block/mmcblk0p5         /factory        ext4    ro                                              wait +#/dev/block/mmcblk0p10        /cache          ext4    noatime,nosuid,nodev    wait,check +#/dev/block/mmcblk0p12        /data           ext4    noatime,nosuid,nodev    wait,check +#/dev/block/mmcblk0p7         /recovery       emmc    defaults                defaults +#/dev/block/mmcblk0p4         /misc           emmc    defaults                defaults

/devices/44000000.ocp/488c0000.omap_dwc3_2/488d0000.usb        /storage/usb0           vfat    defaults        voldmanaged=usb0:auto /devices/44000000.ocp/48880000.omap_dwc3_1/48890000.usb        /storage/usb1           vfat    defaults        voldmanaged=usb1:auto /devices/44000000.ocp/4809c000.mmc/mmc_host/                   /storage/sdcard1        vfat    defaults        voldmanaged=sdcard1:auto

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 

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
 * Boot the board with SD card inserted
 * Power on the board and stop the board at u-boot prompt by interrupting with key press
 * Type in the following commands to boot out of SD card