km/common mainlining
v2 cover km/common mainlining
This series is the second effort of merging the Keymile boards support back into mainline.
This serie is a smaller serie based on the first patch serie:
http://lists.denx.de/pipermail/u-boot/2011-April/090013.html
The first large serie was split up to three independent series, which is easier to review and apply for the custodians.
This serie adds the keymile common parts of the serie. Only the patch common/hush affects common u-boot code all other changes are km specific. The content of the patches are adapted with the inputs of a review from the ML.
The serie relies on the patch lib, vsprintf: introduce strict_strtoul which is already posted
(http://lists.denx.de/pipermail/u-boot/2011-May/091972.html) but currently not committed.
Holger Brunck (5):
common/hush: make get_local_var visible for other users km/common: implement setboardid command km/common: fix coding style issues in generic header km/common: simplify default environment km/common: add pnvramsize to default environment
Thomas Herzmann (2):
km/common: fix initial_boot_bank for bootpackages km/common: implement boardId HWkey checks as u-boot cmd
Valentin Longchamp (1):
keymile boards: move keymile specific header in subdir
board/keymile/common/common.c | 173 +++++++++++++++++++++++++++
board/keymile/scripts/README | 25 ++++
board/keymile/scripts/debug-arm-env.txt | 2 +
board/keymile/scripts/debug-common-env.txt | 9 ++
board/keymile/scripts/debug-ppc-env.txt | 2 +
common/hush.c | 3 +-
include/configs/{ => km}/keymile-common.h | 174 ++++------------------------
include/configs/{ => km}/km-powerpc.h | 12 +--
include/configs/{ => km}/km82xx-common.h | 0
include/configs/{ => km}/km8321-common.h | 0
include/configs/{ => km}/km83xx-common.h | 0
include/configs/{ => km}/km_arm.h | 15 +--
include/configs/kmeter1.h | 2 +-
include/configs/kmsupx5.h | 2 +-
include/configs/mgcoge.h | 6 +-
include/configs/mgcoge2ne.h | 6 +-
include/configs/mgcoge2un.h | 2 +-
include/configs/suen3.h | 2 +-
include/configs/suen8.h | 2 +-
include/configs/suvd3.h | 2 +-
include/configs/tuda1.h | 2 +-
include/configs/tuxa1.h | 2 +-
include/hush.h | 1 +
23 files changed, 261 insertions(+), 183 deletions(-)
create mode 100644 board/keymile/scripts/README
create mode 100644 board/keymile/scripts/debug-arm-env.txt
create mode 100644 board/keymile/scripts/debug-common-env.txt
create mode 100644 board/keymile/scripts/debug-ppc-env.txt
rename include/configs/{ => km}/keymile-common.h (63%)
rename include/configs/{ => km}/km-powerpc.h (91%)
rename include/configs/{ => km}/km82xx-common.h (100%)
rename include/configs/{ => km}/km8321-common.h (100%)
rename include/configs/{ => km}/km83xx-common.h (100%)
rename include/configs/{ => km}/km_arm.h (97%)PATCH v2 1/8 km/common: fix initial_boot_bank for bootpackages
From: Thomas Herzmann <[email protected]>
The initial_boot_bank can be set when more than one application is used in a bootpackage. But a value n <> 0 never led to booting from bank n. Instead, bank 0 was booted. This patch fixes this.
---
Changes for v2:
- split up first large patch serie to three independent smaller patch series
- no change in the content of this patch
include/configs/keymile-common.h | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-)
include/configs/keymile-common.h +8 -7
@@ -247,10 +247,10 @@"printbootargs boot " \"\" && " \"setenv bootcmd \'" \ -"run bootrunner; reset" \ +"run actual bootrunner; reset" \"\' && " \"setenv altbootcmd \'" \ -"run actual0 bootcmd; reset" \ +"run backup bootrunner; reset" \"\' && " \"saveenv && " \"reset\0" \
@@ -288,7 +288,7 @@"addramfs=" \"setenv bootargs \"" \"${bootargs} phram.phram=" \ -"rootfs${actual_bank},${rootfsaddr},${rootfssize}\"\0" \ +"rootfs${boot_bank},${rootfsaddr},${rootfssize}\"\0" \"addtty=" \"setenv bootargs ${bootargs}" \" console=" CONFIG_KM_CONSOLE_TTY ",${baudrate}\0" \
@@ -303,7 +303,7 @@"flashargs=" \"setenv bootargs " \"ubi.mtd=" CONFIG_KM_UBI_LINUX_MTD_NAME " " \ -"root=mtdblock:rootfs${actual_bank} " \ +"root=mtdblock:rootfs${boot_bank} " \"rootfstype=squashfs ro\0" \""
@@ -352,7 +352,7 @@"cramfsload ${kernel_addr_r} uImage && " \"setenv actual_kernel_addr ${kernel_addr_r}\0" \"ubiattach=ubi part ${ubipartition}\0" \ -"ubicopy=ubi read ${cramfsaddr} bootfs${actual_bank}\0" \ +"ubicopy=ubi read ${cramfsaddr} bootfs${boot_bank}\0" \"ubipartition=" CONFIG_KM_UBI_PARTITION_NAME "\0" \""
@@ -382,9 +382,10 @@* - 'default': setup default environment */ #define CONFIG_KM_DEF_ENV_CONSTANTS \ - "actual=setenv actual_bank ${initial_boot_bank}\0" \ - "actual0=setenv actual_bank 0\0" \ + "actual=setenv boot_bank ${actual_bank}\0" \ + "backup=setenv boot_bank ${backup_bank}\0" \ "actual_bank=${initial_boot_bank}\0" \ + "backup_bank=0\0" \ "default=" \ "setenv default 'run newenv; reset' && " \ "run release && saveenv; reset\0" \
Signature · 1 line
1.7.1
Wolfgang Denk
AppliedPATCH v2 1/8 km/common: fix initial_boot_bank for bootpackages
Dear Holger Brunck,
Quoted 12 lines · In message <caa5ff7d66fe8127b7d2578024a2a5ae2e9a2989.1304508448.git.holger.brun…
From: Thomas Herzmann <[email protected]>
The
initial_boot_bankcan be set when more than one application is used in a bootpackage. But a value n <> 0 never led to booting from bank n. Instead, bank 0 was booted. This patch fixes this.Signed-off-by Thomas Herzmann <[email protected]>Signed-off-by Holger Brunck <[email protected]>Signed-off-by Valentin Longchamp <[email protected]>Acked-by Heiko Schocher <[email protected]>cc Wolfgang Denk <[email protected]>cc Detlev Zundel <[email protected]>
Quoted 8 lines
---
Changes for v2:
- split up first large patch serie to three independent smaller patch series
- no change in the content of this patchinclude/configs/keymile-common.h | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Quantum Mechanics is God's version of "Trust me."
PATCH v2 2/8 common/hush: make get_local_var visible for other users
In reply to Holger BrunckWe can actually only set from c-code local hush shell variables, with this patch we can also read them from c-code.
---
Changes for v2:
- split up first large patch serie to three independent smaller patch series
- extend commit msg
common/hush.c | 3 +-- include/hush.h | 1 + 2 files changed, 2 insertions(+), 2 deletions(-)
common/hush.c +1 -2
@@ -497,7 +497,6 @@ static void remove_bg_job(struct pipe *pi);/* local variable support */ static char **make_list_in (char **inp,char *name);static char *insert_var_value (char *inp); -static char *get_local_var (const char *var);#ifndef __U_BOOT__/* Table of built-in functions. They can be forked or not, depending on
@@ -2169,7 +2168,7 @@ static char *get_dollar_var(char ch);#endif /* This is used to get/check local shell variables */ -static char *get_local_var (const char *s) +char *get_local_var (const char *s) {struct variables *cur;
include/hush.h +1 -0
@@ -34,6 +34,7 @@ extern int parse_file_outer(void);int set_local_var (const char *s,int flg_export);void unset_local_var (const char *name); +char *get_local_var (const char *s);#if defined(CONFIG_HUSH_INIT_VAR )extern int hush_init_var (void );
Signature · 1 line
1.7.1
Wolfgang Denk
AppliedPATCH v2 2/8 common/hush: make get_local_var visible for other users
Dear Holger Brunck,
Quoted 14 lines · In message <c8c8780016b267bc0d531619e923a95e356cc5d9.1304508448.git.holger.brun…
We can actually only set from c-code local hush shell variables, with this patch we can also read them from c-code.
Signed-off-by Holger Brunck <[email protected]>Signed-off-by Valentin Longchamp <[email protected]>Acked-by Heiko Schocher <[email protected]>cc Wolfgang Denk <[email protected]>cc Detlev Zundel <[email protected]>---
Changes for v2:
- split up first large patch serie to three independent smaller patch series
- extend commit msg
Quoted 3 lines
common/hush.c | 3 +-- include/hush.h | 1 + 2 files changed, 2 insertions(+), 2 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Gew?hnlich glaubt der Mensch, wenn er nur Worte h?rt, es m?sse sich dabei doch auch was denken lassen. -- Goethe, Faust I
PATCH v2 3/8 km/common: implement setboardid command
In reply to Holger BrunckRead out board id and HW key from the IVM eeprom and set these values as an environment variable.
---
Changes for v2:
- split up first large patch serie to three independent smaller patch series
- rework the patch with inputs from W.Denk:
- adapt commit msg
- add error handling
board/keymile/common/common.c | 34 ++++++++++++++++++++++++++++++++++ 1 files changed, 34 insertions(+), 0 deletions(-)
board/keymile/common/common.c +34 -0
@@ -26,6 +26,7 @@#include <mpc8260.h> #endif #include <ioports.h> +#include <command.h> #include <malloc.h> #include <hush.h> #include <net.h>
@@ -685,3 +686,36 @@ int board_eth_init(bd_t *bis)return -1 ; } + +/* +* do_setboardid command +* read out the board id and the hw key from the intventory EEPROM and set +* this values as environment variables. +*/ +static int do_setboardid (cmd_tbl_t *cmdtp,int flag,int argc, +char *const argv[]) +{ +unsigned char buf[32 ]; +char *p; + + p =get_local_var ("IVM_BoardId" ); +if (p ==NULL ) { +printf ("can't get the IVM_Boardid\n" ); +return 1 ; + } +sprintf ((char *)buf,"%s" , p); +setenv ("boardid" , (char *)buf); + + p =get_local_var ("IVM_HWKey" ); +if (p ==NULL ) { +printf ("can't get the IVM_HWKey\n" ); +return 1 ; + } +sprintf ((char *)buf,"%s" , p); +setenv ("hwkey" , (char *)buf); + +return 0 ; +} + +U_BOOT_CMD (km_setboardid,1 ,0 , do_setboardid,"setboardid" ,"read out bid and " +"hwkey from IVM and set in environment" );
Signature · 1 line
1.7.1
Wolfgang Denk
AppliedPATCH v2 3/8 km/common: implement setboardid command
Dear Holger Brunck,
Quoted 16 lines · In message <600f7afcb8e770eaaa417db1b119823070b62c48.1304508448.git.holger.brun…
Read out board id and HW key from the IVM eeprom and set these values as an environment variable.
Signed-off-by Holger Brunck <[email protected]>Acked-by Heiko Schocher <[email protected]>cc Wolfgang Denk <[email protected]>cc Detlev Zundel <[email protected]>cc Valentin Longchamp <[email protected]>---
Changes for v2:
- split up first large patch serie to three independent smaller patch series
- rework the patch with inputs from W.Denk:
- adapt commit msg
- add error handling
Quoted 2 lines
board/keymile/common/common.c | 34 ++++++++++++++++++++++++++++++++++ 1 files changed, 34 insertions(+), 0 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de A memorandum is written not to inform the reader, but to protect the writer. -- Dean Acheson
PATCH v2 4/8 km/common: implement boardId HWkey checks as u-boot cmd
In reply to Holger BrunckFrom: Thomas Herzmann <[email protected]>
BoardId and HWKey are used to identify the HW class of a given board. The correct values are stored in the inventory eeprom. During creation time of a boot package the boardId and HWkey for the SW is stored in the default environment and burned into the flash. During boottime the values in the inventory and in the environment are compared to avoid starting of a SW which is not authorized for this board.
Some bootpackages are allowed to run on a set of different boardId hwKey. In this case the environment variable boardIdListHex was added to the default environment. In this case the command iterates over the pair values and compares them with the values read from the inventory eeprom.
The syntax of such a boardIdListHex value is e.g.: 158_1 159_1 159_2
---
Changes for v2:
- split up first large patch series to three independent smaller patch series
- give the cmd a more precise name
- rework the patch with inputs from W.Denk:
- adapt and enhance commit msg
- comment the code
- add error handling
board/keymile/common/common.c | 139 ++++++++++++++++++++++++++++++++++++++ include/configs/keymile-common.h | 30 +-------- 2 files changed, 140 insertions(+), 29 deletions(-)
board/keymile/common/common.c +139 -0
@@ -32,6 +32,7 @@#include <net.h> #include <netdev.h> #include <asm/io.h> +#include <linux/ctype.h> #if defined(CONFIG_OF_BOARD_SETUP ) && defined(CONFIG_OF_LIBFDT )#include <libfdt.h>
@@ -719,3 +720,141 @@ static int do_setboardid(cmd_tbl_t *cmdtp, int flag, int argc,U_BOOT_CMD (km_setboardid,1 ,0 , do_setboardid,"setboardid" ,"read out bid and " "hwkey from IVM and set in environment" ); + +/* +* command km_checkbidhwk +* if "boardid" and "hwkey" are not already set in the environment, do: +* if a "boardIdListHex" exists in the environment: +* - read ivm data for boardid and hwkey +* - compare each entry of the boardIdListHex with the +* IVM data: +* if match: +* set environment variables boardid, boardId, +* hwkey, hwKey to the found values +* both (boardid and boardId) are set because +* they might be used differently in the +* application and in the init scripts (?) +* return 0 in case of match, 1 if not match or error +*/ +int do_checkboardidhwk (cmd_tbl_t *cmdtp,int flag,int argc, +char *const argv[]) +{ +unsigned long ivmbid =0 , ivmhwkey =0 ; +unsigned long envbid =0 , envhwkey =0 ; +char *p; +int verbose = argc >1 && *argv[1 ] =='v' ; +int rc =1 ;/* default: no match */ + +/* +* first read out the real inventory values, these values are +* already stored in the local hush variables +*/ + p =get_local_var ("IVM_BoardId" ); +if (p ==NULL ) { +printf ("can't get the IVM_Boardid\n" ); +return rc; + } +strict_strtoul (p,16 , &ivmbid); + + p =get_local_var ("IVM_HWKey" ); +if (p ==NULL ) { +printf ("can't get the IVM_HWKey\n" ); +return rc; + } +strict_strtoul (p,16 , &ivmhwkey); + +if (!ivmbid || !ivmhwkey) { +printf ("Error: IVM_BoardId and/or IVM_HWKey not set!\n" ); +return rc; + } + +/* now try to read values from environment if available */ + p =getenv ("boardid" ); +if (p !=NULL ) +strict_strtoul (p,16 , &envbid); + p =getenv ("hwkey" ); +if (p !=NULL ) +strict_strtoul (p,16 , &envhwkey); + +if (!envbid || !envhwkey) { +/* +* BoardId/HWkey not available in the environment, so try the +* environment variable for BoardId/HWkey list +*/ +char *bidhwklist =getenv ("boardIdListHex" ); +if (bidhwklist) { +int found =0 ; +char *rest = bidhwklist; +char *endp; +if (verbose) { +printf ("IVM_BoardId: %ld, IVM_HWKey=%ld\n" , + ivmbid, ivmhwkey); +printf ("boardIdHwKeyList: %s\n" , + bidhwklist); + } +while (!found) { +/* loop over each bid/hwkey pair in the list */ +unsigned long bid =0 ; +unsigned long hwkey =0 ; +while (*rest && !isxdigit (*rest)) + rest++; + bid =simple_strtoul (rest, &endp,16 ); +/* BoardId/HWkey is separated with a "_" for one entry */ +if (*endp =='_' ) { + rest = endp +1 ; + hwkey =simple_strtoul (rest, &endp,16 ); + rest = endp; +while (*rest && !isxdigit (*rest)) + rest++; + } +if ((!bid) || (!hwkey)) { +/* end of list */ +break ; + } +if (verbose) { +printf ("trying bid=0x%lX, hwkey=%ld\n" , + bid, hwkey); + } +/* +* Compare the values of the found entry in the +* list with the valid values which are stored +* in the inventory eeprom. If they are equal +* store the values in environment variables +* and save the environment. +* This can only happen once for the lifetime +* of a board, because once saved the function +* will never reach the while loop. +*/ +if ((bid == ivmbid) && (hwkey == ivmhwkey)) { +char buf[10 ]; + + found =1 ; + envbid = bid; + envhwkey = hwkey; +sprintf (buf,"%lx" , bid); +setenv ("boardid" , buf); +sprintf (buf,"%lx" , hwkey); +setenv ("hwkey" , buf); +saveenv (); + } + }/* end while( ! found ) */ + } + } + +/* compare now the values */ +if ((ivmbid == envbid) && (ivmhwkey == envhwkey)) { +printf ("boardid=0x%3lX, hwkey=%ld\n" , envbid, envhwkey); + rc =0 ; + }else { +printf ("Error: env bId=0x%3lX, hwKey=%ld\n" , envbid, envhwkey); +printf (" IVM bId=0x%3lX, hwKey=%ld\n" , ivmbid, ivmhwkey); + } +return rc; +} + +U_BOOT_CMD (km_checkbidhwk,2 ,0 , do_checkboardidhwk, +"check boardid and hwkey" , +"[v]\n - check environment parameter " \ +"\"boardIdListHex\" against stored boardid and hwkey " \ +"from the IVM\n v: verbose output" +);
include/configs/keymile-common.h +1 -29
@@ -238,7 +238,6 @@"release=" \"setenv actual_bank ${initial_boot_bank} && " \"setenv subbootcmds \"" \ -"checkboardidlist " \"checkboardid " \"ubiattach ubicopy " \"cramfsloadfdt cramfsloadkernel " \
@@ -389,36 +388,9 @@"default=" \"setenv default 'run newenv; reset' && " \"run release && saveenv; reset\0" \ -"checkboardidlist=" \ -"if test \"x${boardIdListHex}\" != \"x\"; then " \ -"IVMbidhwk=${IVM_BoardId}_${IVM_HWKey}; " \ -"found=0; " \ -"for bidhwk in \"${boardIdListHex}\"; do " \ -"echo trying $bidhwk ...; " \ -"if test \"x$bidhwk\" = \"x$IVMbidhwk\"; then " \ -"found=1; " \ -"echo match found for $bidhwk; " \ -"if test \"x$bidhwk\" != \"x${boardId}_${hwKey}\";then " \ -"setenv boardid ${IVM_BoardId}; " \ -"setenv boardId ${IVM_BoardId}; " \ -"setenv hwkey ${IVM_HWKey}; " \ -"setenv hwKey ${IVM_HWKey}; " \ -"echo \"boardId set to ${boardId}\"; " \ -"echo \"hwKey set to ${hwKey}\"; " \ -"saveenv; " \ -"fi; " \ -"fi; " \ -"done; " \ -"else " \ -"echo \"boardIdListHex not set, not checked\"; " \ -"found=1; " \ -"fi; " \ -"test \"$found\" = 1 \0" \ -"checkboardid=" \ -"test \"x${boardId}\" = \"x${IVM_BoardId}\" && " \ -"test \"x${hwKey}\" = \"x${IVM_HWKey}\"\0" \"printbootargs=print bootargs\0" \ "rootfsfile="xstr(CONFIG_HOSTNAME) "/rootfsImage\0" \ +"checkboardid=km_checkbidhwk\0" \"" #ifndef CONFIG_KM_DEF_ENV
Signature · 1 line
1.7.1
PATCH v2 4/8 km/common: implement boardId HWkey checks as u-boot cmd
Dear Holger Brunck,
Quoted 23 lines · In message <02d1e3f265123ff0296b1c38b227f6d30393ee77.1304508448.git.holger.brun…
From: Thomas Herzmann <[email protected]>
BoardId and HWKey are used to identify the HW class of a given board. The correct values are stored in the inventory eeprom. During creation time of a boot package the boardId and HWkey for the SW is stored in the default environment and burned into the flash. During boottime the values in the inventory and in the environment are compared to avoid starting of a SW which is not authorized for this board.
Some bootpackages are allowed to run on a set of different boardId hwKey. In this case the environment variable boardIdListHex was added to the default environment. In this case the command iterates over the pair values and compares them with the values read from the inventory eeprom.
The syntax of such a boardIdListHex value is e.g.: 158_1 159_1 159_2
Signed-off-by Thomas Herzmann <[email protected]>Signed-off-by Holger Brunck <[email protected]>Signed-off-by Valentin Longchamp <[email protected]>Acked-by Heiko Schocher <[email protected]>cc Wolfgang Denk <[email protected]>cc Detlev Zundel <[email protected]>
Quoted 9 lines
---
Changes for v2:
- split up first large patch series to three independent smaller patch series
- give the cmd a more precise name
- rework the patch with inputs from W.Denk:
- adapt and enhance commit msg
- comment the code
- add error handling
This patch has checkpatch warnings. Please fix.
...
board/keymile/common/common.c static int do_setboardid(cmd_tbl_t *cmdtp, int flag, int argc, · line 785
Quoted 7 lines
board/keymile/common/common.c +7
-0+if (!envbid || !envhwkey) { +/* +* BoardId/HWkey not available in the environment, so try the +* environment variable for BoardId/HWkey list +*/ +char *bidhwklist =getenv ("boardIdListHex" ); +if (bidhwklist) {
Please insert a blank line after declarations.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de I have often regretted my speech, never my silence.
PATCH v2 4/8 km/common: implement boardId HWkey checks as u-boot cmd
Hi,
Quoted 36 lines · Wolfgang Denk
Dear Holger Brunck,
Quoted 23 lines · In message <02d1e3f265123ff0296b1c38b227f6d30393ee77.1304508448.git.holger.brun…
From: Thomas Herzmann <[email protected]>
BoardId and HWKey are used to identify the HW class of a given board. The correct values are stored in the inventory eeprom. During creation time of a boot package the boardId and HWkey for the SW is stored in the default environment and burned into the flash. During boottime the values in the inventory and in the environment are compared to avoid starting of a SW which is not authorized for this board.
Some bootpackages are allowed to run on a set of different boardId hwKey. In this case the environment variable boardIdListHex was added to the default environment. In this case the command iterates over the pair values and compares them with the values read from the inventory eeprom.
The syntax of such a boardIdListHex value is e.g.: 158_1 159_1 159_2
Signed-off-by Thomas Herzmann <[email protected]>Signed-off-by Holger Brunck <[email protected]>Signed-off-by Valentin Longchamp <[email protected]>Acked-by Heiko Schocher <[email protected]>cc Wolfgang Denk <[email protected]>cc Detlev Zundel <[email protected]>Quoted 9 lines
---
Changes for v2:
- split up first large patch series to three independent smaller patch series
- give the cmd a more precise name
- rework the patch with inputs from W.Denk:
- adapt and enhance commit msg
- comment the code
- add error handling
Quoted 2 lines
This patch has checkpatch warnings. Please fix.
Ok the one warning that we exceed 80 characters per line is fixed, sorry for that. But there are two warnings remaining:
WARNING: consider using strict_strtoul in preference to simple_strtoul #137: FILE: board/keymile/common/common.c:813:
+ bid = simple_strtoul(rest, &endp, 16);
WARNING: consider using strict_strtoul in preference to simple_strtoul #141: FILE: board/keymile/common/common.c:817:
+ hwkey = simple_strtoul(rest, &endp, 16);
I know that we use strict_strtoul in the same patch some lines above, but at this point we need *endp and we know that we got a non numeric character at the end. So using simple_strtoul at this point is exactly what we want here.
Is it ok to ignore this warnings and add a comment above the codeline why we use simple_stroul?
Quoted 12 lines
...
board/keymile/common/common.c static int do_setboardid(cmd_tbl_t *cmdtp, int flag, int argc, · line 785
Quoted 7 lines
board/keymile/common/common.c +7
-0+if (!envbid || !envhwkey) { +/* +* BoardId/HWkey not available in the environment, so try the +* environment variable for BoardId/HWkey list +*/ +char *bidhwklist =getenv ("boardIdListHex" ); +if (bidhwklist) {Please insert a blank line after declarations.
Ok fixed.
Best regards
Holger Brunck
PATCH v2 4/8 km/common: implement boardId HWkey checks as u-boot cmd
Dear Holger Brunck,
Quoted 13 lines · In message <[email protected]> you wrote:
Quoted 2 lines
This patch has checkpatch warnings. Please fix.
Ok the one warning that we exceed 80 characters per line is fixed, sorry for that. But there are two warnings remaining:
WARNING: consider usingstrict_strtoulin preference tosimple_strtoul#137: FILE:board/keymile/common/common.c:813:board/keymile/common/common.c +1
-0+ bid =simple_strtoul (rest, &endp,16 );WARNING: consider using
strict_strtoulin preference tosimple_strtoul#141: FILE:board/keymile/common/common.c:817:board/keymile/common/common.c +1
-0+ hwkey =simple_strtoul (rest, &endp,16 );
Quoted 3 lines
I know that we use
strict_strtoulin the same patch some lines above, but at this point we need *endp and we know that we got a non numeric character at the end. So usingsimple_strtoulat this point is exactly what we want here.
Well, mixing both strict_strtoul() and simple_strtoul() [without any comment] in the same patch was what attracted my attention in the first place.
Quoted 2 lines
Is it ok to ignore this warnings and add a comment above the codeline why we use
simple_stroul?
Indeed this needs a comment.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de f u cn rd ths, itn tyg h myxbl cd.
PATCH v2 5/8 km/common: fix coding style issues in generic header
In reply to Holger Brunck---
Changes for v2:
- split up first large patch serie to three independent smaller patch series
- no change in the content of this patch
include/configs/keymile-common.h | 4 ++-- include/configs/km_arm.h | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-)
include/configs/keymile-common.h +2 -2
@@ -86,7 +86,7 @@#define CONFIG_SYS_HZ 1000/* decr. freq: 1 ms ticks */ #define CONFIG_BAUDRATE 115200 -#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, 230400 } +#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, 230400 }#define CONFIG_LOADS_ECHO #define CONFIG_SYS_LOADS_BAUD_CHANGE
@@ -423,6 +423,6 @@ ""#endif /* CONFIG_KM_DEF_ENV */ -#define CONFIG_VERSION_VARIABLE /* include version env variable */ +#define CONFIG_VERSION_VARIABLE /* include version env variable */ #endif /* __CONFIG_KEYMILE_H */
include/configs/km_arm.h +5 -5
@@ -106,7 +106,7 @@#define CONFIG_BOOTMAPSZ (8 << 20)/* Initial Memmap for Linux */ #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */ #define CONFIG_INITRD_TAG /* enable INITRD tag */ -#define CONFIG_SETUP_MEMORY_TAGS /* enable memory tag */ +#define CONFIG_SETUP_MEMORY_TAGS /* enable memory tag */ /* * Commands configuration
@@ -176,10 +176,10 @@#ifndef __ASSEMBLY__#include <asm/arch-kirkwood/gpio.h> extern void __set_direction (unsigned pin,int high); -void set_sda (int state); -void set_scl (int state); -int get_sda (void ); -int get_scl (void ); +void set_sda (int state); +void set_scl (int state); +int get_sda (void ); +int get_scl (void );#define KM_KIRKWOOD_SDA_PIN 8#define KM_KIRKWOOD_SCL_PIN 9#define KM_KIRKWOOD_ENV_WP 38
Signature · 1 line
1.7.1
Wolfgang Denk
AppliedPATCH v2 5/8 km/common: fix coding style issues in generic header
Dear Holger Brunck,
Quoted 11 lines · In message <80eaff2bd998b8f6ba0da2afc1c103161a2583ab.1304508448.git.holger.brun…
Signed-off-by Holger Brunck <[email protected]>Signed-off-by Valentin Longchamp <[email protected]>Acked-by Heiko Schocher <[email protected]>cc Wolfgang Denk <[email protected]>cc Detlev Zundel <[email protected]>---
Changes for v2:
- split up first large patch serie to three independent smaller patch series
- no change in the content of this patch
Quoted 3 lines
include/configs/keymile-common.h | 4 ++-- include/configs/km_arm.h | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-)
Applied, thanks.
Note: I omitted patch 4/8 as changes are pending to that one. But it appears the remaining patche sof this series do not really depend on this patch, so applied the remaining ones. Hope this is OK - please verify.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Its always easier short term to pee in the pond
than install a toilet - it's just not a good long term plan.
- Alan Cox in <[email protected]>PATCH v2 6/8 keymile boards: move keymile specific header in subdir
In reply to Holger BrunckFrom: Valentin Longchamp <[email protected]>
Collect all keymile specific common headers in include/configs/km.
---
Changes for v2:
- split up first large patch serie to three independent smaller patch series
- no change in the content of this patch
include/configs/{ => km}/keymile-common.h | 0
include/configs/{ => km}/km-powerpc.h | 0
include/configs/{ => km}/km82xx-common.h | 0
include/configs/{ => km}/km8321-common.h | 0
include/configs/{ => km}/km83xx-common.h | 0
include/configs/{ => km}/km_arm.h | 0
include/configs/kmeter1.h | 2 +-
include/configs/kmsupx5.h | 2 +-
include/configs/mgcoge.h | 6 +++---
include/configs/mgcoge2ne.h | 6 +++---
include/configs/mgcoge2un.h | 2 +-
include/configs/suen3.h | 2 +-
include/configs/suen8.h | 2 +-
include/configs/suvd3.h | 2 +-
include/configs/tuda1.h | 2 +-
include/configs/tuxa1.h | 2 +-
16 files changed, 14 insertions(+), 14 deletions(-)
rename include/configs/{ => km}/keymile-common.h (100%)
rename include/configs/{ => km}/km-powerpc.h (100%)
rename include/configs/{ => km}/km82xx-common.h (100%)
rename include/configs/{ => km}/km8321-common.h (100%)
rename include/configs/{ => km}/km83xx-common.h (100%)
rename include/configs/{ => km}/km_arm.h (100%)include/configs/km/keymile-common.h renamed from include/configs/keymile-common.h +0 -0
include/configs/km/km-powerpc.h renamed from include/configs/km-powerpc.h +0 -0
include/configs/km/km82xx-common.h renamed from include/configs/km82xx-common.h +0 -0
include/configs/km/km8321-common.h renamed from include/configs/km8321-common.h +0 -0
include/configs/km/km83xx-common.h renamed from include/configs/km83xx-common.h +0 -0
include/configs/km/km_arm.h renamed from include/configs/km_arm.h +0 -0
include/configs/kmeter1.h +1 -1
@@ -34,7 +34,7 @@"netdev=eth2\0" \ /* include common defines/options for all 83xx Keymile boards */ -#include "km83xx-common.h" +#include "km/km83xx-common.h" #define CONFIG_MISC_INIT_R /*
include/configs/kmsupx5.h +1 -1
@@ -36,7 +36,7 @@#define CONFIG_SYS_TEXT_BASE 0xF0000000/* include common defines/options for all 8321 Keymile boards */ -#include "km8321-common.h" +#include "km/km8321-common.h" /* * Init Local Bus Memory Controller:
include/configs/mgcoge.h +3 -3
@@ -36,8 +36,8 @@#define CONFIG_SYS_TEXT_BASE 0xFE000000/* include common defines/options for all Keymile boards */ -#include "keymile-common.h" -#include "km-powerpc.h" +#include "km/keymile-common.h" +#include "km/km-powerpc.h" #define CONFIG_SYS_SDRAM_BASE 0x00000000#define CONFIG_SYS_FLASH_BASE 0xFE000000
@@ -59,7 +59,7 @@#define MTDIDS_DEFAULT "nor3=app"/* include further common stuff for all keymile 82xx boards */ -#include "km82xx-common.h" +#include "km/km82xx-common.h" /* bfticu address */ #define CONFIG_SYS_BFTICU_BASE 0x40000000
include/configs/mgcoge2ne.h +3 -3
@@ -35,8 +35,8 @@#define CONFIG_SYS_TEXT_BASE 0xFE000000/* include common defines/options for all Keymile boards */ -#include "keymile-common.h" -#include "km-powerpc.h" +#include "km/keymile-common.h" +#include "km/km-powerpc.h" #define CONFIG_SYS_SDRAM_BASE 0x00000000#define CONFIG_SYS_FLASH_BASE 0xFE000000
@@ -59,6 +59,6 @@#define MTDIDS_DEFAULT "nor2=app"/* include further common stuff for all keymile 82xx boards */ -#include "km82xx-common.h" +#include "km/km82xx-common.h" #endif /* __MGCOGE2NE */
include/configs/mgcoge2un.h +1 -1
@@ -35,7 +35,7 @@#define _CONFIG_MGCOGE2UN_H/* include common defines/options for all arm based Keymile boards */ -#include "km_arm.h" +#include "km/km_arm.h" /* * Version number information
include/configs/suen3.h +1 -1
@@ -34,7 +34,7 @@#define _CONFIG_SUEN3_H/* include common defines/options for all arm based Keymile boards */ -#include "km_arm.h" +#include "km/km_arm.h" /* * Version number information
include/configs/suen8.h +1 -1
@@ -35,7 +35,7 @@#define _CONFIG_SUEN8_H/* include common defines/options for all arm based Keymile boards */ -#include "km_arm.h" +#include "km/km_arm.h" /* * Version number information
include/configs/suvd3.h +1 -1
@@ -30,7 +30,7 @@#define CONFIG_SYS_TEXT_BASE 0xF0000000/* include common defines/options for all 8321 Keymile boards */ -#include "km8321-common.h" +#include "km/km8321-common.h" #define CONFIG_SYS_APP1_BASE 0xA0000000#define CONFIG_SYS_APP1_SIZE 256/* Megabytes */
include/configs/tuda1.h +1 -1
@@ -33,7 +33,7 @@#define CONFIG_SYS_TEXT_BASE 0xF0000000/* include common defines/options for all 8321 Keymile boards */ -#include "km8321-common.h" +#include "km/km8321-common.h" #define CONFIG_SYS_APP1_BASE 0xA0000000/* PAXG */ #define CONFIG_SYS_APP1_SIZE 256/* Megabytes */
include/configs/tuxa1.h +1 -1
@@ -33,7 +33,7 @@#define CONFIG_SYS_TEXT_BASE 0xF0000000/* include common defines/options for all 8321 Keymile boards */ -#include "km8321-common.h" +#include "km/km8321-common.h" #define CONFIG_SYS_LPXF_BASE 0xA0000000/* LPXF */ #define CONFIG_SYS_LPXF_SIZE 256/* Megabytes */
Signature · 1 line
1.7.1
Wolfgang Denk
AppliedPATCH v2 6/8 keymile boards: move keymile specific header in subdir
Dear Holger Brunck,
Quoted 32 lines · In message <18f52ef6949323ac2e59371d0f2a7b67ea8e8c3f.1304508448.git.holger.brun…
From: Valentin Longchamp <[email protected]>
Collect all keymile specific common headers in
include/configs/km.Signed-off-by Heiko Schocher <[email protected]>Signed-off-by Valentin Longchamp <[email protected]>cc Wolfgang Denk <[email protected]>cc Detlev Zundel <[email protected]>cc Prafulla Wadaskar <[email protected]>cc Kim Phillips <[email protected]>cc Holger Brunck <[email protected]>---
Changes for v2:
- split up first large patch serie to three independent smaller patch series
- no change in the content of this patchinclude/configs/{ => km}/keymile-common.h | 0 include/configs/{ => km}/km-powerpc.h | 0 include/configs/{ => km}/km82xx-common.h | 0 include/configs/{ => km}/km8321-common.h | 0 include/configs/{ => km}/km83xx-common.h | 0 include/configs/{ => km}/km_arm.h | 0 include/configs/kmeter1.h | 2 +- include/configs/kmsupx5.h | 2 +- include/configs/mgcoge.h | 6 +++--- include/configs/mgcoge2ne.h | 6 +++--- include/configs/mgcoge2un.h | 2 +- include/configs/suen3.h | 2 +- include/configs/suen8.h | 2 +- include/configs/suvd3.h | 2 +- include/configs/tuda1.h | 2 +-
Quoted 8 lines
include/configs/tuxa1.h | 2 +-
16 files changed, 14 insertions(+), 14 deletions(-)
rename include/configs/{ => km}/keymile-common.h (100%)
rename include/configs/{ => km}/km-powerpc.h (100%)
rename include/configs/{ => km}/km82xx-common.h (100%)
rename include/configs/{ => km}/km8321-common.h (100%)
rename include/configs/{ => km}/km83xx-common.h (100%)
rename include/configs/{ => km}/km_arm.h (100%)Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Bradley's Bromide: If computers get too powerful, we can organize them into a committee - that will do them in.
PATCH v2 7/8 km/common: simplify default environment
In reply to Holger BrunckThis is a first step to simplify the default environment. Move all the environment variables which are only needed for debugging purpose to textfiles in the scripts directory. In case of debugging these files can be loaded via tftp into RAM and set via the env import command. Other variables are identified as obsolete and were removed.
---
Changes for v2:
- split up first large patch serie to three independent smaller patch series
- no change in the content of this patch
board/keymile/scripts/README | 23 +++++ board/keymile/scripts/debug-arm-env.txt | 2 + board/keymile/scripts/debug-common-env.txt | 9 ++ board/keymile/scripts/debug-ppc-env.txt | 2 + include/configs/km/keymile-common.h | 128 +++------------------------- include/configs/km/km-powerpc.h | 12 +-- include/configs/km/km_arm.h | 5 +- 7 files changed, 55 insertions(+), 126 deletions(-) create mode 100644 board/keymile/scripts/README create mode 100644 board/keymile/scripts/debug-arm-env.txt create mode 100644 board/keymile/scripts/debug-common-env.txt create mode 100644 board/keymile/scripts/debug-ppc-env.txt
board/keymile/scripts/README new file +23 -0
@@ -0,0 +1,23 @@ +debug-common-env.txt +============================ +This file defines environment variables which are valid for powerpc boards +and for arm boards. + +addramfs: add phram device for the rootfilesysten in ram +develop: for development, laod kernel via tftp and mount rootfs via NFS +nfsargs: default arguments for nfs boot +ramfs: load rootfilesystem in RAM kernel +rootfsfile: loacation of the rootfs file for ramfs +setramfspram: compute PRAM size for ramfs target +setrootfsaddr: compute rootfilesystem address for phram +tftpkernel: load a kernel with tftp into ram +tftpramfs: load rootfs with tftp into ram + +debug-ppc-env.txt +============================ +fdt_file: location of the dtb file on the tftp server +tftpfdt: load dtb file and set fdt address + +debug-arm-env.txt +============================ +tftpfdt: for arm only a dummy variable, because we have no fdt on arm
board/keymile/scripts/debug-arm-env.txt new file +2 -0
@@ -0,0 +1,2 @@ +debug_env_common=tftpboot 0x200000 scripts/debug-common-env.txt && env import -t 0x200000 ${filesize} +tftpfdt=true
board/keymile/scripts/debug-common-env.txt new file +9 -0
@@ -0,0 +1,9 @@ +addramfs=setenv bootargs "${bootargs} phram.phram=rootfs${boot_bank},${rootfsaddr},${rootfssize}" +develop=setenv subbootcmds "tftpfdt tftpkernel nfsargs ${commonargs} boot " && setenv bootcmd 'run bootrunner' && setenv altbootcmd 'run bootcmd' && km_setboardid && saveenv && reset +nfsargs=setenv bootargs ubi.mtd=ubi0 root=/dev/nfs rw nfsroot=${serverip}:${rootpath} +ramfs=setenv actual_bank -1 && setenv subbootcmds "tftpfdt tftpkernel setrootfsaddr tftpramfs flashargs ${commonargs} addpanic addramfs boot " && setenv bootcmd 'run bootrunner' && setenv altbootcmd 'run bootcmd' && run setboardid && run setramfspram && run setpnvramaddr && saveenv && reset +rootfsfile=${hostname}/rootfsImage +setramfspram=setexpr value 0 + ${reservedpram} && setexpr value 0x${value} + ${rootfssize} && setexpr value 0x${value} + ${varsize} && setexpr value 0x${value} + ${pnvramsize} && setexpr value 0x${value} / 0x400 && setenv pram 0x${value} +tftpkernel=tftpboot ${kernel_addr_r} ${hostname}/uImage && setenv actual_kernel_addr ${kernel_addr_r} +tftpramfs=tftpboot ${rootfsaddr} ${hostname}/rootfsImage && setenv loadaddr +setrootfsaddr=setexpr value ${pnvramsize} - ${rootfssize} && setenv rootfsaddr 0x${value}
board/keymile/scripts/debug-ppc-env.txt new file +2 -0
@@ -0,0 +1,2 @@ +debug_env_common=tftpboot 0x200000 scripts/debug-common-env.txt && env import -t 0x200000 ${filesize} +tftpfdt=tftpboot ${fdt_addr_r} ${hostname}/${hostname}.dtb && setenv actual_fdt_addr ${fdt_addr_r}
include/configs/km/keymile-common.h +13 -115
221 lines not on this page · raw message
include/configs/km/km-powerpc.h +4 -8
@@ -67,20 +67,14 @@#define CONFIG_KM_FDT_ADDR 0x7E0000/* 128Kbytes */ #define CONFIG_KM_DEF_ENV_CPU \ - "addbootcount=echo \\\\c\0" \ - "addmtdparts=echo \\\\c\0" \ + "addbootcount=true\0" \ + "addmtdparts=true\0" \ "boot=bootm ${actual_kernel_addr} - ${actual_fdt_addr}\0" \ "cramfsloadfdt=" \ "cramfsload ${fdt_addr_r} " \ "fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb && " \ "setenv actual_fdt_addr ${fdt_addr_r}\0" \ "fdt_addr_r=" xstr(CONFIG_KM_FDT_ADDR) "\0" \ - "fdt_file=" \ - xstr(CONFIG_HOSTNAME) "/" \ - xstr(CONFIG_HOSTNAME) ".dtb\0" \ - "tftpfdt=" \ - "tftpboot ${fdt_addr_r} ${fdt_file} && " \ - "setenv actual_fdt_addr ${fdt_addr_r} \0" \ "update=" \ "protect off " xstr(BOOTFLASH_START) " +${filesize} && "\ "erase " xstr(BOOTFLASH_START) " +${filesize} && " \
@@ -89,4 +83,6 @@ "protect on " xstr(BOOTFLASH_START) " +${filesize}\0" \ "" +#define CONFIG_KM_ARCH_DBG_FILE "scripts/debug-ppc-env.txt" +#endif /* __CONFIG_KEYMILE_POWERPC_H */
include/configs/km/km_arm.h +2 -3
@@ -66,12 +66,11 @@#define CONFIG_KM_DEF_ENV_CPU \ "addmtdparts=setenv bootargs ${bootargs} ${mtdparts}\0" \ "boot=bootm ${actual_kernel_addr} - -\0" \ - "cramfsloadfdt=echo \\\\c\0" \ - "tftpfdt=echo \\\\c\0" \ + "cramfsloadfdt=true\0" \ CONFIG_KM_DEF_ENV_UPDATE \ "" - +#define CONFIG_KM_ARCH_DBG_FILE "scripts/debug-arm-env.txt"#define CONFIG_MD5 /* get_random_hex on krikwood needs MD5 support */ #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
Signature · 1 line
1.7.1
Wolfgang Denk
AppliedPATCH v2 7/8 km/common: simplify default environment
Dear Holger Brunck,
Quoted 17 lines · In message <0bbf514662e171fe0a8ef9b53a4819c7839e187e.1304508448.git.holger.brun…
This is a first step to simplify the default environment. Move all the environment variables which are only needed for debugging purpose to textfiles in the scripts directory. In case of debugging these files can be loaded via tftp into RAM and set via the env import command. Other variables are identified as obsolete and were removed.
Signed-off-by Holger Brunck <[email protected]>Signed-off-by Valentin Longchamp <[email protected]>Acked-by Heiko Schocher <[email protected]>cc Wolfgang Denk <[email protected]>cc Detlev Zundel <[email protected]>---
Changes for v2:
- split up first large patch serie to three independent smaller patch series
- no change in the content of this patch
Quoted 12 lines
board/keymile/scripts/README | 23 +++++ board/keymile/scripts/debug-arm-env.txt | 2 + board/keymile/scripts/debug-common-env.txt | 9 ++ board/keymile/scripts/debug-ppc-env.txt | 2 + include/configs/km/keymile-common.h | 128 +++------------------------- include/configs/km/km-powerpc.h | 12 +-- include/configs/km/km_arm.h | 5 +- 7 files changed, 55 insertions(+), 126 deletions(-) create mode 100644 board/keymile/scripts/README create mode 100644 board/keymile/scripts/debug-arm-env.txt create mode 100644 board/keymile/scripts/debug-common-env.txt create mode 100644 board/keymile/scripts/debug-ppc-env.txt
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Where there's no emotion, there's no motive for violence. -- Spock, "Dagger of the Mind", stardate 2715.1
PATCH v2 7/8 km/common: simplify default environment
In reply to Holger BrunckDear Holger Brunck,
Quoted 17 lines · In message <0bbf514662e171fe0a8ef9b53a4819c7839e187e.1304508448.git.holger.brun…
This is a first step to simplify the default environment. Move all the environment variables which are only needed for debugging purpose to textfiles in the scripts directory. In case of debugging these files can be loaded via tftp into RAM and set via the env import command. Other variables are identified as obsolete and were removed.
Signed-off-by Holger Brunck <[email protected]>Signed-off-by Valentin Longchamp <[email protected]>Acked-by Heiko Schocher <[email protected]>cc Wolfgang Denk <[email protected]>cc Detlev Zundel <[email protected]>---
Changes for v2:
- split up first large patch serie to three independent smaller patch series
- no change in the content of this patch
Quoted 12 lines
board/keymile/scripts/README | 23 +++++ board/keymile/scripts/debug-arm-env.txt | 2 + board/keymile/scripts/debug-common-env.txt | 9 ++ board/keymile/scripts/debug-ppc-env.txt | 2 + include/configs/km/keymile-common.h | 128 +++------------------------- include/configs/km/km-powerpc.h | 12 +-- include/configs/km/km_arm.h | 5 +- 7 files changed, 55 insertions(+), 126 deletions(-) create mode 100644 board/keymile/scripts/README create mode 100644 board/keymile/scripts/debug-arm-env.txt create mode 100644 board/keymile/scripts/debug-common-env.txt create mode 100644 board/keymile/scripts/debug-ppc-env.txt
This does not apply cleanly:
pplying patch #94008 to current directory
Description: [U-Boot,v2,7/8] km/common: simplify default environment
Applying: km/common: simplify default environment
fatal: sha1 information is lacking or useless (include/configs/km/keymile-common.h).
Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge.
Patch failed at 0001 km/common: simplify default environment
Stopping here. Please resubmit 4/8, 7/8 and 8/8.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "I can call spirits from the vasty deep." "Why so can I, or so can any man; but will they come when you do call for them?" - Shakespeare, 1 King Henry IV, Act III, Scene I.
PATCH v2 7/8 km/common: simplify default environment
Hello,
Quoted 45 lines · Wolfgang Denk
Dear Holger Brunck,
Quoted 17 lines · In message <0bbf514662e171fe0a8ef9b53a4819c7839e187e.1304508448.git.holger.brun…
This is a first step to simplify the default environment. Move all the environment variables which are only needed for debugging purpose to textfiles in the scripts directory. In case of debugging these files can be loaded via tftp into RAM and set via the env import command. Other variables are identified as obsolete and were removed.
Signed-off-by Holger Brunck <[email protected]>Signed-off-by Valentin Longchamp <[email protected]>Acked-by Heiko Schocher <[email protected]>cc Wolfgang Denk <[email protected]>cc Detlev Zundel <[email protected]>---
Changes for v2:
- split up first large patch serie to three independent smaller patch series
- no change in the content of this patchQuoted 12 lines
board/keymile/scripts/README | 23 +++++ board/keymile/scripts/debug-arm-env.txt | 2 + board/keymile/scripts/debug-common-env.txt | 9 ++ board/keymile/scripts/debug-ppc-env.txt | 2 + include/configs/km/keymile-common.h | 128 +++------------------------- include/configs/km/km-powerpc.h | 12 +-- include/configs/km/km_arm.h | 5 +- 7 files changed, 55 insertions(+), 126 deletions(-) create mode 100644 board/keymile/scripts/README create mode 100644 board/keymile/scripts/debug-arm-env.txt create mode 100644 board/keymile/scripts/debug-common-env.txt create mode 100644 board/keymile/scripts/debug-ppc-env.txtThis does not apply cleanly:
pplying patch #94008 to current directory
Description: [U-Boot,v2,7/8] km/common: simplify default environment
Applying: km/common: simplify default environment
fatal: sha1 information is lacking or useless (include/configs/km/keymile-common.h).
Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge.
Patch failed at 0001 km/common: simplify default environment
Quoted 2 lines
Stopping here. Please resubmit 4/8, 7/8 and 8/8.
Yes there are some dependencies if 4/8 is missing. I fix this an resubmit the missing pieces. I assume that I should only resubmit a patch serie with this three patches and not the whole serie?
Thanks!
Best regards
Holger
PATCH v2 7/8 km/common: simplify default environment
Dear Holger Brunck,
Quoted 4 lines · In message <[email protected]> you wrote:
Yes there are some dependencies if 4/8 is missing. I fix this an resubmit the missing pieces. I assume that I should only resubmit a patch serie with this three patches and not the whole serie?
Correct. Thanks.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de HANDLE WITH EXTREME CARE: This Product Contains Minute Electrically Charged Particles Moving at Velocities in Excess of Five Hundred Million Miles Per Hour.
PATCH v2 8/8 km/common: add pnvramsize to default environment
In reply to Holger BrunckThe pnvram size was used later from start scripts in linux. Therefore it was added to the default environment.
---
Changes for v2:
- split up first large patch serie to three independent smaller patch series
- rework the patch with inputs from W.Denk:
- move variable from c-code to default env to be present in any case when linux starts
include/configs/km/keymile-common.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
include/configs/km/keymile-common.h +1 -0
@@ -293,6 +293,7 @@"setenv default 'run newenv; reset' && " \"run release && saveenv; reset\0" \"checkboardid=km_checkbidhwk\0" \ + "pnvramsize=0x" xstr(CONFIG_KM_PNVRAM) "\0" \"" #ifndef CONFIG_KM_DEF_ENV
Signature · 1 line
1.7.1