User:Äxl/Android on SD card

This page will describe how to take an installed stock firmware and put it on a SD card to boot e.g. Android from there and Linux from NAND. If you want to "Extract and build the stock image (Windows)" you might look here: https://www.miniand.com/wiki/Allwinner/Unpacking+and+building+LiveSuit+images

unpackbootimg tool from Android source
http://code.google.com/p/android-serialport-api/downloads/detail?name=android_bootimg_tools.tar.gz&can=2&q=

U-Boot
mkdir /sdcard/boot mount /dev/block/nanda /sdcard/boot It's linux/u-boot.bin

boot.img
Check cat /proc/partitions for the /system partition and adjust count= as necessary: dd if=/dev/block/nandc of=/sdcard/boot.img bs=1M count=32768

SSH/SCP it together with u-boot.bin to your PC.

Unpack boot.img
If necessary: chmod +x unpackbootimg ./unpackbootimg -i boot.img You'll need boot.img-zImage (kernel) and boot.img-ramdisk (from boot.img-ramdisk.gz) from that.

Adjust mount on init.sun4i.rc
Unpack boot.img-ramdisk and edit init.sun4i.rc like this: /system: nandd becomes mmcblk0p2 /data: nande becomes mmcblk0p3 /cache: nandg becomes mmcblk0p4 /UDISK: nandi becomes mmcblk0p5

Repack boot.img-ramdisk: find. | cpio -H newc -o | gzip -9 >../ramdisk.gz