From 847feac4832e554a5e1cfb8c1af2084123ec95bb Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Mon, 9 Mar 2015 19:33:35 +0100 Subject: [PATCH] recovery: introduce new define RECOVERY_FILENAME_STRING for tftp in cmd_recovery It's used to define a different recovery image for ap1 and ap2 --- u-boot/common/cmd_recovery.c | 4 ++-- u-boot/include/configs/carambola2.h | 2 ++ u-boot/include/configs/skylab.h | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/u-boot/common/cmd_recovery.c b/u-boot/common/cmd_recovery.c index 9bb2289f80..b70f24176b 100644 --- a/u-boot/common/cmd_recovery.c +++ b/u-boot/common/cmd_recovery.c @@ -100,11 +100,11 @@ static int do_run_recovery(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return dhcp_failed(); rc = run_command("setenv filesize 0; " - "tftp 0x81000000 sysmocom-ap2-recovery", 0); + "tftp 0x81000000 " RECOVERY_FILENAME_STRING, 0); if (rc < 0) { rc = run_command("setenv filesize 0; " "set serverip 255.255.255.255; " - "tftp 0x81000000 sysmocom-ap2-recovery", 0); + "tftp 0x81000000 " RECOVERY_FILENAME_STRING, 0); } if (rc < 0) diff --git a/u-boot/include/configs/carambola2.h b/u-boot/include/configs/carambola2.h index 32ae5c4961..8e2f96a7b7 100644 --- a/u-boot/include/configs/carambola2.h +++ b/u-boot/include/configs/carambola2.h @@ -50,6 +50,8 @@ #define CONFIG_ETHADDR 0x00:0xaa:0xbb:0xcc:0xdd:0xee #define CFG_FAULT_ECHO_LINK_DOWN 1 +#define RECOVERY_FILENAME_STRING "openwrt-ar71xx-generic-sysmo-sob-ap1-squashfs-sysupgrade.bin" + #define CFG_PHY_ADDR 0 #define CFG_AG7240_NMACS 2 diff --git a/u-boot/include/configs/skylab.h b/u-boot/include/configs/skylab.h index 884aa41d10..46b2a2ea24 100644 --- a/u-boot/include/configs/skylab.h +++ b/u-boot/include/configs/skylab.h @@ -49,6 +49,8 @@ #define CONFIG_ETHADDR 0x00:0xaa:0xbb:0xcc:0xdd:0xee #define CFG_FAULT_ECHO_LINK_DOWN 1 +#define RECOVERY_FILENAME_STRING "openwrt-ar71xx-generic-sysmo-sob-ap2-squashfs-sysupgrade.bin" + #define CFG_PHY_ADDR 0 #define CFG_AG7240_NMACS 2