Keymile common changes
cover Keymile common changes
This is the last part of the changes for the Keymile boards. This series contains all the changes that are common to all boards and architectures (that's why they are sent as an independant series) and mostly target our environment scripts.
Holger Brunck (2):
km/common: stop u-boot only if someone press <SPACE> km/scripts: load fdt_bid_kwkey.dtb when working with tftp
Tobias M?ller (1):
km/scripts: search for kernel/DTBs at serverip:/PRODUCTNAME via TFTP
in develop mode
Valentin Longchamp (1):
km: update the boot script to check for a DTB
board/keymile/scripts/develop-common.txt | 6 +++--- include/configs/km/keymile-common.h | 9 +++++++-- include/configs/km/km-powerpc.h | 1 + include/configs/km/km_arm.h | 6 ++++++ include/configs/km/kmp204x-common.h | 1 + 5 files changed, 18 insertions(+), 5 deletions(-)
Signature · 1 line
1.8.3.1
PATCH 1/4 km/common: stop u-boot only if someone press <SPACE>
From: Holger Brunck <[email protected]>
To prevent u-boot to stop accidently e.g. due to line noise on the serial line, we now use the option CONFIG_AUTOBOOT_KEYED. We choose the <SPACE> key for this.
---
include/configs/km/keymile-common.h | 4 ++++ 1 file changed, 4 insertions(+)
include/configs/km/keymile-common.h +4 -0
@@ -56,6 +56,10 @@#define CONFIG_LOADS_ECHO #define CONFIG_SYS_LOADS_BAUD_CHANGE +#define CONFIG_AUTOBOOT_KEYED +#define CONFIG_AUTOBOOT_PROMPT "Hit <SPACE> key to stop autoboot in %2ds\n" +#define CONFIG_AUTOBOOT_STOP_STR " " +/* Support the IVM EEprom */ #define CONFIG_SYS_IVM_EEPROM_ADR 0x50#define CONFIG_SYS_IVM_EEPROM_MAX_LEN 0x400
Signature · 1 line
1.8.3.1
PATCH 1/4 km/common: stop u-boot only if someone press <SPACE>
Hello Valentin,
Am 13.11.2015 um 16:15 schrieb Valentin Longchamp:
Quoted 6 lines
From: Holger Brunck <[email protected]>
To prevent u-boot to stop accidently e.g. due to line noise on the serial line, we now use the option
CONFIG_AUTOBOOT_KEYED. We choose the <SPACE> key for this.
Quoted 6 lines
Signed-off-by Holger Brunck <[email protected]>Signed-off-by Valentin Longchamp <[email protected]>---
include/configs/km/keymile-common.h | 4 ++++ 1 file changed, 4 insertions(+)
bye,
Heiko
Quoted 17 lines
include/configs/km/keymile-common.h +4
-0@@ -56,6 +56,10 @@#define CONFIG_LOADS_ECHO #define CONFIG_SYS_LOADS_BAUD_CHANGE +#define CONFIG_AUTOBOOT_KEYED +#define CONFIG_AUTOBOOT_PROMPT "Hit <SPACE> key to stop autoboot in %2ds\n" +#define CONFIG_AUTOBOOT_STOP_STR " " +/* Support the IVM EEprom */ #define CONFIG_SYS_IVM_EEPROM_ADR 0x50#define CONFIG_SYS_IVM_EEPROM_MAX_LEN 0x400
Signature · 2 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH 1/4 km/common: stop u-boot only if someone press <SPACE>
In reply to Valentin LongchampQuoted 9 lines · Valentin Longchamp
From: Holger Brunck <[email protected]>
To prevent u-boot to stop accidently e.g. due to line noise on the serial line, we now use the option
CONFIG_AUTOBOOT_KEYED. We choose the <SPACE> key for this.Signed-off-by Holger Brunck <[email protected]>Signed-off-by Valentin Longchamp <[email protected]>Reviewed-by Heiko Schocher <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151118/f8f3ff8d/attachment.sig>
PATCH 2/4 km: update the boot script to check for a DTB
In reply to Valentin LongchampIf a DTB is found with cramfsls, the bootscript continues as expected. If none is found, the cramfsloadfdt and boot subbootcmds are updated to not load the DTB from cramfs and not pass it to the kernel. The kernel thus must have an appended DTB otherwise the boot will fail.
This is required for the km_kirkwood boards that must support .esw where the DTB sometimes is appended (for backwards compatibility) and sometimes is passed correctly (as we do now for all newer boards).
---
include/configs/km/keymile-common.h | 5 +++-- include/configs/km/km-powerpc.h | 1 + include/configs/km/km_arm.h | 6 ++++++ include/configs/km/kmp204x-common.h | 1 + 4 files changed, 11 insertions(+), 2 deletions(-)
include/configs/km/keymile-common.h +3 -2
@@ -141,8 +141,9 @@* - 'release': for a standalone system kernel/rootfs from flash */ #define CONFIG_KM_DEF_ENV_BOOTTARGETS \ - "subbootcmds=ubiattach ubicopy cramfsloadfdt set_fdthigh " \ - "cramfsloadkernel flashargs add_default addpanic boot\0"\ + "subbootcmds=ubiattach ubicopy checkfdt cramfsloadfdt " \ + "set_fdthigh cramfsloadkernel flashargs add_default " \ + "addpanic boot\0" \ "develop=" \ "tftp 200000 scripts/develop-${arch}.txt && " \ "env import -t 200000 ${filesize} && " \
include/configs/km/km-powerpc.h +1 -0
@@ -79,6 +79,7 @@" ${filesize} && " \ "protect on " __stringify(BOOTFLASH_START) " +${filesize}\0"\"set_fdthigh=true\0" \ +"checkfdt=true\0" \ ""#endif /* __CONFIG_KEYMILE_POWERPC_H */
include/configs/km/km_arm.h +6 -0
@@ -83,6 +83,12 @@ "u-boot="__stringify(CONFIG_HOSTNAME) "/u-boot.kwb\0" \CONFIG_KM_UPDATE_UBOOT \"set_fdthigh=setenv fdt_high ${kernelmem}\0" \ +"checkfdt=" \ +"if cramfsls fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb; " \ +"then true; else setenv cramfsloadfdt true; " \ +"setenv boot bootm ${load_addr_r}; " \ +"echo No FDT found, booting with the kernel " \ +"appended one; fi\0" \"" #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
include/configs/km/kmp204x-common.h +1 -0
@@ -458,6 +458,7 @@ int get_scl(void);"sf probe 0;sf erase 0 +${filesize};" \"sf write ${load_addr_r} 0 ${filesize};\0" \"set_fdthigh=true\0" \ +"checkfdt=true\0" \"" #define CONFIG_HW_ENV_SETTINGS \
Signature · 1 line
1.8.3.1
PATCH 2/4 km: update the boot script to check for a DTB
Hello Valentin,
Am 13.11.2015 um 16:15 schrieb Valentin Longchamp:
Quoted 9 lines
If a DTB is found with cramfsls, the bootscript continues as expected. If none is found, the cramfsloadfdt and boot subbootcmds are updated to not load the DTB from cramfs and not pass it to the kernel. The kernel thus must have an appended DTB otherwise the boot will fail.
This is required for the
km_kirkwoodboards that must support .esw where the DTB sometimes is appended (for backwards compatibility) and sometimes is passed correctly (as we do now for all newer boards).
Quoted 8 lines
Signed-off-by Valentin Longchamp <[email protected]>---
include/configs/km/keymile-common.h | 5 +++-- include/configs/km/km-powerpc.h | 1 + include/configs/km/km_arm.h | 6 ++++++ include/configs/km/kmp204x-common.h | 1 + 4 files changed, 11 insertions(+), 2 deletions(-)
bye,
Heiko
Quoted 59 lines
include/configs/km/keymile-common.h +3
-2@@ -141,8 +141,9 @@* - 'release': for a standalone system kernel/rootfs from flash */ #define CONFIG_KM_DEF_ENV_BOOTTARGETS \ - "subbootcmds=ubiattach ubicopy cramfsloadfdt set_fdthigh " \ - "cramfsloadkernel flashargs add_default addpanic boot\0"\ + "subbootcmds=ubiattach ubicopy checkfdt cramfsloadfdt " \ + "set_fdthigh cramfsloadkernel flashargs add_default " \ + "addpanic boot\0" \ "develop=" \ "tftp 200000 scripts/develop-${arch}.txt && " \ "env import -t 200000 ${filesize} && " \include/configs/km/km-powerpc.h +1
-0@@ -79,6 +79,7 @@" ${filesize} && " \ "protect on " __stringify(BOOTFLASH_START) " +${filesize}\0"\"set_fdthigh=true\0" \ +"checkfdt=true\0" \ ""#endif /* __CONFIG_KEYMILE_POWERPC_H */ include/configs/km/km_arm.h +6
-0@@ -83,6 +83,12 @@ "u-boot="__stringify(CONFIG_HOSTNAME) "/u-boot.kwb\0" \CONFIG_KM_UPDATE_UBOOT \"set_fdthigh=setenv fdt_high ${kernelmem}\0" \ +"checkfdt=" \ +"if cramfsls fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb; " \ +"then true; else setenv cramfsloadfdt true; " \ +"setenv boot bootm ${load_addr_r}; " \ +"echo No FDT found, booting with the kernel " \ +"appended one; fi\0" \"" #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */include/configs/km/kmp204x-common.h +1
-0@@ -458,6 +458,7 @@ int get_scl(void);"sf probe 0;sf erase 0 +${filesize};" \"sf write ${load_addr_r} 0 ${filesize};\0" \"set_fdthigh=true\0" \ +"checkfdt=true\0" \"" #define CONFIG_HW_ENV_SETTINGS \
Signature · 2 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH 2/4 km: update the boot script to check for a DTB
In reply to Valentin LongchampQuoted 11 lines · Valentin Longchamp
If a DTB is found with cramfsls, the bootscript continues as expected. If none is found, the cramfsloadfdt and boot subbootcmds are updated to not load the DTB from cramfs and not pass it to the kernel. The kernel thus must have an appended DTB otherwise the boot will fail.
This is required for the
km_kirkwoodboards that must support .esw where the DTB sometimes is appended (for backwards compatibility) and sometimes is passed correctly (as we do now for all newer boards).Signed-off-by Valentin Longchamp <[email protected]>Reviewed-by Heiko Schocher <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151118/1900064c/attachment.sig>
PATCH 3/4 km/scripts: load fdt_bid_kwkey.dtb when working with tftp
In reply to Valentin LongchampFrom: Holger Brunck <[email protected]>
When loading the dtb file via tftp we should load the one which matches boardId and hwKey and not a common one for the boardname. We have boards were different hwKeys are used and then we may load an incorrect dtb file. If no fdt_bid_kwkey.dtb file is not a fallback to boardname.dtb is used.
---
board/keymile/scripts/develop-common.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
board/keymile/scripts/develop-common.txt +1 -1
@@ -3,7 +3,7 @@ bootcmd=run ${subbootcmds} configure=run set_uimage; km_setboardid && saveenv && reset subbootcmds=tftpfdt tftpkernel nfsargs add_default boot nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${toolchain}/${arch} -tftpfdt=if run set_fdthigh || test ${arch} != arm; then tftpboot ${fdt_addr_r} ${hostname}/${hostname}.dtb; else true; fi +tftpfdt=if run set_fdthigh || test ${arch} != arm; then if tftpboot ${fdt_addr_r} ${hostname}/fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb; then; else tftpboot ${fdt_addr_r} ${hostname}/${hostname}.dtb; fi; else true; fi tftpkernel=tftpboot ${load_addr_r} ${hostname}/${uimage} toolchain=/opt/eldk rootfssize=0
Signature · 1 line
1.8.3.1
PATCH 3/4 km/scripts: load fdt_bid_kwkey.dtb when working with tftp
Hello Valentin,
Am 13.11.2015 um 16:15 schrieb Valentin Longchamp:
Quoted 7 lines
From: Holger Brunck <[email protected]>
When loading the dtb file via tftp we should load the one which matches boardId and hwKey and not a common one for the boardname. We have boards were different hwKeys are used and then we may load an incorrect dtb file. If no fdt_bid_kwkey.dtb file is not a fallback to boardname.dtb is used.
Quoted 7 lines
Signed-off-by Holger Brunck <[email protected]>Signed-off-by Tobias M?ller <[email protected]>Signed-off-by Valentin Longchamp <[email protected]>---
board/keymile/scripts/develop-common.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
bye,
Heiko
Quoted 15 lines
board/keymile/scripts/develop-common.txt +1
-1@@ -3,7 +3,7 @@ bootcmd=run ${subbootcmds} configure=run set_uimage; km_setboardid && saveenv && reset subbootcmds=tftpfdt tftpkernel nfsargs add_default boot nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${toolchain}/${arch} -tftpfdt=if run set_fdthigh || test ${arch} != arm; then tftpboot ${fdt_addr_r} ${hostname}/${hostname}.dtb; else true; fi +tftpfdt=if run set_fdthigh || test ${arch} != arm; then if tftpboot ${fdt_addr_r} ${hostname}/fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb; then; else tftpboot ${fdt_addr_r} ${hostname}/${hostname}.dtb; fi; else true; fi tftpkernel=tftpboot ${load_addr_r} ${hostname}/${uimage} toolchain=/opt/eldk rootfssize=0
Signature · 2 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH 3/4 km/scripts: load fdt_bid_kwkey.dtb when working with tftp
In reply to Valentin LongchampQuoted 11 lines · Valentin Longchamp
From: Holger Brunck <[email protected]>
When loading the dtb file via tftp we should load the one which matches boardId and hwKey and not a common one for the boardname. We have boards were different hwKeys are used and then we may load an incorrect dtb file. If no fdt_bid_kwkey.dtb file is not a fallback to boardname.dtb is used.
Signed-off-by Holger Brunck <[email protected]>Signed-off-by Tobias M?ller <[email protected]>Signed-off-by Valentin Longchamp <[email protected]>Reviewed-by Heiko Schocher <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151118/32f1da84/attachment.sig>
PATCH 4/4 km/scripts: search for kernel/DTBs at serverip:/PRODUCTNAME via TFTP in develop mode
In reply to Valentin LongchampFrom: Tobias M?ller <[email protected]>
Search for the kernel and DTBs in a folder named PRODUCTNAME (found in the IVM) at the TFTP server instead of the u-boot boardname.
---
board/keymile/scripts/develop-common.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
board/keymile/scripts/develop-common.txt +3 -3
@@ -1,10 +1,10 @@ altbootcmd=run ${subbootcmds} bootcmd=run ${subbootcmds} -configure=run set_uimage; km_setboardid && saveenv && reset +configure=run set_uimage; setenv tftppath ${IVM_Symbol} ; km_setboardid && saveenv && reset subbootcmds=tftpfdt tftpkernel nfsargs add_default boot nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${toolchain}/${arch} -tftpfdt=if run set_fdthigh || test ${arch} != arm; then if tftpboot ${fdt_addr_r} ${hostname}/fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb; then; else tftpboot ${fdt_addr_r} ${hostname}/${hostname}.dtb; fi; else true; fi -tftpkernel=tftpboot ${load_addr_r} ${hostname}/${uimage} +tftpfdt=if run set_fdthigh || test ${arch} != arm; then if tftpboot ${fdt_addr_r} ${tftppath}/fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb; then; else tftpboot ${fdt_addr_r} ${tftppath}/${hostname}.dtb; fi; else true; fi +tftpkernel=tftpboot ${load_addr_r} ${tftppath}/${uimage} toolchain=/opt/eldk rootfssize=0 set_uimage=printenv uimage || setenv uimage uImage
Signature · 1 line
1.8.3.1
PATCH 4/4 km/scripts: search for kernel/DTBs at serverip:/PRODUCTNAME via TFTP in develop mode
Hello Valentin,
Am 13.11.2015 um 16:15 schrieb Valentin Longchamp:
Quoted 11 lines
From: Tobias M?ller <[email protected]>
Search for the kernel and DTBs in a folder named PRODUCTNAME (found in the IVM) at the TFTP server instead of the u-boot boardname.
Signed-off-by Tobias M?ller <[email protected]>Signed-off-by Valentin Longchamp <[email protected]>---
board/keymile/scripts/develop-common.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
bye,
Heiko
Quoted 20 lines
board/keymile/scripts/develop-common.txt +3
-3@@ -1,10 +1,10 @@ altbootcmd=run ${subbootcmds} bootcmd=run ${subbootcmds} -configure=run set_uimage; km_setboardid && saveenv && reset +configure=run set_uimage; setenv tftppath ${IVM_Symbol} ; km_setboardid && saveenv && reset subbootcmds=tftpfdt tftpkernel nfsargs add_default boot nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${toolchain}/${arch} -tftpfdt=if run set_fdthigh || test ${arch} != arm; then if tftpboot ${fdt_addr_r} ${hostname}/fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb; then; else tftpboot ${fdt_addr_r} ${hostname}/${hostname}.dtb; fi; else true; fi -tftpkernel=tftpboot ${load_addr_r} ${hostname}/${uimage} +tftpfdt=if run set_fdthigh || test ${arch} != arm; then if tftpboot ${fdt_addr_r} ${tftppath}/fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb; then; else tftpboot ${fdt_addr_r} ${tftppath}/${hostname}.dtb; fi; else true; fi +tftpkernel=tftpboot ${load_addr_r} ${tftppath}/${uimage} toolchain=/opt/eldk rootfssize=0 set_uimage=printenv uimage || setenv uimage uImage
Signature · 2 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH 4/4 km/scripts: search for kernel/DTBs at serverip:/PRODUCTNAME via TFTP in develop mode
In reply to Valentin LongchampQuoted 8 lines · Valentin Longchamp
From: Tobias M?ller <[email protected]>
Search for the kernel and DTBs in a folder named PRODUCTNAME (found in the IVM) at the TFTP server instead of the u-boot boardname.
Signed-off-by Tobias M?ller <[email protected]>Signed-off-by Valentin Longchamp <[email protected]>Reviewed-by Heiko Schocher <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151118/2e048af7/attachment.sig>