EMMC binaries
This was the EFI partition table as exists on the EMMC
sector# Size Name 128K xloader 256K bootloader 2048 8M recovery 18432 8M boot 34816 512M system 1083392 256M cache 1607680 512M userdata 2656256 2183M Media
[edit]Creating the GPT table
-
On Target
- Connect a USB cable to the OTG port on your platform
- Boot your platform up with a stock u-boot and MLO
- Once you platform are booted you'll see the following:
FastBoot entered ...
-
On Host Machine
Locate FastBoot in Android filesystem
CD $mydroid/out/host/linux-x86/bin/fastboot
Search for FastBoot devices
FastBoot devices
Create GPT table on EMMC/SD card
FastBoot OEM Format
From the Android build these is the binaries that go to each partition:
sector# Size Name Binary 128K xloader MLO 256K bootloader u-boot.bin 2048 8M Recovery recovery.img 18432 8M boot boot.img 34816 512M system System.img 1083392 256M cache cache.img 1607680 512M userdata userdata.img 2656256 2183M Media None
-
File Locations
- MLO-X-loader/mlo
- U-boot-U-boot/u-boot.bin
- BOOT.IMG--Need to create using Zimage + ramdisk.img
- RECOVERY.IMG---> Need to create using Zimage + ramdisk-recovery.img
- System.img-$mydroid/out/target/product/<platform>/system.img
- Cache.img--
- Userdata.img-$mydroid/out/target/product/<platform>/userdata.img
All these partitions can is flashed with the given binary using FastBoot.
FastBoot Flash <name> <binary>
Example flashing of all partitions
FastBoot Flash xloader MLO fastboot flash bootloader u-boot.bin fastboot Flash recovery recovery.img FastBoot Flash boot boot.img fastboot Flash system system.img fastboot Flash cache cache.img fastboot flash u Serdata userdata.img
[edit]modifying. IMG Files
Typically when you want to modify any of the partitions, you would need to unzip-modify-rezip and then FastBoot Flash.
Following section talks about what to do, for each partition
BOOT. Img
boot.img = zimage + ramdisk.img zimage = Kernel image ramdisk.img = out/target/product/blaze/root/%./out/host/linux-x86/b In/mkbootimg --kernel zimage --ramdisk ramdisk.img --base 0x80000000 --cmdline "Console=ttyo2, 115200N8 [email protected] [email protected] init=/init vram=10m omapfb.vram=0:4m androidboot.console=ttyo2 " -- Board OMAP4- o boot.img.new Output:boot.img.new **note:bootarg is passed to kernel via--cmdline option above **note : For PandaBoard ES,--CmdLine should is mmodified as "console=ttyo2,115200n8 [email protected] [email protected] Init=/init vram=32m omapfb.vram=0:16m Androidboot.console=ttyo2 "
To ' just ' boot boot.img (before flashing) you can use:
%fastboot Boot boot.img
RAMDISK. Img
%mkdir root%CD root%gunzip-c. /ramdisk.img | Cpio-i <make changes to root/contents...>%./out/host/linux-x86/bin/mkbootfs root/|./out/host/linux-x86/bin/ Minigzip >ramdisk.img.new #output: ramdisk.img.new * * Note:any init.rc changes would need to use this method
RECOVERY. Img
is just like boot.img. recovery.img = Zimage + Ramdisk-recovery.img*follow The same steps as boot.img for packing/unpacking
SYSTEM. Img
#uncompress%./out/host/linux-x86/bin/simg2img system.img system.img.raw #mount to directory mnt-point/%mkdir Mnt-point%sudo mount-t ext4-o loop system.img.raw mnt-point/#modify any. So or apk in the Mnt-point/directory #rezip %sudo out/host/linux-x86/bin/make_ext4fs-s-L 512m-a system system.img.new mnt-point/%sudo umount mnt-point/output:sy Stem.img.new
Instead of have to reflash the whole big system.img, one can selective update any binary In/system folder on running TA Rget
%ADB remount%adb push <local> <remote>eg:%adb remount%adb push out/target/product/blaze/obj/lib/ OVERLAY.OMAP4.SO/SYSTEM/LIB/HW/OVERLAY.OMAP4.SO%ADB Sync
USERDATA. Img
#uncompress%./out/host/linux-x86/bin/simg2img userdata.img userdata.img.raw #mount to directory mnt-point/%mkdir Mnt-point%sudo mount-t ext4-o loop userdata.img.raw mnt-point/#modify any. So or apk in the Mnt-point/directory #rezi P #%sudo./out/host/linux-x86/bin/make_ext4fs-s-L 512m-a userdata userdata.img.new mnt-point/# Above command won ' t wor K on GB/HC. For GB/HC, please use the following updated command%sudo./out/host/linux-x86/bin/make_ext4fs-s-L 512M-A data UserData . img.new mnt-point/%sudo umount mnt-point/output:userdata.img.new
CACHE. Img
#This is empty EXT4 fs image%mkdir mnt-point/%sudo./make_ext4fs-s-L 256m-a cache cache.img Mnt-point/output:cache. Img
[edit]TI Android Build Setup
Copy kernel zimage, u-boot.bin and MLO for your board in folder device/ti/blaze/boot/.
Rename as:
%MV MLO mlo_es2.2_emu or%MV MLO MLO_ES2.2_GP (based on your board being GP or EMU)
Next start standard Android Build and all IMG files is generated in:
Out/target/product/blaze/*.img
A script is introduced on TI Android release to make this flashing process easier:device/ti/blaze/boot/fastboot.sh
USAGE:CD device/ti/blaze/boot/%fastboot.sh--emuor%fastboot.sh--GP
Running This script would flash whole Android system on your board.
Android EMMC Booting[wiki Encyclopedia]