[PATCH v2 3/5] boot: android: Add bootconfig support
Mattijs Korpershoek
mkorpershoek at kernel.org
Fri Nov 7 15:52:09 CET 2025
On Mon, Nov 03, 2025 at 19:52, Guillaume La Roque <glaroque at baylibre.com> wrote:
> Hi,
>
[...]
>>> + unmap_sysmem(ramdisk_dest);
>> We are here in the "if (img_data.header_version > 2) {" block.
>> What about boot image v3? Why are we forcing bootconfig upon them?
>
> our right it's not good bootconfig come with version 4 i will fix it in v3.
>
>>
>> Also, please move this to a seperate function. It makes
>> android_image_get_ramdisk() quite long and difficult to read otherwise.
> i will.
>>
>> Finally, what happens if a kernel does not have bootconfig enabled ?
>> I imagine that everything will crash due to this change. Even if
>> bootconfig is mandatory for boot image v4, I believe we should make this
>> behaviour optional to avoid breaking existing kernels.
>
> it's enable in android kernel since android-12-5.4.xx so if you enable
> boot image version 4 and move androidboot.x in booconfig instead of
> kernelcmdline it's because you decide to enable it with
> BOARD_KERNEL_CMDLINE += bootconfig and you support android boot image
> version 4. it's explained in aosp doc
> :https://source.android.com/docs/core/architecture/bootloader/implementing-bootconfig
Ok, so if I understand correctly, boot image v4 without bootconfig
enabled is not a supported use-case.
>
>
>>
>>> } else {
>>> /* Ramdisk can be used in-place, use current ptr */
>>> if (img_data.ramdisk_addr == 0 ||
>>>
>>> --
>>> 2.34.1
More information about the U-Boot
mailing list