Power & Source of Big Ideas

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

Moderators: chensy, FATechsupport

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!
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

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 5 minutes)
Most users ever online was 42 on 15 Jul 2016, 01:04

Users browsing this forum: No registered users and 2 guests