DistroKit Mailinglist
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: distrokit@pengutronix.de
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [DistroKit] [PATCH v3 5/8] v8a: rockchip: use common environment
Date: Wed, 31 May 2023 13:47:41 +0200	[thread overview]
Message-ID: <20230531114744.3281270-6-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20230531114744.3281270-1-a.fatoum@pengutronix.de>

This effectively reverts commit 95014f4d8a50 ("v8a: rockchip: copy default
barebox env"). The common environment and the rockchip one are now
identical.

The spi-nor part is just for the Rockchip board though, so let's make
its execution conditional and drop barebox-rock3a-defaultenv.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 .../barebox-common-defaultenv/init/bootsource       | 10 +++++++---
 .../barebox-rock3a-defaultenv/init/bootsource       | 13 -------------
 .../nv/linux.bootargs.loglevel                      |  1 -
 configs/platform-v8a/rules/barebox-rockchip.make    |  2 +-
 4 files changed, 8 insertions(+), 18 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..db1915321531 100644
--- a/configs/platform-v8a/barebox-common-defaultenv/init/bootsource
+++ b/configs/platform-v8a/barebox-common-defaultenv/init/bootsource
@@ -8,7 +8,11 @@ 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
+	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 bc81609a49c0..000000000000
--- a/configs/platform-v8a/barebox-rock3a-defaultenv/init/bootsource
+++ /dev/null
@@ -1,13 +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"
-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 805c8749d710..1ca7e8c109ee 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




  parent reply	other threads:[~2023-05-31 11:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-31 11:47 [DistroKit] [PATCH v3 0/8] v8a: barebox: update to use upstream PTXdist rule Ahmad Fatoum
2023-05-31 11:47 ` [DistroKit] [PATCH v3 1/8] platforms: drop no longer needed blspec-rpi4 Ahmad Fatoum
2023-05-31 11:47 ` [DistroKit] [PATCH v3 2/8] v8a: barebox: rock3a: drop no longer needed SD-Card speed quirk Ahmad Fatoum
2023-05-31 11:47 ` [DistroKit] [PATCH v3 3/8] v8a: barebox: version bump v2023.01.0 → v2023.05.0 Ahmad Fatoum
2023-05-31 11:47 ` [DistroKit] [PATCH v3 4/8] Revert "v8a: barebox: rockchip: disable CONFIG_MMCBLKDEV_ROOTARG" Ahmad Fatoum
2023-05-31 11:47 ` Ahmad Fatoum [this message]
2023-06-23 13:04   ` [DistroKit] [PATCH v3 5/8] v8a: rockchip: use common environment Roland Hieber
2023-06-23 13:14     ` Ahmad Fatoum
2023-05-31 11:47 ` [DistroKit] [PATCH v3 6/8] v8a: barebox: configure upstream barebox rule for both imx8m and rockchip Ahmad Fatoum
2023-05-31 11:47 ` [DistroKit] [PATCH v3 7/8] v8a: barebox: switch to upstream rule Ahmad Fatoum
2023-05-31 11:47 ` [DistroKit] [PATCH v3 8/8] v8a: barebox: remove left-over SoC-specific rules Ahmad Fatoum
2023-05-31 12:02 ` [DistroKit] [PATCH v3 0/8] v8a: barebox: update to use upstream PTXdist rule Robert Schwebel

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=20230531114744.3281270-6-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=distrokit@pengutronix.de \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox