From 58d78314c1f83b2a25ffbec7cd2221a1fba66a82 Mon Sep 17 00:00:00 2001 From: Mattijs Korpershoek Date: Thu, 29 Jul 2021 09:21:08 +0200 Subject: configs: sei610: fix typo in header comment s/510/610/ Signed-off-by: Guillaume La Roque Signed-off-by: Mattijs Korpershoek Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong --- include/configs/sei610.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/sei610.h b/include/configs/sei610.h index 6d093161c9..9eeffdd72c 100644 --- a/include/configs/sei610.h +++ b/include/configs/sei610.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0+ */ /* - * Configuration for the SEI510 + * Configuration for the SEI610 * * Copyright (C) 2019 Baylibre, SAS * Author: Jerome Brunet -- cgit v1.2.3 From d1af9aac645622e23905e6ac48f38dde82944dd7 Mon Sep 17 00:00:00 2001 From: Mattijs Korpershoek Date: Thu, 29 Jul 2021 09:21:09 +0200 Subject: configs: meson64_android: fix bad indent in EXTRA_ENV_SETTINGS both lines seem to be joined together which is not the case for the meson64.h EXTRA_ENV_SETTINGS. Add a newline for consistency. Signed-off-by: Guillaume La Roque Signed-off-by: Mattijs Korpershoek Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong --- include/configs/meson64_android.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/meson64_android.h b/include/configs/meson64_android.h index c47d51c853..661de76fd7 100644 --- a/include/configs/meson64_android.h +++ b/include/configs/meson64_android.h @@ -127,7 +127,8 @@ "kernel_addr_r=0x01080000\0" \ "pxefile_addr_r=0x01080000\0" \ "ramdisk_addr_r=0x13000000\0" \ - "fdtfile=amlogic/" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" BOOTENV + "fdtfile=amlogic/" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \ + BOOTENV #include -- cgit v1.2.3 From 75be1ebf2ec09fdbd7562c2b7a86be302cdbd04d Mon Sep 17 00:00:00 2001 From: Mattijs Korpershoek Date: Thu, 29 Jul 2021 09:21:10 +0200 Subject: configs: meson64_android: use CONFIG_FASTBOOT_USB_DEV Right now, when running fastboot we use a hard-coded "0" for the device number. Use the Kconfig option named CONFIG_FASTBOOT_USB_DEV instead. Signed-off-by: Guillaume La Roque Signed-off-by: Mattijs Korpershoek Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong --- include/configs/meson64_android.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/configs/meson64_android.h b/include/configs/meson64_android.h index 661de76fd7..4027a7fe0d 100644 --- a/include/configs/meson64_android.h +++ b/include/configs/meson64_android.h @@ -38,7 +38,7 @@ "fi;" \ "if test \"${run_fastboot}\" -eq 1; then " \ "echo Running Fastboot...;" \ - "fastboot 0;" \ + "fastboot " __stringify(CONFIG_FASTBOOT_USB_DEV) "; " \ "fi\0" #define BOOTENV_DEV_NAME_FASTBOOT(devtypeu, devtypel, instance) \ @@ -69,7 +69,7 @@ "fi;" \ "if test \"${run_recovery}\" -eq 1; then " \ "echo Running Recovery...;" \ - "fastboot 0;" \ + "fastboot " __stringify(CONFIG_FASTBOOT_USB_DEV) "; " \ "fi\0" #define BOOTENV_DEV_NAME_RECOVERY(devtypeu, devtypel, instance) \ -- cgit v1.2.3 From f2cd6487877db9bba8e07abcb36decafcad9ae2a Mon Sep 17 00:00:00 2001 From: Mattijs Korpershoek Date: Thu, 29 Jul 2021 09:21:11 +0200 Subject: configs: meson64_android: use boot part label instead of index To boot Android, we read the gpt and assume that the partition with index "1" will be the "boot" partition. This might not always be the case, as there are no requirements from Android on the partition order. However, Android does seem to use the "boot" label quite a lot on their public documentation [1] Load the boot partition by label instead of by index [1] https://source.android.com/devices/bootloader/partitions Signed-off-by: Guillaume La Roque Signed-off-by: Mattijs Korpershoek Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong --- include/configs/meson64_android.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/configs/meson64_android.h b/include/configs/meson64_android.h index 4027a7fe0d..e22f05c889 100644 --- a/include/configs/meson64_android.h +++ b/include/configs/meson64_android.h @@ -9,6 +9,9 @@ #ifndef __MESON64_ANDROID_CONFIG_H #define __MESON64_ANDROID_CONFIG_H +#ifndef BOOT_PARTITION +#define BOOT_PARTITION "boot" +#endif #define BOOTENV_DEV_FASTBOOT(devtypeu, devtypel, instance) \ "bootcmd_fastboot=" \ @@ -77,11 +80,11 @@ #define BOOTENV_DEV_SYSTEM(devtypeu, devtypel, instance) \ "bootcmd_system=" \ - "echo Loading Android boot partition...;" \ + "echo Loading Android " BOOT_PARTITION " partition...;" \ "mmc dev ${mmcdev};" \ "setenv bootargs ${bootargs} console=${console} androidboot.serialno=${serial#};" \ - "part start mmc ${mmcdev} ${bootpart} boot_start;" \ - "part size mmc ${mmcdev} ${bootpart} boot_size;" \ + "part start mmc ${mmcdev} " BOOT_PARTITION " boot_start;" \ + "part size mmc ${mmcdev} " BOOT_PARTITION " boot_size;" \ "if mmc read ${loadaddr} ${boot_start} ${boot_size}; then " \ "echo Running Android...;" \ "bootm ${loadaddr};" \ @@ -111,7 +114,6 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ "partitions=" PARTS_DEFAULT "\0" \ "mmcdev=2\0" \ - "bootpart=1\0" \ "logopart=2\0" \ "gpio_recovery=88\0" \ "check_button=gpio input ${gpio_recovery};test $? -eq 0;\0" \ -- cgit v1.2.3 From 211f1d993ce9337681bbd07629cbd83e5dfea999 Mon Sep 17 00:00:00 2001 From: Mattijs Korpershoek Date: Thu, 29 Jul 2021 09:21:12 +0200 Subject: configs: meson64_android: use logo part label instead of index To display the bootup logo, we read the gpt and assume that the partition with index "2" will be the "logo" partition. This might not always be the case, and it's very error-prone. Load the logo partition by label instead of by index. Signed-off-by: Guillaume La Roque Signed-off-by: Mattijs Korpershoek Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong --- include/configs/meson64_android.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/configs/meson64_android.h b/include/configs/meson64_android.h index e22f05c889..56545a72f8 100644 --- a/include/configs/meson64_android.h +++ b/include/configs/meson64_android.h @@ -13,6 +13,10 @@ #define BOOT_PARTITION "boot" #endif +#ifndef LOGO_PARTITION +#define LOGO_PARTITION "logo" +#endif + #define BOOTENV_DEV_FASTBOOT(devtypeu, devtypel, instance) \ "bootcmd_fastboot=" \ "sm reboot_reason reason;" \ @@ -104,8 +108,8 @@ "if test \"${boot_source}\" != \"usb\" && " \ "gpt verify mmc ${mmcdev} ${partitions}; then; " \ "mmc dev ${mmcdev};" \ - "part start mmc ${mmcdev} ${logopart} boot_start;" \ - "part size mmc ${mmcdev} ${logopart} boot_size;" \ + "part start mmc ${mmcdev} " LOGO_PARTITION " boot_start;" \ + "part size mmc ${mmcdev} " LOGO_PARTITION " boot_size;" \ "if mmc read ${loadaddr} ${boot_start} ${boot_size}; then " \ "bmp display ${loadaddr} m m;" \ "fi;" \ @@ -114,7 +118,6 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ "partitions=" PARTS_DEFAULT "\0" \ "mmcdev=2\0" \ - "logopart=2\0" \ "gpio_recovery=88\0" \ "check_button=gpio input ${gpio_recovery};test $? -eq 0;\0" \ "load_logo=" PREBOOT_LOAD_LOGO "\0" \ -- cgit v1.2.3 From 143e153385f67943f66832d702c29e0087a3512c Mon Sep 17 00:00:00 2001 From: Mattijs Korpershoek Date: Thu, 29 Jul 2021 09:21:13 +0200 Subject: configs: meson64_android: don't set console bootargs The console bootargs are already set from the kernel commandline. On Android, this is done in yukawa at [1] Don't set it in the bootloader since it's overridden by the kernel anyways. [1] https://android-review.googlesource.com/c/device/amlogic/yukawa/+/1112994 Signed-off-by: Guillaume La Roque Signed-off-by: Mattijs Korpershoek Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong --- include/configs/meson64_android.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'include') diff --git a/include/configs/meson64_android.h b/include/configs/meson64_android.h index 56545a72f8..3b61d5f703 100644 --- a/include/configs/meson64_android.h +++ b/include/configs/meson64_android.h @@ -86,7 +86,7 @@ "bootcmd_system=" \ "echo Loading Android " BOOT_PARTITION " partition...;" \ "mmc dev ${mmcdev};" \ - "setenv bootargs ${bootargs} console=${console} androidboot.serialno=${serial#};" \ + "setenv bootargs ${bootargs} androidboot.serialno=${serial#};" \ "part start mmc ${mmcdev} " BOOT_PARTITION " boot_start;" \ "part size mmc ${mmcdev} " BOOT_PARTITION " boot_size;" \ "if mmc read ${loadaddr} ${boot_start} ${boot_size}; then " \ @@ -121,8 +121,6 @@ "gpio_recovery=88\0" \ "check_button=gpio input ${gpio_recovery};test $? -eq 0;\0" \ "load_logo=" PREBOOT_LOAD_LOGO "\0" \ - "console=/dev/ttyAML0\0" \ - "bootargs=no_console_suspend\0" \ "stdin=" STDIN_CFG "\0" \ "stdout=" STDOUT_CFG "\0" \ "stderr=" STDOUT_CFG "\0" \ -- cgit v1.2.3 From 9d0ac61642a9f4a627ce43760e45987859772a73 Mon Sep 17 00:00:00 2001 From: Mattijs Korpershoek Date: Fri, 30 Jul 2021 14:28:08 +0200 Subject: configs: meson64_android: use BCB for reboot to bootloader As of today, we use a "vendor specific" secure monitor call for the reboot reason (sm). We should not need this. Android uses the BCB (Bootloader Control Block) to communicate with the bootloader. Implement "reboot into bootloader" using the standard BCB way instead of using sm calls. Signed-off-by: Mattijs Korpershoek Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong --- include/configs/meson64_android.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'include') diff --git a/include/configs/meson64_android.h b/include/configs/meson64_android.h index 3b61d5f703..d732032d1f 100644 --- a/include/configs/meson64_android.h +++ b/include/configs/meson64_android.h @@ -17,9 +17,12 @@ #define LOGO_PARTITION "logo" #endif +#ifndef CONTROL_PARTITION +#define CONTROL_PARTITION "misc" +#endif + #define BOOTENV_DEV_FASTBOOT(devtypeu, devtypel, instance) \ "bootcmd_fastboot=" \ - "sm reboot_reason reason;" \ "setenv run_fastboot 0;" \ "if test \"${boot_source}\" = \"usb\"; then " \ "echo Fastboot forced by usb rom boot;" \ @@ -30,18 +33,15 @@ "echo Broken MMC partition scheme;" \ "setenv run_fastboot 1;" \ "fi;" \ - "if test \"${reason}\" = \"bootloader\" -o " \ - "\"${reason}\" = \"fastboot\"; then " \ - "echo Fastboot asked by reboot reason;" \ - "setenv run_fastboot 1;" \ - "fi;" \ - "if test \"${skip_fastboot}\" -eq 1; then " \ - "echo Fastboot skipped by environment;" \ - "setenv run_fastboot 0;" \ - "fi;" \ - "if test \"${force_fastboot}\" -eq 1; then " \ - "echo Fastboot forced by environment;" \ - "setenv run_fastboot 1;" \ + "if bcb load " __stringify(CONFIG_FASTBOOT_FLASH_MMC_DEV) " " \ + CONTROL_PARTITION "; then " \ + "if bcb test command = bootonce-bootloader; then " \ + "echo BCB: Bootloader boot...; " \ + "bcb clear command; bcb store; " \ + "setenv run_fastboot 1;" \ + "fi; " \ + "else " \ + "echo Warning: BCB is corrupted or does not exist; " \ "fi;" \ "if test \"${run_fastboot}\" -eq 1; then " \ "echo Running Fastboot...;" \ -- cgit v1.2.3 From 72d7c03074f0dec67fe68ea268112bb820d7e82f Mon Sep 17 00:00:00 2001 From: Mattijs Korpershoek Date: Fri, 30 Jul 2021 14:28:09 +0200 Subject: configs: meson64_android: implement recovery boot via BCB Right now meson64_android does not know how to boot into Android Recovery: it simply falls back to "fastboot" mode in the bootloader. Implement the boot to recovery. While at it, use the standard BCB way instead of a sm for consistency. Signed-off-by: Mattijs Korpershoek Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong --- include/configs/meson64_android.h | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/configs/meson64_android.h b/include/configs/meson64_android.h index d732032d1f..ce08346b70 100644 --- a/include/configs/meson64_android.h +++ b/include/configs/meson64_android.h @@ -21,6 +21,10 @@ #define CONTROL_PARTITION "misc" #endif +#ifndef RECOVERY_PARTITION +#define RECOVERY_PARTITION "recovery" +#endif + #define BOOTENV_DEV_FASTBOOT(devtypeu, devtypel, instance) \ "bootcmd_fastboot=" \ "setenv run_fastboot 0;" \ @@ -51,20 +55,23 @@ #define BOOTENV_DEV_NAME_FASTBOOT(devtypeu, devtypel, instance) \ "fastboot " -/* TOFIX: Run actual recovery instead of fastboot */ #define BOOTENV_DEV_RECOVERY(devtypeu, devtypel, instance) \ "bootcmd_recovery=" \ "pinmux dev pinctrl@14;" \ "pinmux dev pinctrl@40;" \ - "sm reboot_reason reason;" \ "setenv run_recovery 0;" \ "if run check_button; then " \ "echo Recovery button is pressed;" \ "setenv run_recovery 1;" \ - "elif test \"${reason}\" = \"recovery\" -o " \ - "\"${reason}\" = \"update\"; then " \ - "echo Recovery asked by reboot reason;" \ - "setenv run_recovery 1;" \ + "fi; " \ + "if bcb load " __stringify(CONFIG_FASTBOOT_FLASH_MMC_DEV) " " \ + CONTROL_PARTITION "; then " \ + "if bcb test command = boot-recovery; then " \ + "echo BCB: Recovery boot...; " \ + "setenv run_recovery 1;" \ + "fi;" \ + "else " \ + "echo Warning: BCB is corrupted or does not exist; " \ "fi;" \ "if test \"${skip_recovery}\" -eq 1; then " \ "echo Recovery skipped by environment;" \ @@ -76,7 +83,16 @@ "fi;" \ "if test \"${run_recovery}\" -eq 1; then " \ "echo Running Recovery...;" \ - "fastboot " __stringify(CONFIG_FASTBOOT_USB_DEV) "; " \ + "mmc dev ${mmcdev};" \ + "setenv bootargs \"${bootargs} androidboot.serialno=${serial#}\";" \ + "part start mmc ${mmcdev} " RECOVERY_PARTITION " boot_start;" \ + "part size mmc ${mmcdev} " RECOVERY_PARTITION " boot_size;" \ + "if mmc read ${loadaddr} ${boot_start} ${boot_size}; then " \ + "echo Running Android Recovery...;" \ + "bootm ${loadaddr};" \ + "fi;" \ + "echo Failed to boot Android...;" \ + "reset;" \ "fi\0" #define BOOTENV_DEV_NAME_RECOVERY(devtypeu, devtypel, instance) \ -- cgit v1.2.3 From acc53c6ef62598f0adbad6418a896d2a9d64c187 Mon Sep 17 00:00:00 2001 From: Mattijs Korpershoek Date: Fri, 30 Jul 2021 14:28:10 +0200 Subject: configs: meson64_android: reboot to fastbootd from bootloader Whenever we test for boot-fastboot in the BCB, it means that Android wants us to boot into recovery with a special mode (fastbootd). Force reboot into recovery in that case. Note: we don't erase the bcb on purpose here: recoveryOS needs to read the BCB as well to know if it boots into regular recovery mode or fastbootd mode. Signed-off-by: Mattijs Korpershoek Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong --- include/configs/meson64_android.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/configs/meson64_android.h b/include/configs/meson64_android.h index ce08346b70..f9f2b26416 100644 --- a/include/configs/meson64_android.h +++ b/include/configs/meson64_android.h @@ -44,6 +44,10 @@ "bcb clear command; bcb store; " \ "setenv run_fastboot 1;" \ "fi; " \ + "if bcb test command = boot-fastboot; then " \ + "echo BCB: fastboot userspace boot...; " \ + "setenv force_recovery 1;" \ + "fi; " \ "else " \ "echo Warning: BCB is corrupted or does not exist; " \ "fi;" \ -- cgit v1.2.3 From d5d0296861a9a546e6636fa335b693eb60fd8d59 Mon Sep 17 00:00:00 2001 From: Mattijs Korpershoek Date: Thu, 5 Aug 2021 17:17:20 +0200 Subject: configs: meson64: permit redefining SYS_MALLOC_LEN Permit redefining SYS_MALLOC_LEN for board specific configs. This is especially useful for Android with AVB, which requires a malloc length of 128M. Signed-off-by: Guillaume La Roque Signed-off-by: Mattijs Korpershoek Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong --- include/configs/meson64.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/configs/meson64.h b/include/configs/meson64.h index fb7f16d148..f9bb0240d2 100644 --- a/include/configs/meson64.h +++ b/include/configs/meson64.h @@ -32,7 +32,9 @@ #define CONFIG_CPU_ARMV8 #define CONFIG_REMAKE_ELF #define CONFIG_SYS_MAXARGS 32 +#ifndef CONFIG_SYS_MALLOC_LEN #define CONFIG_SYS_MALLOC_LEN (32 << 20) +#endif #define CONFIG_SYS_CBSIZE 1024 #define CONFIG_SYS_SDRAM_BASE 0 -- cgit v1.2.3 From 285a83b12bdf26f9ed9ebfa6f09ccf9b220e4c56 Mon Sep 17 00:00:00 2001 From: Mattijs Korpershoek Date: Thu, 5 Aug 2021 17:17:21 +0200 Subject: configs: meson64_android: increase SYS_MALLOC_LEN to 128M for AVB To prepare for AVB support, increase SYS_MALLOC_LEN to 128M. This value has been found by testing the following on khadas vim3l: => avb init => avb verify Signed-off-by: Mattijs Korpershoek Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong --- include/configs/meson64_android.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/configs/meson64_android.h b/include/configs/meson64_android.h index f9f2b26416..bc3ffb9ca5 100644 --- a/include/configs/meson64_android.h +++ b/include/configs/meson64_android.h @@ -9,6 +9,10 @@ #ifndef __MESON64_ANDROID_CONFIG_H #define __MESON64_ANDROID_CONFIG_H +#include + +#define CONFIG_SYS_MALLOC_LEN SZ_128M + #ifndef BOOT_PARTITION #define BOOT_PARTITION "boot" #endif -- cgit v1.2.3 From e6c782b502467af6337d32a786d5bdfd5b104229 Mon Sep 17 00:00:00 2001 From: Mattijs Korpershoek Date: Thu, 5 Aug 2021 17:17:22 +0200 Subject: configs: meson64_android: implement AVB support AVB (Android Verified Boot) is well supported in U-Boot already. Add support for it in meson64_android. This is controlled by the "force_avb" environment variable and the CONFIG_CMD_AVB option. Signed-off-by: Guillaume La Roque Signed-off-by: Mattijs Korpershoek Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong --- include/configs/meson64_android.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'include') diff --git a/include/configs/meson64_android.h b/include/configs/meson64_android.h index bc3ffb9ca5..48a23b6e41 100644 --- a/include/configs/meson64_android.h +++ b/include/configs/meson64_android.h @@ -27,6 +27,25 @@ #ifndef RECOVERY_PARTITION #define RECOVERY_PARTITION "recovery" + +#if defined(CONFIG_CMD_AVB) +#define AVB_VERIFY_CHECK \ + "if test \"${force_avb}\" -eq 1; then " \ + "if run avb_verify; then " \ + "echo AVB verification OK.;" \ + "setenv bootargs \"$bootargs $avb_bootargs\";" \ + "else " \ + "echo AVB verification failed.;" \ + "exit; fi;" \ + "else " \ + "setenv bootargs \"$bootargs androidboot.verifiedbootstate=orange\";" \ + "echo Running without AVB...; "\ + "fi;" + +#define AVB_VERIFY_CMD "avb_verify=avb init ${mmcdev}; avb verify;\0" +#else +#define AVB_VERIFY_CHECK "" +#define AVB_VERIFY_CMD "" #endif #define BOOTENV_DEV_FASTBOOT(devtypeu, devtypel, instance) \ @@ -93,6 +112,7 @@ "echo Running Recovery...;" \ "mmc dev ${mmcdev};" \ "setenv bootargs \"${bootargs} androidboot.serialno=${serial#}\";" \ + AVB_VERIFY_CHECK \ "part start mmc ${mmcdev} " RECOVERY_PARTITION " boot_start;" \ "part size mmc ${mmcdev} " RECOVERY_PARTITION " boot_size;" \ "if mmc read ${loadaddr} ${boot_start} ${boot_size}; then " \ @@ -111,6 +131,7 @@ "echo Loading Android " BOOT_PARTITION " partition...;" \ "mmc dev ${mmcdev};" \ "setenv bootargs ${bootargs} androidboot.serialno=${serial#};" \ + AVB_VERIFY_CHECK \ "part start mmc ${mmcdev} " BOOT_PARTITION " boot_start;" \ "part size mmc ${mmcdev} " BOOT_PARTITION " boot_size;" \ "if mmc read ${loadaddr} ${boot_start} ${boot_size}; then " \ @@ -142,6 +163,8 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ "partitions=" PARTS_DEFAULT "\0" \ "mmcdev=2\0" \ + AVB_VERIFY_CMD \ + "force_avb=0\0" \ "gpio_recovery=88\0" \ "check_button=gpio input ${gpio_recovery};test $? -eq 0;\0" \ "load_logo=" PREBOOT_LOAD_LOGO "\0" \ -- cgit v1.2.3 From efc28f6e4d01d14e10bcc45007929ecbe1b40c38 Mon Sep 17 00:00:00 2001 From: Mattijs Korpershoek Date: Thu, 5 Aug 2021 17:17:23 +0200 Subject: configs: meson64_android: implement A/B slot support Implement A/B slot selection using the U-Boot ab_select command. Keep support for non A/B. Not: We need to redefine the recovery partition label, as RecoveryOS is included in the boot image for A/B systems [1] [1] https://source.android.com/devices/tech/ota/ab/ab_implement#recovery Signed-off-by: Guillaume La Roque Signed-off-by: Mattijs Korpershoek Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong --- include/configs/meson64_android.h | 55 +++++++++++++++++++++++++++++++++------ 1 file changed, 47 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/configs/meson64_android.h b/include/configs/meson64_android.h index 48a23b6e41..83fa25bfb1 100644 --- a/include/configs/meson64_android.h +++ b/include/configs/meson64_android.h @@ -25,9 +25,6 @@ #define CONTROL_PARTITION "misc" #endif -#ifndef RECOVERY_PARTITION -#define RECOVERY_PARTITION "recovery" - #if defined(CONFIG_CMD_AVB) #define AVB_VERIFY_CHECK \ "if test \"${force_avb}\" -eq 1; then " \ @@ -42,12 +39,48 @@ "echo Running without AVB...; "\ "fi;" -#define AVB_VERIFY_CMD "avb_verify=avb init ${mmcdev}; avb verify;\0" +#define AVB_VERIFY_CMD "avb_verify=avb init ${mmcdev}; avb verify $slot_suffix;\0" #else #define AVB_VERIFY_CHECK "" #define AVB_VERIFY_CMD "" #endif +#if defined(CONFIG_CMD_AB_SELECT) +#define ANDROIDBOOT_GET_CURRENT_SLOT_CMD "get_current_slot=" \ + "if part number mmc ${mmcdev} " CONTROL_PARTITION " control_part_number; " \ + "then " \ + "echo " CONTROL_PARTITION \ + " partition number:${control_part_number};" \ + "ab_select current_slot mmc ${mmcdev}:${control_part_number};" \ + "else " \ + "echo " CONTROL_PARTITION " partition not found;" \ + "fi;\0" + +#define AB_SELECT_SLOT \ + "run get_current_slot; " \ + "if test -e \"${current_slot}\"; " \ + "then " \ + "setenv slot_suffix _${current_slot}; " \ + "else " \ + "echo current_slot not found;" \ + "exit;" \ + "fi;" + +#define AB_SELECT_ARGS \ + "setenv bootargs_ab androidboot.slot_suffix=${slot_suffix}; " \ + "echo A/B cmdline addition: ${bootargs_ab};" \ + "setenv bootargs ${bootargs} ${bootargs_ab};" + +#define AB_BOOTARGS " androidboot.force_normal_boot=1" +#define RECOVERY_PARTITION "boot" +#else +#define AB_SELECT_SLOT "" +#define AB_SELECT_ARGS " " +#define ANDROIDBOOT_GET_CURRENT_SLOT_CMD "" +#define AB_BOOTARGS " " +#define RECOVERY_PARTITION "recovery" +#endif + #define BOOTENV_DEV_FASTBOOT(devtypeu, devtypel, instance) \ "bootcmd_fastboot=" \ "setenv run_fastboot 0;" \ @@ -112,9 +145,11 @@ "echo Running Recovery...;" \ "mmc dev ${mmcdev};" \ "setenv bootargs \"${bootargs} androidboot.serialno=${serial#}\";" \ + AB_SELECT_SLOT \ + AB_SELECT_ARGS \ AVB_VERIFY_CHECK \ - "part start mmc ${mmcdev} " RECOVERY_PARTITION " boot_start;" \ - "part size mmc ${mmcdev} " RECOVERY_PARTITION " boot_size;" \ + "part start mmc ${mmcdev} " RECOVERY_PARTITION "${slot_suffix} boot_start;" \ + "part size mmc ${mmcdev} " RECOVERY_PARTITION "${slot_suffix} boot_size;" \ "if mmc read ${loadaddr} ${boot_start} ${boot_size}; then " \ "echo Running Android Recovery...;" \ "bootm ${loadaddr};" \ @@ -131,10 +166,13 @@ "echo Loading Android " BOOT_PARTITION " partition...;" \ "mmc dev ${mmcdev};" \ "setenv bootargs ${bootargs} androidboot.serialno=${serial#};" \ + AB_SELECT_SLOT \ + AB_SELECT_ARGS \ AVB_VERIFY_CHECK \ - "part start mmc ${mmcdev} " BOOT_PARTITION " boot_start;" \ - "part size mmc ${mmcdev} " BOOT_PARTITION " boot_size;" \ + "part start mmc ${mmcdev} " BOOT_PARTITION "${slot_suffix} boot_start;" \ + "part size mmc ${mmcdev} " BOOT_PARTITION "${slot_suffix} boot_size;" \ "if mmc read ${loadaddr} ${boot_start} ${boot_size}; then " \ + "setenv bootargs \"${bootargs} " AB_BOOTARGS "\" ; " \ "echo Running Android...;" \ "bootm ${loadaddr};" \ "fi;" \ @@ -163,6 +201,7 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ "partitions=" PARTS_DEFAULT "\0" \ "mmcdev=2\0" \ + ANDROIDBOOT_GET_CURRENT_SLOT_CMD \ AVB_VERIFY_CMD \ "force_avb=0\0" \ "gpio_recovery=88\0" \ -- cgit v1.2.3 From 7039cbd2f5011e46e9f7e5f6b69b1af66b44f740 Mon Sep 17 00:00:00 2001 From: Mattijs Korpershoek Date: Thu, 5 Aug 2021 17:17:24 +0200 Subject: configs: meson64_android: define BOOT_CMD macro BOOT_CMD might be different based on CONFIG_CMD_ABOOTIMG. To prepare for abootimg support, extract the boot command to a dedicated macro. Signed-off-by: Guillaume La Roque Signed-off-by: Mattijs Korpershoek Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong --- include/configs/meson64_android.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/configs/meson64_android.h b/include/configs/meson64_android.h index 83fa25bfb1..0ce616c17e 100644 --- a/include/configs/meson64_android.h +++ b/include/configs/meson64_android.h @@ -81,6 +81,8 @@ #define RECOVERY_PARTITION "recovery" #endif +#define BOOT_CMD "bootm ${loadaddr};" + #define BOOTENV_DEV_FASTBOOT(devtypeu, devtypel, instance) \ "bootcmd_fastboot=" \ "setenv run_fastboot 0;" \ @@ -152,7 +154,7 @@ "part size mmc ${mmcdev} " RECOVERY_PARTITION "${slot_suffix} boot_size;" \ "if mmc read ${loadaddr} ${boot_start} ${boot_size}; then " \ "echo Running Android Recovery...;" \ - "bootm ${loadaddr};" \ + BOOT_CMD \ "fi;" \ "echo Failed to boot Android...;" \ "reset;" \ @@ -174,7 +176,7 @@ "if mmc read ${loadaddr} ${boot_start} ${boot_size}; then " \ "setenv bootargs \"${bootargs} " AB_BOOTARGS "\" ; " \ "echo Running Android...;" \ - "bootm ${loadaddr};" \ + BOOT_CMD \ "fi;" \ "echo Failed to boot Android...;" \ "reset\0" -- cgit v1.2.3 From 72cefbafbf39c7381da7a7979ac997c46e18ba8a Mon Sep 17 00:00:00 2001 From: Guillaume La Roque Date: Thu, 5 Aug 2021 17:17:25 +0200 Subject: configs: meson64_android: boot android via abootimg Since Android 10, we are required to use a "dtbo" partition which includes the various device-tree overlays [1]. It's also possible to provide a "dtb" partition. This is supported via the "abootimg" command. On Yukawa, the assumption is that we have only a "dtbo" partition, which includes all board dtbs and their dtbos [2] [1] https://source.android.com/devices/architecture/dto/partitions [2] https://android.googlesource.com/device/amlogic/yukawa/+/refs/heads/master/build/tasks/dtimages.mk#16 Signed-off-by: Guillaume La Roque Signed-off-by: Mattijs Korpershoek Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong --- include/configs/meson64_android.h | 57 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/meson64_android.h b/include/configs/meson64_android.h index 0ce616c17e..358e0a5c71 100644 --- a/include/configs/meson64_android.h +++ b/include/configs/meson64_android.h @@ -81,7 +81,59 @@ #define RECOVERY_PARTITION "recovery" #endif +#if defined(CONFIG_CMD_ABOOTIMG) +/* + * Prepares complete device tree blob for current board (for Android boot). + * + * Boot image or recovery image should be loaded into $loadaddr prior to running + * these commands. The logic of these commnads is next: + * + * 1. Read correct DTB for current SoC/board from boot image in $loadaddr + * to $fdtaddr + * 2. Merge all needed DTBO for current board from 'dtbo' partition into read + * DTB + * 3. User should provide $fdtaddr as 3rd argument to 'bootm' + */ +#define PREPARE_FDT \ + "echo Preparing FDT...; " \ + "if test $board_name = sei510; then " \ + "echo \" Reading DTB for sei510...\"; " \ + "setenv dtb_index 0;" \ + "elif test $board_name = sei610; then " \ + "echo \" Reading DTB for sei610...\"; " \ + "setenv dtb_index 1;" \ + "else " \ + "echo Error: Android boot is not supported for $board_name; " \ + "exit; " \ + "fi; " \ + "abootimg get dtb --index=$dtb_index dtb_start dtb_size; " \ + "cp.b $dtb_start $fdt_addr_r $dtb_size; " \ + "fdt addr $fdt_addr_r 0x80000; " \ + "if test $board_name = sei510; then " \ + "echo \" Reading DTBO for sei510...\"; " \ + "setenv dtbo_index 0;" \ + "elif test $board_name = sei610; then " \ + "echo \" Reading DTBO for sei610...\"; " \ + "setenv dtbo_index 1;" \ + "else " \ + "echo Error: Android boot is not supported for $board_name; " \ + "exit; " \ + "fi; " \ + "part start mmc ${mmcdev} dtbo${slot_suffix} p_dtbo_start; " \ + "part size mmc ${mmcdev} dtbo${slot_suffix} p_dtbo_size; " \ + "mmc read ${dtboaddr} ${p_dtbo_start} ${p_dtbo_size}; " \ + "echo \" Applying DTBOs...\"; " \ + "adtimg addr $dtboaddr; " \ + "adtimg get dt --index=$dtbo_index dtbo0_addr; " \ + "fdt apply $dtbo0_addr;" \ + "setenv bootargs \"$bootargs androidboot.dtbo_idx=$dtbo_index \";"\ + +#define BOOT_CMD "bootm ${loadaddr} ${loadaddr} ${fdt_addr_r};" + +#else +#define PREPARE_FDT " " #define BOOT_CMD "bootm ${loadaddr};" +#endif #define BOOTENV_DEV_FASTBOOT(devtypeu, devtypel, instance) \ "bootcmd_fastboot=" \ @@ -153,6 +205,7 @@ "part start mmc ${mmcdev} " RECOVERY_PARTITION "${slot_suffix} boot_start;" \ "part size mmc ${mmcdev} " RECOVERY_PARTITION "${slot_suffix} boot_size;" \ "if mmc read ${loadaddr} ${boot_start} ${boot_size}; then " \ + PREPARE_FDT \ "echo Running Android Recovery...;" \ BOOT_CMD \ "fi;" \ @@ -174,6 +227,7 @@ "part start mmc ${mmcdev} " BOOT_PARTITION "${slot_suffix} boot_start;" \ "part size mmc ${mmcdev} " BOOT_PARTITION "${slot_suffix} boot_size;" \ "if mmc read ${loadaddr} ${boot_start} ${boot_size}; then " \ + PREPARE_FDT \ "setenv bootargs \"${bootargs} " AB_BOOTARGS "\" ; " \ "echo Running Android...;" \ BOOT_CMD \ @@ -212,7 +266,8 @@ "stdin=" STDIN_CFG "\0" \ "stdout=" STDOUT_CFG "\0" \ "stderr=" STDOUT_CFG "\0" \ - "loadaddr=0x01000000\0" \ + "dtboaddr=0x08200000\0" \ + "loadaddr=0x01080000\0" \ "fdt_addr_r=0x01000000\0" \ "scriptaddr=0x08000000\0" \ "kernel_addr_r=0x01080000\0" \ -- cgit v1.2.3 From 941c1598756b384a2fbec2709a36499ba3e4c019 Mon Sep 17 00:00:00 2001 From: Mattijs Korpershoek Date: Thu, 5 Aug 2021 17:17:26 +0200 Subject: configs: sei510/sei610: reformat PARTS_default There is a mix of spaces and tabs at the leading \. This makes updating theses lines harder. Add a single space before each \ for some consistency. Signed-off-by: Mattijs Korpershoek Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong --- include/configs/sei510.h | 14 +++++++------- include/configs/sei610.h | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) (limited to 'include') diff --git a/include/configs/sei510.h b/include/configs/sei510.h index d37b4c6405..16a34c717d 100644 --- a/include/configs/sei510.h +++ b/include/configs/sei510.h @@ -16,14 +16,14 @@ #define USERDATA_UUID "9b976e42-5207-11e9-8f16-ff47ac594b22;" #define ROOT_UUID "ddb8c3f6-d94d-4394-b633-3134139cc2e0;" -#define PARTS_DEFAULT \ - "uuid_disk=${uuid_gpt_disk};" \ +#define PARTS_DEFAULT \ + "uuid_disk=${uuid_gpt_disk};" \ "name=boot,size=64M,bootable,uuid=${uuid_gpt_boot};" \ - "name=logo,size=2M,uuid=" LOGO_UUID \ - "name=cache,size=256M,uuid=" CACHE_UUID \ - "name=system,size=1536M,uuid=" SYSTEM_UUID \ - "name=vendor,size=256M,uuid=" VENDOR_UUID \ - "name=userdata,size=5341M,uuid=" USERDATA_UUID \ + "name=logo,size=2M,uuid=" LOGO_UUID \ + "name=cache,size=256M,uuid=" CACHE_UUID \ + "name=system,size=1536M,uuid=" SYSTEM_UUID \ + "name=vendor,size=256M,uuid=" VENDOR_UUID \ + "name=userdata,size=5341M,uuid=" USERDATA_UUID \ "name=rootfs,size=-,uuid=" ROOT_UUID diff --git a/include/configs/sei610.h b/include/configs/sei610.h index 9eeffdd72c..6d13fd143b 100644 --- a/include/configs/sei610.h +++ b/include/configs/sei610.h @@ -16,14 +16,14 @@ #define USERDATA_UUID "9b976e42-5207-11e9-8f16-ff47ac594b22;" #define ROOT_UUID "ddb8c3f6-d94d-4394-b633-3134139cc2e0;" -#define PARTS_DEFAULT \ - "uuid_disk=${uuid_gpt_disk};" \ +#define PARTS_DEFAULT \ + "uuid_disk=${uuid_gpt_disk};" \ "name=boot,size=64M,bootable,uuid=${uuid_gpt_boot};" \ - "name=logo,size=2M,uuid=" LOGO_UUID \ - "name=cache,size=256M,uuid=" CACHE_UUID \ - "name=system,size=1536M,uuid=" SYSTEM_UUID \ - "name=vendor,size=256M,uuid=" VENDOR_UUID \ - "name=userdata,size=12795M,uuid=" USERDATA_UUID \ + "name=logo,size=2M,uuid=" LOGO_UUID \ + "name=cache,size=256M,uuid=" CACHE_UUID \ + "name=system,size=1536M,uuid=" SYSTEM_UUID \ + "name=vendor,size=256M,uuid=" VENDOR_UUID \ + "name=userdata,size=12795M,uuid=" USERDATA_UUID \ "name=rootfs,size=-,uuid=" ROOT_UUID #include -- cgit v1.2.3 From ddc8b223851af042c13261fd476dbce8d1886aaa Mon Sep 17 00:00:00 2001 From: Mattijs Korpershoek Date: Thu, 5 Aug 2021 17:17:27 +0200 Subject: configs: sei510/sei610: don't use hard-coded gpt uuids doc/README.gpt states: > The fields 'uuid' and 'uuid_disk' are optional if CONFIG_RANDOM_UUID is > enabled. A random uuid will be used if omitted or they point to an empty/ > non-existent environment variable. The environment variable will be > set to the generated UUID. The 'gpt guid' command reads the current > value of the uuid_disk from the GPT. Since we have CONFIG_RANDOM_UUID=y, remove the hard-coded uuids and use meaningful variable names instead. Signed-off-by: Mattijs Korpershoek Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong --- include/configs/sei510.h | 12 ++++-------- include/configs/sei610.h | 12 ++++-------- 2 files changed, 8 insertions(+), 16 deletions(-) (limited to 'include') diff --git a/include/configs/sei510.h b/include/configs/sei510.h index 16a34c717d..5bf2668803 100644 --- a/include/configs/sei510.h +++ b/include/configs/sei510.h @@ -10,20 +10,16 @@ #define __CONFIG_H #define LOGO_UUID "43a3305d-150f-4cc9-bd3b-38fca8693846;" -#define CACHE_UUID "99207ae6-5207-11e9-999e-6f77a3612069;" -#define SYSTEM_UUID "99f9b7ac-5207-11e9-8507-c3c037e393f3;" -#define VENDOR_UUID "9d082802-5207-11e9-954c-cbbce08ba108;" -#define USERDATA_UUID "9b976e42-5207-11e9-8f16-ff47ac594b22;" #define ROOT_UUID "ddb8c3f6-d94d-4394-b633-3134139cc2e0;" #define PARTS_DEFAULT \ "uuid_disk=${uuid_gpt_disk};" \ "name=boot,size=64M,bootable,uuid=${uuid_gpt_boot};" \ "name=logo,size=2M,uuid=" LOGO_UUID \ - "name=cache,size=256M,uuid=" CACHE_UUID \ - "name=system,size=1536M,uuid=" SYSTEM_UUID \ - "name=vendor,size=256M,uuid=" VENDOR_UUID \ - "name=userdata,size=5341M,uuid=" USERDATA_UUID \ + "name=cache,size=256M,uuid=${uuid_gpt_cache};" \ + "name=system,size=1536M,uuid=${uuid_gpt_system};" \ + "name=vendor,size=256M,uuid=${uuid_gpt_vendor};" \ + "name=userdata,size=5341M,uuid={uuid_gpt_userdata};" \ "name=rootfs,size=-,uuid=" ROOT_UUID diff --git a/include/configs/sei610.h b/include/configs/sei610.h index 6d13fd143b..baace75a02 100644 --- a/include/configs/sei610.h +++ b/include/configs/sei610.h @@ -10,20 +10,16 @@ #define __CONFIG_H #define LOGO_UUID "43a3305d-150f-4cc9-bd3b-38fca8693846;" -#define CACHE_UUID "99207ae6-5207-11e9-999e-6f77a3612069;" -#define SYSTEM_UUID "99f9b7ac-5207-11e9-8507-c3c037e393f3;" -#define VENDOR_UUID "9d082802-5207-11e9-954c-cbbce08ba108;" -#define USERDATA_UUID "9b976e42-5207-11e9-8f16-ff47ac594b22;" #define ROOT_UUID "ddb8c3f6-d94d-4394-b633-3134139cc2e0;" #define PARTS_DEFAULT \ "uuid_disk=${uuid_gpt_disk};" \ "name=boot,size=64M,bootable,uuid=${uuid_gpt_boot};" \ "name=logo,size=2M,uuid=" LOGO_UUID \ - "name=cache,size=256M,uuid=" CACHE_UUID \ - "name=system,size=1536M,uuid=" SYSTEM_UUID \ - "name=vendor,size=256M,uuid=" VENDOR_UUID \ - "name=userdata,size=12795M,uuid=" USERDATA_UUID \ + "name=cache,size=256M,uuid=${uuid_gpt_cache};" \ + "name=system,size=1536M,uuid=${uuid_gpt_system};" \ + "name=vendor,size=256M,uuid=${uuid_gpt_vendor};" \ + "name=userdata,size=12795M,uuid=${uuid_gpt_userdata};" \ "name=rootfs,size=-,uuid=" ROOT_UUID #include -- cgit v1.2.3 From 33b51765583e6cbe1888f068da795bea599bad18 Mon Sep 17 00:00:00 2001 From: Guillaume La Roque Date: Thu, 5 Aug 2021 17:17:28 +0200 Subject: configs: sei510/610: android bootflow via abootimg Activate the following Kconfig options: * AVB for Android Verified Boot support * ADTIMG for merging DTBOs * ABOOTIMG for extracting Android boot image Also rework the partitioning tables: - add a misc partition to handle BCB messages - add a dtbo partition to store various DTBOs - add a vbmeta partition for AVB hashes - Merge vendor and system into the "super" partition Note: avb support is disables by default. To activate it: => setenv force_avb 1; => saveenv; Signed-off-by: Guillaume La Roque Signed-off-by: Mattijs Korpershoek Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong --- configs/sei510_defconfig | 5 +++++ configs/sei610_defconfig | 5 +++++ include/configs/sei510.h | 11 +++++++---- include/configs/sei610.h | 13 ++++++++----- 4 files changed, 25 insertions(+), 9 deletions(-) (limited to 'include') diff --git a/configs/sei510_defconfig b/configs/sei510_defconfig index 74328f2fd4..8099b40b55 100644 --- a/configs/sei510_defconfig +++ b/configs/sei510_defconfig @@ -20,7 +20,10 @@ CONFIG_PREBOOT="run load_logo" # CONFIG_CONSOLE_MUX is not set # CONFIG_DISPLAY_CPUINFO is not set CONFIG_MISC_INIT_R=y +CONFIG_AVB_VERIFY=y # CONFIG_CMD_BDI is not set +CONFIG_CMD_ADTIMG=y +CONFIG_CMD_ABOOTIMG=y # CONFIG_CMD_IMI is not set CONFIG_CMD_BCB=y CONFIG_CMD_GPIO=y @@ -32,6 +35,7 @@ CONFIG_CMD_USB_MASS_STORAGE=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_BMP=y CONFIG_CMD_REGULATOR=y +CONFIG_CMD_AVB=y CONFIG_OF_CONTROL=y CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y @@ -84,4 +88,5 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_LIBAVB=y CONFIG_OF_LIBFDT_OVERLAY=y diff --git a/configs/sei610_defconfig b/configs/sei610_defconfig index 2a6d0e5995..e11f36ac79 100644 --- a/configs/sei610_defconfig +++ b/configs/sei610_defconfig @@ -20,7 +20,10 @@ CONFIG_PREBOOT="run load_logo" # CONFIG_CONSOLE_MUX is not set # CONFIG_DISPLAY_CPUINFO is not set CONFIG_MISC_INIT_R=y +CONFIG_AVB_VERIFY=y # CONFIG_CMD_BDI is not set +CONFIG_CMD_ADTIMG=y +CONFIG_CMD_ABOOTIMG=y # CONFIG_CMD_IMI is not set CONFIG_CMD_BCB=y CONFIG_CMD_GPIO=y @@ -32,6 +35,7 @@ CONFIG_CMD_USB_MASS_STORAGE=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_BMP=y CONFIG_CMD_REGULATOR=y +CONFIG_CMD_AVB=y CONFIG_OF_CONTROL=y CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y @@ -84,4 +88,5 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_LIBAVB=y CONFIG_OF_LIBFDT_OVERLAY=y diff --git a/include/configs/sei510.h b/include/configs/sei510.h index 5bf2668803..ea91a06157 100644 --- a/include/configs/sei510.h +++ b/include/configs/sei510.h @@ -14,12 +14,15 @@ #define PARTS_DEFAULT \ "uuid_disk=${uuid_gpt_disk};" \ - "name=boot,size=64M,bootable,uuid=${uuid_gpt_boot};" \ "name=logo,size=2M,uuid=" LOGO_UUID \ + "name=misc,size=128K,uuid=${uuid_gpt_misc};" \ + "name=dtbo,size=8M,uuid=${uuid_gpt_dtbo};" \ + "name=vbmeta,size=64K,uuid=${uuid_gpt_vbmeta};" \ + "name=boot,size=32M,bootable,uuid=${uuid_gpt_boot};" \ + "name=recovery,size=32M,uuid=${uuid_gpt_recovery};" \ "name=cache,size=256M,uuid=${uuid_gpt_cache};" \ - "name=system,size=1536M,uuid=${uuid_gpt_system};" \ - "name=vendor,size=256M,uuid=${uuid_gpt_vendor};" \ - "name=userdata,size=5341M,uuid={uuid_gpt_userdata};" \ + "name=super,size=2304M,uuid=${uuid_gpt_super};" \ + "name=userdata,size=4820M,uuid=${uuid_gpt_userdata};" \ "name=rootfs,size=-,uuid=" ROOT_UUID diff --git a/include/configs/sei610.h b/include/configs/sei610.h index baace75a02..783eece271 100644 --- a/include/configs/sei610.h +++ b/include/configs/sei610.h @@ -14,12 +14,15 @@ #define PARTS_DEFAULT \ "uuid_disk=${uuid_gpt_disk};" \ - "name=boot,size=64M,bootable,uuid=${uuid_gpt_boot};" \ - "name=logo,size=2M,uuid=" LOGO_UUID \ + "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=32M,bootable,uuid=${uuid_gpt_boot};" \ + "name=recovery,size=32M,uuid=${uuid_gpt_recovery};" \ "name=cache,size=256M,uuid=${uuid_gpt_cache};" \ - "name=system,size=1536M,uuid=${uuid_gpt_system};" \ - "name=vendor,size=256M,uuid=${uuid_gpt_vendor};" \ - "name=userdata,size=12795M,uuid=${uuid_gpt_userdata};" \ + "name=super,size=2304M,uuid=${uuid_gpt_super};" \ + "name=userdata,size=12274M,uuid=${uuid_gpt_userdata};" \ "name=rootfs,size=-,uuid=" ROOT_UUID #include -- cgit v1.2.3