cmd_recovery: replace flashing with booting an initramfs image
This commit is contained in:
parent
211d005623
commit
e962169649
|
@ -1,6 +1,7 @@
|
|||
/*
|
||||
* Copyright (C) 2012, 2013 sysmocom s.f.m.c. GmbH
|
||||
* Author: Holger Hans Peter Freyther
|
||||
* Author: Alexander Couzens <lynxis@fe80.eu>
|
||||
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -57,9 +58,9 @@ static int tftp_failed(void)
|
|||
return -1;
|
||||
}
|
||||
|
||||
static int flash_failed(void)
|
||||
static int booting_failed(void)
|
||||
{
|
||||
printf("Flash failed.\n");
|
||||
printf("Booting failed.\n");
|
||||
BLINK_LED(15);
|
||||
enable_netconsole();
|
||||
return -1;
|
||||
|
@ -110,16 +111,15 @@ static int do_run_recovery(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
|||
if (rc < 0)
|
||||
return tftp_failed();
|
||||
|
||||
rc = run_command("erase 0x9f050000 +0x7a0000; "
|
||||
"cp.b 0x81000000 0x9f050000 0x7a0000", 0);
|
||||
rc = run_command("bootm 0x81000000", 0);
|
||||
if (rc < 0)
|
||||
return flash_failed();
|
||||
return booting_failed();
|
||||
|
||||
return run_command("resetcycle; reset", 0);
|
||||
}
|
||||
|
||||
U_BOOT_CMD(
|
||||
run_recovery, 2, 0, do_run_recovery,
|
||||
"run_recovery - Run the sysmocom sysmoBTS recovery process",
|
||||
"run_recovery - tftp boot a given image",
|
||||
"[force]"
|
||||
);
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
#define CONFIG_SERVERIP 192.168.2.254
|
||||
#define CFG_FAULT_ECHO_LINK_DOWN 1
|
||||
|
||||
#define RECOVERY_FILENAME_STRING "openwrt-ar71xx-generic-sysmo-sob-ap1-squashfs-sysupgrade.bin"
|
||||
#define RECOVERY_FILENAME_STRING "openwrt-ar71xx-generic-sysmo-sob-ap1-initramfs-kernel.bin"
|
||||
|
||||
#define CFG_PHY_ADDR 0
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
#define CONFIG_SERVERIP 192.168.2.254
|
||||
#define CFG_FAULT_ECHO_LINK_DOWN 1
|
||||
|
||||
#define RECOVERY_FILENAME_STRING "openwrt-ar71xx-generic-sysmo-sob-ap2-squashfs-sysupgrade.bin"
|
||||
#define RECOVERY_FILENAME_STRING "openwrt-ar71xx-generic-sysmo-sob-ap2-initramfs-kernel.bin"
|
||||
|
||||
#define CFG_PHY_ADDR 0
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
#define CONFIG_SERVERIP 192.168.2.254
|
||||
#define CFG_FAULT_ECHO_LINK_DOWN 1
|
||||
|
||||
#define RECOVERY_FILENAME_STRING "openwrt-ar71xx-generic-carambola2-squashfs-sysupgrade.bin"
|
||||
#define RECOVERY_FILENAME_STRING "openwrt-ar71xx-generic-carambola2-initramfs-kernel.bin"
|
||||
|
||||
#define CFG_PHY_ADDR 0
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
#define CONFIG_SERVERIP 192.168.2.254
|
||||
#define CFG_FAULT_ECHO_LINK_DOWN 1
|
||||
|
||||
#define RECOVERY_FILENAME_STRING "openwrt-ar71xx-generic-sysmo-sob-jb02v2-cb2-squashfs-sysupgrade.bin"
|
||||
#define RECOVERY_FILENAME_STRING "openwrt-ar71xx-generic-sysmo-sob-jb02v2-cb2-initramfs-kernel.bin"
|
||||
|
||||
#define CFG_PHY_ADDR 0
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
#define CONFIG_SERVERIP 192.168.2.254
|
||||
#define CFG_FAULT_ECHO_LINK_DOWN 1
|
||||
|
||||
#define RECOVERY_FILENAME_STRING "openwrt-ar71xx-generic-sysmo-sob-jb02v3-skw-squashfs-sysupgrade.bin"
|
||||
#define RECOVERY_FILENAME_STRING "openwrt-ar71xx-generic-sysmo-sob-jb02v3-skw-initramfs-kernel.bin"
|
||||
|
||||
#define CFG_PHY_ADDR 0
|
||||
|
||||
|
|
Loading…
Reference in New Issue