From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Wed, 03 May 2023 15:53:41 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1puCvO-003C01-7R for lore@lore.pengutronix.de; Wed, 03 May 2023 15:53:41 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1puCvM-0001Mh-5q; Wed, 03 May 2023 15:53:40 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1puCvB-0001Im-PB; Wed, 03 May 2023 15:53:29 +0200 Received: from [2a0a:edc0:0:1101:1d::54] (helo=dude05.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1puCvB-000qHg-27; Wed, 03 May 2023 15:53:29 +0200 Received: from afa by dude05.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1puCv9-00HMFh-Rw; Wed, 03 May 2023 15:53:27 +0200 From: Ahmad Fatoum To: distrokit@pengutronix.de Date: Wed, 3 May 2023 15:53:23 +0200 Message-Id: <20230503135327.4137066-7-a.fatoum@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230503135327.4137066-1-a.fatoum@pengutronix.de> References: <20230503135327.4137066-1-a.fatoum@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [DistroKit] [PATCH 06/10] v8a: rockchip: use common environment X-BeenThere: distrokit@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: DistroKit Mailinglist List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ahmad Fatoum , mkl@pengutronix.de Sender: "DistroKit" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: distrokit-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false This effectively reverts commit 95014f4d8a50 ("v8a: rockchip: copy default barebox env"). The common environment and the rockchip one are nearly identical, except for a small section in the bootsource init script. Let's make that section board-dependent and drop barebox-rock3a-defaultenv. Signed-off-by: Ahmad Fatoum --- .../barebox-common-defaultenv/init/bootsource | 12 +++++++++--- .../barebox-rock3a-defaultenv/init/bootsource | 14 -------------- .../nv/linux.bootargs.loglevel | 1 - configs/platform-v8a/rules/barebox-rockchip.make | 2 +- 4 files changed, 10 insertions(+), 19 deletions(-) delete mode 100644 configs/platform-v8a/barebox-rock3a-defaultenv/init/bootsource delete mode 100644 configs/platform-v8a/barebox-rock3a-defaultenv/nv/linux.bootargs.loglevel diff --git a/configs/platform-v8a/barebox-common-defaultenv/init/bootsource b/configs/platform-v8a/barebox-common-defaultenv/init/bootsource index 8f00bced5df2..a45ebf51bec1 100644 --- a/configs/platform-v8a/barebox-common-defaultenv/init/bootsource +++ b/configs/platform-v8a/barebox-common-defaultenv/init/bootsource @@ -8,7 +8,13 @@ fi if [ "$bootsource" = mmc ]; then detect mmc$bootsource_instance global.boot.default="mmc$bootsource_instance net" -elif [ "$bootsource" = "spi-nor" ]; then - usbgadget -A '/dev/mmc0(sd)' - global.autoboot=abort +fi + +if [ "${global.model}" = "Radxa ROCK3 Model A" ]; then + of_property -df mmc1 sd-uhs-sdr50 + + if [ "$bootsource" = "spi-nor" ]; then + usbgadget -A '/dev/mmc1(sd)' + global.autoboot=abort + fi fi diff --git a/configs/platform-v8a/barebox-rock3a-defaultenv/init/bootsource b/configs/platform-v8a/barebox-rock3a-defaultenv/init/bootsource deleted file mode 100644 index d12f04949a5a..000000000000 --- a/configs/platform-v8a/barebox-rock3a-defaultenv/init/bootsource +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -if [ -n "${nv.boot.default}" ]; then - exit -fi - -if [ "$bootsource" = mmc ]; then - detect mmc$bootsource_instance - global.boot.default="mmc$bootsource_instance net" - of_property -df mmc1 sd-uhs-sdr50 -elif [ "$bootsource" = "spi-nor" ]; then - usbgadget -A '/dev/mmc1(sd)' - global.autoboot=abort -fi diff --git a/configs/platform-v8a/barebox-rock3a-defaultenv/nv/linux.bootargs.loglevel b/configs/platform-v8a/barebox-rock3a-defaultenv/nv/linux.bootargs.loglevel deleted file mode 100644 index 705752ca416d..000000000000 --- a/configs/platform-v8a/barebox-rock3a-defaultenv/nv/linux.bootargs.loglevel +++ /dev/null @@ -1 +0,0 @@ -loglevel=5 systemd.log_level=warning systemd.show_status=auto diff --git a/configs/platform-v8a/rules/barebox-rockchip.make b/configs/platform-v8a/rules/barebox-rockchip.make index fbab38419316..a04534418d84 100644 --- a/configs/platform-v8a/rules/barebox-rockchip.make +++ b/configs/platform-v8a/rules/barebox-rockchip.make @@ -69,7 +69,7 @@ $(BAREBOX_ROCKCHIP_CONFIG): endif BAREBOX_ROCKCHIP_EXTRA_ENV_PATH := $(foreach path, \ - $(call remove_quotes,"barebox-rock3a-defaultenv"), \ + $(call remove_quotes,"barebox-common-defaultenv"), \ $(call ptx/in-platformconfigdir,$(path))) BAREBOX_ROCKCHIP_EXTRA_ENV_DEPS := \ $(BAREBOX_ROCKCHIP_EXTRA_ENV_PATH) \ -- 2.39.2