Replace "run load; run update" with conditionalized "run load update".
PATCH 1/1 Replace "run load; run update" with conditionalized "run load update".
The latter version stops when "run load" fails for whatever reasons rendering the combination *a lot* more secure.
--- include/configs/MPC8349EMDS.h | 2 +- include/configs/P3G4.h | 2 +- include/configs/TQM8272.h | 2 +- include/configs/TQM834x.h | 2 +- include/configs/TQM85xx.h | 2 +- include/configs/alpr.h | 2 +- include/configs/bamboo.h | 2 +- include/configs/bubinga.h | 2 +- include/configs/ebony.h | 2 +- include/configs/hcu4.h | 2 +- include/configs/hcu5.h | 2 +- include/configs/ixdpg425.h | 2 +- include/configs/katmai.h | 2 +- include/configs/korat.h | 2 +- include/configs/luan.h | 2 +- include/configs/lwmon5.h | 2 +- include/configs/ocotea.h | 2 +- include/configs/p3mx.h | 2 +- include/configs/p3p440.h | 2 +- include/configs/pcs440ep.h | 2 +- include/configs/pdnb3.h | 2 +- include/configs/sbc8349.h | 2 +- include/configs/sequoia.h | 2 +- include/configs/taihu.h | 2 +- include/configs/taishan.h | 2 +- include/configs/walnut.h | 2 +- include/configs/yosemite.h | 2 +- include/configs/yucca.h | 4 ++-- 28 files changed, 29 insertions(+), 29 deletions(-)
include/configs/MPC8349EMDS.h +1 -1
@@ -739,7 +739,7 @@"load=tftp 100000 /tftpboot/mpc8349emds/u-boot.bin\0" \"update=protect off fe000000 fe03ffff; " \"era fe000000 fe03ffff; cp.b 100000 fe000000 ${filesize}\0" \ -"upd=run load;run update\0" \ +"upd=run load update\0" \"fdtaddr=400000\0" \"fdtfile=mpc8349emds.dtb\0" \""
include/configs/P3G4.h +1 -1
@@ -110,7 +110,7 @@"update=protect off fff00000 fff3ffff;era fff00000 fff3ffff;" \"cp.b 100000 fff00000 ${filesize};" \"setenv filesize;saveenv\0" \ -"upd=run load;run update\0" \ +"upd=run load update\0" \"" #define CONFIG_BOOTCOMMAND "run flash_self"
include/configs/TQM8272.h +1 -1
@@ -87,7 +87,7 @@"cp.b 300000 40000000 40000;" \"setenv filesize;saveenv\0" \"cphwib=cp.b 4003fc00 33fc00 400\0" \ -"upd=run load;run cphwib;run update\0" \ +"upd=run load cphwib update\0" \"" #define CONFIG_BOOTCOMMAND "run flash_self"
include/configs/TQM834x.h +1 -1
@@ -528,7 +528,7 @@ extern int tqm834x_num_flash_banks;"load=tftp 100000 /tftpboot/tqm834x/u-boot.bin\0" \"update=protect off 80000000 8003ffff; " \"era 80000000 8003ffff; cp.b 100000 80000000 40000\0" \ -"upd=run load;run update\0" \ +"upd=run load update\0" \"" #define CONFIG_BOOTCOMMAND "run flash_self"
include/configs/TQM85xx.h +1 -1
@@ -468,7 +468,7 @@"update=protect off fffc0000 ffffffff;era fffc0000 ffffffff;" \"cp.b 100000 fffc0000 40000;" \"setenv filesize;saveenv\0" \ -"upd=run load;run update\0" \ +"upd=run load update\0" \"" #define CONFIG_BOOTCOMMAND "run flash_self"
include/configs/alpr.h +1 -1
@@ -166,7 +166,7 @@"update=protect off fffc0000 ffffffff;era fffc0000 ffffffff;" \"cp.b 100000 fffc0000 40000;" \"setenv filesize;saveenv\0" \ -"upd=run load;run update\0" \ +"upd=run load update\0" \"ethprime=ppc_4xx_eth3\0" \"ethact=ppc_4xx_eth3\0" \"autoload=no\0" \
include/configs/bamboo.h +1 -1
@@ -276,7 +276,7 @@"update=protect off fffa0000 ffffffff;era fffa0000 ffffffff;" \"cp.b 100000 fffa0000 60000;" \"setenv filesize;saveenv\0" \ -"upd=run load;run update\0" \ +"upd=run load update\0" \"" #define CONFIG_BOOTCOMMAND "run flash_self"
include/configs/bubinga.h +1 -1
@@ -111,7 +111,7 @@"update=protect off fffc0000 ffffffff;era fffc0000 ffffffff;" \"cp.b 100000 fffc0000 40000;" \"setenv filesize;saveenv\0" \ -"upd=run load;run update\0" \ +"upd=run load update\0" \"" #define CONFIG_BOOTCOMMAND "run net_nfs"
include/configs/ebony.h +1 -1
@@ -184,7 +184,7 @@"update=protect off fffc0000 ffffffff;era fffc0000 ffffffff;" \"cp.b 100000 fffc0000 40000;" \"setenv filesize;saveenv\0" \ -"upd=run load;run update\0" \ +"upd=run load update\0" \"" #define CONFIG_BOOTCOMMAND "run flash_self"
include/configs/hcu4.h +1 -1
@@ -192,7 +192,7 @@"load=tftp 100000 hcu4/u-boot.bin\0" \"update=protect off FFFB0000 FFFFFFFF;era FFFB0000 FFFFFFFF;" \"cp.b 100000 FFFB0000 50000\0" \ -"upd=run load;run update\0" \ +"upd=run load update\0" \"vx_rom=hcu4/hcu4_vx_rom\0" \"vx=tftp ${loadaddr} ${vx_rom};run vxargs; bootvx\0" \"vxargs=setenv bootargs emac(0,0)c:${vx_rom} e=${ipaddr}" \
include/configs/hcu5.h +1 -1
@@ -199,7 +199,7 @@"load=tftp 100000 hcu5/u-boot.bin\0" \"update=protect off FFFB0000 FFFFFFFF;era FFFB0000 FFFFFFFF;" \"cp.b 100000 FFFB0000 50000\0" \ -"upd=run load;run update\0" \ +"upd=run load update\0" \"vx_rom=hcu5/hcu5_vx_rom\0" \"vx=tftp ${loadaddr} ${vx_rom};run vxargs; bootvx\0" \"vxargs=setenv bootargs emac(0,0)c:${vx_rom} e=${ipaddr}" \
include/configs/ixdpg425.h +1 -1
@@ -168,7 +168,7 @@"update=protect off 50000000 5003ffff;era 50000000 5003ffff;" \"cp.b 100000 50000000 40000;" \"setenv filesize;saveenv\0" \ -"upd=run load;run update\0" \ +"upd=run load update\0" \"" #define CONFIG_BOOTCOMMAND "run net_nfs"
include/configs/katmai.h +1 -1
@@ -209,7 +209,7 @@"update=protect off fffc0000 ffffffff;era fffc0000 ffffffff;" \"cp.b ${fileaddr} fffc0000 ${filesize};" \"setenv filesize;saveenv\0" \ -"upd=run load;run update\0" \ +"upd=run load update\0" \"kozio=bootm ffc60000\0" \"pciconfighost=1\0" \"pcie_mode=RP:RP:RP\0" \
include/configs/korat.h +1 -1
@@ -202,7 +202,7 @@"load=tftp 200000 /tftpboot/${hostname}/u-boot.bin\0" \"update=protect off FFFA0000 FFFFFFFF;era FFFA0000 FFFFFFFF;" \"cp.b 200000 FFFA0000 60000\0" \ -"upd=run load;run update\0" \ +"upd=run load update\0" \"" #define CONFIG_BOOTCOMMAND "run flash_self"
include/configs/luan.h +1 -1
@@ -182,7 +182,7 @@"update=protect off fffc0000 ffffffff;era fffc0000 ffffffff;" \"cp.b 100000 fffc0000 40000;" \"setenv filesize;saveenv\0" \ -"upd=run load;run update\0" \ +"upd=run load update\0" \"" #define CONFIG_BOOTCOMMAND "run flash_self"
include/configs/lwmon5.h +1 -1
@@ -219,7 +219,7 @@"load=tftp 200000 /tftpboot/${hostname}/u-boot.bin\0" \"update=protect off FFF80000 FFFFFFFF;era FFF80000 FFFFFFFF;" \"cp.b 200000 FFF80000 80000\0" \ -"upd=run load;run update\0" \ +"upd=run load update\0" \"lwe_env=tftp 200000 /tftpboot.dev/lwmon5/env_uboot.bin;" \"autoscr 200000\0" \""
include/configs/ocotea.h +1 -1
@@ -199,7 +199,7 @@"update=protect off fffc0000 ffffffff;era fffc0000 ffffffff;" \"cp.b 100000 fffc0000 40000;" \"setenv filesize;saveenv\0" \ -"upd=run load;run update\0" \ +"upd=run load update\0" \"" #define CONFIG_BOOTCOMMAND "run flash_self"
include/configs/p3mx.h +1 -1
@@ -219,7 +219,7 @@"update=protect off fff00000 fff3ffff;era fff00000 fff3ffff;" \"cp.b 100000 fff00000 40000;" \"setenv filesize;saveenv\0" \ -"upd=run load;run update\0" \ +"upd=run load update\0" \ "serverip=11.0.0.152\0"#if defined (CONFIG_P3M750 )
include/configs/p3p440.h +1 -1
@@ -147,7 +147,7 @@"update=protect off fffc0000 ffffffff;era fffc0000 ffffffff;" \"cp.b 100000 fffc0000 40000;" \"setenv filesize;saveenv\0" \ -"upd=run load;run update\0" \ +"upd=run load update\0" \"unlock=yes\0" \"" #define CONFIG_BOOTCOMMAND "run net_nfs"
include/configs/pcs440ep.h +1 -1
@@ -172,7 +172,7 @@"load=tftp 100000 /tftpboot/pcs440ep/u-boot.bin\0" \"update=protect off FFFA0000 FFFFFFFF;era FFFA0000 FFFFFFFF;" \"cp.b 100000 FFFA0000 60000\0" \ -"upd=run load;run update\0" \ +"upd=run load update\0" \"" #define CONFIG_BOOTCOMMAND "run flash_self"
include/configs/pdnb3.h +1 -1
@@ -170,7 +170,7 @@"update=protect off 50000000 5007dfff;era 50000000 5007dfff;" \"cp.b 100000 50000000 ${filesize};" \"setenv filesize;saveenv\0" \ -"upd=run load;run update\0" \ +"upd=run load update\0" \"ipaddr=10.0.0.233\0" \"serverip=10.0.0.152\0" \"netmask=255.255.0.0\0" \
include/configs/sbc8349.h +1 -1
@@ -688,7 +688,7 @@"load=tftp 100000 /tftpboot/sbc8349/u-boot.bin\0" \"update=protect off fff00000 fff3ffff; " \"era fff00000 fff3ffff; cp.b 100000 fff00000 ${filesize}\0" \ -"upd=run load;run update\0" \ +"upd=run load update\0" \"fdtaddr=400000\0" \"fdtfile=sbc8349.dtb\0" \""
include/configs/sequoia.h +1 -1
@@ -284,7 +284,7 @@"load=tftp 200000 /tftpboot/${hostname}/u-boot.bin\0" \"update=protect off FFFA0000 FFFFFFFF;era FFFA0000 FFFFFFFF;" \"cp.b 200000 FFFA0000 60000\0" \ -"upd=run load;run update\0" \ +"upd=run load update\0" \"" #define CONFIG_BOOTCOMMAND "run flash_self"
include/configs/taihu.h +1 -1
@@ -99,7 +99,7 @@"load=tftp 200000 /tftpboot/taihu/u-boot.bin\0" \"update=protect off FFFC0000 FFFFFFFF;era FFFC0000 FFFFFFFF;" \"cp.b 200000 FFFC0000 40000\0" \ -"upd=run load;run update\0" \ +"upd=run load update\0" \"" #define CONFIG_BOOTCOMMAND "run flash_self"
include/configs/taishan.h +1 -1
@@ -194,7 +194,7 @@"update=protect off fffc0000 ffffffff;era fffc0000 ffffffff;" \"cp.b 100000 fffc0000 40000;" \"setenv filesize;saveenv\0" \ -"upd=run load;run update\0" \ +"upd=run load update\0" \"fixedip=setenv bootargs $(bootargs) ip=$(ipaddr):$(serverip):" \"$(gatewayip):$(netmask):$(hostname):$(netdev):off panic=1\0" \"dhcp=setenv bootargs $(bootargs) ip=dhcp\0" \
include/configs/walnut.h +1 -1
@@ -73,7 +73,7 @@"update=protect off fffc0000 ffffffff;era fffc0000 ffffffff;" \"cp.b 100000 fffc0000 40000;" \"setenv filesize;saveenv\0" \ -"upd=run load;run update\0" \ +"upd=run load update\0" \"" #define CONFIG_BOOTCOMMAND "run net_nfs"
include/configs/yosemite.h +1 -1
@@ -209,7 +209,7 @@"update=protect off fff80000 ffffffff;era fff80000 ffffffff;" \"cp.b 200000 fff80000 80000;" \"setenv filesize;saveenv\0" \ -"upd=run load;run update\0" \ +"upd=run load update\0" \"" #define CONFIG_BOOTCOMMAND "run flash_self"
include/configs/yucca.h +2 -2
@@ -175,7 +175,7 @@"bootm ${kernel_addr} ${ramdisk_addr}\0" \"net_nfs=tftp 200000 ${bootfile};run nfsargs addip addtty;" \"bootm\0" \ -"rootpath=/opt/eldk/ppc_4xx\0" \ +"rootpath=/opt/eldk/ppc_4xx\0" \"bootfile=yucca/uImage\0" \"kernel_addr=E7F10000\0" \"ramdisk_addr=E7F20000\0" \
@@ -184,7 +184,7 @@"update=protect off 2:4-7;era 2:4-7;" \"cp.b ${fileaddr} FFFB0000 ${filesize};" \"setenv filesize;saveenv\0" \ -"upd=run load;run update\0" \ +"upd=run load update\0" \"pciconfighost=1\0" \"pcie_mode=RP:EP:EP\0" \""
Signature · 1 line
1.5.4.2
PATCH 1/1 Replace "run load; run update" with conditionalized "run load update".
Quoted 4 lines · Detlev Zundel
The latter version stops when "run load" fails for whatever reasons rendering the combination *a lot* more secure.
Signed-off-by Detlev Zundel <[email protected]>
Thanks for spotting.
Best regards,
Stefan
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
PATCH 1/1 Replace "run load; run update" with conditionalized "run load update".
Hi Stefan,
Quoted 7 lines · Detlev Zundel
Quoted 4 lines
The latter version stops when "run load" fails for whatever reasons rendering the combination *a lot* more secure.
Signed-off-by Detlev Zundel <[email protected]>Thanks for spotting.
Actually the sequoia part of the patch bit Markus hard preparing for a training. To put the board into a defined state he first erased the environment, reset the board and did a "run upd". Seemed a pretty natural thing to do, but becourse of the erased environment, the tftp failed and because of the ";" u-boot was erased anyway.
The nasty part he only realized at that moment - although he had U-Boot still running, tftp would only work with "ethaddr" set _after_ a reset :(
Oddly enough, a BDI penalty loop reflashing a board reminds me a lot of biathlon...
Cheers
Detlev
PS: Yes I know, he could have used serial download or even a USB stick,
but we only realized that later.
Signature · 6 lines
Lobbing insults is not a useful technique for reaching understanding.
-- Thomas Bushnell, BSG
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.dePATCH 1/1 Replace "run load; run update" with conditionalized "run load update".
Quoted 3 lines · In message <[email protected]> you wrote:
PS: Yes I know, he could have used serial download or even a USB stick,
but we only realized that later.
Markus can make this a examination question for his training:
List at least 5 different ways to recover U-Boot on a running board without using Ethernet download.
[It's a pity that we don't have firewire support yet.]
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 "We have the right to survive!" "Not be killing others." -- Deela and Kirk, "Wink of An Eye", stardate 5710.5
Wolfgang Denk
AppliedPATCH 1/1 Replace "run load; run update" with conditionalized "run load update".
In reply to Detlev ZundelQuoted 4 lines · In message <[email protected]> you wrote:
The latter version stops when "run load" fails for whatever reasons rendering the combination *a lot* more secure.
Signed-off-by Detlev Zundel <[email protected]>
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 People with narrow minds usually have broad tongues.