[OpenWrt-Devel] [PATCH 0/9] ar71xx: Add support for three PowerCloud devices
This patch series finally gets the previously attempted PowerCloud device patch series up-to-date with trunk, including using the new image generation Makefile format instead of old-style. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/9] ar71xx: PowerCloud CAP324 image generation To: openwrt-devel@lists.openwrt.org
From: Daniel Dickinson Image generation (and mtd partition) part of support for PowerCloud CAP324 Cloud AP. The CAP324 Cloud AP is a device sold by PowerCloud Systems who's stock firmware (CloudCommand) provides 'cloud' based managment of large numbers of access points. The CAP324 is a dual-band 802.11n wireless access point with 16MB flash and 128MB RAM and single gigabit ethernet port. It can be powered via PoE or a wall wart. --- target/linux/ar71xx/generic/profiles/pcs.mk | 44 + target/linux/ar71xx/image/Makefile | 20 +++-- 2 files changed, 62 insertions(+), 2 deletions(-) diff --git a/target/linux/ar71xx/generic/profiles/pcs.mk b/target/linux/ar71xx/generic/profiles/pcs.mk index 1399ef4..b56d131 100644 --- a/target/linux/ar71xx/generic/profiles/pcs.mk +++ b/target/linux/ar71xx/generic/profiles/pcs.mk @@ -27,3 +27,47 @@ define Profile/DLRTDEV01/Description endef $(eval $(call Profile,DLRTDEV01)) + +define Profile/CAP324 + NAME:=PowerCloud CAP324 Cloud AP + PACKAGES:=uboot-envtools +endef + +define Profile/CAP324/Description + Package set optimized for the PowerCloud Systems CAP324 Cloud AP + + The CAP324 Cloud AP is a device sold by PowerCloud Systems + who's stock firmware (CloudCommand) provides 'cloud' based + managment of large numbers of access points. + + The CAP324 is a dual-band 802.11n wireless access point with 16MB + flash and 128MB RAM and single gigabit ethernet port. It can be + powered via PoE or a wall wart. +endef + +$(eval $(call Profile,CAP324)) + +define Profile/CAP324NOCLOUD + NAME:=PowerCloud CAP324 Without Cloud + PACKAGES:=uboot-envtools +endef + +define Profile/CAP324NOCLOUD/Description + Package set optimized for the PowerCloud Systems CAP324 Without Cloud + + The CAP324 Cloud AP is a device sold by PowerCloud Systems + who's stock firmware (CloudCommand) provides 'cloud' based + managment of large numbers of access points. + + The CAP324 is a dual-band 802.11n wireless access point with 16MB + flash and 128MB RAM and single gigabit ethernet port. It can be + powered via PoE or a wall wart. + + WARNING: Will remove certificates used by cloud firmware + After flashing this firmware you will not be able to + return the device to cloud operation. +The advantage is reclaiming flash used for the certificates. +endef + +$(eval $(call Profile,CAP324NOCLOUD)) + diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index d12ad8b..6891b19 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -212,7 +212,6 @@ define Device/gl-domino endef TARGET_DEVICES += gl-domino - define Device/wndr3700 BOARDNAME = WNDR3700 NETGEAR_KERNEL_MAGIC = 0x33373030 @@ -384,6 +383,24 @@ define Device/archer-c7-v2 TPLINK_HWID := 0xc702 endef +define Device/cap324 + BOARDNAME := CAP324 + DEVICE_PROFILE := CAP324 + IMAGE_SIZE = 15296k + MTDPARTS = mtdparts=spi0.0:256k(u-boot),64k(u-boot-env)ro,1536k(kernel),13760k(rootfs),640k(certs),64k(nvram),64k(art),15296k@0x5(firmware) +endef + +TARGET_DEVICES += cap324 + +define Device/cap324-nocloud + BOARDNAME := CAP324 + DEVICE_PROFILE := CAP324NOCLOUD + IMAGE_SIZE = 15296k + MTDPARTS = mtdparts=spi0.0:256k(u-boot),64k(u-boot-env)ro,1536k(kernel),14464k(rootfs),64k(art),16000k@0x5(firmware) +endef + +TARGET_DEVICES += cap324-nocloud + define Device/tl-wdr7500-v3 $(Device/tplink-8mlzma) BOARDNAME := ARCHER-C7 @@ -1443,7 +1460,6 @@ define Build/Clean $(LOADER_MAKE) clean endef - alfa_ap96_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,256k(u-boot-env)ro,13312k(rootfs),2048k(kernel),512k(caldata)ro,15360k@0x8(firmware) alfa_mtdlayout_8M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6144k(rootfs),1600k(kernel),64k(nvram),64k(art)ro,7744k@0x5(firmware) alfa_mtdlayout_16M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,15936k(firmware),64k(nvram),64k(art)ro -- 2.4.3 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/9] ar71xx: PowerCloud CAP324 kernel support To: openwrt-devel@lists.openwrt.org
From: Daniel Dickinson Kernel part of support for PowerCloud CAP324 Cloud AP. The CAP324 Cloud AP was a device sold by PowerCloud Systems as hardware for the CloudCommand service for 'cloud' based managment of large numbers access points. The CAP324 is a dual-band 802.11n wireless access point with 16MB flash and 128MB RAM and single gigabit ethernet port. It can be powered via PoE or a wall wart. --- target/linux/ar71xx/config-4.1 | 1 + target/linux/ar71xx/mikrotik/config-default| 1 + target/linux/ar71xx/nand/config-default| 1 + ...-MIPS-ath79-add-powercloud-cap324-support.patch | 175 + 4 files changed, 178 insertions(+) create mode 100644 target/linux/ar71xx/patches-4.1/823-MIPS-ath79-add-powercloud-cap324-support.patch diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1 index eff197a..7a402a4 100644 --- a/target/linux/ar71xx/config-4.1 +++ b/target/linux/ar71xx/config-4.1 @@ -50,6 +50,7 @@ CONFIG_ATH79_MACH_ARDUINO_YUN=y CONFIG_ATH79_MACH_AW_NR580=y CONFIG_ATH79_MACH_BHU_BXU2000N2_A=y CONFIG_ATH79_MACH_BSB=y +CONFIG_ATH79_MACH_CAP324=y CONFIG_ATH79_MACH_CAP4200AG=y CONFIG_ATH79_MACH_CARAMBOLA2=y CONFIG_ATH79_MACH_CF_E316N_V2=y diff --git a/target/linux/ar71xx/mikrotik/config-default b/target/linux/ar71xx/mikrotik/config-default index de91e4b..c46529c 100644 --- a/target/linux/ar71xx/mikrotik/config-default +++ b/target/linux/ar71xx/mikrotik/config-default @@ -15,6 +15,7 @@ # CONFIG_ATH79_MACH_ARCHER_C7 is not set # CONFIG_ATH79_MACH_AW_NR580 is not set # CONFIG_ATH79_MACH_BHU_BXU2000N2_A is not set +# CONFIG_ATH79_MACH_CAP324 is not set # CONFIG_ATH79_MACH_CAP4200AG is not set # CONFIG_ATH79_MACH_CARAMBOLA2 is not set # CONFIG_ATH79_MACH_CPE510 is not set diff --git a/target/linux/ar71xx/nand/config-default b/target/linux/ar71xx/nand/config-default index 50b6dbe..0407da0 100644 --- a/target/linux/ar71xx/nand/config-default +++ b/target/linux/ar71xx/nand/config-default @@ -13,6 +13,7 @@ # CONFIG_ATH79_MACH_AP96 is not set # CONFIG_ATH79_MACH_ARCHER_C7 is not set # CONFIG_ATH79_MACH_AW_NR580 is not set +# CONFIG_ATH79_MACH_CAP324 is not set # CONFIG_ATH79_MACH_CAP4200AG is not set # CONFIG_ATH79_MACH_CARAMBOLA2 is not set # CONFIG_ATH79_MACH_DB120 is not set diff --git a/target/linux/ar71xx/patches-4.1/823-MIPS-ath79-add-powercloud-cap324-support.patch b/target/linux/ar71xx/patches-4.1/823-MIPS-ath79-add-powercloud-cap324-support.patch new file mode 100644 index 000..2653d24 --- /dev/null +++ b/target/linux/ar71xx/patches-4.1/823-MIPS-ath79-add-powercloud-cap324-support.patch @@ -0,0 +1,175 @@ +--- a/arch/mips/ath79/Kconfig b/arch/mips/ath79/Kconfig +@@ -866,6 +866,16 @@ config ATH79_MACH_MZK_W300NH + select ATH79_DEV_M25P80 + select ATH79_DEV_WMAC + ++config ATH79_MACH_CAP324 ++ bool "PowerCloud Systems CAP324 board support" ++ select SOC_AR934X ++ select ATH79_DEV_AP9X_PCI if PCI ++ select ATH79_DEV_ETH ++ select ATH79_DEV_GPIO_BUTTONS ++ select ATH79_DEV_LEDS_GPIO ++ select ATH79_DEV_M25P80 ++ select ATH79_DEV_WMAC ++ + config ATH79_MACH_RW2458N + bool "Redwave RW2458N board support" + select SOC_AR724X +--- a/arch/mips/ath79/Makefile b/arch/mips/ath79/Makefile +@@ -57,6 +57,7 @@ obj-$(CONFIG_ATH79_MACH_ARCHER_C7) += ma + obj-$(CONFIG_ATH79_MACH_AW_NR580) += mach-aw-nr580.o + obj-$(CONFIG_ATH79_MACH_BHU_BXU2000N2_A)+= mach-bhu-bxu2000n2-a.o + obj-$(CONFIG_ATH79_MACH_BSB) += mach-bsb.o ++obj-$(CONFIG_ATH79_MACH_CAP324) += mach-cap324.o + obj-$(CONFIG_ATH79_MACH_CAP4200AG)+= mach-cap4200ag.o + obj-$(CONFIG_ATH79_MACH_CPE510) += mach-cpe510.o + obj-$(CONFIG_ATH79_MACH_DB120)+= mach-db120.o +--- /dev/null b/arch/mips/ath79/mach-cap324.c +@@ -0,0 +1,133 @@ ++/* ++ * PowerCloud Systems CAP324 board support ++ * ++ * Copyright (C) 2012 Gabor Juhos ++ * Copyright (C) 2012-2013 PowerCloud Systems ++ * Copyright (C) 2015 Daniel Dickinson ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 as published ++ * by the Free Software Foundation. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include "common.h" ++#include "dev-ap9x-pci.h" ++#include "dev-eth.h" ++#include "dev-gpio-buttons.h" ++#include "dev-leds-gpio.h" ++#include "dev-m25p80.h" ++#include "dev-spi.h" ++#include "dev-usb.h" ++#include "dev-wmac.h" ++#include "machtypes.h" ++ ++#define CAP324_GPIO_LED_POWER_GREEN 12 ++#define CAP324_GPIO_LED_POWER_AMBER 13 ++#define CAP324_GPIO_LED_LAN_GREEN 14 ++#define CAP324_GPIO_LED_LAN_AMBER 15 ++#define CAP324_GPIO_LED_WLAN_GREEN18 ++#define CAP324_GPIO_LED_WLAN_AMBER19 ++ ++#define CAP324_GPIO_BTN_RESET 17 ++ ++#define CAP324_KEYS_POLL_INTERVAL 20 /* msecs */ ++#define CAP324_KEYS_DEB
[OpenWrt-Devel] [PATCH 9/9] ar71xx: PowerCloud CR5000 openwrt configuration
From: Daniel Dickinson OpenWrt configuration part of support for the PowerCloud Systems CR5000. The CR5000 is a dual-band 802.11n wireless router with 8MB flash, 64MB RAM, (unused on stock firmware) USB 2.0 port and five port gigabit ethernet switch. The CR5000 was sold as hardware for the Skydog cloud-managed router service. Signed-off-by: Daniel Dickinson --- package/boot/uboot-envtools/files/ar71xx | 1 + target/linux/ar71xx/base-files/etc/board.d/01_leds | 5 + target/linux/ar71xx/base-files/etc/board.d/02_network | 5 + target/linux/ar71xx/base-files/etc/diag.sh | 3 +++ target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 +++ target/linux/ar71xx/base-files/lib/upgrade/platform.sh | 3 ++- 6 files changed, 19 insertions(+), 1 deletion(-) diff --git a/package/boot/uboot-envtools/files/ar71xx b/package/boot/uboot-envtools/files/ar71xx index aed7b0b..a070a5d 100644 --- a/package/boot/uboot-envtools/files/ar71xx +++ b/package/boot/uboot-envtools/files/ar71xx @@ -19,6 +19,7 @@ cap324 | \ cap4200ag | \ carambola2 | \ cr3000 | \ +cr5000 | \ eap300v2 | \ hornet-ub | \ hornet-ub-x2 | \ diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds index e81a889..4a9c2bb 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds @@ -135,6 +135,11 @@ cr3000) ucidef_set_led_wlan "wlan" "WLAN" "pcs:blue:wlan" "phy0tpt" ;; +cr5000) + ucidef_set_led_wlan "wlan" "WLAN" "pcs:blue:wlan" "phy0tpt" + ucidef_set_led_usbdev "usb" "USB" "pcs:white:wps" "1-1" + ;; + db120) ucidef_set_led_usbdev "usb" "USB" "db120:green:usb" "1-1" ;; diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network index 291f9c4..b43be99 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/02_network +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network @@ -33,6 +33,11 @@ epg5000) "0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan" ;; +cr5000) + ucidef_add_switch "switch0" \ + "0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" + ;; + ap136-010 |\ ap147-010) ucidef_set_interfaces_lan_wan "eth0" "eth1" diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index 88f807d..06a0635 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -70,6 +70,9 @@ get_status_led() { cr3000) status_led="pcs:amber:power" ;; + cr5000) + status_led="pcs:amber:power" + ;; db120) status_led="db120:green:status" ;; diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 99c284a..a75b618 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -427,6 +427,9 @@ ar71xx_board_detect() { *CR3000) name="cr3000" ;; + *CR5000) + name="cr5000" + ;; *"DB120 reference board") name="db120" ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index b163161..ca68b5b 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -169,7 +169,8 @@ platform_check_image() { all0258n | \ cap324 | \ cap4200ag | \ - cr3000) + cr3000 |\ + cr5000) platform_check_image_allnet "$1" && return 0 return 1 ;; -- 2.4.3 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 5/9] ar71xx: PowerCloud CR3000 image generation
From: Daniel Dickinson Image generation (and mtd partition) part of support for the PowerCloud Systems CR3000. The CR3000 is a 802.11n 2.4 GHz wireless router with 8MB flash, 64MB RAM, a four port gigabit ethernet switch, and a fast ethernet wan port that was sold by PowerCloud Systems as hardware for the Skydog cloud-managed router service. Signed-off-by: Daniel Dickinson --- target/linux/ar71xx/generic/profiles/pcs.mk | 37 + target/linux/ar71xx/image/Makefile | 18 ++ 2 files changed, 55 insertions(+) diff --git a/target/linux/ar71xx/generic/profiles/pcs.mk b/target/linux/ar71xx/generic/profiles/pcs.mk index b56d131..ec712aa 100644 --- a/target/linux/ar71xx/generic/profiles/pcs.mk +++ b/target/linux/ar71xx/generic/profiles/pcs.mk @@ -71,3 +71,40 @@ endef $(eval $(call Profile,CAP324NOCLOUD)) +define Profile/CR3000 + NAME:=PowerCloud CR3000 Cloud Router + PACKAGES:=uboot-envtools +endef + +define Profile/CR3000/Description + Package set optimized for the PowerCloud Systems CR3000 Cloud Router + + The CR3000 is a 802.11n 2.4 GHz wireless router with + 8MB flash, 64MB RAM, a four port gigabit ethernet switch, + and a faster ethernet wan port that was sold by PowerCloud + Systems as hardware for the Skydog cloud-managed router service. +endef + +$(eval $(call Profile,CR3000)) + +define Profile/CR3000NOCLOUD + NAME:=PowerCloud CR3000 Without Cloud + PACKAGES:=uboot-envtools +endef + +define Profile/CR3000NOCLOUD/Description + Package set optimized for the PowerCloud Systems CR3000 Without Cloud + + The CR3000 is a 802.11n 2.4 GHz wireless router with + 8MB flash, 64MB RAM, a four port gigabit ethernet switch, + and a faster ethernet wan port that was sold by PowerCloud + Systems as hardware for the Skydog cloud-managed router service. + + WARNING: Will remove certificates used by cloud firmware + After flashing this firmware you will not be able to + return the device to cloud operation. +The advantage is reclaiming flash used for the certificates. +endef + +$(eval $(call Profile,CR3000NOCLOUD)) + diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index 6891b19..a537dd0 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -401,6 +401,24 @@ endef TARGET_DEVICES += cap324-nocloud +define Device/cr3000 + BOARDNAME = CR3000 + DEVICE_PROFILE := CR3000 + IMAGE_SIZE = 7808k + MTDPARTS = mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,1408k(kernel),5696k(rootfs),640k(certs),64k(nvram),64k(art)ro,7104k@0x5(firmware) +endef + +TARGET_DEVICES += cr3000 + +define Device/cr3000-nocloud + BOARDNAME := CR3000 + DEVICE_PROFILE := CR3000NOCLOUD + IMAGE_SIZE = 7808k + MTDPARTS = mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,1408k(kernel),6400k(rootfs),64k(nvram),64k(art)ro,7104k@0x5(firmware) +endef + +TARGET_DEVICES += cr3000-nocloud + define Device/tl-wdr7500-v3 $(Device/tplink-8mlzma) BOARDNAME := ARCHER-C7 -- 2.4.3 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 7/9] ar71xx: PowerCloud CR5000 kernel support To: openwrt-devel@lists.openwrt.org
From: Daniel Dickinson Kernel part of support for the PowerCloud Systems CR5000. The CR5000 is a dual-band 802.11n wireless router with 8MB flash, 64 MB RAM, (unused in stock firmware) USB 2.0 port, and five port gigabit ethernet switch. The CR5000 was sold as hardware for the Skydog cloud-managed router service. --- target/linux/ar71xx/config-4.1 | 1 + target/linux/ar71xx/mikrotik/config-default| 1 + target/linux/ar71xx/nand/config-default| 1 + ...-MIPS-ath79-add-powercloud-cr5000-support.patch | 219 + 4 files changed, 222 insertions(+) create mode 100644 target/linux/ar71xx/patches-4.1/825-MIPS-ath79-add-powercloud-cr5000-support.patch diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1 index e1f925c..b49e560 100644 --- a/target/linux/ar71xx/config-4.1 +++ b/target/linux/ar71xx/config-4.1 @@ -56,6 +56,7 @@ CONFIG_ATH79_MACH_CARAMBOLA2=y CONFIG_ATH79_MACH_CF_E316N_V2=y CONFIG_ATH79_MACH_CPE510=y CONFIG_ATH79_MACH_CR3000=y +CONFIG_ATH79_MACH_CR5000=y CONFIG_ATH79_MACH_DB120=y CONFIG_ATH79_MACH_DGL_5500_A1=y CONFIG_ATH79_MACH_DHP_1565_A1=y diff --git a/target/linux/ar71xx/mikrotik/config-default b/target/linux/ar71xx/mikrotik/config-default index d541c0f..88ac6cf 100644 --- a/target/linux/ar71xx/mikrotik/config-default +++ b/target/linux/ar71xx/mikrotik/config-default @@ -20,6 +20,7 @@ # CONFIG_ATH79_MACH_CARAMBOLA2 is not set # CONFIG_ATH79_MACH_CPE510 is not set # CONFIG_ATH79_MACH_CR3000 is not set +# CONFIG_ATH79_MACH_CR5000 is not set # CONFIG_ATH79_MACH_DB120 is not set # CONFIG_ATH79_MACH_DGL_5500_A1 is not set # CONFIG_ATH79_MACH_DHP_1565_A1 is not set diff --git a/target/linux/ar71xx/nand/config-default b/target/linux/ar71xx/nand/config-default index e875c76..314dbeb 100644 --- a/target/linux/ar71xx/nand/config-default +++ b/target/linux/ar71xx/nand/config-default @@ -17,6 +17,7 @@ # CONFIG_ATH79_MACH_CAP4200AG is not set # CONFIG_ATH79_MACH_CARAMBOLA2 is not set # CONFIG_ATH79_MACH_CR3000 is not set +# CONFIG_ATH79_MACH_CR5000 is not set # CONFIG_ATH79_MACH_DB120 is not set # CONFIG_ATH79_MACH_DIR_505_A1 is not set # CONFIG_ATH79_MACH_DIR_600_A1 is not set diff --git a/target/linux/ar71xx/patches-4.1/825-MIPS-ath79-add-powercloud-cr5000-support.patch b/target/linux/ar71xx/patches-4.1/825-MIPS-ath79-add-powercloud-cr5000-support.patch new file mode 100644 index 000..5edd4b3 --- /dev/null +++ b/target/linux/ar71xx/patches-4.1/825-MIPS-ath79-add-powercloud-cr5000-support.patch @@ -0,0 +1,219 @@ +--- a/arch/mips/ath79/Kconfig b/arch/mips/ath79/Kconfig +@@ -886,6 +886,17 @@ config ATH79_MACH_CR3000 + select ATH79_DEV_M25P80 + select ATH79_DEV_WMAC + ++config ATH79_MACH_CR5000 ++ bool "PowerCloud Systems CR5000 support" ++ select SOC_AR934X ++ select ATH79_DEV_AP9X_PCI if PCI ++ select ATH79_DEV_ETH ++ select ATH79_DEV_GPIO_BUTTONS ++ select ATH79_DEV_LEDS_GPIO ++ select ATH79_DEV_M25P80 ++ select ATH79_DEV_USB ++ select ATH79_DEV_WMAC ++ + config ATH79_MACH_RW2458N + bool "Redwave RW2458N board support" + select SOC_AR724X +--- a/arch/mips/ath79/Makefile b/arch/mips/ath79/Makefile +@@ -61,6 +61,7 @@ obj-$(CONFIG_ATH79_MACH_CAP324) += mach + obj-$(CONFIG_ATH79_MACH_CAP4200AG)+= mach-cap4200ag.o + obj-$(CONFIG_ATH79_MACH_CPE510) += mach-cpe510.o + obj-$(CONFIG_ATH79_MACH_CR3000) += mach-cr3000.o ++obj-$(CONFIG_ATH79_MACH_CR5000) += mach-cr5000.o + obj-$(CONFIG_ATH79_MACH_DB120)+= mach-db120.o + obj-$(CONFIG_ATH79_MACH_DLAN_PRO_500_WP) += mach-dlan-pro-500-wp.o + obj-$(CONFIG_ATH79_MACH_DLAN_PRO_1200_AC) += mach-dlan-pro-1200-ac.o +--- /dev/null b/arch/mips/ath79/mach-cr5000.c +@@ -0,0 +1,176 @@ ++/* ++ * PowerCloud CR5000 support ++ * ++ * Copyright (c) 2011 Qualcomm Atheros ++ * Copyright (c) 2011-2012 Gabor Juhos ++ * Copyright (c) 2012-2013 PowerCloud Systems ++ * Copyright (c) 2015 Daniel Dickinson ++ * ++ * Permission to use, copy, modify, and/or distribute this software for any ++ * purpose with or without fee is hereby granted, provided that the above ++ * copyright notice and this permission notice appear in all copies. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES ++ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF ++ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ++ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ++ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ++ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include "common.h" ++#include "dev-ap9x-pci.h" +
[OpenWrt-Devel] [PATCH 3/9] ar71xx: PowerCloud CAP324 OpenWrt configuration
From: Daniel Dickinson Openwrt configuration part of support for PowerCloud CAP324 Cloud AP. The CAP324 Cloud AP is a device sold by PowerCloud Systems who's stock firmware (CloudCommand) provides 'cloud' based managment of large numbers access points. The CAP324 is a dual-band 802.11n wireless access point with 16MB flash and 128MB RAM and single gigabit ethernet port. It can be powered via PoE or a wall wart. Signed-off-by: Daniel Dickinson --- package/boot/uboot-envtools/files/ar71xx | 1 + target/linux/ar71xx/base-files/etc/board.d/01_leds | 6 ++ target/linux/ar71xx/base-files/etc/board.d/02_network | 1 + target/linux/ar71xx/base-files/etc/diag.sh | 3 +++ target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 +++ target/linux/ar71xx/base-files/lib/upgrade/platform.sh | 1 + 6 files changed, 15 insertions(+) diff --git a/package/boot/uboot-envtools/files/ar71xx b/package/boot/uboot-envtools/files/ar71xx index 0c81f328..4a9bec5 100644 --- a/package/boot/uboot-envtools/files/ar71xx +++ b/package/boot/uboot-envtools/files/ar71xx @@ -15,6 +15,7 @@ board=$(ar71xx_board_name) case "$board" in all0258n | \ +cap324 | \ cap4200ag | \ carambola2 | \ eap300v2 | \ diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds index 892b567..6a17d82 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds @@ -92,6 +92,12 @@ bxu2000n-2-a1) ucidef_set_led_wlan "wlan" "WLAN" "bhu:green:wlan" "phy0tpt" ;; +cap324) + ucidef_set_led_netdev "lan" "LAN" "pcs:green:lan" "eth0" + ucidef_set_led_wlan "wlan_amber" "WLAN_AMBER" "pcs:amber:wlan" "phy0tpt" + ucidef_set_led_wlan "wlan_green" "WLAN_GREEN" "pcs:green:wlan" "phy1tpt" + ;; + cap4200ag) ucidef_set_led_default "lan_green" "LAN_GREEN" "senao:green:lan" "1" ucidef_set_led_wlan "wlan_amber" "WLAN_AMBER" "senao:amber:wlan" "phy0tpt" diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network index ed47dcf..869d30f 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/02_network +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network @@ -306,6 +306,7 @@ antminer-s1 |\ antminer-s3 |\ aw-nr580 |\ bullet-m |\ +cap324 |\ cap4200ag |\ eap300v2 |\ eap7660d |\ diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index a8e1721..8f8fe32 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -55,6 +55,9 @@ get_status_led() { bxu2000n-2-a1) status_led="bhu:green:status" ;; + cap324) + status_led="pcs:green:power" + ;; cap4200ag) status_led="senao:green:pwr" ;; diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index df77040..7e239b6 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -411,6 +411,9 @@ ar71xx_board_detect() { *AW-NR580) name="aw-nr580" ;; + *CAP324) + name="cap324" + ;; *CAP4200AG) name="cap4200ag" ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 41886e3..23e87e3 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -167,6 +167,7 @@ platform_check_image() { case "$board" in all0315n | \ all0258n | \ + cap324 | \ cap4200ag) platform_check_image_allnet "$1" && return 0 return 1 -- 2.4.3 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 6/9] ar71xx: PowerCloud CR3000 OpenWrt configuration
From: Daniel Dickinson OpenWRt configuration part of support for the PowerCloud Systems CR3000. The CR3000 is a 802.11n 2.4 GHz wireless router with 8MB flash, 64MB RAM, a four port gigabit ethernet switch, and a fast ethernet wan port that was sold by PowerCloud Systems as hardware for the Skydog cloud-managed router service. Signed-off-by: Daniel Dickinson --- package/boot/uboot-envtools/files/ar71xx | 1 + target/linux/ar71xx/base-files/etc/board.d/01_leds | 9 + target/linux/ar71xx/base-files/etc/board.d/02_network | 6 ++ target/linux/ar71xx/base-files/etc/diag.sh | 3 +++ target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 +++ target/linux/ar71xx/base-files/lib/upgrade/platform.sh | 3 ++- 6 files changed, 24 insertions(+), 1 deletion(-) diff --git a/package/boot/uboot-envtools/files/ar71xx b/package/boot/uboot-envtools/files/ar71xx index 4a9bec5..aed7b0b 100644 --- a/package/boot/uboot-envtools/files/ar71xx +++ b/package/boot/uboot-envtools/files/ar71xx @@ -18,6 +18,7 @@ all0258n | \ cap324 | \ cap4200ag | \ carambola2 | \ +cr3000 | \ eap300v2 | \ hornet-ub | \ hornet-ub-x2 | \ diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds index 6a17d82..e81a889 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds @@ -126,6 +126,15 @@ cpe510) ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "tp-link:green:link4" "wlan0" "76" "100" "-75" "13" ;; +cr3000) + ucidef_set_led_netdev "wan" "WAN" "pcs:blue:wan" "eth1" + ucidef_set_led_switch "lan1" "LAN1" "pcs:blue:lan1" "switch0" "0x04" + ucidef_set_led_switch "lan2" "LAN2" "pcs:blue:lan2" "switch0" "0x08" + ucidef_set_led_switch "lan3" "LAN3" "pcs:blue:lan3" "switch0" "0x10" + ucidef_set_led_switch "lan4" "LAN4" "pcs:blue:lan4" "switch0" "0x02" + ucidef_set_led_wlan "wlan" "WLAN" "pcs:blue:wlan" "phy0tpt" + ;; + db120) ucidef_set_led_usbdev "usb" "USB" "db120:green:usb" "1-1" ;; diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network index 869d30f..291f9c4 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/02_network +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network @@ -247,6 +247,12 @@ wzr-hp-g300nh) "0:lan" "1:lan" "2:lan" "3:lan" "5@eth0" ;; +cr3000) + ucidef_set_interfaces_lan_wan "eth0.1" "eth1" + ucidef_add_switch "switch0" "1" "1" + ucidef_add_switch_vlan "switch0" "1" "0t 1 2 3 4" + ;; + dgl-5500-a1 |\ dir-825-c1) local mac diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index 8f8fe32..88f807d 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -67,6 +67,9 @@ get_status_led() { cpe510) status_led="tp-link:green:link4" ;; + cr3000) + status_led="pcs:amber:power" + ;; db120) status_led="db120:green:status" ;; diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 7e239b6..99c284a 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -424,6 +424,9 @@ ar71xx_board_detect() { name="cpe510" tplink_pharos_board_detect ;; + *CR3000) + name="cr3000" + ;; *"DB120 reference board") name="db120" ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 23e87e3..b163161 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -168,7 +168,8 @@ platform_check_image() { all0315n | \ all0258n | \ cap324 | \ - cap4200ag) + cap4200ag | \ + cr3000) platform_check_image_allnet "$1" && return 0 return 1 ;; -- 2.4.3 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 8/9] ar71xx: PowerCloud CR5000 image generation
From: Daniel Dickinson Image generation (and mtd parititioning) part of support for the PowerCloud Systems CR5000. The CR5000 is a dual-band 802.11n wireless router with 8MB flash, 64MB RAM, (unused on stock firmware) USB 2.0 port and five port gigabit ethernet switch. The CR5000 was sold as hardware for the Skydog cloud-managed router service. Signed-off-by: Daniel Dickinson --- target/linux/ar71xx/generic/profiles/pcs.mk | 37 + target/linux/ar71xx/image/Makefile | 18 ++ 2 files changed, 55 insertions(+) diff --git a/target/linux/ar71xx/generic/profiles/pcs.mk b/target/linux/ar71xx/generic/profiles/pcs.mk index ec712aa..e912d9d 100644 --- a/target/linux/ar71xx/generic/profiles/pcs.mk +++ b/target/linux/ar71xx/generic/profiles/pcs.mk @@ -108,3 +108,40 @@ endef $(eval $(call Profile,CR3000NOCLOUD)) +define Profile/CR5000 + NAME:=PowerCloud CR5000 Cloud Router + PACKAGES:=uboot-envtools kmod-usb-core kmod-usb2 kmod-usb-ohci kmod-ledtrig-usbdev +endef + +define Profile/CR5000/Description + Package set optimized for the PowerCloud Systems CR5000 Cloud Router + + The CR5000 is a dual-band 802.11n wireless router with 8MB flash, + 64MB RAM, (unused on stock firmware) USB 2.0 port and five port + gigabit ethernet switch. The CR5000 was sold as hardware for + the Skydog cloud-managed router service. +endef + +$(eval $(call Profile,CR5000)) + +define Profile/CR5000NOCLOUD + NAME:=PowerCloud CR5000 Without Cloud + PACKAGES:=uboot-envtools kmod-usb-core kmod-usb2 kmod-usb-ohci kmod-ledtrig-usbdev +endef + +define Profile/CR5000NOCLOUD/Description + Package set optimized for the PowerCloud Systems CR5000 Without Cloud + + The CR5000 is a dual-band 802.11n wireless router with 8MB flash, + 64MB RAM, (unused on stock firmware) USB 2.0 port and five port + gigabit ethernet switch. The CR5000 was sold as hardware for + the Skydog cloud-managed router service. + + WARNING: Will remove certificates used by cloud firmware + After flashing this firmware you will not be able to + return the device to cloud operation. +The advantage is reclaiming flash used for the certificates. +endef + +$(eval $(call Profile,CR5000NOCLOUD)) + diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index a537dd0..72e04dc 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -419,6 +419,24 @@ endef TARGET_DEVICES += cr3000-nocloud +define Device/cr5000 + BOARDNAME = CR5000 + DEVICE_PROFILE := CR5000 + IMAGE_SIZE = 7808k + MTDPARTS = mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,1408k(kernel),5696k(rootfs),640k(certs),64k(nvram),64k(art)ro,7104k@0x5(firmware) +endef + +TARGET_DEVICES += cr5000 + +define Device/cr5000 + BOARDNAME := CR5000 + DEVICE_PROFILE := CR5000NOCLOUD + IMAGE_SIZE = 7808k + MTDPARTS = mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,1408k(kernel),6400k(rootfs),64k(art)ro,7808k@0x5(firmware) +endef + +TARGET_DEVICES += cr5000-nocloud + define Device/tl-wdr7500-v3 $(Device/tplink-8mlzma) BOARDNAME := ARCHER-C7 -- 2.4.3 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 4/9] ar71xx: PowerCloud CR3000 kernel support To: openwrt-devel@lists.openwrt.org
From: Daniel Dickinson Kernel part of support package for PowerCloud CR3000. The CR3000 is a 802.11n 2.4 GHz wireless router with 8MB flash, 64MB RAM, a four port gigabit ethernet switch, and a fast ethernet wan port which was sold by PowerCloud Systems as hardware for the Skydog cloud-managed router service. --- target/linux/ar71xx/config-4.1 | 1 + target/linux/ar71xx/mikrotik/config-default| 1 + target/linux/ar71xx/nand/config-default| 1 + ...-MIPS-ath79-add-powercloud-cr3000-support.patch | 203 + 4 files changed, 206 insertions(+) create mode 100644 target/linux/ar71xx/patches-4.1/824-MIPS-ath79-add-powercloud-cr3000-support.patch diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1 index 7a402a4..e1f925c 100644 --- a/target/linux/ar71xx/config-4.1 +++ b/target/linux/ar71xx/config-4.1 @@ -55,6 +55,7 @@ CONFIG_ATH79_MACH_CAP4200AG=y CONFIG_ATH79_MACH_CARAMBOLA2=y CONFIG_ATH79_MACH_CF_E316N_V2=y CONFIG_ATH79_MACH_CPE510=y +CONFIG_ATH79_MACH_CR3000=y CONFIG_ATH79_MACH_DB120=y CONFIG_ATH79_MACH_DGL_5500_A1=y CONFIG_ATH79_MACH_DHP_1565_A1=y diff --git a/target/linux/ar71xx/mikrotik/config-default b/target/linux/ar71xx/mikrotik/config-default index c46529c..d541c0f 100644 --- a/target/linux/ar71xx/mikrotik/config-default +++ b/target/linux/ar71xx/mikrotik/config-default @@ -19,6 +19,7 @@ # CONFIG_ATH79_MACH_CAP4200AG is not set # CONFIG_ATH79_MACH_CARAMBOLA2 is not set # CONFIG_ATH79_MACH_CPE510 is not set +# CONFIG_ATH79_MACH_CR3000 is not set # CONFIG_ATH79_MACH_DB120 is not set # CONFIG_ATH79_MACH_DGL_5500_A1 is not set # CONFIG_ATH79_MACH_DHP_1565_A1 is not set diff --git a/target/linux/ar71xx/nand/config-default b/target/linux/ar71xx/nand/config-default index 0407da0..e875c76 100644 --- a/target/linux/ar71xx/nand/config-default +++ b/target/linux/ar71xx/nand/config-default @@ -16,6 +16,7 @@ # CONFIG_ATH79_MACH_CAP324 is not set # CONFIG_ATH79_MACH_CAP4200AG is not set # CONFIG_ATH79_MACH_CARAMBOLA2 is not set +# CONFIG_ATH79_MACH_CR3000 is not set # CONFIG_ATH79_MACH_DB120 is not set # CONFIG_ATH79_MACH_DIR_505_A1 is not set # CONFIG_ATH79_MACH_DIR_600_A1 is not set diff --git a/target/linux/ar71xx/patches-4.1/824-MIPS-ath79-add-powercloud-cr3000-support.patch b/target/linux/ar71xx/patches-4.1/824-MIPS-ath79-add-powercloud-cr3000-support.patch new file mode 100644 index 000..79f8bcc --- /dev/null +++ b/target/linux/ar71xx/patches-4.1/824-MIPS-ath79-add-powercloud-cr3000-support.patch @@ -0,0 +1,203 @@ +--- a/arch/mips/ath79/Kconfig b/arch/mips/ath79/Kconfig +@@ -876,6 +876,16 @@ config ATH79_MACH_CAP324 + select ATH79_DEV_M25P80 + select ATH79_DEV_WMAC + ++config ATH79_MACH_CR3000 ++ bool "PowerCloud Systems CR3000 board support" ++ select SOC_AR934X ++ select ATH79_DEV_AP9X_PCI if PCI ++ select ATH79_DEV_ETH ++ select ATH79_DEV_GPIO_BUTTONS ++ select ATH79_DEV_LEDS_GPIO ++ select ATH79_DEV_M25P80 ++ select ATH79_DEV_WMAC ++ + config ATH79_MACH_RW2458N + bool "Redwave RW2458N board support" + select SOC_AR724X +--- a/arch/mips/ath79/Makefile b/arch/mips/ath79/Makefile +@@ -60,6 +60,7 @@ obj-$(CONFIG_ATH79_MACH_BSB) += mach-bs + obj-$(CONFIG_ATH79_MACH_CAP324) += mach-cap324.o + obj-$(CONFIG_ATH79_MACH_CAP4200AG)+= mach-cap4200ag.o + obj-$(CONFIG_ATH79_MACH_CPE510) += mach-cpe510.o ++obj-$(CONFIG_ATH79_MACH_CR3000) += mach-cr3000.o + obj-$(CONFIG_ATH79_MACH_DB120)+= mach-db120.o + obj-$(CONFIG_ATH79_MACH_DLAN_PRO_500_WP) += mach-dlan-pro-500-wp.o + obj-$(CONFIG_ATH79_MACH_DLAN_PRO_1200_AC) += mach-dlan-pro-1200-ac.o +--- /dev/null b/arch/mips/ath79/mach-cr3000.c +@@ -0,0 +1,161 @@ ++/* ++ * PowerCloud Systems CR3000 support ++ * ++ * Copyright (c) 2011 Qualcomm Atheros ++ * Copyright (c) 2011-2012 Gabor Juhos ++ * Copyright (c) 2012-2013 PowerCloud Systems ++ * Copyright (c) 2015 Daniel Dickinson ++ * ++ * Permission to use, copy, modify, and/or distribute this software for any ++ * purpose with or without fee is hereby granted, provided that the above ++ * copyright notice and this permission notice appear in all copies. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES ++ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF ++ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ++ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ++ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ++ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include "common.h" ++#include "dev-ap9x-pci.h" ++#include "dev-eth.
[OpenWrt-Devel] Add experimental Golang support (GCCGO)
GCC 5 now supports Go 1.4 which is modern enough to make building Go programs practical for systems supported by OpenWrt. (Actually GCCGO which is the GCC-based golang compile which will build Go 1.4 projects but is a different stack than the standard golang environment which does not (to my knowledge) support a number of OpenWrt's architectures especially MIPS). So GCCGO support actually brings Go cross-building support to a number of platforms for which it was not previously available. Go is not all that suitable for the smaller side of OpenWrt devices (e.g. 64MB RAM, 8 MB flash), but is potentially useful on more modern hardware, and/or where OpenWrt is being used on bigger iron (like x86_64 NAS projects). ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] [toolchain]: Add experimental GCCGO support
From: Daniel Dickinson Packages can use TARGET_GOC for the gnugcc compiler. No generic packaging defaults have been added as I'm not sure what that should look like or if there are even sensible defaults for the Go projects out there. Currently only patches for GCC 5 - previous versions of GCC will need similar work. Also note that GCC 5 is required for Go 1.4; previous versions of GCC only support Go 1.1 therefore a dependency on GCC version will be required by many packages. Signed-off-by: Daniel Dickinson --- rules.mk | 4 + toolchain/gcc/Config.in| 8 ++ toolchain/gcc/common.mk| 10 +- toolchain/gcc/final/Makefile | 2 +- .../5.2.0/960-add-libm-for-extra-langs.patch | 39 +++ .../5.2.0/970-fix-go-mprof-use-uninitialized.patch | 13 +++ .../980-fix-missing-glibc-types-with-musl.patch| 119 + .../gcc/patches/5.2.0/990-fix-skip-gotools.patch | 26 + 8 files changed, 216 insertions(+), 5 deletions(-) create mode 100644 toolchain/gcc/patches/5.2.0/960-add-libm-for-extra-langs.patch create mode 100644 toolchain/gcc/patches/5.2.0/970-fix-go-mprof-use-uninitialized.patch create mode 100644 toolchain/gcc/patches/5.2.0/980-fix-missing-glibc-types-with-musl.patch create mode 100644 toolchain/gcc/patches/5.2.0/990-fix-skip-gotools.patch diff --git a/rules.mk b/rules.mk index 1e7549f..2bda73c 100644 --- a/rules.mk +++ b/rules.mk @@ -187,6 +187,8 @@ else endif endif +TARGET_CFLAGS_GO=$(TARGET_CFLAGS) -g1 + export PATH:=$(TARGET_PATH) export STAGING_DIR STAGING_DIR_HOST export SH_FUNC:=. $(INCLUDE_DIR)/shell.sh; @@ -214,6 +216,7 @@ endif BUILD_KEY=$(TOPDIR)/key-build TARGET_CC:=$(TARGET_CROSS)gcc +TARGET_GOC:=$(TARGET_CROSS)gccgo TARGET_CXX:=$(TARGET_CROSS)g++ KPATCH:=$(SCRIPT_DIR)/patch-kernel.sh SED:=$(STAGING_DIR_HOST)/bin/sed -i -e @@ -253,6 +256,7 @@ TARGET_CONFIGURE_OPTS = \ LD=$(TARGET_CROSS)ld \ NM="$(TARGET_NM)" \ CC="$(TARGET_CC)" \ + GOC="$(TARGET_GOC)" \ GCC="$(TARGET_CC)" \ CXX="$(TARGET_CXX)" \ RANLIB="$(TARGET_RANLIB)" \ diff --git a/toolchain/gcc/Config.in b/toolchain/gcc/Config.in index a8c39d6..e89b81a 100644 --- a/toolchain/gcc/Config.in +++ b/toolchain/gcc/Config.in @@ -72,3 +72,11 @@ config INSTALL_GFORTRAN default n help Build/install GNU fortran compiler ? + +config INSTALL_GOLANG + bool + prompt "Build/install golang compiler?" if TOOLCHAINOPTS + default n + help + Build/install GNU golang compiler ? + diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk index 3e4f3ee..54e8f2d 100644 --- a/toolchain/gcc/common.mk +++ b/toolchain/gcc/common.mk @@ -101,7 +101,7 @@ HOST_STAMP_CONFIGURED:=$(GCC_BUILD_DIR)/.configured HOST_STAMP_INSTALLED:=$(STAGING_DIR_HOST)/stamp/.gcc_$(GCC_VARIANT)_installed SEP:=, -TARGET_LANGUAGES:="c,c++$(if $(CONFIG_INSTALL_LIBGCJ),$(SEP)java)$(if $(CONFIG_INSTALL_GFORTRAN),$(SEP)fortran)" +TARGET_LANGUAGES:="c,c++$(if $(CONFIG_INSTALL_LIBGCJ),$(SEP)java)$(if $(CONFIG_INSTALL_GFORTRAN),$(SEP)fortran)$(if $(CONFIG_INSTALL_GOLANG),$(SEP)go)" export libgcc_cv_fixed_point=no ifdef CONFIG_USE_UCLIBC @@ -122,8 +122,9 @@ GCC_CONFIGURE:= \ SHELL="$(BASH)" \ $(if $(shell gcc --version 2>&1 | grep LLVM), \ CFLAGS="-O2 -fbracket-depth=512 -pipe" \ - CXXFLAGS="-O2 -fbracket-depth=512 -pipe" \ - ) \ + CXXFLAGS="-O2 -fbracket-depth=512 -pipe" \ +) \ + $(if $(CONFIG_USE_MUSL),CONFIG_USE_MUSL="-DCONFIG_USE_MUSL") \ $(HOST_SOURCE_DIR)/configure \ --with-bugurl=$(BUGURL) \ --with-pkgversion="$(PKGVERSION)" \ @@ -199,7 +200,8 @@ GCC_MAKE:= \ $(MAKE) \ CFLAGS="$(HOST_CFLAGS)" \ CFLAGS_FOR_TARGET="$(TARGET_CFLAGS)" \ - CXXFLAGS_FOR_TARGET="$(TARGET_CFLAGS)" + CXXFLAGS_FOR_TARGET="$(TARGET_CFLAGS)" \ + GOCFLAGS_FOR_TARGET="-O2 -g $(if $(CONFIG_USE_MUSL),-DCONFIG_USE_MUSL)" define Host/Prepare mkdir -p $(GCC_BUILD_DIR) diff --git a/toolchain/gcc/final/Makefile b/toolchain/gcc/final/Makefile index 3434d89..224dbdb 100644 --- a/toolchain/gcc/final/Makefile +++ b/toolchain/gcc/final/Makefile @@ -44,7 +44,7 @@ define Host/Compile endef define SetupExtraArch - for app in $(TOOLCHAIN_DIR)/bin/$(OPTIMIZE_FOR_CPU)*-{gcc,gcc-*,g++}; do \ + for app in $(TOOLCHAIN_DIR)/bin/$(OPTIMIZE_FOR_CPU)*-{gcc,gcc-*,g++,gccgo}; do \ [ -e app ] || continue; \ old_base=(basename app); \ new_base=$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_NAME))-{old_base##$(OPTIMIZE_FOR_CPU)-}; \ diff --git a/toolchain/gcc/patches/5.2.0/960-add-libm-for-extra-langs.patch b/toolchain/gcc/patches/5.2.0/960-add-libm-for-extra-langs.patch new file mode
[OpenWrt-Devel] [PATCH] openssl: add config option for no_hw support
The hardware support is required by some 3rd party engines (tpm) Signed-off-by: Florian Eckert --- package/libs/openssl/Config.in | 5 + package/libs/openssl/Makefile | 9 +++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/package/libs/openssl/Config.in b/package/libs/openssl/Config.in index b0a29c5..e2aa10d 100644 --- a/package/libs/openssl/Config.in +++ b/package/libs/openssl/Config.in @@ -25,4 +25,9 @@ config OPENSSL_ENGINE_DIGEST depends on OPENSSL_ENGINE_CRYPTO prompt "Digests acceleration support" +config OPENSSL_HARDWARE_SUPPORT + bool + default n + prompt "Enable hardware support" + endmenu diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile index 17f7d03..5358e35 100644 --- a/package/libs/openssl/Makefile +++ b/package/libs/openssl/Makefile @@ -29,7 +29,8 @@ PKG_CONFIG_DEPENDS:= \ CONFIG_OPENSSL_ENGINE_DIGEST \ CONFIG_OPENSSL_WITH_EC \ CONFIG_OPENSSL_WITH_EC2M \ - CONFIG_OPENSSL_WITH_SSL3 + CONFIG_OPENSSL_WITH_SSL3 \ + CONFIG_OPENSSL_HARDWARE_SUPPORT include $(INCLUDE_DIR)/package.mk @@ -89,7 +90,7 @@ endef OPENSSL_NO_CIPHERS:= no-idea no-md2 no-mdc2 no-rc5 no-sha0 no-camellia no-krb5 -OPENSSL_OPTIONS:= shared no-err no-hw zlib-dynamic no-sse2 no-ssl2 +OPENSSL_OPTIONS:= shared no-err zlib-dynamic no-sse2 no-ssl2 ifdef CONFIG_OPENSSL_ENGINE_CRYPTO OPENSSL_OPTIONS += -DHAVE_CRYPTODEV @@ -112,6 +113,10 @@ ifndef CONFIG_OPENSSL_WITH_SSL3 OPENSSL_OPTIONS += no-ssl3 endif +ifndef CONFIG_OPENSSL_HARDWARE_SUPPORT + OPENSSL_OPTIONS += no-hw +endif + ifeq ($(CONFIG_x86_64),y) OPENSSL_TARGET:=linux-x86_64-openwrt OPENSSL_MAKEFLAGS += LIBDIR=lib -- 2.1.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 2/9] ar71xx: PowerCloud CAP324 image generation To: openwrt-devel@lists.openwrt.org
On 2015-12-09 10:21, open...@daniel.thecshore.com wrote: > From: Daniel Dickinson > > Image generation (and mtd partition) part of support for > PowerCloud CAP324 Cloud AP. The CAP324 Cloud AP is a device sold by > PowerCloud Systems who's stock firmware (CloudCommand) provides > 'cloud' based managment of large numbers of access points. > > The CAP324 is a dual-band 802.11n wireless access point with 16MB flash > and 128MB RAM and single gigabit ethernet port. It can be powered via > PoE or a wall wart. > --- > target/linux/ar71xx/generic/profiles/pcs.mk | 44 > + > target/linux/ar71xx/image/Makefile | 20 +++-- > 2 files changed, 62 insertions(+), 2 deletions(-) > > diff --git a/target/linux/ar71xx/generic/profiles/pcs.mk > b/target/linux/ar71xx/generic/profiles/pcs.mk > index 1399ef4..b56d131 100644 > --- a/target/linux/ar71xx/generic/profiles/pcs.mk > +++ b/target/linux/ar71xx/generic/profiles/pcs.mk > @@ -27,3 +27,47 @@ define Profile/DLRTDEV01/Description > endef > > $(eval $(call Profile,DLRTDEV01)) > + > +define Profile/CAP324 > + NAME:=PowerCloud CAP324 Cloud AP > + PACKAGES:=uboot-envtools > +endef > + > +define Profile/CAP324/Description > + Package set optimized for the PowerCloud Systems CAP324 Cloud AP > + > + The CAP324 Cloud AP is a device sold by PowerCloud Systems > + who's stock firmware (CloudCommand) provides 'cloud' based > + managment of large numbers of access points. > + > + The CAP324 is a dual-band 802.11n wireless access point with 16MB > + flash and 128MB RAM and single gigabit ethernet port. It can be > + powered via PoE or a wall wart. > +endef > + > +$(eval $(call Profile,CAP324)) > + > +define Profile/CAP324NOCLOUD > + NAME:=PowerCloud CAP324 Without Cloud > + PACKAGES:=uboot-envtools > +endef > + > +define Profile/CAP324NOCLOUD/Description > + Package set optimized for the PowerCloud Systems CAP324 Without Cloud > + > + The CAP324 Cloud AP is a device sold by PowerCloud Systems > + who's stock firmware (CloudCommand) provides 'cloud' based > + managment of large numbers of access points. > + > + The CAP324 is a dual-band 802.11n wireless access point with 16MB > + flash and 128MB RAM and single gigabit ethernet port. It can be > + powered via PoE or a wall wart. > + > + WARNING: Will remove certificates used by cloud firmware > + After flashing this firmware you will not be able to > + return the device to cloud operation. > +The advantage is reclaiming flash used for the certificates. > +endef > + > +$(eval $(call Profile,CAP324NOCLOUD)) Having two profiles here is overkill, please change that. You can refer to the same profile from multiple Device/* sections. - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 8/9] ar71xx: PowerCloud CR5000 image generation
On 2015-12-09 10:21, open...@daniel.thecshore.com wrote: > From: Daniel Dickinson > > Image generation (and mtd parititioning) part of support for the > PowerCloud Systems CR5000. The CR5000 is a dual-band 802.11n > wireless router with 8MB flash, 64MB RAM, (unused on stock firmware) > USB 2.0 port and five port gigabit ethernet switch. The CR5000 > was sold as hardware for the Skydog cloud-managed router service. > > Signed-off-by: Daniel Dickinson > --- > target/linux/ar71xx/generic/profiles/pcs.mk | 37 > + > target/linux/ar71xx/image/Makefile | 18 ++ > 2 files changed, 55 insertions(+) > diff --git a/target/linux/ar71xx/image/Makefile > b/target/linux/ar71xx/image/Makefile > index a537dd0..72e04dc 100644 > --- a/target/linux/ar71xx/image/Makefile > +++ b/target/linux/ar71xx/image/Makefile > @@ -419,6 +419,24 @@ endef > > TARGET_DEVICES += cr3000-nocloud > > +define Device/cr5000 > + BOARDNAME = CR5000 > + DEVICE_PROFILE := CR5000 > + IMAGE_SIZE = 7808k > + MTDPARTS = > mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,1408k(kernel),5696k(rootfs),640k(certs),64k(nvram),64k(art)ro,7104k@0x5(firmware) > +endef > + > +TARGET_DEVICES += cr5000 > + > +define Device/cr5000 > + BOARDNAME := CR5000 > + DEVICE_PROFILE := CR5000NOCLOUD > + IMAGE_SIZE = 7808k > + MTDPARTS = > mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,1408k(kernel),6400k(rootfs),64k(art)ro,7808k@0x5(firmware) > +endef Should be cr5000-nocloud. Did you test this? Also, the mtd layout looks wrong to me. Kill the kernel/rootfs partitions, add just the firmware part in their place (without the explicit offset), and let the kernel figure out the kernel/rootfs split. Same applies to your other patches as well. - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 1/9] ar71xx: PowerCloud CAP324 kernel support To: openwrt-devel@lists.openwrt.org
On 2015-12-09 10:21, open...@daniel.thecshore.com wrote: > From: Daniel Dickinson > > Kernel part of support for PowerCloud CAP324 Cloud AP. > The CAP324 Cloud AP was a device sold by PowerCloud Systems as hardware for > the CloudCommand service for 'cloud' based managment of large numbers > access points. > > The CAP324 is a dual-band 802.11n wireless access point with 16MB flash > and 128MB RAM and single gigabit ethernet port. It can be powered via PoE > or a wall wart. > --- > target/linux/ar71xx/config-4.1 | 1 + > target/linux/ar71xx/mikrotik/config-default| 1 + > target/linux/ar71xx/nand/config-default| 1 + > ...-MIPS-ath79-add-powercloud-cap324-support.patch | 175 > + > 4 files changed, 178 insertions(+) > create mode 100644 > target/linux/ar71xx/patches-4.1/823-MIPS-ath79-add-powercloud-cap324-support.patch > > diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1 > index eff197a..7a402a4 100644 > --- a/target/linux/ar71xx/config-4.1 > +++ b/target/linux/ar71xx/config-4.1 > @@ -50,6 +50,7 @@ CONFIG_ATH79_MACH_ARDUINO_YUN=y > CONFIG_ATH79_MACH_AW_NR580=y > CONFIG_ATH79_MACH_BHU_BXU2000N2_A=y > CONFIG_ATH79_MACH_BSB=y > +CONFIG_ATH79_MACH_CAP324=y > CONFIG_ATH79_MACH_CAP4200AG=y > CONFIG_ATH79_MACH_CARAMBOLA2=y > CONFIG_ATH79_MACH_CF_E316N_V2=y > diff --git a/target/linux/ar71xx/mikrotik/config-default > b/target/linux/ar71xx/mikrotik/config-default > index de91e4b..c46529c 100644 > --- a/target/linux/ar71xx/mikrotik/config-default > +++ b/target/linux/ar71xx/mikrotik/config-default > @@ -15,6 +15,7 @@ > # CONFIG_ATH79_MACH_ARCHER_C7 is not set > # CONFIG_ATH79_MACH_AW_NR580 is not set > # CONFIG_ATH79_MACH_BHU_BXU2000N2_A is not set > +# CONFIG_ATH79_MACH_CAP324 is not set > # CONFIG_ATH79_MACH_CAP4200AG is not set > # CONFIG_ATH79_MACH_CARAMBOLA2 is not set > # CONFIG_ATH79_MACH_CPE510 is not set > diff --git a/target/linux/ar71xx/nand/config-default > b/target/linux/ar71xx/nand/config-default > index 50b6dbe..0407da0 100644 > --- a/target/linux/ar71xx/nand/config-default > +++ b/target/linux/ar71xx/nand/config-default > @@ -13,6 +13,7 @@ > # CONFIG_ATH79_MACH_AP96 is not set > # CONFIG_ATH79_MACH_ARCHER_C7 is not set > # CONFIG_ATH79_MACH_AW_NR580 is not set > +# CONFIG_ATH79_MACH_CAP324 is not set > # CONFIG_ATH79_MACH_CAP4200AG is not set > # CONFIG_ATH79_MACH_CARAMBOLA2 is not set > # CONFIG_ATH79_MACH_DB120 is not set > diff --git > a/target/linux/ar71xx/patches-4.1/823-MIPS-ath79-add-powercloud-cap324-support.patch > > b/target/linux/ar71xx/patches-4.1/823-MIPS-ath79-add-powercloud-cap324-support.patch > new file mode 100644 > index 000..2653d24 > --- /dev/null > +++ > b/target/linux/ar71xx/patches-4.1/823-MIPS-ath79-add-powercloud-cap324-support.patch > @@ -0,0 +1,175 @@ > +--- a/arch/mips/ath79/Kconfig > b/arch/mips/ath79/Kconfig Seems like we've been accumulating separate patches for adding individual boards again, I'm going to clean up that stuff later. When you've fixed the issues that I've pointed out already, please also restructure your patches to add the mach files individually, then a commit that integrates your boards into 700-MIPS-ath79-openwrt-machines.patch, then the image build integration patches. - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] linux: add support of Synopsys ARCHS38-based boards
This patch introduces support of new boards with ARC HS38 cores. ARC HS38 is a new generation of ARC cores which utilize ARCv2 ISA. Because of new ISA ARC HS38 are binary incompatible with ARC 700 cores which requires both separate toolchain and target applications including Linux kernel for that new cores. As with ARC770 we're addind support for 2 boards for now: [1] Synopsys SDP board (AXS103) This is the same base-board as in AXS101 but with FPGA-based CPU-tile where ARCHs38 core is implemented. [2] nSIM Again this is the same simulation engine but configured for new instruction set and features of new CPU. Cc: Felix Fietkau Cc: Jo-Philipp Wich Cc: Jonas Gorski Signed-off-by: Alexey Brodkin --- include/target.mk | 1 + target/linux/archs38/Makefile | 27 +++ target/linux/archs38/base-files.mk | 3 + .../archs38/base-files/etc/board.d/02_network | 19 ++ target/linux/archs38/base-files/lib/arc.sh | 50 + .../base-files/lib/preinit/01_preinit_arc.sh | 9 + target/linux/archs38/config-4.3| 190 + target/linux/archs38/dts/axc003_idu.dtsi | 126 target/linux/archs38/dts/axs103_idu.dts| 25 +++ target/linux/archs38/dts/axs10x_mb.dtsi| 224 + target/linux/archs38/dts/nsim_hs_idu.dts | 73 +++ target/linux/archs38/dts/skeleton.dtsi | 37 .../linux/archs38/generic/profiles/00-default.mk | 16 ++ .../linux/archs38/generic/profiles/01-minimal.mk | 15 ++ target/linux/archs38/generic/profiles/02-axs103.mk | 16 ++ .../linux/archs38/generic/profiles/03-nsim_hs.mk | 15 ++ target/linux/archs38/generic/target.mk | 8 + target/linux/archs38/image/Makefile| 40 ...openwrt-arc-remove-dependency-on-DEVTMPFS.patch | 36 .../0002-openwrt-arc-add-OWRTDTB-section.patch | 91 + toolchain/gcc/common.mk| 1 + toolchain/uClibc/common.mk | 3 +- toolchain/uClibc/config/archs | 10 + 23 files changed, 1034 insertions(+), 1 deletion(-) create mode 100644 target/linux/archs38/Makefile create mode 100644 target/linux/archs38/base-files.mk create mode 100755 target/linux/archs38/base-files/etc/board.d/02_network create mode 100644 target/linux/archs38/base-files/lib/arc.sh create mode 100644 target/linux/archs38/base-files/lib/preinit/01_preinit_arc.sh create mode 100644 target/linux/archs38/config-4.3 create mode 100644 target/linux/archs38/dts/axc003_idu.dtsi create mode 100644 target/linux/archs38/dts/axs103_idu.dts create mode 100644 target/linux/archs38/dts/axs10x_mb.dtsi create mode 100644 target/linux/archs38/dts/nsim_hs_idu.dts create mode 100644 target/linux/archs38/dts/skeleton.dtsi create mode 100644 target/linux/archs38/generic/profiles/00-default.mk create mode 100644 target/linux/archs38/generic/profiles/01-minimal.mk create mode 100644 target/linux/archs38/generic/profiles/02-axs103.mk create mode 100644 target/linux/archs38/generic/profiles/03-nsim_hs.mk create mode 100644 target/linux/archs38/generic/target.mk create mode 100644 target/linux/archs38/image/Makefile create mode 100644 target/linux/archs38/patches-4.3/0001-openwrt-arc-remove-dependency-on-DEVTMPFS.patch create mode 100644 target/linux/archs38/patches-4.3/0002-openwrt-arc-add-OWRTDTB-section.patch create mode 100644 toolchain/uClibc/config/archs diff --git a/include/target.mk b/include/target.mk index f129298..009738a 100644 --- a/include/target.mk +++ b/include/target.mk @@ -264,6 +264,7 @@ ifeq ($(DUMP),1) ifeq ($(ARCH),arc) CPU_TYPE ?= arc700 CPU_CFLAGS_arc700 = -marc700 +CPU_CFLAGS_archs38 = -marchs endif DEFAULT_CFLAGS=$(strip $(CPU_CFLAGS) $(CPU_CFLAGS_$(CPU_TYPE)) $(CPU_CFLAGS_$(CPU_SUBTYPE))) endif diff --git a/target/linux/archs38/Makefile b/target/linux/archs38/Makefile new file mode 100644 index 000..855954a --- /dev/null +++ b/target/linux/archs38/Makefile @@ -0,0 +1,27 @@ +# +# Copyright (C) 2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk + +ARCH:=arc +CPU_TYPE:=archs +BOARD:=archs38 +BOARDNAME:=Synopsys DesignWare ARC HS38 +CFLAGS:=-Os -pipe -fno-caller-saves -matomic +MAINTAINER:=Alexey Brodkin +SUBTARGETS:=generic + +KERNEL_PATCHVER:=4.3 + +DEVICE_TYPE:=developerboard + +include $(INCLUDE_DIR)/target.mk + +define Target/Description + Synopsys DesignWare boards +endef + +$(eval $(call BuildTarget)) diff --git a/target/linux/archs38/base-files.mk b/target/linux/archs38/base-files.mk new file mode 100644 index 000..fdd2c71 --- /dev/null +++ b/target/linux/archs38/base-files.mk @@ -0,0 +1,3 @@ +define Package/base-files/install-target + rm -f $(1)/etc/co
Re: [OpenWrt-Devel] [PATCH v6 5/6] ar71xx: scan nand ubi partition for ath9k eeprom files
On Mon, Dec 7, 2015 at 7:48 PM, Yousong Zhou wrote: > On 7 December 2015 at 23:55, Chris Blake wrote: >> Yousong, >> >> Sorry to come back so fast, but how would moving the skip to hexdump >> help the code in any way? For example, we are currently using: >> >> dd bs=1 skip=$offset count=6 if=/dev/$part 2>/dev/null | hexdump -v -n >> 6 -e '5/1 "%02x:" 1/1 "%02x"' >> >> If we move the skip to hexdump, then we would also need to remove the >> count from dd, which means the entire partition is then piped into >> hexdump which to me seems to be a lot less efficient than the current >> implementation above. >> > > I used the following command before for fetching MAC addresses from > mtd devices. Not sure if it also works for ubi devices... > > hexdump -v -n 6 -s 0x1fc00 -e '5/1 "%02x:" 1/1 "%02x""\n"' /dev/mtd2 > > P.S. please avoid top posting > > Cheers, > yousong > > Will do, and thanks for the advice. As for UBI I was able to get it working, so expect all requested changes to be in the next patch revision. (along with a patch to fix up mtd_get_mac_binary) Thanks again! - Chris Blake >> On Mon, Dec 7, 2015 at 9:42 AM, Yousong Zhou wrote: >>> >>> Am 07.12.2015 22:12 schrieb "Chris Blake" : Hey Yousong, looking at the hexdump comment, this function was actually based off of the function mtd_get_mac_binary() which uses the same dd offset logic as you can see in mtd_get_mac_binary_ubi(). If this were to be changed, shouldn't the same change apply to mtd_get_mac_binary()? >>> >>> Yes, it should >>> I know this would require a new patch, but just want to make sure we are on the same page. >>> >>> Previously, I thought mtd_get_mac_binary_ubi was a new function and not >>> aware of its resemblence to mtd_get_mac_binary. A new patch is good if we >>> think it can help improve the code even though it is mostly unrelated in the >>> whole series. >>> >>> And a new nitpick crawls out below... >>> Regards, Chris Blake On Sun, Dec 6, 2015 at 10:05 PM, Yousong Zhou wrote: > Hello, Christian, a few nitpicks inline :) > > On 6 December 2015 at 06:48, Christian Lamparter > wrote: >> From: Chris R Blake >> >> The MR18 stores the ath9k eeprom values on the NAND. >> This patch makes it possible to retrieve the images >> from there. >> >> Signed-off-by: Chris R Blake >> --- >> package/base-files/files/lib/functions/system.sh| 17 >> + >> .../base-files/etc/hotplug.d/firmware/10-ath9k-eeprom | 6 +- >> 2 files changed, 22 insertions(+), 1 deletion(-) >> >> diff --git a/package/base-files/files/lib/functions/system.sh >> b/package/base-files/files/lib/functions/system.sh >> index 8d75a5a..928a429 100644 >> --- a/package/base-files/files/lib/functions/system.sh >> +++ b/package/base-files/files/lib/functions/system.sh >> @@ -41,6 +41,23 @@ mtd_get_mac_binary() { >> dd bs=1 skip=$offset count=6 if=$part 2>/dev/null | hexdump -v >> -n 6 -e '5/1 "%02x:" 1/1 "%02x"' >> } >> >> +mtd_get_mac_binary_ubi() { >> + local mtdname="$1" >> + local offset="$2" >> + >> + . /lib/upgrade/nand.sh >> + >> + local ubidev=$( nand_find_ubi $CI_UBIPART ) >> + local part="$( nand_find_volume $ubidev $1 )" > > Quotes and padding whitespaces are not need here for consistency of code > style. > >> + >> + if [ -z "$part" ]; then >> + echo "mtd_get_mac_binary: ubi partition $mtdname not >> found!" >&2 >>> >>> Here the error message should be reworded. >>> >>> yousong >>> >> + return >> + fi >> + >> + dd bs=1 skip=$offset count=6 if=/dev/$part 2>/dev/null | >> hexdump -v -n 6 -e '5/1 "%02x:" 1/1 "%02x"' > > hexdump accepts an argument for offset with -s option > >> +} >> + >> mtd_get_part_size() { >> local part_name=$1 >> local first dev size erasesize name >> diff --git >> a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom >> b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom >> index b5f0588..7287809 100644 >> --- >> a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom >> +++ >> b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom >> @@ -9,11 +9,14 @@ ath9k_eeprom_extract() { >> local part=$1 >> local offset=$2 >> local count=$3 >> + local ubidev=$( nand_find_ubi $CI_UBIPART ) >> local mtd >> >> mtd=$(find_mtd_chardev $part) >> [ -n "$mtd" ] || \ >> - ath9k_eeprom_die "no mtd device found for
[OpenWrt-Devel] First boot provisioning
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hello, I would want to start some discussion about first boot provisioning and theoretical inclusion of some script into default images. Today, if somebody want some automatic way to autoconfigure OpenWrt boxes, he has to create its own image. But if there is some possibility directly in OpenWrt, how to do some well-documented procedure during first boot, first boot auto configuration could be offloaded from image. I know there are some security issues. But I think that such procedure could be very tiny and efficient. For example, it is very easy to write handler for reset button /etc/rc.button/reset : if [ "$SEEN" -lt 1 ] then echo "REBOOT" > /dev/console sync reboot elif [ "$SEEN" -gt 10 ] then ( echo "PROVISIONING" wget -q -O- http://openwrt-prov/opkg.repo >/etc/opkg/provisioned.conf packages=$(wget -q -O- http://openwrt-prov/default/opkg.install) [ -n "$packages" ] && opkg update && opkg install $packages ) 2>&1 | logger elif [ "$SEEN" -gt 5 ] then echo "FACTORY RESET" > /dev/console jffs2reset -y && reboot & fi so if you press reset button for more than 10 seconds, box will download two files from some server. One which can add some local repositories and second to get package names to install. Next to this, it will do opkg update and install. There are more ways how to trigger first boot procedure. This is only proof of concept. Another way is to include this procedure in uci-defaults and run each time when device is in factory defaults mode. Some questions: - - How to form url? Which url? - - Is it secure to download some external content by default? No, but this will hapen only during first boot. - - Should this procedure be manual? eg. it needs to press button or automaticaly? Thank you for any comments/opinions :) regards, Lukas Macura -BEGIN PGP SIGNATURE- Version: GnuPG v2 iQIcBAEBCAAGBQJWaDtIAAoJEITo2zD2c2OSgM8QAI0poNY6aLUm6tgxqPm3h/5b l9PR8tlEQjmG8Q8NSHlnk6kgxoDipZ34MdbdRRVI1P5IYa72yoB2MD7Wz5L8rq6D CsIUBvUxcBlUsLWGEb8mC1iEjJFRXFjz6GuQAJ7ChAJTi++YCbWjPLhnew75svY4 PsvvSZsOY7oDeAjcXpnJBMpU4OzvfdJWM5jvT1ee6Jp+WfuU7fnXEnll5JLMDhTO I9OZB/O5XMIYgk81o5awyPQRAiW9tbsmbmoMmsphnEmjjTpRE7vmzMU1B5DlXj6B Q7ZHyGEtIgw77s8JcS5sQs60Jg6lVbrC2icNP9HO8POoPQQpJyHEzO60AjDJVzUG PRgnLlEQtqFu3SGQzPts70o8OKZaj6AiV5ulCyEZ+juulExDLD+bLBfD15vZvhNV S/GAhzDbZ2lzmjEKpTYbdXsWwx9qU6/40NbN9no7xcSCZtz4S8kRI9FjXW7rPNqP RZ3jP0J5gA6R1U8ib2mRNX8uoG2vU3c3TMUPrIgsYP6YkSUp9o0FNl8To+onwTTH ZqD0u3IxU/lRuKSZA5S+PjiwZB/iysRzgHKnDhgU4hW+1H7TTjoy7lSY+UeuJGLj 8Z258C8Nfdle1yWZ4RECe0z8MTSTBDRBn713D2Upl7Pq/0jCL3V7uHo5cMZ17EXp 0/5/Q4/Kxj11yWADZZDD =ud97 -END PGP SIGNATURE- ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH v5] Add support for Ubiquiti EdgeRouter X (UBNT-ERX)
Hi. I know you guys a probably very busy, but could you please confirm that this is the right list to submit such patches and format of this patch is correct - so I could fix it if it's not. Thanks! 2015-12-03 2:16 GMT-05:00 Nikolay Martynov : > This router is based on MT7621 SoC, no wifi, nand. > > Works: > * Boots. > * Ethernet. > * Switch. > * Button (reset). > * Flashing OpenWrt from stock firmware. > * Upgrading OpenWrt. > > Doesn't work: > * No GPIO leds. All leds are controlled by switch, > but stock firmware was able to control them. > * SoC has crypto engine but no open driver. > * SoC has nat acceleration, but no open driver. > * This router has 2MB spi flash soldered in but MT > nand/spi drivers do not support pin sharing, > so it is not accessable and disabled. Stock > firmware could read it and it was empty. > > Unknown status: PoE support. > > Router has serial pins populated. If looking at the top > of the router, then counting from Eth sockets pins go as: > 'GND, RX, TX, GND'. 3.3v, 57600. > > U-boot bootloader supports tftpboot, controlled from serial. > This router has two kernel partitions: 'live' and 'backup'. > They are swapped during flashing (on both stock and OpenWrt). > Active partition is controlled by a flag in factory partition. > U-boot has cusotm command to switch active kernel partition. > Kernel partitions are 'bare flash' 3MB. Stock bootloader has > no UBI support. Stock rootfs is UBIFS. > > Flashing procedure. > Stock firmware uses custom kernel patch to mount squashfs > from a file that is located on UBIFS volume. This makes wiping > out this volume from within stock firmware difficult. > Instead this patch builds image that is flashable by stock firmware > and contains initrams image (with minimal set of packages > to fit into kernel partition). Once this is flashed one can reboot > into initramfs OpenWrt and use sysupgrade to flash OpenWrt including > rootfs into nand. > Note: factory image is only built if initramfs image is enabled. > > v2: Fix building all mt7621 targets along with ubnt-erx. > v3: Undo change to MT7621 nand partitions, make nand detection > less likely to affect other nands. > v4: Update as per Piotr Dymacz comments. > v5: Fix upgrading code to actually upgrade kernel. > > Signed-off-by: Nikolay Martynov > --- > package/system/procd/files/nand.sh | 4 + > .../linux/ramips/base-files/etc/board.d/02_network | 1 + > target/linux/ramips/base-files/lib/ramips.sh | 5 +- > .../ramips/base-files/lib/upgrade/platform.sh | 24 + > target/linux/ramips/base-files/lib/upgrade/ubnt.sh | 71 + > target/linux/ramips/dts/MT7621.dts | 22 > target/linux/ramips/dts/UBNT-ERX.dts | 117 > + > target/linux/ramips/dts/mt7621.dtsi| 20 > target/linux/ramips/image/Makefile | 61 ++- > target/linux/ramips/mt7621/profiles/ubnt.mk| 17 +++ > .../patches-3.18/0901-spansion_nand_id_fix.patch | 43 > 11 files changed, 363 insertions(+), 22 deletions(-) > create mode 100644 target/linux/ramips/base-files/lib/upgrade/ubnt.sh > create mode 100644 target/linux/ramips/dts/UBNT-ERX.dts > create mode 100644 target/linux/ramips/mt7621/profiles/ubnt.mk > create mode 100644 > target/linux/ramips/patches-3.18/0901-spansion_nand_id_fix.patch > > diff --git a/package/system/procd/files/nand.sh > b/package/system/procd/files/nand.sh > index 0c179cb..67867da 100644 > --- a/package/system/procd/files/nand.sh > +++ b/package/system/procd/files/nand.sh > @@ -275,6 +275,10 @@ nand_upgrade_tar() { > nand_do_upgrade_stage2() { > local file_type=$(identify $1) > > + if type 'platform_nand_pre_upgrade' >/dev/null 2>/dev/null; then > + platform_nand_pre_upgrade "$1" > + fi > + > [ ! "$(find_mtd_index "$CI_UBIPART")" ] && CI_UBIPART="rootfs" > > case "$file_type" in > diff --git a/target/linux/ramips/base-files/etc/board.d/02_network > b/target/linux/ramips/base-files/etc/board.d/02_network > index 7e51229..de81553 100755 > --- a/target/linux/ramips/base-files/etc/board.d/02_network > +++ b/target/linux/ramips/base-files/etc/board.d/02_network > @@ -122,6 +122,7 @@ ramips_setup_interfaces() > f5d8235-v2|\ > hg255d|\ > rt-n14u|\ > + ubnt-erx|\ > ur-326n4g|\ > wrtnode|\ > wt3020|\ > diff --git a/target/linux/ramips/base-files/lib/ramips.sh > b/target/linux/ramips/base-files/lib/ramips.sh > index 92e13c0..ba23939 100755 > --- a/target/linux/ramips/base-files/lib/ramips.sh > +++ b/target/linux/ramips/base-files/lib/ramips.sh > @@ -349,6 +349,9 @@ ramips_board_detect() { > *"TEW-692GR") > name="tew-692gr" > ;; > + *"UBNT-ERX") > + name="ubnt-erx" > + ;; > *"UR-326N4G") > name="ur-326n4g" > ;; > @@
[OpenWrt-Devel] Ubiquiti UniFI AC Lite
Does anyone know who's maintaining this page? https://wiki.openwrt.org/toh/ubiquiti/unifiac Want to give out a hand with that porting. Cheers, A ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [OpenWrt] openwrt build system costs: support of or foundation over?
Dave, I would define $220 monthly as significant. I've talked with management at prpl and we're all on board with funding monthly infrastructure as we have offered in the past. If we had a list of people who are running build servers, what the build servers are building (which device are they building for, etc), who is running the server, and what their costs are. I think your idea of a broker and spreadsheet are perfect. As a way to put more visibility in the work, I think we should put the relevant public info about the build servers on the wiki. Could you head that up Dave to get this process moving? I think we're with you on grants for dev work; this has come up in more than a few prpl meetings as of late. There are some new members coming in to prpl in the new year who are very interested in funding a grant program for OpenWrt. I think how it would work might be a little fuzzy still on our end but I think we'll work it out. Eric On Tue, Dec 8, 2015 at 10:39 AM, Dave Taht wrote: > On Mon, Dec 7, 2015 at 8:26 PM, Eric Schultz > wrote: > > Dave, > > > > Thanks for bringing this up. Based upon my conversations at the OpenWrt > > summit and observations, an official OpenWrt Foundation would be a > positive > > development. I heard at least a few companies say that they want to help > but > > they don't even know who to pay in some cases. > > I was figuring that nobody knows who to pay in most cases! > > This was why my thinking was more towards having a broker-like > arrangement for various things. We put up a spreadsheet of existing > costs. it's pretty easy to defend expanding the build cluster > system(s) to some point of diminishing return, and merely getting that > tiny amount done - with X number of companies contributing to it - > would be a start. Everybody can then point proudly at everything more > often lit up green at: > > http://buildbot.openwrt.org:8010/grid > > on their "what I'm doing for open source" promo material - and revel > in a personal or product build that works the first time more often - > and everybody's happy. > > Having a set of goals clearly expressed by all sides on this, and > other matters, openly, would be a start. > > What is happening instead: companies that should be investing a little > in basic infrastructure, into basic tools, and - building quality, > responsiveness, and good software engineering methods into everything > they use... > > instead get focused on features that they want, that's "missing", and > the quality of the rest of the system is hit or miss. > > I was struck a few days back looking at: > > http://rdkcentral.com/about-rdk/ > > when 99.99% of the code, and quality, needs to be delivered in the > linux portion of the stack, which is otherwise represented as this > tiny, "obviously working" slice of the chart. They are still running > Linux 2.6 over there last I looked > > progress and quality does not happen automagically. There has always > been a disconnect between engineers building better software, and > companies shipping products, and it would be nice to find more ways to > communicate across and close the gaps. > > This is one of my all time favorite satires of the problems all sides > face in delivering good products: > > https://www.youtube.com/watch?v=KowAEqHpftI > > > There's lots of reasons why > > this has been the case but, in the end, more clarity in governance and > > process would go a long way to help here. I'm happy to personally help > but > > the committers are really the ones who have to drive this. > > And they are pretty busy and tend to disagree a lot. :) Which was part > of openwrt's strength during the Great recession - they couldn't be > bought and folded up like embedded alley and montavista were. > > Something - whatever that thing is - needs to be democratic, neutral, > and trusted. Perhaps writing down everybody wishlist of needs would be > a start... > > > On a related topic, prpl is contracting with me to facilitate and help > build > > a distributed test platform for OpenWrt. The goal is somewhat similar in > > design to Kernel CI but handles testing of upstream nightlies on devices > as > > well as boot. I'd like to have you involved and I'll be sending out the > > participation information soon for next week's kickoff meeting. > Obviously, > > that platform will require regularly built images so if those don't exist > > then we would have to address that. > > Good. We need more and better testbeds, and I certainly agree that > getting to where stuff could be flashed, abused, and tested on a > regular basis would be great. I really hate it when I flash a brick. > > testbed note here: > > Over in make-wifi-fast land at kau.se we finally are doing testing of > the cake algorithms on a realistic testbed that can simulate long rtts > to 105mbit. It took 6 months to get to this point > > And we are starting to boot up the ath9k based x86 testbed where we > hope to at least get to gbit, on the budge
[OpenWrt-Devel] Board detection for Lamobo R1 fails
Hi, I'm trying to use the /etc/board.d/02_network board specific defaults for the Lamobo R1 (like the integrated switch) which got recently committed. Apparently in sunxi_board_detect() the following case does not match: model="$( cat /proc/device-tree/model )" case "$model" in ... "Lamobo R1") board="lamobo-r1" ;; as the output from /proc/device-tree/model is root@OpenWrt:/etc/board.d# cat /proc/device-tree/model Lamobo Banana Pi R1 which is the value from linux-sunxi/u-boot-Lamobo_R1/u-boot-2015.07/arch/arm/dts/sun7i-a20-lamobo- r1.dts In the end the board name in /tmp/sysinfo/model ends up being "generic" and the 02_network script does nothing. Kind regards, Vasco ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] ncurses: Fix build of libncursew
Packages using libncursesw can fail to build if both libncurses and libncursesw are not installed. Currently the ncurses.h file is installed in "usr/include/ncursesw" directory and includes other .h files in the "usr/include" directory incorrectly. For example: Including fails due to these references. These build changes will set the correct include paths within the developer includes. Packages that expect ncurses.h (or curses.h) in the default "usr/include" path fail even when expecting to build with libncursesw and will need to be fixed as well. However, they cannot be fixed until this patch is applied. Signed-off-by: Ted Hess --- package/libs/ncurses/Makefile | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/package/libs/ncurses/Makefile b/package/libs/ncurses/Makefile index 1f7ea9b..924033f 100644 --- a/package/libs/ncurses/Makefile +++ b/package/libs/ncurses/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2013 OpenWrt.org +# Copyright (C) 2006-2015 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ncurses PKG_VERSION:=5.9 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz @@ -91,6 +91,7 @@ endif ifeq ($(BUILD_VARIANT),libncursesw) CONFIGURE_ARGS += \ --enable-widec \ + --includedir="/usr/include/ncursesw" \ --with-build-cppflags=-D_GNU_SOURCE endif @@ -138,7 +139,7 @@ endef ifeq ($(BUILD_VARIANT),libncursesw) define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include/ncursesw/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/ncursesw/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/ncursesw/*.h $(1)/usr/include/ncursesw/ $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ncurses,panel,menu,form}w.{a,so*} $(1)/usr/lib/ -- 2.5.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] kernel: Add dummy sound driver
Useful when using sound players that can send to icecast, etc. without any sound device attached. Signed-off-by: Ted Hess --- diff --git a/package/kernel/linux/modules/sound.mk b/package/kernel/linux/modules/sound.mk index 603bb70..d09cf21 100644 --- a/package/kernel/linux/modules/sound.mk +++ b/package/kernel/linux/modules/sound.mk @@ -273,3 +273,19 @@ define KernelPackage/pcspkr/description endef $(eval $(call KernelPackage,pcspkr)) + +define KernelPackage/sound-dummy + $(call AddDepends/sound) + TITLE:=Null sound output driver (sink) + KCONFIG:= \ + CONFIG_SND_DUMMY + FILES:= \ + $(LINUX_DIR)/sound/drivers/snd-dummy.ko + AUTOLOAD:=$(call AutoLoad,32,snd-dummy) +endef + +define KernelPackage/sound_dummy/description + Dummy sound device for Alsa when no hardware present +endef + +$(eval $(call KernelPackage,sound-dummy)) -- 2.5.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 1/9] ar71xx: PowerCloud CAP324 kernel support To: openwrt-devel@lists.openwrt.org
Seems like we've been accumulating separate patches for adding individual boards again, I'm going to clean up that stuff later. When you've fixed the issues that I've pointed out already, please also restructure your patches to add the mach files individually, then a commit that integrates your boards into 700-MIPS-ath79-openwrt-machines.patch, then the image build integration patches. Sorry, I'm not 100% sure I follow, so let me make sure I'm understanding: You no longer want to have individual patches in target/linux/xxx/patches/ for each board, so the commit series should be to do each board separately in terms of commit, but which each affect 700-MIPS-ath79-openwrt-machines.patch rather than being in individual patches. That is the adding mach-xxx.c becomes part of 700-MIPS-ath79-... ? Or should the mach file be added somewhere else (e.g. somewhere in the target/linux/ar71xx tree and referenced by patch 700-MIPS-... for the KConfig and Makefile and so on? It would be perhaps useful to have some documentation on dev.openwrt.org pointing to expected board patch guidelines. Regards, Daniel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 8/9] ar71xx: PowerCloud CR5000 image generation
Should be cr5000-nocloud. Did you test this? I compiled but had overlooked the missing image. Also, the mtd layout looks wrong to me. Kill the kernel/rootfs partitions, add just the firmware part in their place (without the explicit offset), and let the kernel figure out the kernel/rootfs split. Same applies to your other patches as well. Ok, I didn't know that was possible now; these are based on patches that have been around for ages now, but never quite got integrated. Given this is actually possible, there are clearly rather a lot of boards that could get cleaned up wrt to this. Regards, Daniel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 1/9] ar71xx: PowerCloud CAP324 kernel support To: openwrt-devel@lists.openwrt.org
On 2015-12-09 21:02, Daniel Dickinson wrote: >> Seems like we've been accumulating separate patches for adding >> individual boards again, I'm going to clean up that stuff later. When >> you've fixed the issues that I've pointed out already, please also >> restructure your patches to add the mach files individually, then a >> commit that integrates your boards into >> 700-MIPS-ath79-openwrt-machines.patch, then the image build integration >> patches. > > > Sorry, I'm not 100% sure I follow, so let me make sure I'm understanding: > > You no longer want to have individual patches in > target/linux/xxx/patches/ for each board, so the commit series should be to > > do each board separately in terms of commit, but which each affect > 700-MIPS-ath79-openwrt-machines.patch rather than being in individual > patches. > > That is the adding mach-xxx.c becomes part of 700-MIPS-ath79-... ? mach-xxx.c should go to files/arch/mips/ath79/ instead of patches/ > Or should the mach file be added somewhere else (e.g. somewhere in the > target/linux/ar71xx tree and referenced by patch 700-MIPS-... for the > KConfig and Makefile and so on? > > > It would be perhaps useful to have some documentation on dev.openwrt.org > pointing to expected board patch guidelines. This mess really is ar71xx specific. On targets that have been converted to device tree (e.g. ramips), things are a lot easier and cleaner. Maybe some day ar71xx will be converted to run device tree too, but I'm not sure if anybody's actively working on this. - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 1/9] ar71xx: PowerCloud CAP324 kernel support To: openwrt-devel@lists.openwrt.org
On 2015-12-09 21:47, Felix Fietkau wrote: > On 2015-12-09 21:02, Daniel Dickinson wrote: >>> Seems like we've been accumulating separate patches for adding >>> individual boards again, I'm going to clean up that stuff later. When >>> you've fixed the issues that I've pointed out already, please also >>> restructure your patches to add the mach files individually, then a >>> commit that integrates your boards into >>> 700-MIPS-ath79-openwrt-machines.patch, then the image build integration >>> patches. >> >> >> Sorry, I'm not 100% sure I follow, so let me make sure I'm understanding: >> >> You no longer want to have individual patches in >> target/linux/xxx/patches/ for each board, so the commit series should be to >> >> do each board separately in terms of commit, but which each affect >> 700-MIPS-ath79-openwrt-machines.patch rather than being in individual >> patches. >> >> That is the adding mach-xxx.c becomes part of 700-MIPS-ath79-... ? > mach-xxx.c should go to files/arch/mips/ath79/ instead of patches/ Actually, now that I think about it again, I will probably change the structure so that we don't have to touch patches/ for new boards anymore. It's just annoying to maintain, considering how many boards we have. - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] linux: add support of Synopsys ARCHS38-based boards
On 12/09/2015 03:16 PM, Alexey Brodkin wrote: > This patch introduces support of new boards with ARC HS38 cores. > > ARC HS38 is a new generation of ARC cores which utilize ARCv2 ISA. > Because of new ISA ARC HS38 are binary incompatible with ARC 700 > cores which requires both separate toolchain and target applications > including Linux kernel for that new cores. > > As with ARC770 we're addind support for 2 boards for now: > > [1] Synopsys SDP board (AXS103) > This is the same base-board as in AXS101 but with > FPGA-based CPU-tile where ARCHs38 core is implemented. > > [2] nSIM > Again this is the same simulation engine but configured for > new instruction set and features of new CPU. > > Cc: Felix Fietkau > Cc: Jo-Philipp Wich > Cc: Jonas Gorski > Signed-off-by: Alexey Brodkin > --- > include/target.mk | 1 + > target/linux/archs38/Makefile | 27 +++ > target/linux/archs38/base-files.mk | 3 + > .../archs38/base-files/etc/board.d/02_network | 19 ++ > target/linux/archs38/base-files/lib/arc.sh | 50 + > .../base-files/lib/preinit/01_preinit_arc.sh | 9 + > target/linux/archs38/config-4.3| 190 + > target/linux/archs38/dts/axc003_idu.dtsi | 126 > target/linux/archs38/dts/axs103_idu.dts| 25 +++ > target/linux/archs38/dts/axs10x_mb.dtsi| 224 > + > target/linux/archs38/dts/nsim_hs_idu.dts | 73 +++ > target/linux/archs38/dts/skeleton.dtsi | 37 > .../linux/archs38/generic/profiles/00-default.mk | 16 ++ > .../linux/archs38/generic/profiles/01-minimal.mk | 15 ++ > target/linux/archs38/generic/profiles/02-axs103.mk | 16 ++ > .../linux/archs38/generic/profiles/03-nsim_hs.mk | 15 ++ > target/linux/archs38/generic/target.mk | 8 + > target/linux/archs38/image/Makefile| 40 > ...openwrt-arc-remove-dependency-on-DEVTMPFS.patch | 36 > .../0002-openwrt-arc-add-OWRTDTB-section.patch | 91 + > toolchain/gcc/common.mk| 1 + > toolchain/uClibc/common.mk | 3 +- > toolchain/uClibc/config/archs | 10 + > 23 files changed, 1034 insertions(+), 1 deletion(-) > create mode 100644 target/linux/archs38/Makefile > create mode 100644 target/linux/archs38/base-files.mk > create mode 100755 target/linux/archs38/base-files/etc/board.d/02_network > create mode 100644 target/linux/archs38/base-files/lib/arc.sh > create mode 100644 > target/linux/archs38/base-files/lib/preinit/01_preinit_arc.sh > create mode 100644 target/linux/archs38/config-4.3 > create mode 100644 target/linux/archs38/dts/axc003_idu.dtsi > create mode 100644 target/linux/archs38/dts/axs103_idu.dts > create mode 100644 target/linux/archs38/dts/axs10x_mb.dtsi > create mode 100644 target/linux/archs38/dts/nsim_hs_idu.dts > create mode 100644 target/linux/archs38/dts/skeleton.dtsi > create mode 100644 target/linux/archs38/generic/profiles/00-default.mk > create mode 100644 target/linux/archs38/generic/profiles/01-minimal.mk > create mode 100644 target/linux/archs38/generic/profiles/02-axs103.mk > create mode 100644 target/linux/archs38/generic/profiles/03-nsim_hs.mk > create mode 100644 target/linux/archs38/generic/target.mk > create mode 100644 target/linux/archs38/image/Makefile > create mode 100644 > target/linux/archs38/patches-4.3/0001-openwrt-arc-remove-dependency-on-DEVTMPFS.patch > create mode 100644 > target/linux/archs38/patches-4.3/0002-openwrt-arc-add-OWRTDTB-section.patch > create mode 100644 toolchain/uClibc/config/archs > > diff --git a/include/target.mk b/include/target.mk > index f129298..009738a 100644 > --- a/include/target.mk > +++ b/include/target.mk > @@ -264,6 +264,7 @@ ifeq ($(DUMP),1) >ifeq ($(ARCH),arc) > CPU_TYPE ?= arc700 > CPU_CFLAGS_arc700 = -marc700 > +CPU_CFLAGS_archs38 = -marchs >endif >DEFAULT_CFLAGS=$(strip $(CPU_CFLAGS) $(CPU_CFLAGS_$(CPU_TYPE)) > $(CPU_CFLAGS_$(CPU_SUBTYPE))) > endif > diff --git a/target/linux/archs38/Makefile b/target/linux/archs38/Makefile > new file mode 100644 > index 000..855954a > --- /dev/null > +++ b/target/linux/archs38/Makefile > @@ -0,0 +1,27 @@ > +# > +# Copyright (C) 2015 OpenWrt.org > +# > +# This is free software, licensed under the GNU General Public License v2. > +# See /LICENSE for more information. > +# > +include $(TOPDIR)/rules.mk > + > +ARCH:=arc > +CPU_TYPE:=archs > +BOARD:=archs38 > +BOARDNAME:=Synopsys DesignWare ARC HS38 > +CFLAGS:=-Os -pipe -fno-caller-saves -matomic "-Os -pipe" will be added by default in include/target.mk, if "-fno-caller-saves -matomic" should always be used for this CPU core, you should add it to CPU_CFLAGS_archs38 in include/target.mk or like "-mno-branch-likely" is added to CPU_CFLAGS for all mips
Re: [OpenWrt-Devel] [PATCH 1/9] ar71xx: PowerCloud CAP324 kernel support To: openwrt-devel@lists.openwrt.org
On 09/12/15 04:07 PM, Felix Fietkau wrote: On 2015-12-09 21:47, Felix Fietkau wrote: On 2015-12-09 21:02, Daniel Dickinson wrote: Seems like we've been accumulating separate patches for adding individual boards again, I'm going to clean up that stuff later. When you've fixed the issues that I've pointed out already, please also restructure your patches to add the mach files individually, then a commit that integrates your boards into 700-MIPS-ath79-openwrt-machines.patch, then the image build integration patches. Sorry, I'm not 100% sure I follow, so let me make sure I'm understanding: You no longer want to have individual patches in target/linux/xxx/patches/ for each board, so the commit series should be to do each board separately in terms of commit, but which each affect 700-MIPS-ath79-openwrt-machines.patch rather than being in individual patches. That is the adding mach-xxx.c becomes part of 700-MIPS-ath79-... ? mach-xxx.c should go to files/arch/mips/ath79/ instead of patches/ Actually, now that I think about it again, I will probably change the structure so that we don't have to touch patches/ for new boards anymore. It's just annoying to maintain, considering how many boards we have. If you could let me know when you've done that I will be the first one to do things the new way. Regards, Daniel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [enhancement] ar71xx: Moving UART related GPIO initialization into the serial drivers.
Hi, Here are my patches for ar71xx enabling UART to be turned on and off at runtime to free up the GPIO pins, if someone is interested. I think doing this at runtime is better than compiling out UART support altogether. For example, it allows the failsafe mode to function without problems, and, as the RX pin should not be written to neither by the kernel, nor by the bootloader, it makes perfect sense to use it as 1-wire bus, or i2c SCL line. I tested this on an ar933x based platform (tp-link 740n v4) and it works fine. But, as I don't have access to older devices (ar71xx-ar91xx based), and the serial driver they use is different, the patch for them (the second one) is NOT TESTED and I'd appreciate if someone else would test it. Usage example: #Unbind the serial driver echo ar933x-uart > /sys/bus/platform/drivers/ar933x-uart/unbind [dmesg: console [ttyATH0] disabled] #export RX pin as GPIO echo 9 > /sys/class/gpio/export #From now on RX pin works as normal GPIO echo out > /sys//sys/class/gpio/gpio9/direction echo 1 > /sys//sys/class/gpio/gpio9/value #Rebind the serial driver back echo ar933x-uart > /sys/bus/platform/drivers/ar933x-uart/bind [dmesg: console [ttyATH0] enabled] #WARNING: Remember to remove the askconsole line from /etc/inittab - otherwise procd will reboot the system #if console goes away. I plan to make procd/askfirst better behaved in future. But - as of yet - I'm not sure how. Regards, Piotr Madalinski ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [enhancement] ar71xx: Moving UART related GPIO initialization into the serial drivers.
Here are my patches for ar71xx enabling UART to be turned on and off at runtime to free up the GPIO pins, And I forgot to attach the patches. Sorry. Here they are. --- a/arch/mips/ath79/dev-common.c +++ b/arch/mips/ath79/dev-common.c @@ -20,9 +20,37 @@ #include #include +#include #include "common.h" #include "dev-common.h" +static void ath79_enable_uart(struct platform_device* pdev) { + if (soc_is_ar71xx()) + ath79_gpio_function_enable(AR71XX_GPIO_FUNC_UART_EN); + else if (soc_is_ar724x()) + ath79_gpio_function_enable(AR724X_GPIO_FUNC_UART_EN); + else if (soc_is_ar913x()) + ath79_gpio_function_enable(AR913X_GPIO_FUNC_UART_EN); + else if (soc_is_ar933x()) + ath79_gpio_function_enable(AR933X_GPIO_FUNC_UART_EN); +} + +static void ath79_disable_uart(struct platform_device* pdev) { + if (soc_is_ar71xx()) + ath79_gpio_function_disable(AR71XX_GPIO_FUNC_UART_EN); + else if (soc_is_ar724x()) + ath79_gpio_function_disable(AR724X_GPIO_FUNC_UART_EN); + else if (soc_is_ar913x()) + ath79_gpio_function_disable(AR913X_GPIO_FUNC_UART_EN); + else if (soc_is_ar933x()) + ath79_gpio_function_disable(AR933X_GPIO_FUNC_UART_EN); +} + +static struct ath79_platform_uart_hooks platform_hooks = { +.probe = ath79_enable_uart, +.remove = ath79_disable_uart, +}; + static struct resource ath79_uart_resources[] = { { .start = AR71XX_UART_BASE, @@ -72,6 +100,9 @@ static struct platform_device ar933x_uar .id = -1, .resource = ar933x_uart_resources, .num_resources = ARRAY_SIZE(ar933x_uart_resources), + .dev = { + .platform_data = &platform_hooks + }, }; void __init ath79_register_uart(void) @@ -97,6 +128,7 @@ void __init ath79_register_uart(void) soc_is_qca955x() || soc_is_qca956x()) { ath79_uart_data[0].uartclk = uart_clk_rate; + ath79_enable_uart(&ath79_uart_device); platform_device_register(&ath79_uart_device); } else if (soc_is_ar933x()) { platform_device_register(&ar933x_uart_device); --- /dev/null +++ b/arch/mips/include/asm/mach-ath79/ath79_uart_platform.h @@ -0,0 +1,21 @@ +/* + * Platform data definition for Atheros AR71XX/AR724X/AR913X UART controller + * + * Copyright (C) 2015 Piotr Madalinski + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + */ + +#ifndef _ATH79_UART_PLATFORM_H +#define _ATH79_UART_PLATFORM_H + +struct platform_device; + +struct ath79_platform_uart_hooks { + void (*probe)(struct platform_device*); + void (*remove)(struct platform_device*); +}; + +#endif /* _ATH79_UART_PLATFORM_H */ --- a/drivers/tty/serial/ar933x_uart.c +++ b/drivers/tty/serial/ar933x_uart.c @@ -31,6 +31,7 @@ #include #include +#include #define DRIVER_NAME "ar933x-uart" @@ -50,6 +51,7 @@ struct ar933x_uart_port { unsigned int min_baud; unsigned int max_baud; struct clk *clk; + struct ath79_platform_uart_hooks *platform_hooks; }; static inline bool ar933x_uart_console_enabled(void) @@ -669,6 +671,10 @@ static int ar933x_uart_probe(struct plat return PTR_ERR(up->clk); } + up->platform_hooks = dev_get_platdata(&pdev->dev); + if (up->platform_hooks && up->platform_hooks->probe) + up->platform_hooks->probe(pdev); + port = &up->port; mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); @@ -710,6 +716,7 @@ static int ar933x_uart_probe(struct plat goto err_disable_clk; platform_set_drvdata(pdev, up); + return 0; err_disable_clk: @@ -726,8 +733,9 @@ static int ar933x_uart_remove(struct pla if (up) { uart_remove_one_port(&ar933x_uart_driver, &up->port); clk_disable_unprepare(up->clk); + if (up->platform_hooks && up->platform_hooks->remove) + up->platform_hooks->remove(pdev); } - return 0; } --- a/arch/mips/ath79/dev-common.c +++ b/arch/mips/ath79/dev-common.c @@ -67,6 +67,8 @@ static struct plat_serial8250_port ath79 .flags = AR71XX_UART_FLAGS, .iotype = UPIO_MEM32, .regshift = 2, + .platform_probe = &ath79_enable_uart, + .platform_remove = &ath79_disable_uart, }, { /* terminating entry */ } --- a/drivers/tty/serial/8250/8250_core.c +++ b/drivers/tty/serial/8250/8250_core.c @@ -3676,6 +3676,9 @@ static int serial8250_probe(struct platf struct uart_8250_port uart; int ret, i, irqflag = 0; + if (p && p->platform_probe) + p->platform_probe(dev); + memset(&uart, 0, sizeof(uart)); if (share_irqs) @@ -3718,6 +3721,7 @@ static int serial8250_probe(struct platf */ static int serial8250_remove(struct platform_device *dev) { + struct plat_serial8250_port *p; int i; for (i = 0; i < nr_uarts; i++) { @@ -3726,6 +3730,12 @@ static int serial8250_remove(struct plat if (up->port.dev == &dev->dev) serial8250_unregister_port(i); } + + p = dev_get_platdata(&dev->dev); + + if (p && p->platform_remove) + p->platform_remove(dev); + return 0; } --- a/include/linux/serial_8250.h +++ b/include/linux/serial_8250.h @@ -39,6 +39,8 @@