configs: khadas-vim3: refresh Android support
cover configs: khadas-vim3: refresh Android support
Update VIM3 and VIM3L Android support to match the Android 16 AOSP A/B images used by these Khadas development boards. Remove the unused non-A/B defconfigs, increase the fastboot buffer to 512 MiB, update the partition layout and correct the DTB indices in vendor_boot.
The layout follows the AOSP generic boot and vendor_boot model:
https://source.android.com/docs/core/architecture/partitions/generic-boot
Both Android A/B defconfigs were build-tested. Android boot will be tested on both VIM3 and VIM3L.
---
Guillaume La Roque (4):
configs: khadas-vim3: drop non-A/B Android defconfigs
configs: khadas-vim3: enlarge the fastboot buffer
configs: khadas-vim3: update the Android partition layout
configs: khadas-vim3: fix the Android DTB index
board/amlogic/vim3/MAINTAINERS | 2 - configs/khadas-vim3_android_ab_defconfig | 1 + configs/khadas-vim3_android_defconfig | 122 ------------------------------ configs/khadas-vim3l_android_ab_defconfig | 1 + configs/khadas-vim3l_android_defconfig | 122 ------------------------------ include/configs/khadas-vim3_android.h | 36 ++++----- include/configs/khadas-vim3l_android.h | 36 ++++----- 7 files changed, 34 insertions(+), 286 deletions(-)
---
base-commit: 951132236b9adc592c2e49faadd103c6a355cac3
change-id: 20260908-update_vim-997dcb218017
Best regards,
Signature · 1 line
Guillaume La Roque <[email protected]>
PATCH 1/4 configs: khadas-vim3: drop non-A/B Android defconfigs
Android support for VIM3 and VIM3L is maintained with the A/B layout used by the AOSP builds. Remove the unused non-A/B defconfigs and their MAINTAINERS entries.
--- board/amlogic/vim3/MAINTAINERS | 2 - configs/khadas-vim3_android_defconfig | 122 --------------------------------- configs/khadas-vim3l_android_defconfig | 122 --------------------------------- 3 files changed, 246 deletions(-)
board/amlogic/vim3/MAINTAINERS +0 -2
@@ -4,10 +4,8 @@ S: Maintained L: [email protected] F: board/amlogic/vim3/ F: configs/khadas-vim3_defconfig -F: configs/khadas-vim3_android_defconfig F: configs/khadas-vim3_android_ab_defconfig F: configs/khadas-vim3l_defconfig -F: configs/khadas-vim3l_android_defconfig F: configs/khadas-vim3l_android_ab_defconfig F: doc/board/amlogic/khadas-vim3.rst F: doc/board/amlogic/khadas-vim3l.rst
configs/khadas-vim3_android_defconfig deleted +0 -122
122 lines not on this page · raw message
configs/khadas-vim3l_android_defconfig deleted +0 -122
122 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH 2/4 configs: khadas-vim3: enlarge the fastboot buffer
In reply to Guillaume La RoqueIncrease the fastboot buffer from 112 MiB to 512 MiB on VIM3 and VIM3L to allow larger downloads when flashing Android images. The buffer fits within the RAM available on both boards.
--- configs/khadas-vim3_android_ab_defconfig | 1 + configs/khadas-vim3l_android_ab_defconfig | 1 + 2 files changed, 2 insertions(+)
configs/khadas-vim3_android_ab_defconfig +1 -0
@@ -63,6 +63,7 @@ CONFIG_BUTTON=y CONFIG_BUTTON_ADC=y CONFIG_USB_FUNCTION_FASTBOOT=y CONFIG_FASTBOOT_BUF_ADDR=0x6000000 +CONFIG_FASTBOOT_BUF_SIZE=0x20000000 CONFIG_FASTBOOT_FLASH=y CONFIG_FASTBOOT_FLASH_MMC_DEV=2 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
configs/khadas-vim3l_android_ab_defconfig +1 -0
@@ -63,6 +63,7 @@ CONFIG_BUTTON=y CONFIG_BUTTON_ADC=y CONFIG_USB_FUNCTION_FASTBOOT=y CONFIG_FASTBOOT_BUF_ADDR=0x6000000 +CONFIG_FASTBOOT_BUF_SIZE=0x20000000 CONFIG_FASTBOOT_FLASH=y CONFIG_FASTBOOT_FLASH_MMC_DEV=2 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
Signature · 1 line
2.34.1
PATCH 3/4 configs: khadas-vim3: update the Android partition layout
In reply to Guillaume La RoqueUpdate the VIM3 and VIM3L GPT layout for the AOSP Android builds. Add the missing frp, vendor_boot, init_boot, DLKM vbmeta and metadata partitions. Grow super to 4 GiB, resize userdata and remove rootfs.
Set the vendor_boot and init_boot staging addresses and advertise metadata as f2fs for fastboot format.
With the non-A/B defconfigs removed, keep only the A/B layout and drop the unused ROOT_UUID.
--- include/configs/khadas-vim3_android.h | 34 +++++++++++++++------------------- include/configs/khadas-vim3l_android.h | 34 +++++++++++++++------------------- 2 files changed, 30 insertions(+), 38 deletions(-)
include/configs/khadas-vim3_android.h +15 -19
@@ -10,36 +10,29 @@#define __CONFIG_H#define LOGO_UUID "43a3305d-150f-4cc9-bd3b-38fca8693846;" -#define ROOT_UUID "ddb8c3f6-d94d-4394-b633-3134139cc2e0;" -#if defined(CONFIG_CMD_BCB ) && defined(CONFIG_ANDROID_AB )#define PARTS_DEFAULT \ "uuid_disk=${uuid_gpt_disk};" \ "name=logo,start=512K,size=2M,uuid=" LOGO_UUID \ "name=misc,size=512K,uuid=${uuid_gpt_misc};" \ + "name=frp,size=512K,uuid=${uuid_gpt_frp};" \ "name=dtbo_a,size=8M,uuid=${uuid_gpt_dtbo_a};" \ "name=dtbo_b,size=8M,uuid=${uuid_gpt_dtbo_b};" \ "name=vbmeta_a,size=512K,uuid=${uuid_gpt_vbmeta_a};" \ "name=vbmeta_b,size=512K,uuid=${uuid_gpt_vbmeta_b};" \ + "name=vbmeta_vendor_dlkm_a,size=64K,uuid=${uuid_gpt_vbmeta_vendor_dlkm_a};" \ + "name=vbmeta_vendor_dlkm_b,size=64K,uuid=${uuid_gpt_vbmeta_vendor_dlkm_b};" \ + "name=vbmeta_system_dlkm_a,size=64K,uuid=${uuid_gpt_vbmeta_system_dlkm_a};" \ + "name=vbmeta_system_dlkm_b,size=64K,uuid=${uuid_gpt_vbmeta_system_dlkm_b};" \ "name=boot_a,size=64M,bootable,uuid=${uuid_gpt_boot_a};" \ "name=boot_b,size=64M,bootable,uuid=${uuid_gpt_boot_b};" \ - "name=super,size=3072M,uuid=${uuid_gpt_super};" \ - "name=userdata,size=11218M,uuid=${uuid_gpt_userdata};" \ - "name=rootfs,size=-,uuid=" ROOT_UUID -#else -#define PARTS_DEFAULT \ - "uuid_disk=${uuid_gpt_disk};" \ - "name=logo,start=512K,size=2M,uuid=" LOGO_UUID \ - "name=misc,size=512K,uuid=${uuid_gpt_misc};" \ - "name=dtbo,size=8M,uuid=${uuid_gpt_dtbo};" \ - "name=vbmeta,size=512K,uuid=${uuid_gpt_vbmeta};" \ - "name=boot,size=64M,bootable,uuid=${uuid_gpt_boot};" \ - "name=recovery,size=64M,uuid=${uuid_gpt_recovery};" \ - "name=cache,size=256M,uuid=${uuid_gpt_cache};" \ - "name=super,size=1792M,uuid=${uuid_gpt_super};" \ - "name=userdata,size=12722M,uuid=${uuid_gpt_userdata};" \ - "name=rootfs,size=-,uuid=" ROOT_UUID -#endif + "name=vendor_boot_a,size=32M,uuid=${uuid_gpt_vendor_boot_a};" \ + "name=vendor_boot_b,size=32M,uuid=${uuid_gpt_vendor_boot_b};" \ + "name=init_boot_a,size=8M,uuid=${uuid_gpt_init_boot_a};" \ + "name=init_boot_b,size=8M,uuid=${uuid_gpt_init_boot_b};" \ + "name=super,size=4096M,uuid=${uuid_gpt_super};" \ + "name=metadata,size=64M,uuid=${uuid_gpt_metadata};" \ + "name=userdata,size=10240M,uuid=${uuid_gpt_userdata};"#define CFG_EXTRA_ENV_SETTINGS \ "board=vim3\0" \
@@ -61,6 +54,9 @@"kernel_addr_r=0x01080000\0" \"pxefile_addr_r=0x01080000\0" \"ramdisk_addr_r=0x13000000\0" \ +"vendor_boot_comp_addr_r=0x39000000\0" \ +"init_boot_comp_addr_r=0x41000000\0" \ + "fastboot.partition-type:metadata=f2fs\0"#include <configs/meson64.h>
include/configs/khadas-vim3l_android.h +15 -19
@@ -10,36 +10,29 @@#define __CONFIG_H#define LOGO_UUID "43a3305d-150f-4cc9-bd3b-38fca8693846;" -#define ROOT_UUID "ddb8c3f6-d94d-4394-b633-3134139cc2e0;" -#if defined(CONFIG_CMD_BCB ) && defined(CONFIG_ANDROID_AB )#define PARTS_DEFAULT \ "uuid_disk=${uuid_gpt_disk};" \ "name=logo,start=512K,size=2M,uuid=" LOGO_UUID \ "name=misc,size=512K,uuid=${uuid_gpt_misc};" \ + "name=frp,size=512K,uuid=${uuid_gpt_frp};" \ "name=dtbo_a,size=8M,uuid=${uuid_gpt_dtbo_a};" \ "name=dtbo_b,size=8M,uuid=${uuid_gpt_dtbo_b};" \ "name=vbmeta_a,size=512K,uuid=${uuid_gpt_vbmeta_a};" \ "name=vbmeta_b,size=512K,uuid=${uuid_gpt_vbmeta_b};" \ + "name=vbmeta_vendor_dlkm_a,size=64K,uuid=${uuid_gpt_vbmeta_vendor_dlkm_a};" \ + "name=vbmeta_vendor_dlkm_b,size=64K,uuid=${uuid_gpt_vbmeta_vendor_dlkm_b};" \ + "name=vbmeta_system_dlkm_a,size=64K,uuid=${uuid_gpt_vbmeta_system_dlkm_a};" \ + "name=vbmeta_system_dlkm_b,size=64K,uuid=${uuid_gpt_vbmeta_system_dlkm_b};" \ "name=boot_a,size=64M,bootable,uuid=${uuid_gpt_boot_a};" \ "name=boot_b,size=64M,bootable,uuid=${uuid_gpt_boot_b};" \ - "name=super,size=3072M,uuid=${uuid_gpt_super};" \ - "name=userdata,size=11218M,uuid=${uuid_gpt_userdata};" \ - "name=rootfs,size=-,uuid=" ROOT_UUID -#else -#define PARTS_DEFAULT \ - "uuid_disk=${uuid_gpt_disk};" \ - "name=logo,start=512K,size=2M,uuid=" LOGO_UUID \ - "name=misc,size=512K,uuid=${uuid_gpt_misc};" \ - "name=dtbo,size=8M,uuid=${uuid_gpt_dtbo};" \ - "name=vbmeta,size=512K,uuid=${uuid_gpt_vbmeta};" \ - "name=boot,size=64M,bootable,uuid=${uuid_gpt_boot};" \ - "name=recovery,size=64M,uuid=${uuid_gpt_recovery};" \ - "name=cache,size=256M,uuid=${uuid_gpt_cache};" \ - "name=super,size=1792M,uuid=${uuid_gpt_super};" \ - "name=userdata,size=12722M,uuid=${uuid_gpt_userdata};" \ - "name=rootfs,size=-,uuid=" ROOT_UUID -#endif + "name=vendor_boot_a,size=32M,uuid=${uuid_gpt_vendor_boot_a};" \ + "name=vendor_boot_b,size=32M,uuid=${uuid_gpt_vendor_boot_b};" \ + "name=init_boot_a,size=8M,uuid=${uuid_gpt_init_boot_a};" \ + "name=init_boot_b,size=8M,uuid=${uuid_gpt_init_boot_b};" \ + "name=super,size=4096M,uuid=${uuid_gpt_super};" \ + "name=metadata,size=64M,uuid=${uuid_gpt_metadata};" \ + "name=userdata,size=10240M,uuid=${uuid_gpt_userdata};"#define CFG_EXTRA_ENV_SETTINGS \ "board=vim3l\0" \
@@ -61,6 +54,9 @@"kernel_addr_r=0x01080000\0" \"pxefile_addr_r=0x01080000\0" \"ramdisk_addr_r=0x13000000\0" \ +"vendor_boot_comp_addr_r=0x39000000\0" \ +"init_boot_comp_addr_r=0x41000000\0" \ + "fastboot.partition-type:metadata=f2fs\0"#include <configs/meson64.h>
Signature · 1 line
2.34.1
PATCH 4/4 configs: khadas-vim3: fix the Android DTB index
In reply to Guillaume La RoqueThe AOSP vendor_boot images for VIM3 and VIM3L contain two DTBs:
VIM3L at index 0 and VIM3 at index 1. The current adtb_idx values of 2 and 3 are out of range, preventing Android from booting.
Use the matching index for each board.
--- include/configs/khadas-vim3_android.h | 2 +- include/configs/khadas-vim3l_android.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
include/configs/khadas-vim3_android.h +1 -1
@@ -39,7 +39,7 @@"board_name=vim3\0" \"bootmeths=android\0" \"bootcmd=bootflow scan\0" \ -"adtb_idx=3\0" \ +"adtb_idx=1\0" \"partitions=" PARTS_DEFAULT "\0" \"mmcdev=2\0" \"fastboot_raw_partition_bootloader=0x1 0xfff mmcpart 1\0" \
include/configs/khadas-vim3l_android.h +1 -1
@@ -39,7 +39,7 @@"board_name=vim3l\0" \"bootmeths=android\0" \"bootcmd=bootflow scan\0" \ -"adtb_idx=2\0" \ +"adtb_idx=0\0" \"partitions=" PARTS_DEFAULT "\0" \"mmcdev=2\0" \"fastboot_raw_partition_bootloader=0x1 0xfff mmcpart 1\0" \
Signature · 1 line
2.34.1
Quoted 27 lines · Guillaume La Roque
Update VIM3 and VIM3L Android support to match the Android 16 AOSP A/B images used by these Khadas development boards. Remove the unused non-A/B defconfigs, increase the fastboot buffer to 512 MiB, update the partition layout and correct the DTB indices in
vendor_boot.The layout follows the AOSP generic boot and
vendor_bootmodel:
https://source.android.com/docs/core/architecture/partitions/generic-bootBoth Android A/B defconfigs were build-tested. Android boot will be tested on both VIM3 and VIM3L.
Signed-off-by Guillaume La Roque <[email protected]>---
Guillaume La Roque (4):
configs: khadas-vim3: drop non-A/B Android defconfigs
configs: khadas-vim3: enlarge the fastboot buffer
configs: khadas-vim3: update the Android partition layout
configs: khadas-vim3: fix the Android DTB indexboard/amlogic/vim3/MAINTAINERS | 2 - configs/khadas-vim3_android_ab_defconfig | 1 + configs/khadas-vim3_android_defconfig | 122 ------------------------------ configs/khadas-vim3l_android_ab_defconfig | 1 + configs/khadas-vim3l_android_defconfig | 122 ------------------------------ include/configs/khadas-vim3_android.h | 36 ++++----- include/configs/khadas-vim3l_android.h | 36 ++++----- 7 files changed, 34 insertions(+), 286 deletions(-)
Quoted 7 lines
---
base-commit:951132236b9adc592c2e49faadd103c6a355cac3
change-id: 20260908-update_vim-997dcb218017Best regards,
--
Guillaume La Roque <[email protected]>
Thanks,
Neil
Hi,
Quoted 9 lines · Guillaume La Roque
Update VIM3 and VIM3L Android support to match the Android 16 AOSP A/B images used by these Khadas development boards. Remove the unused non-A/B defconfigs, increase the fastboot buffer to 512 MiB, update the partition layout and correct the DTB indices in
vendor_boot.The layout follows the AOSP generic boot and
vendor_bootmodel:
https://source.android.com/docs/core/architecture/partitions/generic-boot[...]
Thanks, Applied to https://source.denx.de/u-boot/custodians/u-boot-amlogic (u-boot-amlogic-next)
[1/4] configs: khadas-vim3: drop non-A/B Android defconfigs
https://source.denx.de/u-boot/custodians/u-boot-amlogic/-/commit/a2d0134bfc140b9b2092ab09cfef37a7da7c51ac [2/4] configs: khadas-vim3: enlarge the fastboot buffer https://source.denx.de/u-boot/custodians/u-boot-amlogic/-/commit/349d13ce42f60dba1604accc3abb24d5f6afeb18 [3/4] configs: khadas-vim3: update the Android partition layout https://source.denx.de/u-boot/custodians/u-boot-amlogic/-/commit/09aee880eea6cf05e117988da1be8231b07c5bc0 [4/4] configs: khadas-vim3: fix the Android DTB index https://source.denx.de/u-boot/custodians/u-boot-amlogic/-/commit/7a403d3db56db9f1efba44ed145e875c23fb785d
Signature · 1 line
Neil
Hi Neil,
Quoted 15 lines · Neil Armstrong
Hi,
Quoted 9 lines · Guillaume La Roque
Update VIM3 and VIM3L Android support to match the Android 16 AOSP A/B images used by these Khadas development boards. Remove the unused non-A/B defconfigs, increase the fastboot buffer to 512 MiB, update the partition layout and correct the DTB indices in
vendor_boot.The layout follows the AOSP generic boot and
vendor_bootmodel:
https://source.android.com/docs/core/architecture/partitions/generic-boot[...]
Thanks, Applied to https://source.denx.de/u-boot/custodians/u-boot-amlogic (u-boot-amlogic-next)
Quoted 8 lines
[1/4] configs: khadas-vim3: drop non-A/B Android defconfigs
https://source.denx.de/u-boot/custodians/u-boot-amlogic/-/commit/a2d0134bfc140b9b2092ab09cfef37a7da7c51ac [2/4] configs: khadas-vim3: enlarge the fastboot buffer https://source.denx.de/u-boot/custodians/u-boot-amlogic/-/commit/349d13ce42f60dba1604accc3abb24d5f6afeb18 [3/4] configs: khadas-vim3: update the Android partition layout https://source.denx.de/u-boot/custodians/u-boot-amlogic/-/commit/09aee880eea6cf05e117988da1be8231b07c5bc0 [4/4] configs: khadas-vim3: fix the Android DTB index https://source.denx.de/u-boot/custodians/u-boot-amlogic/-/commit/7a403d3db56db9f1efba44ed145e875c23fb785d
I see that the patches have been applied to git.u-boot-project.org [1] but the b4 ty note still lists source.denx.de.
Can you consider updating your b4.thanks-treename and b4.thanks-commit-url-mask so that it points the new instance?
FWIW, this is what I added to my ~/.gitconfig for DFU:
[b4]
- thanks-commit-url-mask = https://source.denx.de/u-boot/custodians/u-boot-dfu/-/commit/%.40s
+ thanks-commit-url-mask = https://git.u-boot-project.org/u-boot/custodians/u-boot-dfu/-/commit/%.40s
thanks-am-template = /home/mkorpershoek/.dotfiles-private/u-boot-dfu/thanks-am-template
- thanks-treename = https://source.denx.de/u-boot/custodians/u-boot-dfu
+ thanks-treename = https://git.u-boot-project.org/u-boot/custodians/u-boot-dfu
Thanks!
Mattijs
Quoted 3 lines
Signature · 2 lines
-- Neil
Quoted 37 lines · Mattijs Korpershoek
Hi Neil,
Quoted 15 lines · Neil Armstrong
Hi,
Quoted 9 lines · Guillaume La Roque
Update VIM3 and VIM3L Android support to match the Android 16 AOSP A/B images used by these Khadas development boards. Remove the unused non-A/B defconfigs, increase the fastboot buffer to 512 MiB, update the partition layout and correct the DTB indices in
vendor_boot.The layout follows the AOSP generic boot and
vendor_bootmodel:
https://source.android.com/docs/core/architecture/partitions/generic-boot[...]
Thanks, Applied to https://source.denx.de/u-boot/custodians/u-boot-amlogic (u-boot-amlogic-next)
Quoted 8 lines
[1/4] configs: khadas-vim3: drop non-A/B Android defconfigs
https://source.denx.de/u-boot/custodians/u-boot-amlogic/-/commit/a2d0134bfc140b9b2092ab09cfef37a7da7c51ac [2/4] configs: khadas-vim3: enlarge the fastboot buffer https://source.denx.de/u-boot/custodians/u-boot-amlogic/-/commit/349d13ce42f60dba1604accc3abb24d5f6afeb18 [3/4] configs: khadas-vim3: update the Android partition layout https://source.denx.de/u-boot/custodians/u-boot-amlogic/-/commit/09aee880eea6cf05e117988da1be8231b07c5bc0 [4/4] configs: khadas-vim3: fix the Android DTB index https://source.denx.de/u-boot/custodians/u-boot-amlogic/-/commit/7a403d3db56db9f1efba44ed145e875c23fb785dI see that the patches have been applied to git.u-boot-project.org [1] but the b4 ty note still lists source.denx.de.
Can you consider updating your b4.thanks-treename and b4.thanks-commit-url-mask so that it points the new instance?
FWIW, this is what I added to my ~/.gitconfig for DFU:
[b4]
Review
Quoted 5 lines
(quoted diff) +2
-2- thanks-commit-url-mask = https://source.denx.de/u-boot/custodians/u-boot-dfu/-/commit/%.40s + thanks-commit-url-mask = https://git.u-boot-project.org/u-boot/custodians/u-boot-dfu/-/commit/%.40s thanks-am-template = /home/mkorpershoek/.dotfiles-private/u-boot-dfu/thanks-am-template - thanks-treename = https://source.denx.de/u-boot/custodians/u-boot-dfu + thanks-treename = https://git.u-boot-project.org/u-boot/custodians/u-boot-dfu
Forgot to update it, fixed thx.
Neil
Quoted 9 lines
Thanks!
MattijsQuoted 3 lines
Signature · 2 lines
-- Neil