AA is supposed to be the current stable branch, and the wiki provides instructions on how to flash it on SX76x devices, requiring a replacement of the stock locked bootloader. It says to build it along with your image from menuconfig for the replacement. Currently, this builds a broken bootloader that can boot only an already flashed OpenWrt image, and you cannot reflash again without booting an older bootloader over serial in the UART boot mode. At this moment, this device is temporarily not supported in trunk, and this bootloader package was dropped after the AA branch, with a new one added later. This patch corrects the unmaintained AA bootloader to work as close to as designed as I could manage. I made this patch mostly through trial and error, and I don't really understand why it simply refuses to work properly without it. Again, this patch is ONLY for AA.
Signed-off-by: Daniel Gimpelevich <dan...@gimpelevich.san-francisco.ca.us> Index: package/uboot-lantiq/patches/500-gigasx.patch =================================================================== --- package/uboot-lantiq/patches/500-gigasx.patch (revision 35398) +++ package/uboot-lantiq/patches/500-gigasx.patch (working copy) @@ -1,6 +1,6 @@ --- a/Makefile +++ b/Makefile -@@ -3613,6 +3613,32 @@ +@@ -3615,6 +3615,33 @@ $(eval $(call arcadyan, arv752DPW%config)) $(eval $(call arcadyan, arv752DPW22%config)) @@ -23,6 +23,7 @@ + *) $(XECHO) "... DDR RAM config \\\"$${DDR}\\\" unknown, use default"; \ + esac; \ + fi ++ echo "#define CONFIG_GIGASX76X_ENV" >>$(obj)include/config.h + echo "#define CONFIG_SWITCH_PORT1 1" >>$(obj)include/config.h + echo "#define CONFIG_SWITCH_PIN 3" >>$(obj)include/config.h + echo "#define CONFIG_BUTTON_PORT0 1" >>$(obj)include/config.h @@ -33,3 +34,63 @@ easy50712%config : unconfig @mkdir -p $(obj)include @mkdir -p $(obj)board/infineon/easy50712 +--- a/include/configs/easy50712.h ++++ b/include/configs/easy50712.h +@@ -114,7 +114,9 @@ + + #define CONFIG_CMD_HTTPD /* enable upgrade via HTTPD */ + ++#ifndef CONFIG_GIGASX76X_ENV + #define CONFIG_IPADDR 192.168.0.119 + #define CONFIG_ETHADDR 00:01:02:03:04:05 ++#endif + + #endif /* __CONFIG_H */ +--- a/include/configs/ifx-common.h ++++ b/include/configs/ifx-common.h +@@ -35,6 +35,7 @@ + #undef CONFIG_PREBOOT + + #undef CONFIG_BOOTARGS ++#ifndef CONFIG_GIGASX76X_ENV + #define CONFIG_EXTRA_ENV_SETTINGS \ + "ram_addr=0x80500000\0" \ + "kernel_addr=0xb0020000\0" \ +@@ -65,6 +66,7 @@ + "cp.b ${ram_addr} ${kernel_addr} ${filesize}\0" + + #define CONFIG_BOOTCOMMAND "run flash_flash" ++#endif + + /* + * TFTP is using fragmented packets +@@ -159,7 +161,12 @@ + + /* Address and size of Primary Environment Sector */ + #define CONFIG_ENV_ADDR 0xB0010000 ++#ifdef CONFIG_GIGASX76X_ENV ++#define CONFIG_ENV_SIZE 0xC00 ++#define CONFIG_ENV_SECT_SIZE 0x10000 ++#else + #define CONFIG_ENV_SIZE 0x10000 ++#endif + + #ifdef CONFIG_FLASH_CFI_DRIVER + #define CONFIG_SYS_FLASH_CFI +--- a/board/infineon/easy50712/danube.c ++++ b/board/infineon/easy50712/danube.c +@@ -331,6 +331,14 @@ + + int board_gpio_init(void) + { ++#ifdef CONFIG_GIGASX76X_ENV ++ setenv("ipaddr", "192.168.1.1"); ++ setenv("serverip", "192.168.1.16"); ++ setenv("gatewayip", "192.168.1.1"); ++ setenv("ram_addr", "0x80100000"); ++ setenv("bootcmd", "setenv bootargs board=$(boardid) ethaddr=$(ethaddr);bootm 0xb0020000"); ++ setenv("bootdelay", "2"); ++#endif + #ifdef CONFIG_BUTTON_PORT0 + *DANUBE_GPIO_P0_ALTSEL0 &= ~(1<<CONFIG_BUTTON_PIN); + *DANUBE_GPIO_P0_ALTSEL1 &= ~(1<<CONFIG_BUTTON_PIN); _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel