From aff7f1314a14ab2af5dbb04a33744c1c4db5aef7 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Mon, 18 Aug 2025 10:51:19 -0600 Subject: boot: Add LEGACY_IMAGE_FORMAT to DISTRO_DEFAULTS At this time there are still major Linux distributions which by default boot using LEGACY_IMAGE_FORMAT type scripts. Add this option to DISTRO_DEFAULTS to ensure these platforms can still boot. Fixes: d780965927d4 ("Drop the special am335x_boneblack_vboot target") Reported-by: Sascha Silbe Tested-By: Sascha Silbe Signed-off-by: Tom Rini --- boot/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'boot') diff --git a/boot/Kconfig b/boot/Kconfig index 2993cd7f9ba..124f6db3e6e 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -1162,6 +1162,7 @@ config DISTRO_DEFAULTS select CMD_SYSBOOT select HUSH_PARSER select SYS_LONGHELP + select LEGACY_IMAGE_FORMAT help Note: These scripts have been replaced by Standard Boot. Do not use them on new boards. See 'Migrating from distro_boot' at -- cgit v1.2.3 From e18a0dec6e383bf903b7b577201fece58122dae8 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Mon, 8 Sep 2025 15:48:16 +0200 Subject: boot: Increase kernel size limit to 128 MiB on ARM64/PPC/RV The ARM64 kernel Image size with LOCKDEP enabled is now around 80 MiB, which makes it unbootable due to "Image too large: increase CONFIG_SYS_BOOTM_LEN". Increase the image size limit to 128 MiB to future proof the limit. Signed-off-by: Marek Vasut --- boot/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'boot') diff --git a/boot/Kconfig b/boot/Kconfig index 124f6db3e6e..dd047365754 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -1056,7 +1056,7 @@ config SYS_BOOTM_LEN hex "Maximum size of a decompresed OS image" depends on CMD_BOOTM || CMD_BOOTI || CMD_BOOTZ || \ LEGACY_IMAGE_FORMAT || SPL_LEGACY_IMAGE_FORMAT - default 0x4000000 if PPC || ARM64 || RISCV + default 0x8000000 if PPC || ARM64 || RISCV default 0x1000000 if X86 || ARCH_MX6 || ARCH_MX7 default 0x800000 help -- cgit v1.2.3 From 5289b6e5540e571afd81482305e5623e9124ea66 Mon Sep 17 00:00:00 2001 From: Guillaume Ranquet Date: Thu, 11 Sep 2025 15:50:26 +0200 Subject: android: boot: fix wrong end of header in v3/v4 parsing The android boot header is page aligned but the current code made the assumption that the header was always smaller than the current header format. When the page_size is defined as 2048, as this is the case with the cuttlefish target, the current code sets the end of the header in the middle of it as the v3 and v4 headers are respectively 2112 and 2128 bytes long. Fix that by aligning to page_size Fixes: 1115027d2f75 ("android: boot: update android_image_get_data to support v3, v4") Signed-off-by: Guillaume Ranquet --- boot/image-android.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'boot') diff --git a/boot/image-android.c b/boot/image-android.c index 1cd2060bb3f..e46dee0d9b3 100644 --- a/boot/image-android.c +++ b/boot/image-android.c @@ -107,7 +107,12 @@ static void android_vendor_boot_image_v3_v4_parse_hdr(const struct andr_vnd_boot data->dtb_load_addr = hdr->dtb_addr; data->bootconfig_size = hdr->bootconfig_size; end = (ulong)hdr; - end += hdr->page_size; + + if (hdr->header_version > 3) + end += ALIGN(ANDR_VENDOR_BOOT_V4_SIZE, hdr->page_size); + else + end += ALIGN(ANDR_VENDOR_BOOT_V3_SIZE, hdr->page_size); + if (hdr->vendor_ramdisk_size) { data->vendor_ramdisk_ptr = end; data->vendor_ramdisk_size = hdr->vendor_ramdisk_size; -- cgit v1.2.3