Skip to content

tmlind/droid4-kexecboot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kexecboot based bootloader images for droid 4

These images can be flashed to the 4MB mmcblk1p13 "bpsw" on droid 4 eMMC for a
kexec based bootloader. We can now configure the stock bootloader to boot to
mmcblk1p13 partition using utagboot bootloader configurator. And then we can
use kexecboot for a GUI to boot a newer kernel to the selected distro. We can
now also boot to the stock Android and SafeStrap using pivot_root.


USAGE

See files PARTITIONS, INSTALL and CONFIGURATION for how to install and use
droid4-kexecboot.


BUILDING FROM SOURCES

Use the buildroot git tree for most recent droid4 work branch at:

https://github.com/tmlind/buildroot

Then just do:

$ git checkout droid4-kexecboot-2017.11
$ make droid4_kexecboot_defconfig
$ make
...
$ sudo dd if=/dev/zero of=/tmp/boot.img bs=1M count=4
$ sudo mkfs.ext2 /tmp/boot.img
$ sudo mount -o loop /tmp/boot.img /mnt
$ sudo tar xf output/images/rootfs.tar -C /mnt
$ sudo umount /mnt

And then you should be able to flash /tmp/boot.img to mmcblk1p13 bpsw
partition on droid 4 as described in INSTALL above. The binary for
utags-mmcblk1p13.bin is generated with utagboot at:

https://github.com/tmlind/utagboot

And probably does not need to be changed unless you want some custom
kernel cmdline options for the stock kernel when booting to buildroot.


DEVELOPER ACCESS VIA SERIAL PORT

You can build a USB to serial adapter for droid 4 using the instructions at:

http://muru.com/linux/d4/

And then you need to configure droid4-kexecboot image to set proper user and
password or at least a root password. Or rebuild the image with Kconfig option
BR2_TARGET_ENABLE_ROOT_LOGIN enabled.


KNOWN ISSUES

Current v3.0.8 based Android images depend on SafeStrap configuration being on
mmcblk1p25 vfat partition. If somebody fixes the Android images for their
initramfs to use the root partition based on kernel command line, we should be
able to also boot Android images. And then mmcblk1p25 can be formatted as ext4
and is usable for distros.

Note that the stock v3.0.8 kernel does not seem to survive kexec boot at all.
To boot to the stock v3.0.8 kernel, we start kexecboot as pid 1 so we can
pivot_root to the stock Android distro if selected in kexecboot.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published