summaryrefslogtreecommitdiffstats
path: root/arch/ppc
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-09-26 09:50:08 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2016-10-10 08:30:26 +0200
commit4d9734c8a26437838a5c1085fb3859734036e150 (patch)
treef63cf21ae773c4d24d2baecc96c6994fa814d57d /arch/ppc
parent7791ad2d59a16b76c6a0e48797e9b0ba481b67e0 (diff)
downloadbarebox-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/ppc')
-rw-r--r--arch/ppc/boards/freescale-p1010rdb/Makefile3
-rw-r--r--arch/ppc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/bin/init (renamed from arch/ppc/boards/freescale-p1010rdb/env/bin/init)0
-rw-r--r--arch/ppc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/config (renamed from arch/ppc/boards/freescale-p1010rdb/env/config)0
-rw-r--r--arch/ppc/boards/freescale-p1010rdb/p1010rdb.c4
-rw-r--r--arch/ppc/boards/freescale-p1022ds/Makefile1
-rw-r--r--arch/ppc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/bin/init (renamed from arch/ppc/boards/freescale-p1022ds/env/bin/init)0
-rw-r--r--arch/ppc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/config (renamed from arch/ppc/boards/freescale-p1022ds/env/config)0
-rw-r--r--arch/ppc/boards/freescale-p1022ds/p1022ds.c4
-rw-r--r--arch/ppc/boards/freescale-p2020rdb/Makefile1
-rw-r--r--arch/ppc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/bin/init (renamed from arch/ppc/boards/freescale-p2020rdb/env/bin/init)0
-rw-r--r--arch/ppc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/config (renamed from arch/ppc/boards/freescale-p2020rdb/env/config)0
-rw-r--r--arch/ppc/boards/freescale-p2020rdb/p2020rdb.c4
-rw-r--r--arch/ppc/boards/geip-da923rc/Makefile1
-rw-r--r--arch/ppc/boards/geip-da923rc/da923rc.c4
-rw-r--r--arch/ppc/boards/geip-da923rc/defaultenv-geip-da923rc/bin/boot (renamed from arch/ppc/boards/geip-da923rc/env/bin/boot)0
-rw-r--r--arch/ppc/boards/geip-da923rc/defaultenv-geip-da923rc/bin/init (renamed from arch/ppc/boards/geip-da923rc/env/bin/init)0
-rw-r--r--arch/ppc/boards/geip-da923rc/defaultenv-geip-da923rc/config (renamed from arch/ppc/boards/geip-da923rc/env/config)0
-rw-r--r--arch/ppc/configs/da923rc_defconfig1
-rw-r--r--arch/ppc/configs/p1010rdb_defconfig1
-rw-r--r--arch/ppc/configs/p1022ds_defconfig1
-rw-r--r--arch/ppc/configs/p2020rdb_defconfig1
21 files changed, 21 insertions, 5 deletions
diff --git a/arch/ppc/boards/freescale-p1010rdb/Makefile b/arch/ppc/boards/freescale-p1010rdb/Makefile
index 2a51091e14..a7b64eef4d 100644
--- a/arch/ppc/boards/freescale-p1010rdb/Makefile
+++ b/arch/ppc/boards/freescale-p1010rdb/Makefile
@@ -1,4 +1,5 @@
obj-y += p1010rdb.o
obj-y += law.o
obj-y += tlb.o
-obj-y += ddr.o \ No newline at end of file
+obj-y += ddr.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-freescale-p1010rdb
diff --git a/arch/ppc/boards/freescale-p1010rdb/env/bin/init b/arch/ppc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/bin/init
index c0e04c1f2d..c0e04c1f2d 100644
--- a/arch/ppc/boards/freescale-p1010rdb/env/bin/init
+++ b/arch/ppc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/bin/init
diff --git a/arch/ppc/boards/freescale-p1010rdb/env/config b/arch/ppc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/config
index bffd86882e..bffd86882e 100644
--- a/arch/ppc/boards/freescale-p1010rdb/env/config
+++ b/arch/ppc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/config
diff --git a/arch/ppc/boards/freescale-p1010rdb/p1010rdb.c b/arch/ppc/boards/freescale-p1010rdb/p1010rdb.c
index eab3abac70..b163327597 100644
--- a/arch/ppc/boards/freescale-p1010rdb/p1010rdb.c
+++ b/arch/ppc/boards/freescale-p1010rdb/p1010rdb.c
@@ -22,6 +22,7 @@
#include <types.h>
#include <i2c/i2c.h>
#include <gpio.h>
+#include <envfs.h>
#include <partition.h>
#include <memory.h>
#include <asm/cache.h>
@@ -121,6 +122,9 @@ static int p1010rdb_devices_init(void)
IORESOURCE_MEM, &i2cplat[1]);
board_eth_init();
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_freescale_p1010rdb);
+
return 0;
}
diff --git a/arch/ppc/boards/freescale-p1022ds/Makefile b/arch/ppc/boards/freescale-p1022ds/Makefile
index e9b59d5ccb..48867fa851 100644
--- a/arch/ppc/boards/freescale-p1022ds/Makefile
+++ b/arch/ppc/boards/freescale-p1022ds/Makefile
@@ -3,3 +3,4 @@ obj-y += law.o
obj-y += tlb.o
obj-y += ddr.o
obj-y += ics307_clk.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-freescale-p1022ds
diff --git a/arch/ppc/boards/freescale-p1022ds/env/bin/init b/arch/ppc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/bin/init
index c0e04c1f2d..c0e04c1f2d 100644
--- a/arch/ppc/boards/freescale-p1022ds/env/bin/init
+++ b/arch/ppc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/bin/init
diff --git a/arch/ppc/boards/freescale-p1022ds/env/config b/arch/ppc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/config
index bffd86882e..bffd86882e 100644
--- a/arch/ppc/boards/freescale-p1022ds/env/config
+++ b/arch/ppc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/config
diff --git a/arch/ppc/boards/freescale-p1022ds/p1022ds.c b/arch/ppc/boards/freescale-p1022ds/p1022ds.c
index 95a7234d4b..d80c234ea9 100644
--- a/arch/ppc/boards/freescale-p1022ds/p1022ds.c
+++ b/arch/ppc/boards/freescale-p1022ds/p1022ds.c
@@ -23,6 +23,7 @@
#include <i2c/i2c.h>
#include <partition.h>
#include <memory.h>
+#include <envfs.h>
#include <asm/cache.h>
#include <asm/fsl_ddr_sdram.h>
#include <asm/fsl_law.h>
@@ -113,6 +114,9 @@ static int p1022ds_devices_init(void)
board_eth_init();
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_freescale_p1022ds);
+
return 0;
}
diff --git a/arch/ppc/boards/freescale-p2020rdb/Makefile b/arch/ppc/boards/freescale-p2020rdb/Makefile
index dbd2af6dae..b2497f695c 100644
--- a/arch/ppc/boards/freescale-p2020rdb/Makefile
+++ b/arch/ppc/boards/freescale-p2020rdb/Makefile
@@ -1,3 +1,4 @@
obj-y += p2020rdb.o
obj-y += law.o
obj-y += tlb.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-freescale-p2020rdb
diff --git a/arch/ppc/boards/freescale-p2020rdb/env/bin/init b/arch/ppc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/bin/init
index 4d7b03e26d..4d7b03e26d 100644
--- a/arch/ppc/boards/freescale-p2020rdb/env/bin/init
+++ b/arch/ppc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/bin/init
diff --git a/arch/ppc/boards/freescale-p2020rdb/env/config b/arch/ppc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/config
index 23e0ba2a5d..23e0ba2a5d 100644
--- a/arch/ppc/boards/freescale-p2020rdb/env/config
+++ b/arch/ppc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/config
diff --git a/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c b/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c
index b03d791eb1..555976578e 100644
--- a/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c
+++ b/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c
@@ -25,6 +25,7 @@
#include <i2c/i2c.h>
#include <partition.h>
#include <memory.h>
+#include <envfs.h>
#include <asm/cache.h>
#include <asm/fsl_ddr_sdram.h>
#include <asm/fsl_law.h>
@@ -95,6 +96,9 @@ static int devices_init(void)
fsl_eth_init(2, &gfar_info[0]);
fsl_eth_init(3, &gfar_info[1]);
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_freescale_p2020rdb);
+
return 0;
}
diff --git a/arch/ppc/boards/geip-da923rc/Makefile b/arch/ppc/boards/geip-da923rc/Makefile
index 3abc6c6c6b..7177bfac2c 100644
--- a/arch/ppc/boards/geip-da923rc/Makefile
+++ b/arch/ppc/boards/geip-da923rc/Makefile
@@ -4,3 +4,4 @@ obj-y += law.o
obj-y += ddr.o
obj-y += nand.o
obj-y += product_data.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-geip-da923rc
diff --git a/arch/ppc/boards/geip-da923rc/da923rc.c b/arch/ppc/boards/geip-da923rc/da923rc.c
index 85c974780d..6ec4ee2b6c 100644
--- a/arch/ppc/boards/geip-da923rc/da923rc.c
+++ b/arch/ppc/boards/geip-da923rc/da923rc.c
@@ -22,6 +22,7 @@
#include <asm/io.h>
#include <net.h>
#include <gpio.h>
+#include <envfs.h>
#include <platform_data/serial-ns16550.h>
#include <partition.h>
#include <environment.h>
@@ -96,6 +97,9 @@ static int da923rc_devices_init(void)
board_eth_init();
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_geip_da923rc);
+
return 0;
}
diff --git a/arch/ppc/boards/geip-da923rc/env/bin/boot b/arch/ppc/boards/geip-da923rc/defaultenv-geip-da923rc/bin/boot
index ce7da18e63..ce7da18e63 100644
--- a/arch/ppc/boards/geip-da923rc/env/bin/boot
+++ b/arch/ppc/boards/geip-da923rc/defaultenv-geip-da923rc/bin/boot
diff --git a/arch/ppc/boards/geip-da923rc/env/bin/init b/arch/ppc/boards/geip-da923rc/defaultenv-geip-da923rc/bin/init
index 80cc2cffb3..80cc2cffb3 100644
--- a/arch/ppc/boards/geip-da923rc/env/bin/init
+++ b/arch/ppc/boards/geip-da923rc/defaultenv-geip-da923rc/bin/init
diff --git a/arch/ppc/boards/geip-da923rc/env/config b/arch/ppc/boards/geip-da923rc/defaultenv-geip-da923rc/config
index 79e2606a71..79e2606a71 100644
--- a/arch/ppc/boards/geip-da923rc/env/config
+++ b/arch/ppc/boards/geip-da923rc/defaultenv-geip-da923rc/config
diff --git a/arch/ppc/configs/da923rc_defconfig b/arch/ppc/configs/da923rc_defconfig
index a6d38fd6f0..f873eb54a5 100644
--- a/arch/ppc/configs/da923rc_defconfig
+++ b/arch/ppc/configs/da923rc_defconfig
@@ -18,7 +18,6 @@ CONFIG_CMD_EXPORT=y
CONFIG_CMD_FLASH=y
CONFIG_CMD_GO=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=n
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/ppc/boards/geip-da923rc/env/"
CONFIG_CMD_LOADENV=y
CONFIG_CMD_PRINTENV=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/ppc/configs/p1010rdb_defconfig b/arch/ppc/configs/p1010rdb_defconfig
index a891a6c4af..b1f1002d96 100644
--- a/arch/ppc/configs/p1010rdb_defconfig
+++ b/arch/ppc/configs/p1010rdb_defconfig
@@ -18,7 +18,6 @@ CONFIG_CMD_RESET=y
CONFIG_CMD_TIMEOUT=y
CONFIG_CMD_GO=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=n
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/ppc/boards/freescale-p1010rdb/env/"
CONFIG_CMD_LOADENV=y
CONFIG_CMD_PRINTENV=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/ppc/configs/p1022ds_defconfig b/arch/ppc/configs/p1022ds_defconfig
index 4d0fe991ab..f517708178 100644
--- a/arch/ppc/configs/p1022ds_defconfig
+++ b/arch/ppc/configs/p1022ds_defconfig
@@ -16,7 +16,6 @@ CONFIG_CMD_FLASH=y
CONFIG_CMD_RESET=y
CONFIG_CMD_GO=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=n
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/ppc/boards/freescale-p1022ds/env/"
CONFIG_CMD_LOADENV=y
CONFIG_CMD_PRINTENV=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/ppc/configs/p2020rdb_defconfig b/arch/ppc/configs/p2020rdb_defconfig
index 817c9a0e65..d0b11b47a8 100644
--- a/arch/ppc/configs/p2020rdb_defconfig
+++ b/arch/ppc/configs/p2020rdb_defconfig
@@ -17,7 +17,6 @@ CONFIG_CMD_FLASH=y
CONFIG_CMD_RESET=y
CONFIG_CMD_GO=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=n
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/ppc/boards/freescale-p2020rdb/env/"
CONFIG_CMD_LOADENV=y
CONFIG_CMD_PRINTENV=y
CONFIG_CMD_SAVEENV=y