@cp $(BUILD_TOPDIR)/u-boot/tuboot.bin $(BUILD_TOPDIR)/bin/temp.bin
@make show_size
+gs-oolite_v1_dev: export UBOOT_FILE_NAME=uboot_for_gs-oolite_v1_dev
+gs-oolite_v1_dev: export MAX_UBOOT_SIZE=64
+gs-oolite_v1_dev: export COMPRESSED_UBOOT=1
+gs-oolite_v1_dev:
+ @cd $(BUILD_TOPDIR)/u-boot/ && $(MAKECMD) gs_oolite_v1_dev_config
+ @cd $(BUILD_TOPDIR)/u-boot/ && $(MAKECMD) ENDIANNESS=-EB V=1 all
+ @cp $(BUILD_TOPDIR)/u-boot/tuboot.bin $(BUILD_TOPDIR)/bin/temp.bin
+ @make show_size
+
8devices_carambola2: export UBOOT_FILE_NAME=uboot_for_8devices_carambola2
8devices_carambola2: export MAX_UBOOT_SIZE=256
8devices_carambola2:
@./mkconfig -a ap121 mips mips ap121 ar7240 ar7240
+gs_oolite_v1_dev_config : unconfig hornet_common_config
+ @echo '======= Configuring for GS-Oolite v1 with dev board at:' `date` '======='
+ @echo "#define CONFIG_FOR_GS_OOLITE_V1_DEV 1" >> include/config.h
+ @echo "#define GPIO_SYS_LED_BIT 27" >> include/config.h
+ @echo "#define GPIO_SYS_LED_ON 0" >> include/config.h
+ @echo "#define GPIO_WAN_LED_BIT 17" >> include/config.h
+ @echo "#define GPIO_WAN_LED_ON 0" >> include/config.h
+ @echo "#define GPIO_LAN1_LED_BIT 13" >> include/config.h
+ @echo "#define GPIO_LAN1_LED_ON 0" >> include/config.h
+ @echo "#define GPIO_LAN2_LED_BIT 15" >> include/config.h
+ @echo "#define GPIO_LAN2_LED_ON 0" >> include/config.h
+ @echo "#define GPIO_RST_BUTTON_BIT 11" >> include/config.h
+ @echo "#define DEFAULT_FLASH_SIZE_IN_MB 16" >> include/config.h
+ @echo "#define BOARD_CUSTOM_STRING \"AP121 (AR9331) U-Boot for GS-Oolite v1\"" >> include/config.h
+
+ @./mkconfig -a ap121 mips mips ap121 ar7240 ar7240
+
carambola2_config : unconfig hornet_common_config
@echo '======= Configuring for 8devices Carambola 2 at:' `date` '======='
@echo "#define CONFIG_FOR_8DEVICES_CARAMBOLA2 1" >> include/config.h
gpio ^= 1 << GPIO_SYS_LED_BIT;
#elif defined(CONFIG_FOR_DLINK_DIR505_A1)
gpio ^= 1 << GPIO_SYS_LED_BIT;
+#elif defined(CONFIG_FOR_GS_OOLITE_V1_DEV)
+ gpio ^= 1 << GPIO_SYS_LED_BIT;
#elif defined(CONFIG_FOR_8DEVICES_CARAMBOLA2)
gpio ^= 1 << GPIO_WLAN_LED_BIT;
#else
#endif
#elif defined(CONFIG_FOR_DLINK_DIR505_A1)
SETBITVAL(gpio, GPIO_SYS_LED_BIT, GPIO_SYS_LED_ON);
+#elif defined(CONFIG_FOR_GS_OOLITE_V1_DEV)
+ SETBITVAL(gpio, GPIO_SYS_LED_BIT, GPIO_SYS_LED_ON);
+ SETBITVAL(gpio, GPIO_WAN_LED_BIT, GPIO_WAN_LED_ON);
+ SETBITVAL(gpio, GPIO_LAN1_LED_BIT, GPIO_LAN1_LED_ON);
+ SETBITVAL(gpio, GPIO_LAN2_LED_BIT, GPIO_LAN2_LED_ON);
#elif defined(CONFIG_FOR_8DEVICES_CARAMBOLA2)
SETBITVAL(gpio, GPIO_WLAN_LED_BIT, GPIO_WLAN_LED_ON);
#else
#endif
#elif defined(CONFIG_FOR_DLINK_DIR505_A1)
SETBITVAL(gpio, GPIO_SYS_LED_BIT, !GPIO_SYS_LED_ON);
+#elif defined(CONFIG_FOR_GS_OOLITE_V1_DEV)
+ SETBITVAL(gpio, GPIO_SYS_LED_BIT, !GPIO_SYS_LED_ON);
+ SETBITVAL(gpio, GPIO_WAN_LED_BIT, !GPIO_WAN_LED_ON);
+ SETBITVAL(gpio, GPIO_LAN1_LED_BIT, !GPIO_LAN1_LED_ON);
+ SETBITVAL(gpio, GPIO_LAN2_LED_BIT, !GPIO_LAN2_LED_ON);
#elif defined(CONFIG_FOR_8DEVICES_CARAMBOLA2)
SETBITVAL(gpio, GPIO_WLAN_LED_BIT, !GPIO_WLAN_LED_ON);
#else
// turn off RED LED, we don't need it
ar7240_reg_wr(AR7240_GPIO_OUT, (ar7240_reg_rd(AR7240_GPIO_OUT) | (0x1 << 26)));
+#elif defined(CONFIG_FOR_GS_OOLITE_V1_DEV)
+
+ /* LED's GPIOs on GS-Oolite v1 with development board:
+ *
+ * 13 => LAN2
+ * 15 => LAN1
+ * 17 => WAN
+ * 27 => SYS LED (green on dev board, red on module)
+ *
+ * I/O on development board:
+ * 0 => RED LED (active low)
+ * 1 => RED LED (active low)
+ * 6 => Switch 8
+ * 7 => Switch 7
+ * 8 => USB power
+ * 11 => Reset switch
+ * 14 => RED LED (active low)
+ * 16 => RED LED (active low)
+ * 18 => RED LED (active low)
+ * 19 => RED LED (active low)
+ * 20 => RED LED (active low)
+ * 21 => RED LED (active low)
+ * 22 => RED LED (active low)
+ * 23 => Relay 1
+ * 24 => Relay 2
+ * 26 => RED LED (active low)
+ *
+ */
+
+ // set GPIO_OE
+ ar7240_reg_wr(AR7240_GPIO_OE, (ar7240_reg_rd(AR7240_GPIO_OE) | 0xDFFE103));
+
+ // turn on power on USB and turn off RED LEDs
+ ar7240_reg_wr(AR7240_GPIO_SET, 0x47D4103);
#else
#error "Custom GPIO config in gpio_config() not defined!"
#endif
#define CONFIG_BOOTARGS "console=ttyS0,115200 root=31:06 rootfstype=squashfs init=/sbin/init mtdparts=ar7240-nor0:64k(u-boot),64k(ART),64k(mac),64k(nvram),256k(language),1024k(uImage),6656k(rootfs)"
+#elif defined(CONFIG_FOR_GS_OOLITE_V1_DEV)
+
+ #define CONFIG_BOOTARGS "console=ttyS0,115200 root=31:02 rootfstype=squashfs init=/sbin/init mtdparts=ar7240-nor0:128k(u-boot),1024k(kernel),2816k(rootfs),64k(config),64k(ART)"
+
#elif defined(CONFIG_FOR_8DEVICES_CARAMBOLA2)
#define CONFIG_BOOTARGS "console=ttyS0,115200 root=31:02 rootfstype=squashfs init=/sbin/init mtdparts=ar7240-nor0:256k(u-boot),64k(u-boot-env),16000k(firmware),64k(ART)"
#elif defined(CONFIG_FOR_8DEVICES_CARAMBOLA2)
// Carambola 2: 256k(U-Boot),64k(U-Boot env),64k(ART)
#define WEBFAILSAFE_UPLOAD_LIMITED_AREA_IN_BYTES (384 * 1024)
+#elif defined (CONFIG_FOR_GS_OOLITE_V1_DEV)
+ // GS-Oolite v1: 128k(U-Boot + MAC),64k(ART)
+ #define WEBFAILSAFE_UPLOAD_LIMITED_AREA_IN_BYTES (192 * 1024)
#else
// TP-Link: 64k(U-Boot),64k(MAC/model/WPS pin block),64k(ART)
#define WEBFAILSAFE_UPLOAD_LIMITED_AREA_IN_BYTES (192 * 1024)
#define OFFSET_MAC_DATA_BLOCK_LENGTH 0x010000
#define OFFSET_MAC_ADDRESS 0x000000 // Carambola 2 has two MAC addresses at the beginning of ART partition
#define OFFSET_MAC_ADDRESS2 0x000006
+#elif defined (CONFIG_FOR_GS_OOLITE_V1_DEV)
+ // GS-OOlite has only one MAC, inside second block
+ // It's some kind of TP-Link clone
+ #define OFFSET_MAC_DATA_BLOCK 0x010000
+ #define OFFSET_MAC_DATA_BLOCK_LENGTH 0x010000
+ #define OFFSET_MAC_ADDRESS 0x00FC00
#else
#define OFFSET_MAC_DATA_BLOCK 0x010000
#define OFFSET_MAC_DATA_BLOCK_LENGTH 0x010000
#endif
#if !defined(CONFIG_FOR_8DEVICES_CARAMBOLA2) && \
- !defined(CONFIG_FOR_DLINK_DIR505_A1)
+ !defined(CONFIG_FOR_DLINK_DIR505_A1) && \
+ !defined (CONFIG_FOR_GS_OOLITE_V1_DEV)
#define OFFSET_ROUTER_MODEL 0x00FD00
#endif