All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mattijs Korpershoek <mkorpershoek@baylibre.com>
To: Neil Armstrong <narmstrong@baylibre.com>
Cc: u-boot-amlogic@groups.io, u-boot@lists.denx.de,
	Mattijs Korpershoek <mkorpershoek@baylibre.com>
Subject: [PATCH 5/6] configs: meson64_android: use logo part label instead of index
Date: Thu, 29 Jul 2021 09:21:12 +0200	[thread overview]
Message-ID: <20210729072113.208099-6-mkorpershoek@baylibre.com> (raw)
In-Reply-To: <20210729072113.208099-1-mkorpershoek@baylibre.com>

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>
---
 include/configs/meson64_android.h | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

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"			      \
-- 
2.30.2


  parent reply	other threads:[~2021-07-29 12:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-29  7:21 [PATCH 0/6] VIM3: misc cleanups to prepare android support Mattijs Korpershoek
2021-07-29  7:21 ` [PATCH 1/6] configs: sei610: fix typo in header comment Mattijs Korpershoek
2021-07-29  9:21   ` Neil Armstrong
2021-07-29  7:21 ` [PATCH 2/6] configs: meson64_android: fix bad indent in EXTRA_ENV_SETTINGS Mattijs Korpershoek
2021-07-29  9:21   ` Neil Armstrong
2021-07-29  7:21 ` [PATCH 3/6] configs: meson64_android: use CONFIG_FASTBOOT_USB_DEV Mattijs Korpershoek
2021-07-29  9:22   ` Neil Armstrong
2021-07-29  7:21 ` [PATCH 4/6] configs: meson64_android: use boot part label instead of index Mattijs Korpershoek
2021-07-29  9:22   ` Neil Armstrong
2021-07-29  7:21 ` Mattijs Korpershoek [this message]
2021-07-29  9:22   ` [PATCH 5/6] configs: meson64_android: use logo " Neil Armstrong
2021-07-29  7:21 ` [PATCH 6/6] configs: meson64_android: don't set console bootargs Mattijs Korpershoek
2021-07-29  9:23   ` Neil Armstrong
2021-07-29  9:37 ` [PATCH 0/6] VIM3: misc cleanups to prepare android support Neil Armstrong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210729072113.208099-6-mkorpershoek@baylibre.com \
    --to=mkorpershoek@baylibre.com \
    --cc=narmstrong@baylibre.com \
    --cc=u-boot-amlogic@groups.io \
    --cc=u-boot@lists.denx.de \
    --subject='Re: [PATCH 5/6] configs: meson64_android: use logo part label instead of index' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.