Page 1 of 1

NanoPi S2 custom Android bootloader(u-boot-bin) in eflasher

Posted: Sun Jun 18, 2017 1:54 pm
by fl0wtec
Hi @FATechsupport,

I´ve compiled a custom bootloader.

For the sake of convenience, I´d like to prepare an eflasher SD card including the custom kernel. The idea is, that once the SD card is inserted it should automatically transfer android to the eMMC storage of the NanoPi S2.

Ho to include a custom kernel into the eflasher sd cards Android image?

Thanks!

Re: NanoPi S2 custom Android bootloader(u-boot-bin) in eflasher

Posted: Fri Jul 14, 2017 12:28 pm
by fl0wtec
I´ve found the solution, might be clumsy but it works for both bootloader and kernel:

BOOTLOADER
1) copy your compiled u-boot.bin to the eflasher sd card /android directory as bootloader (no fileextension!)


KERNEL
1) transfer new kernel to the board via adb

Code: Select all

adb shell mount -o remount,rw / && adb shell mkdir /boot && adb shell mount -t ext4 /dev/block/platform/dw_mmc.2/by-num/p1 /boot/ && adb push uImage /boot


2) Make boot.img on the device

Code: Select all

adb shell cat /dev/block/platform/dw_mmc.2/by-num/p1 >/sdcard/boot.img


3) Pull boot.img from device

Code: Select all

adb pull /sdcard/boot.img boot.img


4) Put boot.img in /android/ folder on eflasher SD card

5) now you can flash Android to other boards and it already contains the correct bootoader and kernel.

works for other partitions as well ie. system.img

Code: Select all

adb shell cat /dev/block/platform/dw_mmc.2/by-num/p2 >/sdcard/system.img
adb shell cat /dev/block/platform/dw_mmc.2/by-num/p7 >/sdcard/userdata.img

BR
fl0wtec