[U-Boot] [PATCH 1/5] nios2: Calculate the env position from monitor size

Reorder the 10m50 and 3c120 config files such, that the environment position can be calculated from the monitor size. The environment is placed right after the monitor. This removes one more ad-hoc variable.
Signed-off-by: Marek Vasut marex@denx.de Cc: Thomas Chou thomas@wytron.com.tw --- include/configs/10m50_devboard.h | 26 +++++++++++++------------- include/configs/3c120_devboard.h | 26 +++++++++++++------------- 2 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/include/configs/10m50_devboard.h b/include/configs/10m50_devboard.h index 8a91cdb..c99177c 100644 --- a/include/configs/10m50_devboard.h +++ b/include/configs/10m50_devboard.h @@ -54,19 +54,6 @@ #define CONFIG_LMB
/* - * ENVIRONMENT -- Put environment in sector CONFIG_SYS_MONITOR_LEN above - * CONFIG_SYS_RESET_ADDR, since we assume the monitor is stored at the - * reset address, no? This will keep the environment in user region - * of flash. NOTE: the monitor length must be multiple of sector size - * (which is common practice). - */ -#define CONFIG_ENV_IS_IN_FLASH - -#define CONFIG_ENV_SIZE 0x10000 /* 64k, 1 sector */ -#define CONFIG_ENV_OVERWRITE /* Serial change Ok */ -#define CONFIG_ENV_ADDR 0xf4040000 - -/* * MEMORY ORGANIZATION * -Monitor at top of sdram. * -The heap is placed below the monitor @@ -83,6 +70,19 @@ #define CONFIG_SYS_MALLOC_LEN 0x20000
/* + * ENVIRONMENT -- Put environment in sector CONFIG_SYS_MONITOR_LEN above + * CONFIG_SYS_RESET_ADDR, since we assume the monitor is stored at the + * reset address, no? This will keep the environment in user region + * of flash. NOTE: the monitor length must be multiple of sector size + * (which is common practice). + */ +#define CONFIG_ENV_IS_IN_FLASH + +#define CONFIG_ENV_SIZE 0x10000 /* 64k, 1 sector */ +#define CONFIG_ENV_OVERWRITE /* Serial change Ok */ +#define CONFIG_ENV_ADDR (0xf4000000 + CONFIG_SYS_MONITOR_LEN) + +/* * MISC */ #define CONFIG_SYS_LONGHELP /* Provide extended help */ diff --git a/include/configs/3c120_devboard.h b/include/configs/3c120_devboard.h index 2ecdd5d..0f494e5 100644 --- a/include/configs/3c120_devboard.h +++ b/include/configs/3c120_devboard.h @@ -57,19 +57,6 @@ #define CONFIG_LMB
/* - * ENVIRONMENT -- Put environment in sector CONFIG_SYS_MONITOR_LEN above - * CONFIG_SYS_RESET_ADDR, since we assume the monitor is stored at the - * reset address, no? This will keep the environment in user region - * of flash. NOTE: the monitor length must be multiple of sector size - * (which is common practice). - */ -#define CONFIG_ENV_IS_IN_FLASH - -#define CONFIG_ENV_SIZE 0x20000 /* 128k, 1 sector */ -#define CONFIG_ENV_OVERWRITE /* Serial change Ok */ -#define CONFIG_ENV_ADDR 0xe2840000 - -/* * MEMORY ORGANIZATION * -Monitor at top of sdram. * -The heap is placed below the monitor @@ -86,6 +73,19 @@ #define CONFIG_SYS_MALLOC_LEN 0x20000
/* + * ENVIRONMENT -- Put environment in sector CONFIG_SYS_MONITOR_LEN above + * CONFIG_SYS_RESET_ADDR, since we assume the monitor is stored at the + * reset address, no? This will keep the environment in user region + * of flash. NOTE: the monitor length must be multiple of sector size + * (which is common practice). + */ +#define CONFIG_ENV_IS_IN_FLASH + +#define CONFIG_ENV_SIZE 0x20000 /* 128k, 1 sector */ +#define CONFIG_ENV_OVERWRITE /* Serial change Ok */ +#define CONFIG_ENV_ADDR (0xe2800000 + CONFIG_SYS_MONITOR_LEN) + +/* * MISC */ #define CONFIG_SYS_LONGHELP /* Provide extended help */

The monitor is growing much larger with various additions, like fitImage, command line completion, UBI etc. Make the monitor area larger so these features can be safely added.
Signed-off-by: Marek Vasut marex@denx.de Cc: Thomas Chou thomas@wytron.com.tw --- include/configs/10m50_devboard.h | 2 +- include/configs/3c120_devboard.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/configs/10m50_devboard.h b/include/configs/10m50_devboard.h index c99177c..68ef6e5 100644 --- a/include/configs/10m50_devboard.h +++ b/include/configs/10m50_devboard.h @@ -63,7 +63,7 @@ #define CONFIG_SYS_SDRAM_SIZE 0x08000000 #define CONFIG_NR_DRAM_BANKS 1 #define CONFIG_MONITOR_IS_IN_RAM -#define CONFIG_SYS_MONITOR_LEN 0x40000 /* Reserve 256k */ +#define CONFIG_SYS_MONITOR_LEN 0x80000 /* Reserve 512k */ #define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_SDRAM_BASE + \ CONFIG_SYS_SDRAM_SIZE - \ CONFIG_SYS_MONITOR_LEN) diff --git a/include/configs/3c120_devboard.h b/include/configs/3c120_devboard.h index 0f494e5..00e8374 100644 --- a/include/configs/3c120_devboard.h +++ b/include/configs/3c120_devboard.h @@ -66,7 +66,7 @@ #define CONFIG_SYS_SDRAM_SIZE 0x08000000 #define CONFIG_NR_DRAM_BANKS 1 #define CONFIG_MONITOR_IS_IN_RAM -#define CONFIG_SYS_MONITOR_LEN 0x40000 /* Reserve 256k */ +#define CONFIG_SYS_MONITOR_LEN 0x80000 /* Reserve 512k */ #define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_SDRAM_BASE + \ CONFIG_SYS_SDRAM_SIZE - \ CONFIG_SYS_MONITOR_LEN)

Hi Marek,
On 2015年12月15日 10:09, Marek Vasut wrote:
The monitor is growing much larger with various additions, like fitImage, command line completion, UBI etc. Make the monitor area larger so these features can be safely added.
Signed-off-by: Marek Vasut marex@denx.de Cc: Thomas Chou thomas@wytron.com.tw
include/configs/10m50_devboard.h | 2 +- include/configs/3c120_devboard.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/configs/10m50_devboard.h b/include/configs/10m50_devboard.h index c99177c..68ef6e5 100644 --- a/include/configs/10m50_devboard.h +++ b/include/configs/10m50_devboard.h @@ -63,7 +63,7 @@ #define CONFIG_SYS_SDRAM_SIZE 0x08000000 #define CONFIG_NR_DRAM_BANKS 1 #define CONFIG_MONITOR_IS_IN_RAM -#define CONFIG_SYS_MONITOR_LEN 0x40000 /* Reserve 256k */ +#define CONFIG_SYS_MONITOR_LEN 0x80000 /* Reserve 512k */ #define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_SDRAM_BASE + \ CONFIG_SYS_SDRAM_SIZE - \ CONFIG_SYS_MONITOR_LEN) diff --git a/include/configs/3c120_devboard.h b/include/configs/3c120_devboard.h index 0f494e5..00e8374 100644 --- a/include/configs/3c120_devboard.h +++ b/include/configs/3c120_devboard.h @@ -66,7 +66,7 @@ #define CONFIG_SYS_SDRAM_SIZE 0x08000000 #define CONFIG_NR_DRAM_BANKS 1 #define CONFIG_MONITOR_IS_IN_RAM -#define CONFIG_SYS_MONITOR_LEN 0x40000 /* Reserve 256k */ +#define CONFIG_SYS_MONITOR_LEN 0x80000 /* Reserve 512k */ #define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_SDRAM_BASE + \ CONFIG_SYS_SDRAM_SIZE - \ CONFIG_SYS_MONITOR_LEN)
Acked-by: Thomas Chou thomas@wytron.com.tw
Thanks, Thomas

Hi Marek,
On 2015年12月15日 10:09, Marek Vasut wrote:
The monitor is growing much larger with various additions, like fitImage, command line completion, UBI etc. Make the monitor area larger so these features can be safely added.
Signed-off-by: Marek Vasut marex@denx.de Cc: Thomas Chou thomas@wytron.com.tw
include/configs/10m50_devboard.h | 2 +- include/configs/3c120_devboard.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Applied to u-boot-nios. Thanks.
Best regards, Thomas

Preset the $loadaddr environment variable to some sane default, let's say half of the RAM. This variable is where the kernel is loaded using all sorts of .*load commands, so it's convenient to have it set.
Signed-off-by: Marek Vasut marex@denx.de Cc: Thomas Chou thomas@wytron.com.tw --- include/configs/10m50_devboard.h | 3 ++- include/configs/3c120_devboard.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/include/configs/10m50_devboard.h b/include/configs/10m50_devboard.h index 68ef6e5..608127f 100644 --- a/include/configs/10m50_devboard.h +++ b/include/configs/10m50_devboard.h @@ -92,7 +92,8 @@ #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ sizeof(CONFIG_SYS_PROMPT) + \ 16) /* Print buf size */ -#define CONFIG_SYS_LOAD_ADDR CONFIG_SYS_SDRAM_BASE +#define CONFIG_SYS_LOAD_ADDR 0xcc000000 /* Half of RAM */ +#define CONFIG_LOADADDR CONFIG_SYS_LOAD_ADDR #define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MONITOR_BASE - \ CONFIG_ENV_SIZE - \ diff --git a/include/configs/3c120_devboard.h b/include/configs/3c120_devboard.h index 00e8374..6c9dc3f 100644 --- a/include/configs/3c120_devboard.h +++ b/include/configs/3c120_devboard.h @@ -95,7 +95,8 @@ #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ sizeof(CONFIG_SYS_PROMPT) + \ 16) /* Print buf size */ -#define CONFIG_SYS_LOAD_ADDR CONFIG_SYS_SDRAM_BASE +#define CONFIG_SYS_LOAD_ADDR 0xd4000000 /* Half of RAM */ +#define CONFIG_LOADADDR CONFIG_SYS_LOAD_ADDR #define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MONITOR_BASE - \ CONFIG_ENV_SIZE - \

Hi Marek,
On 2015年12月15日 10:09, Marek Vasut wrote:
Preset the $loadaddr environment variable to some sane default, let's say half of the RAM. This variable is where the kernel is loaded using all sorts of .*load commands, so it's convenient to have it set.
Signed-off-by: Marek Vasut marex@denx.de Cc: Thomas Chou thomas@wytron.com.tw
include/configs/10m50_devboard.h | 3 ++- include/configs/3c120_devboard.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/include/configs/10m50_devboard.h b/include/configs/10m50_devboard.h index 68ef6e5..608127f 100644 --- a/include/configs/10m50_devboard.h +++ b/include/configs/10m50_devboard.h @@ -92,7 +92,8 @@ #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ sizeof(CONFIG_SYS_PROMPT) + \ 16) /* Print buf size */ -#define CONFIG_SYS_LOAD_ADDR CONFIG_SYS_SDRAM_BASE +#define CONFIG_SYS_LOAD_ADDR 0xcc000000 /* Half of RAM */ +#define CONFIG_LOADADDR CONFIG_SYS_LOAD_ADDR #define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MONITOR_BASE - \ CONFIG_ENV_SIZE - \ diff --git a/include/configs/3c120_devboard.h b/include/configs/3c120_devboard.h index 00e8374..6c9dc3f 100644 --- a/include/configs/3c120_devboard.h +++ b/include/configs/3c120_devboard.h @@ -95,7 +95,8 @@ #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ sizeof(CONFIG_SYS_PROMPT) + \ 16) /* Print buf size */ -#define CONFIG_SYS_LOAD_ADDR CONFIG_SYS_SDRAM_BASE +#define CONFIG_SYS_LOAD_ADDR 0xd4000000 /* Half of RAM */ +#define CONFIG_LOADADDR CONFIG_SYS_LOAD_ADDR #define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MONITOR_BASE - \ CONFIG_ENV_SIZE - \
Acked-by: Thomas Chou thomas@wytron.com.tw
Thanks, Thomas

Hi Marek,
On 2015年12月15日 10:09, Marek Vasut wrote:
Preset the $loadaddr environment variable to some sane default, let's say half of the RAM. This variable is where the kernel is loaded using all sorts of .*load commands, so it's convenient to have it set.
Signed-off-by: Marek Vasut marex@denx.de Cc: Thomas Chou thomas@wytron.com.tw
include/configs/10m50_devboard.h | 3 ++- include/configs/3c120_devboard.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)
Applied to u-boot-nios. Thanks.
Best regards, Thomas

The uImage format is legacy for years now, enable support for the fitImage format, which allows combining multiple files (kernel and dtb) into a single file, offers better protection of the payload and so on.
Signed-off-by: Marek Vasut marex@denx.de Cc: Thomas Chou thomas@wytron.com.tw --- include/configs/10m50_devboard.h | 2 ++ include/configs/3c120_devboard.h | 2 ++ 2 files changed, 4 insertions(+)
diff --git a/include/configs/10m50_devboard.h b/include/configs/10m50_devboard.h index 608127f..0aa79f7 100644 --- a/include/configs/10m50_devboard.h +++ b/include/configs/10m50_devboard.h @@ -14,6 +14,8 @@ */ #define CONFIG_DISPLAY_CPUINFO #define CONFIG_DISPLAY_BOARDINFO_LATE +#define CONFIG_OF_LIBFDT +#define CONFIG_FIT
/* * SERIAL diff --git a/include/configs/3c120_devboard.h b/include/configs/3c120_devboard.h index 6c9dc3f..0054d8b 100644 --- a/include/configs/3c120_devboard.h +++ b/include/configs/3c120_devboard.h @@ -14,6 +14,8 @@ */ #define CONFIG_DISPLAY_CPUINFO #define CONFIG_DISPLAY_BOARDINFO_LATE +#define CONFIG_OF_LIBFDT +#define CONFIG_FIT
/* * SERIAL

Hi Marek,
On 2015年12月15日 10:09, Marek Vasut wrote:
The uImage format is legacy for years now, enable support for the fitImage format, which allows combining multiple files (kernel and dtb) into a single file, offers better protection of the payload and so on.
Signed-off-by: Marek Vasut marex@denx.de Cc: Thomas Chou thomas@wytron.com.tw
include/configs/10m50_devboard.h | 2 ++ include/configs/3c120_devboard.h | 2 ++ 2 files changed, 4 insertions(+)
diff --git a/include/configs/10m50_devboard.h b/include/configs/10m50_devboard.h index 608127f..0aa79f7 100644 --- a/include/configs/10m50_devboard.h +++ b/include/configs/10m50_devboard.h @@ -14,6 +14,8 @@ */ #define CONFIG_DISPLAY_CPUINFO #define CONFIG_DISPLAY_BOARDINFO_LATE +#define CONFIG_OF_LIBFDT
Already defined.
+#define CONFIG_FIT
/*
- SERIAL
diff --git a/include/configs/3c120_devboard.h b/include/configs/3c120_devboard.h index 6c9dc3f..0054d8b 100644 --- a/include/configs/3c120_devboard.h +++ b/include/configs/3c120_devboard.h @@ -14,6 +14,8 @@ */ #define CONFIG_DISPLAY_CPUINFO #define CONFIG_DISPLAY_BOARDINFO_LATE +#define CONFIG_OF_LIBFDT
Ditto.
+#define CONFIG_FIT
/*
- SERIAL
Thanks, Thomas

On Tuesday, December 15, 2015 at 06:31:11 AM, Thomas Chou wrote:
Hi Marek,
On 2015年12月15日 10:09, Marek Vasut wrote:
The uImage format is legacy for years now, enable support for the fitImage format, which allows combining multiple files (kernel and dtb) into a single file, offers better protection of the payload and so on.
Signed-off-by: Marek Vasut marex@denx.de Cc: Thomas Chou thomas@wytron.com.tw
include/configs/10m50_devboard.h | 2 ++ include/configs/3c120_devboard.h | 2 ++ 2 files changed, 4 insertions(+)
diff --git a/include/configs/10m50_devboard.h b/include/configs/10m50_devboard.h index 608127f..0aa79f7 100644 --- a/include/configs/10m50_devboard.h +++ b/include/configs/10m50_devboard.h @@ -14,6 +14,8 @@
*/
#define CONFIG_DISPLAY_CPUINFO #define CONFIG_DISPLAY_BOARDINFO_LATE
+#define CONFIG_OF_LIBFDT
Already defined.
+#define CONFIG_FIT
/*
- SERIAL
diff --git a/include/configs/3c120_devboard.h b/include/configs/3c120_devboard.h index 6c9dc3f..0054d8b 100644 --- a/include/configs/3c120_devboard.h +++ b/include/configs/3c120_devboard.h @@ -14,6 +14,8 @@
*/
#define CONFIG_DISPLAY_CPUINFO #define CONFIG_DISPLAY_BOARDINFO_LATE
+#define CONFIG_OF_LIBFDT
Ditto.
+#define CONFIG_FIT
/*
- SERIAL
The compiler is not complaining, is it really ?
Best regards, Marek Vasut

Hi Marek,
On 2015年12月15日 18:26, Marek Vasut wrote:
On Tuesday, December 15, 2015 at 06:31:11 AM, Thomas Chou wrote:
Hi Marek,
On 2015年12月15日 10:09, Marek Vasut wrote:
The uImage format is legacy for years now, enable support for the fitImage format, which allows combining multiple files (kernel and dtb) into a single file, offers better protection of the payload and so on.
Signed-off-by: Marek Vasut marex@denx.de Cc: Thomas Chou thomas@wytron.com.tw
include/configs/10m50_devboard.h | 2 ++ include/configs/3c120_devboard.h | 2 ++ 2 files changed, 4 insertions(+)
diff --git a/include/configs/10m50_devboard.h b/include/configs/10m50_devboard.h index 608127f..0aa79f7 100644 --- a/include/configs/10m50_devboard.h +++ b/include/configs/10m50_devboard.h @@ -14,6 +14,8 @@
*/
#define CONFIG_DISPLAY_CPUINFO #define CONFIG_DISPLAY_BOARDINFO_LATE
+#define CONFIG_OF_LIBFDT
Already defined.
+#define CONFIG_FIT
/*
* SERIAL
diff --git a/include/configs/3c120_devboard.h b/include/configs/3c120_devboard.h index 6c9dc3f..0054d8b 100644 --- a/include/configs/3c120_devboard.h +++ b/include/configs/3c120_devboard.h @@ -14,6 +14,8 @@
*/
#define CONFIG_DISPLAY_CPUINFO #define CONFIG_DISPLAY_BOARDINFO_LATE
+#define CONFIG_OF_LIBFDT
Ditto.
+#define CONFIG_FIT
/*
* SERIAL
The compiler is not complaining, is it really ?
Hmm, it might be the compiler's problem.
It might be better to move CONFIG_FIT to the misc (the last) config section.
Best regards, Thomas

On Tuesday, December 15, 2015 at 02:26:44 PM, Thomas Chou wrote:
Hi Marek,
On 2015年12月15日 18:26, Marek Vasut wrote:
On Tuesday, December 15, 2015 at 06:31:11 AM, Thomas Chou wrote:
Hi Marek,
On 2015年12月15日 10:09, Marek Vasut wrote:
The uImage format is legacy for years now, enable support for the fitImage format, which allows combining multiple files (kernel and dtb) into a single file, offers better protection of the payload and so on.
Signed-off-by: Marek Vasut marex@denx.de Cc: Thomas Chou thomas@wytron.com.tw
include/configs/10m50_devboard.h | 2 ++ include/configs/3c120_devboard.h | 2 ++ 2 files changed, 4 insertions(+)
diff --git a/include/configs/10m50_devboard.h b/include/configs/10m50_devboard.h index 608127f..0aa79f7 100644 --- a/include/configs/10m50_devboard.h +++ b/include/configs/10m50_devboard.h @@ -14,6 +14,8 @@
*/
#define CONFIG_DISPLAY_CPUINFO #define CONFIG_DISPLAY_BOARDINFO_LATE
+#define CONFIG_OF_LIBFDT
Already defined.
+#define CONFIG_FIT
/*
* SERIAL
diff --git a/include/configs/3c120_devboard.h b/include/configs/3c120_devboard.h index 6c9dc3f..0054d8b 100644 --- a/include/configs/3c120_devboard.h +++ b/include/configs/3c120_devboard.h @@ -14,6 +14,8 @@
*/
#define CONFIG_DISPLAY_CPUINFO #define CONFIG_DISPLAY_BOARDINFO_LATE
+#define CONFIG_OF_LIBFDT
Ditto.
+#define CONFIG_FIT
/*
* SERIAL
The compiler is not complaining, is it really ?
Hmm, it might be the compiler's problem.
It might be better to move CONFIG_FIT to the misc (the last) config section.
Apparently, if the macro is defined in the same file twice and it is the same, CPP will not complain.

Hi Marek,
On 2015年12月16日 07:18, Marek Vasut wrote:
On Tuesday, December 15, 2015 at 02:26:44 PM, Thomas Chou wrote:
Hi Marek,
On 2015年12月15日 18:26, Marek Vasut wrote:
On Tuesday, December 15, 2015 at 06:31:11 AM, Thomas Chou wrote:
Hi Marek,
On 2015年12月15日 10:09, Marek Vasut wrote:
The uImage format is legacy for years now, enable support for the fitImage format, which allows combining multiple files (kernel and dtb) into a single file, offers better protection of the payload and so on.
Signed-off-by: Marek Vasut marex@denx.de Cc: Thomas Chou thomas@wytron.com.tw
include/configs/10m50_devboard.h | 2 ++ include/configs/3c120_devboard.h | 2 ++ 2 files changed, 4 insertions(+)
diff --git a/include/configs/10m50_devboard.h b/include/configs/10m50_devboard.h index 608127f..0aa79f7 100644 --- a/include/configs/10m50_devboard.h +++ b/include/configs/10m50_devboard.h @@ -14,6 +14,8 @@
*/ #define CONFIG_DISPLAY_CPUINFO #define CONFIG_DISPLAY_BOARDINFO_LATE
+#define CONFIG_OF_LIBFDT
Already defined.
+#define CONFIG_FIT
/* * SERIAL
diff --git a/include/configs/3c120_devboard.h b/include/configs/3c120_devboard.h index 6c9dc3f..0054d8b 100644 --- a/include/configs/3c120_devboard.h +++ b/include/configs/3c120_devboard.h @@ -14,6 +14,8 @@
*/ #define CONFIG_DISPLAY_CPUINFO #define CONFIG_DISPLAY_BOARDINFO_LATE
+#define CONFIG_OF_LIBFDT
Ditto.
+#define CONFIG_FIT
/* * SERIAL
The compiler is not complaining, is it really ?
Hmm, it might be the compiler's problem.
It might be better to move CONFIG_FIT to the misc (the last) config section.
Apparently, if the macro is defined in the same file twice and it is the same, CPP will not complain.
Please note that CONFIG_FIT is moved to Kconfig. So it should be added to defcofnig.
Best regards, Thomas

Enable command auto completion and enable $version variable. This makes working with U-Boot far more enjoyable.
Signed-off-by: Marek Vasut marex@denx.de Cc: Thomas Chou thomas@wytron.com.tw --- include/configs/10m50_devboard.h | 3 +++ include/configs/3c120_devboard.h | 3 +++ 2 files changed, 6 insertions(+)
diff --git a/include/configs/10m50_devboard.h b/include/configs/10m50_devboard.h index 0aa79f7..72d455f0 100644 --- a/include/configs/10m50_devboard.h +++ b/include/configs/10m50_devboard.h @@ -101,6 +101,9 @@ CONFIG_ENV_SIZE - \ CONFIG_SYS_MALLOC_LEN - \ 0x10000) +#define CONFIG_VERSION_VARIABLE +#define CONFIG_AUTO_COMPLETE #define CONFIG_CMDLINE_EDITING +#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
#endif /* __CONFIG_H */ diff --git a/include/configs/3c120_devboard.h b/include/configs/3c120_devboard.h index 0054d8b..ed30d6f 100644 --- a/include/configs/3c120_devboard.h +++ b/include/configs/3c120_devboard.h @@ -104,6 +104,9 @@ CONFIG_ENV_SIZE - \ CONFIG_SYS_MALLOC_LEN - \ 0x10000) +#define CONFIG_VERSION_VARIABLE +#define CONFIG_AUTO_COMPLETE #define CONFIG_CMDLINE_EDITING +#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
#endif /* __CONFIG_H */

Hi Marek,
On 2015年12月15日 10:09, Marek Vasut wrote:
Enable command auto completion and enable $version variable. This makes working with U-Boot far more enjoyable.
Signed-off-by: Marek Vasut marex@denx.de Cc: Thomas Chou thomas@wytron.com.tw
include/configs/10m50_devboard.h | 3 +++ include/configs/3c120_devboard.h | 3 +++ 2 files changed, 6 insertions(+)
diff --git a/include/configs/10m50_devboard.h b/include/configs/10m50_devboard.h index 0aa79f7..72d455f0 100644 --- a/include/configs/10m50_devboard.h +++ b/include/configs/10m50_devboard.h @@ -101,6 +101,9 @@ CONFIG_ENV_SIZE - \ CONFIG_SYS_MALLOC_LEN - \ 0x10000) +#define CONFIG_VERSION_VARIABLE +#define CONFIG_AUTO_COMPLETE #define CONFIG_CMDLINE_EDITING +#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
This is the default value in common/cli_hush.c.
#endif /* __CONFIG_H */ diff --git a/include/configs/3c120_devboard.h b/include/configs/3c120_devboard.h index 0054d8b..ed30d6f 100644 --- a/include/configs/3c120_devboard.h +++ b/include/configs/3c120_devboard.h @@ -104,6 +104,9 @@ CONFIG_ENV_SIZE - \ CONFIG_SYS_MALLOC_LEN - \ 0x10000) +#define CONFIG_VERSION_VARIABLE +#define CONFIG_AUTO_COMPLETE #define CONFIG_CMDLINE_EDITING +#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
Ditto.
#endif /* __CONFIG_H */
Thanks, Thomas

On Tuesday, December 15, 2015 at 06:33:57 AM, Thomas Chou wrote:
Hi Marek,
On 2015年12月15日 10:09, Marek Vasut wrote:
Enable command auto completion and enable $version variable. This makes working with U-Boot far more enjoyable.
Signed-off-by: Marek Vasut marex@denx.de Cc: Thomas Chou thomas@wytron.com.tw
include/configs/10m50_devboard.h | 3 +++ include/configs/3c120_devboard.h | 3 +++ 2 files changed, 6 insertions(+)
diff --git a/include/configs/10m50_devboard.h b/include/configs/10m50_devboard.h index 0aa79f7..72d455f0 100644 --- a/include/configs/10m50_devboard.h +++ b/include/configs/10m50_devboard.h @@ -101,6 +101,9 @@
CONFIG_ENV_SIZE - \ CONFIG_SYS_MALLOC_LEN - \ 0x10000)
+#define CONFIG_VERSION_VARIABLE +#define CONFIG_AUTO_COMPLETE
#define CONFIG_CMDLINE_EDITING
+#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
This is the default value in common/cli_hush.c.
#endif /* __CONFIG_H */
diff --git a/include/configs/3c120_devboard.h b/include/configs/3c120_devboard.h index 0054d8b..ed30d6f 100644 --- a/include/configs/3c120_devboard.h +++ b/include/configs/3c120_devboard.h @@ -104,6 +104,9 @@
CONFIG_ENV_SIZE - \ CONFIG_SYS_MALLOC_LEN - \ 0x10000)
+#define CONFIG_VERSION_VARIABLE +#define CONFIG_AUTO_COMPLETE
#define CONFIG_CMDLINE_EDITING
+#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
Ditto.
Oops, thanks, nice catch.
Can you pick 1-3 ? I will re-post 4,5 then.
Best regards, Marek Vasut

On Tuesday, December 15, 2015 at 06:33:57 AM, Thomas Chou wrote:
Hi Marek,
On 2015年12月15日 10:09, Marek Vasut wrote:
Enable command auto completion and enable $version variable. This makes working with U-Boot far more enjoyable.
Signed-off-by: Marek Vasut marex@denx.de Cc: Thomas Chou thomas@wytron.com.tw
include/configs/10m50_devboard.h | 3 +++ include/configs/3c120_devboard.h | 3 +++ 2 files changed, 6 insertions(+)
diff --git a/include/configs/10m50_devboard.h b/include/configs/10m50_devboard.h index 0aa79f7..72d455f0 100644 --- a/include/configs/10m50_devboard.h +++ b/include/configs/10m50_devboard.h @@ -101,6 +101,9 @@
CONFIG_ENV_SIZE - \ CONFIG_SYS_MALLOC_LEN - \ 0x10000)
+#define CONFIG_VERSION_VARIABLE +#define CONFIG_AUTO_COMPLETE
#define CONFIG_CMDLINE_EDITING
+#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
This is the default value in common/cli_hush.c.
#endif /* __CONFIG_H */
diff --git a/include/configs/3c120_devboard.h b/include/configs/3c120_devboard.h index 0054d8b..ed30d6f 100644 --- a/include/configs/3c120_devboard.h +++ b/include/configs/3c120_devboard.h @@ -104,6 +104,9 @@
CONFIG_ENV_SIZE - \ CONFIG_SYS_MALLOC_LEN - \ 0x10000)
+#define CONFIG_VERSION_VARIABLE +#define CONFIG_AUTO_COMPLETE
#define CONFIG_CMDLINE_EDITING
+#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
Ditto.
Two patches are about to head your way.
Best regards, Marek Vasut

Hi Marek,
On 2015年12月15日 10:09, Marek Vasut wrote:
Reorder the 10m50 and 3c120 config files such, that the environment position can be calculated from the monitor size. The environment is placed right after the monitor. This removes one more ad-hoc variable.
Signed-off-by: Marek Vasut marex@denx.de Cc: Thomas Chou thomas@wytron.com.tw
include/configs/10m50_devboard.h | 26 +++++++++++++------------- include/configs/3c120_devboard.h | 26 +++++++++++++------------- 2 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/include/configs/10m50_devboard.h b/include/configs/10m50_devboard.h index 8a91cdb..c99177c 100644 --- a/include/configs/10m50_devboard.h +++ b/include/configs/10m50_devboard.h @@ -54,19 +54,6 @@ #define CONFIG_LMB
/*
- ENVIRONMENT -- Put environment in sector CONFIG_SYS_MONITOR_LEN above
- CONFIG_SYS_RESET_ADDR, since we assume the monitor is stored at the
- reset address, no? This will keep the environment in user region
- of flash. NOTE: the monitor length must be multiple of sector size
- (which is common practice).
- */
-#define CONFIG_ENV_IS_IN_FLASH
-#define CONFIG_ENV_SIZE 0x10000 /* 64k, 1 sector */ -#define CONFIG_ENV_OVERWRITE /* Serial change Ok */ -#define CONFIG_ENV_ADDR 0xf4040000
-/*
- MEMORY ORGANIZATION
- -Monitor at top of sdram.
- -The heap is placed below the monitor
@@ -83,6 +70,19 @@ #define CONFIG_SYS_MALLOC_LEN 0x20000
/*
- ENVIRONMENT -- Put environment in sector CONFIG_SYS_MONITOR_LEN above
- CONFIG_SYS_RESET_ADDR, since we assume the monitor is stored at the
- reset address, no? This will keep the environment in user region
- of flash. NOTE: the monitor length must be multiple of sector size
- (which is common practice).
- */
+#define CONFIG_ENV_IS_IN_FLASH
+#define CONFIG_ENV_SIZE 0x10000 /* 64k, 1 sector */ +#define CONFIG_ENV_OVERWRITE /* Serial change Ok */ +#define CONFIG_ENV_ADDR (0xf4000000 + CONFIG_SYS_MONITOR_LEN)
+/*
- MISC
*/ #define CONFIG_SYS_LONGHELP /* Provide extended help */ diff --git a/include/configs/3c120_devboard.h b/include/configs/3c120_devboard.h index 2ecdd5d..0f494e5 100644 --- a/include/configs/3c120_devboard.h +++ b/include/configs/3c120_devboard.h @@ -57,19 +57,6 @@ #define CONFIG_LMB
/*
- ENVIRONMENT -- Put environment in sector CONFIG_SYS_MONITOR_LEN above
- CONFIG_SYS_RESET_ADDR, since we assume the monitor is stored at the
- reset address, no? This will keep the environment in user region
- of flash. NOTE: the monitor length must be multiple of sector size
- (which is common practice).
- */
-#define CONFIG_ENV_IS_IN_FLASH
-#define CONFIG_ENV_SIZE 0x20000 /* 128k, 1 sector */ -#define CONFIG_ENV_OVERWRITE /* Serial change Ok */ -#define CONFIG_ENV_ADDR 0xe2840000
-/*
- MEMORY ORGANIZATION
- -Monitor at top of sdram.
- -The heap is placed below the monitor
@@ -86,6 +73,19 @@ #define CONFIG_SYS_MALLOC_LEN 0x20000
/*
- ENVIRONMENT -- Put environment in sector CONFIG_SYS_MONITOR_LEN above
- CONFIG_SYS_RESET_ADDR, since we assume the monitor is stored at the
- reset address, no? This will keep the environment in user region
- of flash. NOTE: the monitor length must be multiple of sector size
- (which is common practice).
- */
+#define CONFIG_ENV_IS_IN_FLASH
+#define CONFIG_ENV_SIZE 0x20000 /* 128k, 1 sector */ +#define CONFIG_ENV_OVERWRITE /* Serial change Ok */ +#define CONFIG_ENV_ADDR (0xe2800000 + CONFIG_SYS_MONITOR_LEN)
+/*
- MISC
*/ #define CONFIG_SYS_LONGHELP /* Provide extended help */
Acked-by: Thomas Chou thomas@wytron.com.tw
Thanks, Thomas

Hi Marek,
On 2015年12月15日 10:09, Marek Vasut wrote:
Reorder the 10m50 and 3c120 config files such, that the environment position can be calculated from the monitor size. The environment is placed right after the monitor. This removes one more ad-hoc variable.
Signed-off-by: Marek Vasut marex@denx.de Cc: Thomas Chou thomas@wytron.com.tw
include/configs/10m50_devboard.h | 26 +++++++++++++------------- include/configs/3c120_devboard.h | 26 +++++++++++++------------- 2 files changed, 26 insertions(+), 26 deletions(-)
Applied to u-boot-nios. Thanks.
participants (2)
-
Marek Vasut
-
Thomas Chou