]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
km/powerpc: migrate to env.txt file
authorHolger Brunck <holger.brunck@hitachienergy.com>
Fri, 2 Dec 2022 17:22:38 +0000 (18:22 +0100)
committerTom Rini <trini@konsulko.com>
Mon, 12 Dec 2022 21:48:33 +0000 (16:48 -0500)
Use already present common.env file and add a powerpc specific env
so that we can move all the environment defines to text files.

Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
18 files changed:
board/keymile/km83xx/km83xx.env [new file with mode: 0644]
configs/kmcoge5ne_defconfig
configs/kmeter1_defconfig
configs/kmopti2_defconfig
configs/kmsupx5_defconfig
configs/kmtepr2_defconfig
configs/tuge1_defconfig
configs/tuxx1_defconfig
include/configs/km/km-mpc83xx.h
include/configs/km/km-powerpc.h [deleted file]
include/configs/kmcoge5ne.h
include/configs/kmeter1.h
include/configs/kmopti2.h
include/configs/kmsupx5.h
include/configs/kmtepr2.h
include/configs/tuge1.h
include/configs/tuxx1.h
include/environment/pg-wcom/powerpc.env [new file with mode: 0644]

diff --git a/board/keymile/km83xx/km83xx.env b/board/keymile/km83xx/km83xx.env
new file mode 100644 (file)
index 0000000..ed2487c
--- /dev/null
@@ -0,0 +1,21 @@
+#if CONFIG_TARGET_KMCOGE5NE
+#define WCOM_UBI_PARTITION_APP
+hostname=kmcoge5ne
+netdev=eth1
+uimage=ecc_bch_uImage
+#elif CONFIG_TARGET_KMETER1
+hostname=kmeter1
+netdev=eth2
+uimage=uImage
+#else
+hostname=kmeter1
+netdev=eth0
+uimage=uImage
+#endif
+
+#include <environment/pg-wcom/common.env>
+#include <environment/pg-wcom/powerpc.env>
+
+#if CONFIG_TARGET_KMCOGE5NE
+add_default+= eccmode=bch
+#endif
index 013277c9bf129f8b95f7f0f36b0e280eb27786dc..6bfcee9ed2fd230f70271cfdb9baf4085552d477 100644 (file)
@@ -159,7 +159,6 @@ CONFIG_LCRR_DBYP_PLL_BYPASSED=y
 CONFIG_LCRR_EADC_2=y
 CONFIG_LCRR_CLKDIV_4=y
 CONFIG_83XX_PCICLK=0x3ef1480
-CONFIG_KM_DEF_NETDEV="eth1"
 CONFIG_SYS_MONITOR_LEN=786432
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
@@ -197,6 +196,7 @@ CONFIG_MTDIDS_DEFAULT="nor0=boot,nand0=app"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=boot:768k(u-boot),128k(env),128k(envred),-(ubi0);app:-(ubi1);"
 CONFIG_CMD_UBI=y
 # CONFIG_CMD_UBIFS is not set
+CONFIG_ENV_SOURCE_FILE="km83xx"
 CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_ENV_ADDR_REDUND=0xF00E0000
index 66ec936cce4ac96393cbb7deff3e30fb24525aa0..b0af9e051bba6764fcd58d72ab5477274dc88bf7 100644 (file)
@@ -129,7 +129,6 @@ CONFIG_ACR_PARKM_USB_I2C1_BOOT=y
 CONFIG_LCRR_DBYP_PLL_BYPASSED=y
 CONFIG_LCRR_EADC_2=y
 CONFIG_LCRR_CLKDIV_4=y
-CONFIG_KM_DEF_NETDEV="eth2"
 CONFIG_SYS_MONITOR_LEN=786432
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
@@ -166,6 +165,7 @@ CONFIG_MTDIDS_DEFAULT="nor0=boot"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=boot:768k(u-boot),128k(env),128k(envred),-(ubi0);"
 CONFIG_CMD_UBI=y
 # CONFIG_CMD_UBIFS is not set
+CONFIG_ENV_SOURCE_FILE="km83xx"
 CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_ENV_ADDR_REDUND=0xF00E0000
index 3ba334c2401c61707b71a188302e8a1bcecde94f..9a1e7cbde30f4a82ddd94c5fa45dea0cd1093503 100644 (file)
@@ -178,6 +178,7 @@ CONFIG_MTDIDS_DEFAULT="nor0=boot"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=boot:768k(u-boot),128k(env),128k(envred),-(ubi0);"
 CONFIG_CMD_UBI=y
 # CONFIG_CMD_UBIFS is not set
+CONFIG_ENV_SOURCE_FILE="km83xx"
 CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_ENV_ADDR_REDUND=0xF00E0000
index 4a02e5e88fc171c3650e4cdd541778590f866b95..d981e51223924f2acf6cc21a155b0bdefdb15749 100644 (file)
@@ -157,6 +157,7 @@ CONFIG_MTDIDS_DEFAULT="nor0=boot"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=boot:768k(u-boot),128k(env),128k(envred),-(ubi0);"
 CONFIG_CMD_UBI=y
 # CONFIG_CMD_UBIFS is not set
+CONFIG_ENV_SOURCE_FILE="km83xx"
 CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_ENV_ADDR_REDUND=0xF00E0000
index 55158864ea33e7971c8da29e0d8f954dd773c286..18a464c0aeb5763dbc0770ff9c0e25013b93bfa1 100644 (file)
@@ -177,6 +177,7 @@ CONFIG_MTDIDS_DEFAULT="nor0=boot"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=boot:768k(u-boot),128k(env),128k(envred),-(ubi0);"
 CONFIG_CMD_UBI=y
 # CONFIG_CMD_UBIFS is not set
+CONFIG_ENV_SOURCE_FILE="km83xx"
 CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_ENV_ADDR_REDUND=0xF00E0000
index 894a79df59e943b08d15f07b93a39ba72c4d9ea2..dbd832c9b76dcd3401ebdc7b4f664d89010072f7 100644 (file)
@@ -157,6 +157,7 @@ CONFIG_MTDIDS_DEFAULT="nor0=boot"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=boot:768k(u-boot),128k(env),128k(envred),-(ubi0);"
 CONFIG_CMD_UBI=y
 # CONFIG_CMD_UBIFS is not set
+CONFIG_ENV_SOURCE_FILE="km83xx"
 CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_ENV_ADDR_REDUND=0xF00E0000
index 6e66e6ce3052f8a79422883b3f89b720f86cf7fa..1b034a21a72648657b4485eddd64df443d965104 100644 (file)
@@ -179,6 +179,7 @@ CONFIG_MTDIDS_DEFAULT="nor0=boot"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=boot:768k(u-boot),128k(env),128k(envred),-(ubi0);"
 CONFIG_CMD_UBI=y
 # CONFIG_CMD_UBIFS is not set
+CONFIG_ENV_SOURCE_FILE="km83xx"
 CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_ENV_ADDR_REDUND=0xF00E0000
index 840a4d5401f55d6e5204cc5c402ffabb37337aed..7f1839f463d099b9625df9077401ad6944121b59 100644 (file)
  */
 #define CFG_SYS_BOOTMAPSZ              (8 << 20)
 
-/*
- * Environment
- */
-
-/*
- * Environment Configuration
- */
-#ifndef CONFIG_KM_DEF_ENV              /* if not set by keymile-common.h */
-#define CONFIG_KM_DEF_ENV "km-common=empty\0"
-#endif
-
-#ifndef CONFIG_KM_DEF_ARCH
-#define CONFIG_KM_DEF_ARCH     "arch=ppc_82xx\0"
-#endif
-
-#define CONFIG_EXTRA_ENV_SETTINGS \
-       CONFIG_KM_DEF_ENV                                                \
-       CONFIG_KM_DEF_ARCH                                               \
-       "newenv="                                                        \
-               "prot off " __stringify(CONFIG_ENV_ADDR) " +0x40000 && " \
-               "era " __stringify(CONFIG_ENV_ADDR) " +0x40000\0"        \
-       "unlock=yes\0"                                                   \
-       ""
-
 /*
  * QE UEC ethernet configuration
  */
diff --git a/include/configs/km/km-powerpc.h b/include/configs/km/km-powerpc.h
deleted file mode 100644 (file)
index 424caa0..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * (C) Copyright 2011
- * Heiko Schocher, DENX Software Engineering, hs@denx.de.
- */
-
-#ifndef __CONFIG_KEYMILE_POWERPC_H
-#define __CONFIG_KEYMILE_POWERPC_H
-
-/* Do boardspecific init for all boards */
-
-/* Increase max size of compressed kernel */
-
-/******************************************************************************
- * (PRAM usage)
- * ... -------------------------------------------------------
- * ... |ROOTFSSIZE | PNVRAM |PHRAM |RESERVED_PRAM | END_OF_RAM
- * ... |<------------------- pram -------------------------->|
- * ... -------------------------------------------------------
- * @END_OF_RAM:
- * @CONFIG_KM_RESERVED_PRAM: reserved pram for special purpose
- * @CONFIG_KM_PHRAM: address for /var
- * @CONFIG_KM_PNVRAM: address for PNVRAM (for the application)
- */
-
-/* set the default PRAM value to at least PNVRAM + PHRAM when pram env variable
- * is not valid yet, which is the case for when u-boot copies itself to RAM */
-#define CONFIG_PRAM            ((CONFIG_KM_PNVRAM + CONFIG_KM_PHRAM)>>10)
-
-/* architecture specific default bootargs */
-#define CONFIG_KM_DEF_BOOT_ARGS_CPU            ""
-
-#define CONFIG_KM_DEF_ENV_CPU                                          \
-       "u-boot="CONFIG_HOSTNAME "/u-boot.bin\0"                \
-       "update="                                                       \
-               "protect off " __stringify(BOOTFLASH_START) " +${filesize} && "\
-               "erase " __stringify(BOOTFLASH_START) "  +${filesize} && "\
-               "cp.b ${load_addr_r} " __stringify(BOOTFLASH_START)     \
-               "  ${filesize} && "                                     \
-               "protect on " __stringify(BOOTFLASH_START) "  +${filesize}\0"\
-       "set_fdthigh=true\0"                                            \
-       "checkfdt=true\0"                                               \
-       "bootm_mapsize=" __stringify(CONFIG_SYS_BOOTM_LEN) "\0"         \
-       ""
-
-#endif /* __CONFIG_KEYMILE_POWERPC_H */
index 6b30fb4b617e6fc2a2a52877ab82df490efea698..e0f94aead794b0beef1a88cb15fc663f5ffadb0d 100644 (file)
@@ -8,16 +8,10 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-#define CONFIG_HOSTNAME                "kmcoge5ne"
 #define NAND_MAX_CHIPS                         1
 #define CFG_SYS_NAND_BASE CFG_SYS_KMBEC_FPGA_BASE /* PRIO_BASE_ADDRESS */
 
-#define CONFIG_KM_UBI_PARTITION_NAME_BOOT      "ubi0"
-#define CONFIG_KM_UBI_PARTITION_NAME_APP       "ubi1"
-
 /* include common defines/options for all Keymile boards */
-#include "km/keymile-common.h"
-#include "km/km-powerpc.h"
 #include "km/km-mpc83xx.h"
 #include "km/km-mpc8360.h"
 
index 910fc1b2cb258dfdd72e214a68a3db19c2c8cc40..6f67e5a98aba10bad22adab85fb26140f3fffb09 100644 (file)
@@ -8,11 +8,7 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-#define CONFIG_HOSTNAME                "kmeter1"
-
 /* include common defines/options for all Keymile boards */
-#include "km/keymile-common.h"
-#include "km/km-powerpc.h"
 #include "km/km-mpc83xx.h"
 #include "km/km-mpc8360.h"
 
index 5050c70303901f77419dd0b25f8441f9c4ea68e2..d6a3844bcc5e07c381ffd6f4a6b16d15b74f8b64 100644 (file)
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-/*
- * High Level Configuration Options
- */
-#define CONFIG_HOSTNAME                "kmopti2"
-
 /* include common defines/options for all Keymile boards */
-#include "km/keymile-common.h"
-#include "km/km-powerpc.h"
 #include "km/km-mpc83xx.h"
 #include "km/km-mpc832x.h"
 
index e3de6c61e71c905ba57c7a3ebc08cfd2bfcaf452..d6a3844bcc5e07c381ffd6f4a6b16d15b74f8b64 100644 (file)
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-/*
- * High Level Configuration Options
- */
-#define CONFIG_HOSTNAME                "kmsupx5"
-
 /* include common defines/options for all Keymile boards */
-#include "km/keymile-common.h"
-#include "km/km-powerpc.h"
 #include "km/km-mpc83xx.h"
 #include "km/km-mpc832x.h"
 
index a4ceb1c50d6bede08ec143c1d2eab99388bb7e97..d6a3844bcc5e07c381ffd6f4a6b16d15b74f8b64 100644 (file)
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-/*
- * High Level Configuration Options
- */
-#define CONFIG_HOSTNAME         "kmtepr2"
-
 /* include common defines/options for all Keymile boards */
-#include "km/keymile-common.h"
-#include "km/km-powerpc.h"
 #include "km/km-mpc83xx.h"
 #include "km/km-mpc832x.h"
 
index d43ccbe8dd94b040cd4237d5c54f69e198383430..d6a3844bcc5e07c381ffd6f4a6b16d15b74f8b64 100644 (file)
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-/*
- * High Level Configuration Options
- */
-#define CONFIG_HOSTNAME                "tuge1"
-
 /* include common defines/options for all Keymile boards */
-#include "km/keymile-common.h"
-#include "km/km-powerpc.h"
 #include "km/km-mpc83xx.h"
 #include "km/km-mpc832x.h"
 
index 7eed31c35f038ae9ea7c8d76cae0f4c68fc53b6d..d6a3844bcc5e07c381ffd6f4a6b16d15b74f8b64 100644 (file)
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-/*
- * High Level Configuration Options
- */
-#define CONFIG_HOSTNAME                "tuxx1"
-
 /* include common defines/options for all Keymile boards */
-#include "km/keymile-common.h"
-#include "km/km-powerpc.h"
 #include "km/km-mpc83xx.h"
 #include "km/km-mpc832x.h"
 
diff --git a/include/environment/pg-wcom/powerpc.env b/include/environment/pg-wcom/powerpc.env
new file mode 100644 (file)
index 0000000..a57fd93
--- /dev/null
@@ -0,0 +1,14 @@
+arch=ppc_82xx
+bootm_mapsize=CONFIG_SYS_BOOTM_LEN
+checkfdt=true
+set_fdthigh=true
+
+update=protect off BOOTFLASH_START +${filesize} &&
+       erase BOOTFLASH_START +${filesize} &&
+       cp.b ${load_addr_r} BOOTFLASH_START ${filesize} &&
+       protect on BOOTFLASH_START +${filesize}
+
+newenv=prot off CONFIG_ENV_ADDR +0x40000 &&
+       era CONFIG_ENV_ADDR +0x40000
+
+unlock=yes