Fix CONFIG_BOOTFILE value, use it in fw upgrade script
authorPiotr Dymacz <pepe2k@gmail.com>
Mon, 29 Aug 2016 11:51:18 +0000 (13:51 +0200)
committerPiotr Dymacz <pepe2k@gmail.com>
Mon, 29 Aug 2016 11:51:18 +0000 (13:51 +0200)
u-boot/include/configs/qca9k_common.h
u-boot/include/upg_scripts.h
u-boot/net/tftp.c

index 3a58a66b862566d8e04ffe6e1049c1eb9a6e53ac..d13c99e32640f1c50c29f4408fa0ea01eca958ee 100644 (file)
@@ -83,7 +83,7 @@
 #define CONFIG_NETCONSOLE_PORT 6666
 
 /* Other environment variables */
-#define CONFIG_BOOTFILE        "firmware.bin"
+#define CONFIG_BOOTFILE        firmware.bin
 #define CONFIG_LOADADDR        0x80800000
 
 /* This is needed for time calculation */
index 0ee3503218fa5c5d4b9a789aea9c5f593d3d8bff..4d144e76f889ac308317b4008e296ed378a5ba54 100644 (file)
        #endif
 
        #define CONFIG_ENV_UPG_SCRIPTS_FW       \
-               "fw_name=firmware.bin\0" \
                "fw_addr=" MK_STR(CONFIG_UPG_SCRIPTS_FW_ADDR_HEX) "\0" \
                "fw_upg=" \
                        "if ping $serverip; then " \
-                               "tftp $loadaddr $fw_name && " \
+                               "tftp $loadaddr $bootfile && " \
                                "erase $fw_addr +$filesize && " \
                                "cp.b $loadaddr $fw_addr $filesize && " \
                                "echo DONE! Firmware upgraded!; " \
index 19280d6bbd133c0522acd4b16c3b04cb83f67d6a..afa322ff5404661062ebd4d523e6c72e8b98fbf3 100644 (file)
@@ -350,7 +350,7 @@ void TftpStart(void){
            }
        }
 
-       printf("\n    Filename: '%s'", tftp_filename);
+       printf("\n    Filename: %s", tftp_filename);
 
        if(NetBootFileSize){
                printf("\n        Size: 0x%x Bytes = ", NetBootFileSize<<9);