From: Piotr Dymacz Date: Mon, 29 Aug 2016 11:51:18 +0000 (+0200) Subject: Fix CONFIG_BOOTFILE value, use it in fw upgrade script X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=89e2cfced6cd9b91dcc4fd9d4fc003fefc05edf3;p=oweals%2Fu-boot_mod.git Fix CONFIG_BOOTFILE value, use it in fw upgrade script --- diff --git a/u-boot/include/configs/qca9k_common.h b/u-boot/include/configs/qca9k_common.h index 3a58a66..d13c99e 100644 --- a/u-boot/include/configs/qca9k_common.h +++ b/u-boot/include/configs/qca9k_common.h @@ -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 */ diff --git a/u-boot/include/upg_scripts.h b/u-boot/include/upg_scripts.h index 0ee3503..4d144e7 100644 --- a/u-boot/include/upg_scripts.h +++ b/u-boot/include/upg_scripts.h @@ -96,11 +96,10 @@ #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!; " \ diff --git a/u-boot/net/tftp.c b/u-boot/net/tftp.c index 19280d6..afa322f 100644 --- a/u-boot/net/tftp.c +++ b/u-boot/net/tftp.c @@ -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);