]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
configs: meson64_android: use logo part label instead of index
authorMattijs Korpershoek <mkorpershoek@baylibre.com>
Thu, 29 Jul 2021 07:21:12 +0000 (09:21 +0200)
committerNeil Armstrong <narmstrong@baylibre.com>
Thu, 29 Jul 2021 09:37:23 +0000 (11:37 +0200)
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 <mkorpershoek@baylibre.com>
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
include/configs/meson64_android.h

index e22f05c889918887f22cff4fd824525321053422..56545a72f86181ed0a9dd7eb752605bc337637dd 100644 (file)
 #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;" \
        "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;" \
 #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"                           \