From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.4 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5CDEC4338F for ; Thu, 29 Jul 2021 09:22:49 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B3E3760F6F for ; Thu, 29 Jul 2021 09:22:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B3E3760F6F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2E3FB82E68; Thu, 29 Jul 2021 11:22:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="FaoxHqwu"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0309782E16; Thu, 29 Jul 2021 11:22:45 +0200 (CEST) Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 81D3582DF7 for ; Thu, 29 Jul 2021 11:22:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=narmstrong@baylibre.com Received: by mail-wr1-x429.google.com with SMTP id l18so6048793wrv.5 for ; Thu, 29 Jul 2021 02:22:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:organization:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=T8EK84UTVgr0D7nMyUp31RjSD3kEftHQLqfOa3V0NOY=; b=FaoxHqwu5XZb8IUOrTf21IyvwMmBL3lLYIZT365zLfug6PpfOZanLjy5/etrNixtIQ bGrAYqD3XYm36ovYv5AK6T0+Ts5c3ByI8sldC5SpbT93Z6xOV+glLXGEzE8A4sQLfthe yX4z/nHgRqrXrkX5OCNO1HasiYrcdt0TC024e40hF7dI/j6E+BT/lGtprqxe9L7rXqlC XtQDrsrBCmUZXbdmR9ykekjPr5rAQLv/RZt2M4ChE37STGQZkSt0wI4s/uxmR3j0uTpM 5BMfoCqwraXEtWnkgpLohU27arOgJzP8sr9e7zOBtuQlxFGUYhl8V/+veFLs/hT6efw4 /9zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=T8EK84UTVgr0D7nMyUp31RjSD3kEftHQLqfOa3V0NOY=; b=TRDeAMPPisNIVujhH0OcTp9IHprHXv0oNyULMS8Ks82xYl5wwrw74mYGg8ZlNhHgsE SIZKBOIEqJB4kgQuyfZWmwbWuK7ChmJPcBsA8zHbqh6zd2I+g+zUKpIymMOfeeZzb4Nt ZHPwYPp5oRG/jbNpA5VR8OzqmE0HMY/WPPXqdSXl9oe96Wh7cJIMXLvlEu197OGJxUbr TC4DmEifqmQt3jtmSuQ+ezJ7V0kmwcc2FMGZNwlTSccMNHU5pXwEYS3eTUSdD9WlGHAi IbwIFQ9gqwyj4NOzfdppoYo4vvxObkK9Uq4BfAT5/Meug37dNV6HDmPL+onraO/8Qd7I ri2g== X-Gm-Message-State: AOAM5305Gibu4QzduuKJKFIzP1krZ4gOjKEijZWwFlMDKgNdmB93gXJn pw5okigvvrk8jgRPH/eXLiK+nMP/RzrScJZd X-Google-Smtp-Source: ABdhPJwxrb8hCB/gr6HwOCrtVuZBc47+M8/dX6BwY6hheQfsECbf5CFd+orMLVf7yqa/fXao5ohXJg== X-Received: by 2002:a5d:420c:: with SMTP id n12mr2341850wrq.58.1627550557745; Thu, 29 Jul 2021 02:22:37 -0700 (PDT) Received: from [10.1.3.29] (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id r18sm2544081wrt.96.2021.07.29.02.22.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 29 Jul 2021 02:22:37 -0700 (PDT) Subject: Re: [PATCH 4/6] configs: meson64_android: use boot part label instead of index To: Mattijs Korpershoek Cc: u-boot-amlogic@groups.io, u-boot@lists.denx.de References: <20210729072113.208099-1-mkorpershoek@baylibre.com> <20210729072113.208099-5-mkorpershoek@baylibre.com> From: Neil Armstrong Organization: Baylibre Message-ID: <519c9f93-58fd-1d9d-013a-10821e6c5aa4@baylibre.com> Date: Thu, 29 Jul 2021 11:22:37 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210729072113.208099-5-mkorpershoek@baylibre.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On 29/07/2021 09:21, Mattijs Korpershoek wrote: > 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 > --- > include/configs/meson64_android.h | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > 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" \ > Acked-by: Neil Armstrong