remove carambola_factory

we have our own recovery mechanism
This commit is contained in:
Alexander Couzens 2015-03-04 20:03:51 +01:00
parent a1c127f9a1
commit bcb1638b70
5 changed files with 0 additions and 70 deletions

View File

@ -3,7 +3,6 @@ include $(TOPDIR)/config.mk
LIB = lib$(BOARD).a
OBJS = $(BOARD).o flash.o ../common/ar7240_flash.o ../common/ar7240_s26_phy.o
OBJS += carambola_factory.o
OBJS += ../common/watchdog.o
SOBJS = ../common/lowlevel_init.o
SOBJS += hornet_pll_init.o

View File

@ -1,57 +0,0 @@
#include <common.h>
#include <config.h>
#define XMK_STR(x) #x
#define MK_STR(x) XMK_STR(x)
static void carambola_factory_load_image(void)
{
char *filename = CFG_C2_IMG_FILENAME;
int tftp_ret;
int argc_tftp = 3;
char* argv_tftp[] = {"tftpboot", CFG_C2_IMG_LOAD_ADDR, filename};
int argc_bootm = 2;
char* argv_bootm[] = {"bootm", CFG_C2_IMG_LOAD_ADDR};
if (!getenv ("ipaddr"))
setenv("ipaddr", MK_STR(CONFIG_IPADDR));
if (!getenv ("serverip"))
setenv("serverip", MK_STR(CONFIG_SERVERIP));
//Workaround for slow TFTP:
//wake-up network stack with ping to server
char *serverip = getenv ("serverip");
char ping_command[32]="ping ";
strncpy(ping_command+5, serverip, 16);
run_command(ping_command, NULL);
//end of workaround
setenv("netretry", "once"); // Try once, reboot after
tftp_ret=do_tftpb (NULL, 0, argc_tftp, argv_tftp);
if (0 == tftp_ret) {
printf("Booting TFTP image...\n");
do_bootm(NULL, 0, argc_bootm, argv_bootm);
do_reset(NULL, 0, 0, NULL);
}
else{
printf("Error getting TFTP image. Rebooting...\n");
do_reset(NULL, 0, 0, NULL);
}
return;
}
void carambola_factory_mode(void)
{
char* production_env = getenv("production");
if (production_env){
if (strncmp(production_env, "yes", 3) == 0){
carambola_factory_load_image();
}
}
return;
}

View File

@ -506,10 +506,6 @@ void main_loop (void)
if (bootdelay >= 0 && s && !abortboot (bootdelay)) {
#ifdef CONFIG_CARAMBOLA_FACTORY_MODE
carambola_factory_mode();
#endif
# ifdef CONFIG_AUTOBOOT_KEYED
int prev = disable_ctrlc(1); /* disable Control C checking */
# endif

View File

@ -60,10 +60,6 @@
#define CFG_BOOTM_LEN (16 << 20) /* 16 MB */
#define CONFIG_CARAMBOLA_FACTORY_MODE
#define CFG_C2_IMG_LOAD_ADDR "0x80F00000"
#define CFG_C2_IMG_FILENAME "carambola2.bin"
#include <configs/common.h>
#include <cmd_confdefs.h>

View File

@ -59,10 +59,6 @@
#define CFG_BOOTM_LEN (16 << 20) /* 16 MB */
#define CONFIG_CARAMBOLA_FACTORY_MODE
#define CFG_C2_IMG_LOAD_ADDR "0x80F00000"
#define CFG_C2_IMG_FILENAME "carambola2.bin"
#include <configs/common.h>
#include <cmd_confdefs.h>