diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2016-09-26 09:50:08 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2016-10-10 08:30:26 +0200 |
commit | 4d9734c8a26437838a5c1085fb3859734036e150 (patch) | |
tree | f63cf21ae773c4d24d2baecc96c6994fa814d57d /arch/arm/boards/phytec-phycore-omap4460 | |
parent | 7791ad2d59a16b76c6a0e48797e9b0ba481b67e0 (diff) | |
download | barebox-4d9734c8a26437838a5c1085fb3859734036e150.tar.gz barebox-4d9734c8a26437838a5c1085fb3859734036e150.tar.xz |
defaultenv: add defaultenv-1 in boards via defaultenv_append_directory()
Currently it's hardcoded for each board which defaultenv version is
used. This is unfortunate since some people like the other defaultenv
version better and may want to select it.
This patch removes the board specific environment path
CONFIG_DEFAULT_ENVIRONMENT_PATH and instead adds it via:
if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
defaultenv_append_directory(defaultenv_<board>);
This way we can make sure that the defaultenv-1 board specific bits are
only compiled in when defaultenv-1 is actually in use.
The next step is to make the defaultenv version selection a user visible
choice.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/boards/phytec-phycore-omap4460')
-rw-r--r-- | arch/arm/boards/phytec-phycore-omap4460/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/boards/phytec-phycore-omap4460/board.c | 4 | ||||
-rw-r--r-- | arch/arm/boards/phytec-phycore-omap4460/defaultenv-phytec-phycore-omap4460/bin/init_board (renamed from arch/arm/boards/phytec-phycore-omap4460/env/bin/init_board) | 0 | ||||
-rw-r--r-- | arch/arm/boards/phytec-phycore-omap4460/defaultenv-phytec-phycore-omap4460/bin/nand_bootstrap (renamed from arch/arm/boards/phytec-phycore-omap4460/env/bin/nand_bootstrap) | 0 | ||||
-rw-r--r-- | arch/arm/boards/phytec-phycore-omap4460/defaultenv-phytec-phycore-omap4460/config (renamed from arch/arm/boards/phytec-phycore-omap4460/env/config) | 0 |
5 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/boards/phytec-phycore-omap4460/Makefile b/arch/arm/boards/phytec-phycore-omap4460/Makefile index 5d4eb10b9b..5e78e11ec1 100644 --- a/arch/arm/boards/phytec-phycore-omap4460/Makefile +++ b/arch/arm/boards/phytec-phycore-omap4460/Makefile @@ -1,2 +1,3 @@ obj-y += board.o lwl-y += lowlevel.o mux.o +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-phytec-phycore-omap4460 diff --git a/arch/arm/boards/phytec-phycore-omap4460/board.c b/arch/arm/boards/phytec-phycore-omap4460/board.c index 807cdd677d..b7aeeca6df 100644 --- a/arch/arm/boards/phytec-phycore-omap4460/board.c +++ b/arch/arm/boards/phytec-phycore-omap4460/board.c @@ -20,6 +20,7 @@ #include <driver.h> #include <gpio.h> #include <io.h> +#include <envfs.h> #include <asm/armlinux.h> #include <generated/mach-types.h> #include <mach/omap4-silicon.h> @@ -307,6 +308,9 @@ static int pcm049_devices_init(void) if (IS_ENABLED(CONFIG_DRIVER_VIDEO_OMAP)) omap_add_display(&pcm049_fb_data); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_phytec_phycore_omap4460); + return 0; } device_initcall(pcm049_devices_init); diff --git a/arch/arm/boards/phytec-phycore-omap4460/env/bin/init_board b/arch/arm/boards/phytec-phycore-omap4460/defaultenv-phytec-phycore-omap4460/bin/init_board index d5142ee8d0..d5142ee8d0 100644 --- a/arch/arm/boards/phytec-phycore-omap4460/env/bin/init_board +++ b/arch/arm/boards/phytec-phycore-omap4460/defaultenv-phytec-phycore-omap4460/bin/init_board diff --git a/arch/arm/boards/phytec-phycore-omap4460/env/bin/nand_bootstrap b/arch/arm/boards/phytec-phycore-omap4460/defaultenv-phytec-phycore-omap4460/bin/nand_bootstrap index 49e38dc4f0..49e38dc4f0 100644 --- a/arch/arm/boards/phytec-phycore-omap4460/env/bin/nand_bootstrap +++ b/arch/arm/boards/phytec-phycore-omap4460/defaultenv-phytec-phycore-omap4460/bin/nand_bootstrap diff --git a/arch/arm/boards/phytec-phycore-omap4460/env/config b/arch/arm/boards/phytec-phycore-omap4460/defaultenv-phytec-phycore-omap4460/config index 1a252dd9c5..1a252dd9c5 100644 --- a/arch/arm/boards/phytec-phycore-omap4460/env/config +++ b/arch/arm/boards/phytec-phycore-omap4460/defaultenv-phytec-phycore-omap4460/config |