[OpenWrt-Devel] [PATCH] ar71xx: add support for Onion Omega
This patch adds support for the Onion Omega. https://onion.io/omega Signed-off-by: L. D. Pinney ldpin...@gmail.com Acked-by: Boken Lin b...@onion.io Tested-by: Jacky Huang huangfangch...@163.com --- target/linux/ar71xx/base-files/etc/diag.sh | 3 +++ target/linux/ar71xx/base-files/etc/uci-defaults/02_network | 4 target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 +++ target/linux/ar71xx/base-files/lib/upgrade/platform.sh | 1 + target/linux/ar71xx/config-3.18| 1 + target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c | 85 target/linux/ar71xx/generic/profiles/onion.mk | 16 ++ target/linux/ar71xx/image/Makefile | 9 target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch | 24 +++-- tools/firmware-utils/src/mktplinkfw.c | 6 ++ 10 files changed, 146 insertions(+), 6 deletions(-) diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index f3bd142..aa23400 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -173,6 +173,9 @@ get_status_led() { om5p-an) status_led=om5p:blue:power ;; + onion-omega) + status_led=onion:amber:system + ;; pb44) status_led=pb44:amber:jump1 ;; diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network index 9a0d0a3..9ab782e 100755 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network @@ -277,6 +277,10 @@ mynet-n750) [ -n $mac ] ucidef_set_interface_macaddr wan $mac ;; +onion-omega) + ucidef_set_interface_lan wlan0 + ;; + dhp-1565-a1 |\ dir-835-a1 |\ wndr3700v4 | \ diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 9d3d2cb..2362c11 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -556,6 +556,9 @@ ar71xx_board_detect() { *OM5P AN) name=om5p-an ;; + *Onion Omega) + name=onion-omega + ;; *PB42) name=pb42 ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 41e344c..7ce2bce 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -313,6 +313,7 @@ platform_check_image() { el-mini | \ gl-inet | \ mc-mac1200r | \ + onion-omega | \ oolite | \ smart-300 | \ tl-mr10u | \ diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18 index 0de176e..d8adb44 100644 --- a/target/linux/ar71xx/config-3.18 +++ b/target/linux/ar71xx/config-3.18 @@ -88,6 +88,7 @@ CONFIG_ATH79_MACH_NBG460N=y CONFIG_ATH79_MACH_NBG6716=y CONFIG_ATH79_MACH_OM2P=y CONFIG_ATH79_MACH_OM5P=y +CONFIG_ATH79_MACH_ONION_OMEGA=y CONFIG_ATH79_MACH_PB42=y CONFIG_ATH79_MACH_PB44=y CONFIG_ATH79_MACH_PB92=y diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c new file mode 100644 index 000..c739840 --- /dev/null +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c @@ -0,0 +1,84 @@ +/* + * Onion Omega board support + * + * Copyright (C) 2015 Boken Lin b...@onion.io + * + * 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 linux/gpio.h + +#include asm/mach-ath79/ath79.h + +#include dev-eth.h +#include dev-gpio-buttons.h +#include dev-leds-gpio.h +#include dev-m25p80.h +#include dev-usb.h +#include dev-wmac.h +#include machtypes.h + +#define OMEGA_GPIO_LED_SYSTEM 27 +#define OMEGA_GPIO_BTN_RESET 11 + +#define OMEGA_GPIO_USB_POWER 8 + +#define OMEGA_KEYS_POLL_INTERVAL 20 /* msecs */ +#define OMEGA_KEYS_DEBOUNCE_INTERVAL (3 * OMEGA_KEYS_POLL_INTERVAL) + +static const char *omega_part_probes[] = { + tp-link, + NULL, +}; + +static struct flash_platform_data omega_flash_data = { + .part_probes= omega_part_probes, +}; + +static struct gpio_led omega_leds_gpio[] __initdata = { + { + .name = onion:amber:system, + .gpio = OMEGA_GPIO_LED_SYSTEM, + .active_low = 1, +
Re: [OpenWrt-Devel] [PATCH] [ar71xx] Add support for Onion Omega
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Boken Lin b...@onion.io wrote: The firmware won't be dock-specific. The same firmware will be used regardless of which dock the Omega is plugged into. And all docks have similar configuration, i.e. every dock has a USB port. And when I build a board and put the button and the gpio power for usb somewhere else? maybe all of your docks will? Just something I wanted you to think about at least :) Carambola2 unfortunately did the same thing, so Carambola2 in the build menu actually means, this particular dev board not any board with a carambola2 on it Just hoping to avoid that here if possible :) Cheers, Karl P -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBAgAGBQJVnqeVAAoJEBmotQ/U1cr26UwP/j4lb1se2MFkwbkJxhzSNDUH rny2n5nHieVac2jKtpR20eH3MOdnS+FqFHmG44X8g9IJjUiz7piIkY+3ZxiE2wOX aTuGAyknVeKLSk8I6H9nbRrjsBlJqAta09HHvDjBVNI/DAc+HAISI59Q3soryCKa lGGV7mmb/nYb+okuXo5DDaMSFvnGKXSVJ8BZ19zDsF4KlN9pm944urHp9LsnqXYk JQ4tkJ5t3YW0PTS0BNtCdEsjH2hffz+otrbHDcLDkYrd+XcMon7duLC+bmkqpVdV zerzkEJPR2LI8DYn9X/He96d6HMDtCuur1heqSvSEGhy+2X2xikQqzpiN8Cnm8yY tVZX6lPKSTIaXCW2hVJicffXJMErPoVT5N+vxANS9Hnc1zSy84mSaqZXjWvyEo+3 UCy80UaJruT7JYMYQQjMR3aNdAY6w0zsll0GVB9rtSq79f9NAlPqYWRTFQqkfsF/ ej02yK1pqGehmSZU8pQXNMHaLNQuM3j6F9iaJf0syVfGpbU8+QEQH+Nv7T3LtXwV QRlHEW/85mNUul1C2se10iKoVTGlEEsQ2jZMIMVfOGyB4RzalBCwk4cMOAESsDo8 aEnbRnN/cSXjzLF1dATJYqNrHMPr3JllF/EIzBDOq/JJTi4Pj3KyMXlF9KtxC9FA owN8yVClmJDCOo+N8Dnp =wYLO -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] [ar71xx] Add support for Onion Omega
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Please consider renaming your board. If I understand your website properly, the module is the Omega, and this boardfile is for the omega _with_ one of it's docks This Omega boardfile would not be usable for someone with a different dock, with leds/pins in different places. Further, you've included things like all the usb modules, when the Omega Onion itself doesn't have a usb port, your dock does. Minor: Also, you've got oolite/onion in the wrong order. Cheers, Karl P Boken Lin b...@onion.io wrote: From: Boken Lin b...@onion.io Add support for Onion Omega. Signed-off-by: Boken Lin b...@onion.io -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBAgAGBQJVnnxaAAoJEBmotQ/U1cr2OpoQAJow5szL482WILaBiy1DwoXr gs8T74Q78hmA7Q4hsWZEw3JWsE2W+jbiXXsNhtTqPqDpK+OkvnOfvjK8+BnR+ofu 1oXJvMRuvKg3htpn0+uuTDBxE1ei60MzbOTC7J4cTDw/Hx8TD7jxdiYRlE1l78Tk yX1GthWCUmzQa5J+QdMQjWWaAQPlHClpDJGUxIHVl5g4Kol9dC6+rb/fkJ1l5qkO 8GKfh3ALuHyDYRhOHz/IOyj1l2bLEriEis343VfA9rl1Xlw6mKfp5gCpa+KcxAlU 89wsf/xKHAgAipE34p0YlvmOAWPVWrRMvWjOi/mJh9tGjuEicyKY5HYQHToxY7J3 y+ZXBgTSvm/64PRIKY2u/0yzDflqUi/N6zU+DQ6/kQ0HLAKfAsNPwOg/sPuf7bFH C2kUz98LJ0nrbCk+wlb8CywLoMH7MFbzKziwsimPLITfyavw1LFmfFCqQ/uICIpL C4g14loo828uo/60RtHxBxL14kDn07GCihXUF+hhbooEkE6KxVAApjnrM1zuOkBb p0YakVT5QT3kl5WCBxBADY1N8PZmNq2nscoYj96oN2nZEHS4TrfbK+K0KjZJGqTT ilucYTP1ZBqSjASojpbYbcu9EO+MPKODF2GFlXdwIMUiwb0PJA5gSmrABLIId/XD Ek+9skaJ09Qt0afD7GxM =VY1p -END PGP SIGNATURE- ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] [ar71xx] Add support for Onion Omega
From: Boken Lin b...@onion.io Add support for Onion Omega. Signed-off-by: Boken Lin b...@onion.io --- target/linux/ar71xx/base-files/etc/diag.sh | 3 + .../ar71xx/base-files/etc/uci-defaults/02_network | 1 + target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 + .../ar71xx/base-files/lib/upgrade/platform.sh | 1 + target/linux/ar71xx/config-3.18| 1 + .../files/arch/mips/ath79/mach-onion-omega.c | 85 ++ target/linux/ar71xx/generic/profiles/onion.mk | 16 target/linux/ar71xx/image/Makefile | 9 +++ .../610-MIPS-ath79-openwrt-machines.patch | 24 -- tools/firmware-utils/src/mktplinkfw.c | 8 +- 10 files changed, 144 insertions(+), 7 deletions(-) create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c create mode 100644 target/linux/ar71xx/generic/profiles/onion.mk diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index ce2b9ba..0015d4c 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -167,6 +167,9 @@ get_status_led() { om5p-an) status_led=om5p:blue:power ;; +onion-omega) +status_led=onion:amber:system +;; pb44) status_led=pb44:amber:jump1 ;; diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network index ec709a0..6e9185c 100755 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network @@ -313,6 +313,7 @@ mr600 |\ mr600v2 |\ mr900 |\ mr900v2 |\ +onion-omega |\ rb-411 |\ rb-911g-2hpnd |\ rb-911g-5hpacd |\ diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index dd13948..e23ed74 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -550,6 +550,9 @@ ar71xx_board_detect() { *OM5P AN) name=om5p-an ;; +*Onion Omega) +name=onion-omega +;; *PB42) name=pb42 ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 73d8b0d..b045a33 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -312,6 +312,7 @@ platform_check_image() { gl-inet | \ mc-mac1200r | \ oolite | \ +onion-omega | \ smart-300 | \ tl-mr10u | \ tl-mr11u | \ diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18 index 02857d5..388cb2b 100644 --- a/target/linux/ar71xx/config-3.18 +++ b/target/linux/ar71xx/config-3.18 @@ -86,6 +86,7 @@ CONFIG_ATH79_MACH_NBG460N=y CONFIG_ATH79_MACH_NBG6716=y CONFIG_ATH79_MACH_OM2P=y CONFIG_ATH79_MACH_OM5P=y +CONFIG_ATH79_MACH_ONION_OMEGA=y CONFIG_ATH79_MACH_PB42=y CONFIG_ATH79_MACH_PB44=y CONFIG_ATH79_MACH_PB92=y diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c new file mode 100644 index 000..177e76f --- /dev/null +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c @@ -0,0 +1,85 @@ +/* + * Onion Omega board support + * + * Copyright (C) 2015 Boken Lin b...@onion.io + * + * 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 linux/gpio.h + +#include asm/mach-ath79/ath79.h + +#include dev-eth.h +#include dev-gpio-buttons.h +#include dev-leds-gpio.h +#include dev-m25p80.h +#include dev-usb.h +#include dev-wmac.h +#include machtypes.h + +#define OMEGA_GPIO_LED_SYSTEM 27 +#define OMEGA_GPIO_BTN_RESET11 + +#define OMEGA_GPIO_USB_POWER8 + +#define OMEGA_KEYS_POLL_INTERVAL20 /* msecs */ +#define OMEGA_KEYS_DEBOUNCE_INTERVAL(3 * OMEGA_KEYS_POLL_INTERVAL) + +static const char *omega_part_probes[] = { +tp-link, +NULL, +}; + +static struct flash_platform_data omega_flash_data = { +.part_probes= omega_part_probes, +}; + +static struct gpio_led omega_leds_gpio[] __initdata = { +{ +.name = onion:amber:system, +.gpio = OMEGA_GPIO_LED_SYSTEM, +.active_low = 1, +}, +}; + +static struct gpio_keys_button omega_gpio_keys[] __initdata = { +{ +.desc = reset, +.type = EV_KEY, +.code = KEY_RESTART, +.debounce_interval = OMEGA_KEYS_DEBOUNCE_INTERVAL, +.gpio = OMEGA_GPIO_BTN_RESET, +.active_low = 0, +} +}; + +static void __init onion_omega_setup(void) +{ +u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00); +u8 *ee =