Skip to content
Snippets Groups Projects
Commit bb6c0f06 authored by Dzmitry's avatar Dzmitry
Browse files

starqltechn: automate dualbooting with u-boot

Dual boot PostmarketOS and Android with u-boot! It works by placing an additional u-boot FIT image,
and a script into overridden initramfs. Mentioned script is used to find and select image to boot.
User should enable dual-boot explicitly by enabling commented deviceinfo options,
and placing vendor boot image into device /boot directory, running 'pmbootstrap init' and
specifying vendor boot image location, if building locally.

deviceinfo_bootimg_override_initramfs:
- add android_boot_image.itb - u-boot FIT image assembled,
using extracted kernel and ramdisk from vendor image.
- add find_image_and_boot.itb - u-boot FIT image with a script
to find and boot needed image.

Set couple new options:
- deviceinfo_bootimg_override_header_info_using_vendor_image="true"
This overrides boot image header values, written in deviceinfo, by
extracted values from vendor image. This mainly needed to trick trustzone.

- deviceinfo_bootimg_vendor_android_boot_image="vendor_boot.img"
We're counting on vendor image to be on device's /boot directory in a file
with that name.

- deviceinfo_bootimg_vendor_device_tree_identifiers="qcom,msm-id\s*=\s*<0x141\s*0x20001>; qcom,board-id\s*=\s*<0x08\s*0x0e>;"
Identifiers to find a dtb, used by stock bootloader in vendor's boot image file.
parent c2d091a3
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment