summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Gilles <jgilles@multitech.com>2014-06-20 12:29:19 -0500
committerJesse Gilles <jgilles@multitech.com>2014-06-20 12:29:19 -0500
commit0a7fe84926933b2f01162ec7cd3aeb8a3f97228c (patch)
tree819dc5d2635f1884da1eeb8613ce9d7def7f4845
parent95ec13a8703bce85a88f91628323dcb1cc983e9e (diff)
contrib/uboot-setenv-mtocgd: chain uboot commands with &&
makes commands stop on error
-rw-r--r--multitech/contrib/uboot-setenv-mtocgd22
1 files changed, 11 insertions, 11 deletions
diff --git a/multitech/contrib/uboot-setenv-mtocgd b/multitech/contrib/uboot-setenv-mtocgd
index e3022b3..200a7a4 100644
--- a/multitech/contrib/uboot-setenv-mtocgd
+++ b/multitech/contrib/uboot-setenv-mtocgd
@@ -1,6 +1,6 @@
print setting U-Boot variables...
send setenv bootargs \'mem=128M console=ttyS0,115200 root=/dev/mtdblock8 ro rootfstype=jffs2\'
-send setenv bootcmd \'nboot.jffs2 ${loadaddr} 0 ${kernel_addr}; bootm ${loadaddr}\'
+send setenv bootcmd \'nboot.jffs2 ${loadaddr} 0 ${kernel_addr} && bootm ${loadaddr}\'
send setenv bootdelay 1
send setenv serverip 192.168.2.2
send setenv ipaddr 192.168.2.1
@@ -44,16 +44,16 @@ send setenv erase_kernel \'nand erase.part kernel\'
send setenv erase_config \'nand erase.part config\'
send setenv erase_oem \'nand erase.part oem\'
send setenv erase_rootfs \'nand erase.part rootfs\'
-send setenv tftp_bootstrap \'tftp ${tftpaddr} ${bootstrap_file}; run erase_bootstrap; nand write.jffs2 ${fileaddr} bootstrap ${filesize}\'
-send setenv tftp_uboot \'tftp ${tftpaddr} ${uboot_file}; run erase_uboot; nand write.jffs2 ${fileaddr} u-boot ${filesize}\'
-send setenv tftp_uboot_env1 \'tftp ${tftpaddr} ${uboot_env1_file}; run erase_uboot_env1; nand write.jffs2 ${fileaddr} u-boot-env1 ${filesize}\'
-send setenv tftp_uboot_env2 \'tftp ${tftpaddr} ${uboot_env2_file}; run erase_uboot_env2; nand write.jffs2 ${fileaddr} u-boot-env2 ${filesize}\'
-send setenv tftp_kernel \'tftp ${tftpaddr} ${kernel_file}; run erase_kernel; nand write.jffs2 ${fileaddr} kernel ${filesize}\'
-send setenv tftp_config \'tftp ${tftpaddr} ${config_file}; run erase_config; nand write.jffs2 ${fileaddr} config ${filesize}\'
-send setenv tftp_oem \'tftp ${tftpaddr} ${oem_file}; run erase_oem; nand write.jffs2 ${fileaddr} oem ${filesize}\'
-send setenv tftp_rootfs \'tftp ${tftpaddr} ${rootfs_file}; run erase_rootfs; nand write.jffs2 ${fileaddr} rootfs ${filesize}\'
-send setenv krb \'run tftp_kernel; run tftp_rootfs; boot\'
-send setenv rb \'run tftp_rootfs; boot\'
+send setenv tftp_bootstrap \'tftp ${tftpaddr} ${bootstrap_file} && run erase_bootstrap && nand write.jffs2 ${fileaddr} bootstrap ${filesize}\'
+send setenv tftp_uboot \'tftp ${tftpaddr} ${uboot_file} && run erase_uboot && nand write.jffs2 ${fileaddr} u-boot ${filesize}\'
+send setenv tftp_uboot_env1 \'tftp ${tftpaddr} ${uboot_env1_file} && run erase_uboot_env1 && nand write.jffs2 ${fileaddr} u-boot-env1 ${filesize}\'
+send setenv tftp_uboot_env2 \'tftp ${tftpaddr} ${uboot_env2_file} && run erase_uboot_env2 && nand write.jffs2 ${fileaddr} u-boot-env2 ${filesize}\'
+send setenv tftp_kernel \'tftp ${tftpaddr} ${kernel_file} && run erase_kernel && nand write.jffs2 ${fileaddr} kernel ${filesize}\'
+send setenv tftp_config \'tftp ${tftpaddr} ${config_file} && run erase_config && nand write.jffs2 ${fileaddr} config ${filesize}\'
+send setenv tftp_oem \'tftp ${tftpaddr} ${oem_file} && run erase_oem && nand write.jffs2 ${fileaddr} oem ${filesize}\'
+send setenv tftp_rootfs \'tftp ${tftpaddr} ${rootfs_file} && run erase_rootfs && nand write.jffs2 ${fileaddr} rootfs ${filesize}\'
+send setenv krb \'run tftp_kernel && run tftp_rootfs && boot\'
+send setenv rb \'run tftp_rootfs && boot\'
print saving...
send saveenv
send saveenv