[PATCH 1/4] sandbox: env: switch from CONFIG_DEFAULT_ENVIRONMENT_PATH to bbenv-y
Ahmad Fatoum
a.fatoum at pengutronix.de
Thu Mar 27 07:47:39 PDT 2025
By moving it out of the config, the sandbox default environment is always
there, even when building allyesconfig.
This introduces no functional change for sandbox_defconfig, but
is useful as we start running tests against allyesconfig and want
the same environment (autoboot abortion by default) in any case.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
arch/sandbox/board/Makefile | 1 +
arch/sandbox/board/board.c | 3 +++
arch/sandbox/board/{env => defaultenv-sandbox}/network/eth0 | 0
arch/sandbox/board/{env => defaultenv-sandbox}/nv/autoboot | 0
arch/sandbox/configs/sandbox_defconfig | 2 +-
5 files changed, 5 insertions(+), 1 deletion(-)
rename arch/sandbox/board/{env => defaultenv-sandbox}/network/eth0 (100%)
rename arch/sandbox/board/{env => defaultenv-sandbox}/nv/autoboot (100%)
diff --git a/arch/sandbox/board/Makefile b/arch/sandbox/board/Makefile
index 029bfe7ff163..2b6346f6098d 100644
--- a/arch/sandbox/board/Makefile
+++ b/arch/sandbox/board/Makefile
@@ -12,6 +12,7 @@ obj-y += dev-random.o
obj-y += watchdog.o
obj-$(CONFIG_CMD_SANDBOX_CPUINFO) += cpuinfo.o
obj-$(CONFIG_LED) += led.o
+bbenv-y += defaultenv-sandbox
extra-y += barebox.lds
diff --git a/arch/sandbox/board/board.c b/arch/sandbox/board/board.c
index c8d1c99897f5..58a7b8c96f62 100644
--- a/arch/sandbox/board/board.c
+++ b/arch/sandbox/board/board.c
@@ -15,6 +15,7 @@
*/
#include <common.h>
+#include <envfs.h>
#include <driver.h>
#include <malloc.h>
#include <mach/linux.h>
@@ -59,6 +60,8 @@ static int devices_init(struct device *dev)
platform_device_register(&devrandom_device);
+ defaultenv_append_directory(defaultenv_sandbox);
+
return 0;
}
diff --git a/arch/sandbox/board/env/network/eth0 b/arch/sandbox/board/defaultenv-sandbox/network/eth0
similarity index 100%
rename from arch/sandbox/board/env/network/eth0
rename to arch/sandbox/board/defaultenv-sandbox/network/eth0
diff --git a/arch/sandbox/board/env/nv/autoboot b/arch/sandbox/board/defaultenv-sandbox/nv/autoboot
similarity index 100%
rename from arch/sandbox/board/env/nv/autoboot
rename to arch/sandbox/board/defaultenv-sandbox/nv/autoboot
diff --git a/arch/sandbox/configs/sandbox_defconfig b/arch/sandbox/configs/sandbox_defconfig
index 251af8d0ef31..4cc9d9982c1a 100644
--- a/arch/sandbox/configs/sandbox_defconfig
+++ b/arch/sandbox/configs/sandbox_defconfig
@@ -9,7 +9,7 @@ CONFIG_PARTITION_DISK_EFI=y
CONFIG_DEFAULT_COMPRESSION_GZIP=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_REBOOT_MODE=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/sandbox/board/env"
+CONFIG_DEFAULT_ENVIRONMENT_PATH=""
CONFIG_STATE=y
CONFIG_STATE_CRYPTO=y
CONFIG_RESET_SOURCE=y
--
2.39.5
More information about the barebox
mailing list