Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/Makefile b/Makefile
- index 2d314a7..6c64c53 100644
- --- a/Makefile
- +++ b/Makefile
- @@ -272,7 +272,8 @@ comfast_cf-e520n \
- comfast_cf-e530n:
- @$(call build,64,1,ETH_CONFIG=_s27)
- -d-link_dir-505_a1:
- +d-link_dir-505_a1 \
- +zsun_sd100:
- @$(call build,64,1)
- dragino_ms14:
- diff --git a/u-boot/Makefile b/u-boot/Makefile
- index 1c02897..e4a8fcc 100644
- --- a/u-boot/Makefile
- +++ b/u-boot/Makefile
- @@ -852,6 +852,11 @@ zbtlink_zbt-we1526: qca953x_common
- @$(call define_add,CFG_ATH_GMAC_NMACS,2)
- @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240
- +zsun_sd100: ar933x_common
- + @$(call config_init,Zsun SD100,sd100,16,22,0,QCA_AR9331_SOC)
- + @$(call define_add,CONFIG_FOR_ZSUN_SD100,1)
- + @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240
- +
- # =============
- # CLEAN TARGETS
- # =============
- diff --git a/u-boot/include/configs/ap121.h b/u-boot/include/configs/ap121.h
- index fac001f..8dc3a01 100644
- --- a/u-boot/include/configs/ap121.h
- +++ b/u-boot/include/configs/ap121.h
- @@ -156,6 +156,11 @@
- #define CONFIG_QCA_GPIO_MASK_LED_ACT_L GPIO27
- +#elif defined(CONFIG_FOR_ZSUN_SD100)
- + #define CONFIG_QCA_GPIO_MASK_LED_ACT_H GPIO0
- + #define CONFIG_QCA_GPIO_MASK_OUT_INIT_H GPIO18
- + #define CONFIG_QCA_GPIO_MASK_OUT_INIT_L GPIO21
- +
- #endif
- /*
- @@ -243,6 +248,12 @@
- "rootfstype=squashfs init=/sbin/init "\
- "mtdparts=ar7240-nor0:128k(u-boot),64k(u-boot-env),16128k(firmware),64k(art)"
- +#elif defined(CONFIG_FOR_ZSUN_SD100)
- +
- + #define CONFIG_BOOTARGS "console=ttyATH0,115200 root=31:04 "\
- + "rootfstype=squashfs,jffs2 noinitrd "\
- + "mtdparts=spi0.0:64k(u-boot)ro,64k(u-boot-env)ro,16128k(firmware),64k(nvram)ro,64k(art)ro"
- +
- #endif
- /*
- @@ -330,6 +341,11 @@
- #define CFG_ENV_SIZE 0x8000
- #define CFG_ENV_SECT_SIZE 0x10000
- +#elif defined(CONFIG_FOR_ZSUN_SD100)
- +
- + #define CFG_ENV_ADDR 0x9F010000
- + #define CFG_ENV_SIZE 0x10000
- +
- #else
- #define CFG_ENV_ADDR 0x9F01EC00
- @@ -359,7 +375,8 @@
- defined(CONFIG_FOR_ALFA_NETWORK_TUBE2H) ||\
- defined(CONFIG_FOR_CREATCOMM_D3321) ||\
- defined(CONFIG_FOR_DRAGINO_MS14) ||\
- - defined(CONFIG_FOR_VILLAGE_TELCO_MP2)
- + defined(CONFIG_FOR_VILLAGE_TELCO_MP2) ||\
- + defined(CONFIG_FOR_ZSUN_SD100)
- #define OFFSET_MAC_DATA_BLOCK 0xFF0000
- #define OFFSET_MAC_DATA_BLOCK_LENGTH 0x010000
- @@ -427,7 +444,8 @@
- !defined(CONFIG_FOR_HAK5_PACKET_SQUIRREL) &&\
- !defined(CONFIG_FOR_HAK5_WIFI_PINEAPPLE_NANO) &&\
- !defined(CONFIG_FOR_UNWIRED_DEVICES_UNWIRED_ONE) &&\
- - !defined(CONFIG_FOR_VILLAGE_TELCO_MP2)
- + !defined(CONFIG_FOR_VILLAGE_TELCO_MP2) &&\
- + !defined(CONFIG_FOR_ZSUN_SD100)
- #define OFFSET_ROUTER_MODEL 0xFD00
- @@ -481,6 +499,35 @@
- #endif
- +/* Zsun SD100 is limited to 64 KB only and has a custom recovery script */
- +#if defined(CONFIG_FOR_ZSUN_SD100)
- +
- + #undef CONFIG_CMD_HTTPD
- +
- +
- +#endif
- +
- /*
- * ===========================
- * HTTP recovery configuration
- @@ -528,6 +575,10 @@
- #define WEBFAILSAFE_UPLOAD_LIMITED_AREA_IN_BYTES (256 * 1024)
- +#elif defined(CONFIG_FOR_ZSUN_SD100)
- +
- + #define WEBFAILSAFE_UPLOAD_LIMITED_AREA_IN_BYTES (256 * 1024)
- +
- #else
- #define WEBFAILSAFE_UPLOAD_LIMITED_AREA_IN_BYTES (256 * 1024)
- @@ -587,7 +638,8 @@
- !defined(CONFIG_FOR_GLINET_GL_USB150) &&\
- !defined(CONFIG_FOR_HAK5_WIFI_PINEAPPLE_NANO) &&\
- !defined(CONFIG_FOR_UNWIRED_DEVICES_UNWIRED_ONE) &&\
- - !defined(CONFIG_FOR_VILLAGE_TELCO_MP2)
- + !defined(CONFIG_FOR_VILLAGE_TELCO_MP2) &&\
- + !defined(CONFIG_FOR_ZSUN_SD100)
- #define CONFIG_UPG_SCRIPTS_UBOOT_SIZE_BCKP_HEX 0x20000
- diff --git a/u-boot/include/env_scripts.h b/u-boot/include/env_scripts.h
- index ddd0232..06049a9 100644
- --- a/u-boot/include/env_scripts.h
- +++ b/u-boot/include/env_scripts.h
- @@ -140,7 +140,8 @@
- "elif itest $cnt < 5; then "
- #endif
- - #define CONFIG_ENV_BTN_RECOVERY_SCRIPT \
- + #if !defined(CONFIG_ENV_BTN_RECOVERY_SCRIPT)
- + #define CONFIG_ENV_BTN_RECOVERY_SCRIPT \
- "recovery=" \
- "if button; then " \
- "sleep 600;" \
- @@ -182,6 +183,7 @@
- "fi;" \
- "setenv cnt;" \
- "fi\0"
- + #endif
- #endif /* CONFIG_BTN_RECOVERY_SCRIPT && CONFIG_GPIO_RESET_BTN */
Advertisement
Add Comment
Please, Sign In to add comment