Save bootargs from 1st stage bootloader like linux does

Dzmitry Sankouski dsankouski at gmail.com
Mon Jan 10 16:01:08 CET 2022


I'm working on a project to bring mainline linux kernels to android phones.
I'm planning to use u-boot as a secondary stage bootloader packed in
android boot image,
so that linux kernel is replaced with u-boot, and initramfs is replaced
with FIT image.

This approach allows to use u-boot on a phone without much pain with
storage drivers.

Obviously, u-boot should know initramfs load address. It can be obtained
from initrd-start
device tree option. However, on arm64 address to the right device tree is
provided in x0 CPU
register.

Would you accept a patch to preserve boot args on arm64?


More information about the U-Boot mailing list