Message ID | 1439153278.8865.0@smtp.autistici.org |
---|---|
State | Changes Requested |
Headers | show |
It seems the ML is choking on the full patch and splitting it up because it in turn adds a patch into the kernel patches dir, so here's the download link for the full patch: https://volatilesystems.org/dl/openwrt/targets/add-minibox-target-trunk.patch I think the full patch meets the requirements, if I need to split out, let me know. Stijn Op zo, 9 aug 2015 om 10:47 , schreef Stijn Segers <francesco.borromini@inventati.org>: > Hello, > > The patch below adds support for the Gainstrong Minibox v1.0 mini > router into trunk. This is based off the Barrier Breaker based source > code at http://ooioe.com/miniboxv1/Sourcecode/. > > Patch applies cleanly, has been compile-tested on a 15.05 tree (the > patch below is for the trunk ar17xx target with kernel 4.1). For > those interested, I can provide the 15.05 patch as well. > > Any questions, let me know. > > Thank you > > Stijn > > > > > Index: openwrt/trunk/target/linux/ar71xx/base-files/etc/diag.sh > =================================================================== > --- openwrt.orig/trunk/target/linux/ar71xx/base-files/etc/diag.sh > +++ openwrt/trunk/target/linux/ar71xx/base-files/etc/diag.sh > @@ -222,6 +222,9 @@ get_status_led() { > qihoo-c301) > status_led="qihoo:green:status" > ;; > + minibox-v1) > + status_led="minibox-v1:green:system" > + ;; > tew-632brp) > status_led="tew-632brp:green:status" > ;; > @@ -366,7 +369,7 @@ set_state() { > status_led_blink_preinit_regular > ;; > done) > - status_led_on > + status_led_off > case $(ar71xx_board_name) in > qihoo-c301) > local n=$(fw_printenv activeregion | cut -d = -f 2) > Index: > openwrt/trunk/target/linux/ar71xx/base-files/etc/uci-defaults/02_network > =================================================================== > --- > openwrt.orig/trunk/target/linux/ar71xx/base-files/etc/uci-defaults/02_network > +++ > openwrt/trunk/target/linux/ar71xx/base-files/etc/uci-defaults/02_network > @@ -419,6 +419,7 @@ ja76pf |\ > mc-mac1200r|\ > mynet-n600 |\ > oolite |\ > +minibox-v1 |\ > qihoo-c301 |\ > rb-750 |\ > rb-751 |\ > Index: openwrt/trunk/target/linux/ar71xx/base-files/lib/ar71xx.sh > =================================================================== > --- openwrt.orig/trunk/target/linux/ar71xx/base-files/lib/ar71xx.sh > +++ openwrt/trunk/target/linux/ar71xx/base-files/lib/ar71xx.sh > @@ -119,6 +119,9 @@ tplink_board_detect() { > "3C0001"*) > model="OOLITE" > ;; > + "3C0002"*) > + model="MINIBOX_V1" > + ;; > "070300"*) > model="TP-Link TL-WR703N" > ;; > @@ -320,6 +323,9 @@ ar71xx_board_detect() { > *"AC1750DB") > name="f9k1115v2" > ;; > + *"MiniBox V1.0") > + name="minibox-v1" > + ;; > *"AirGateway") > name="airgateway" > ;; > Index: > openwrt/trunk/target/linux/ar71xx/base-files/lib/upgrade/platform.sh > =================================================================== > --- > openwrt.orig/trunk/target/linux/ar71xx/base-files/lib/upgrade/platform.sh > +++ > openwrt/trunk/target/linux/ar71xx/base-files/lib/upgrade/platform.sh > @@ -315,6 +315,7 @@ platform_check_image() { > mc-mac1200r | \ > onion-omega | \ > oolite | \ > + minibox-v1 |\ > smart-300 | \ > tl-mr10u | \ > tl-mr11u | \ > Index: openwrt/trunk/target/linux/ar71xx/config-4.1 > =================================================================== > --- openwrt.orig/trunk/target/linux/ar71xx/config-4.1 > +++ openwrt/trunk/target/linux/ar71xx/config-4.1 > @@ -73,6 +73,7 @@ CONFIG_ATH79_MACH_EW_DORIN=y > CONFIG_ATH79_MACH_F9K1115V2=y > CONFIG_ATH79_MACH_GL_INET=y > CONFIG_ATH79_MACH_GS_OOLITE=y > +CONFIG_ATH79_MACH_MINIBOX_V1=y > CONFIG_ATH79_MACH_HIWIFI_HC6361=y > CONFIG_ATH79_MACH_HORNET_UB=y > CONFIG_ATH79_MACH_JA76PF=y > Index: > openwrt/trunk/target/linux/ar71xx/files/arch/mips/ath79/mach-minibox-v1.c > =================================================================== > --- /dev/null > +++ > openwrt/trunk/target/linux/ar71xx/files/arch/mips/ath79/mach-minibox-v1.c > @@ -0,0 +1,85 @@ > +/* > + * Oolite board support > + * > + * > + * 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 <asm/mach-ath79/ar71xx_regs.h> > + > +#include "common.h" > +#include "dev-eth.h" > +#include "dev-gpio-buttons.h" > +#include "dev-leds-gpio.h" > +#include "dev-m25p80.h" > +#include "dev-wmac.h" > +#include "machtypes.h" > +#include "dev-usb.h" > + > +#define MINIBOX_V1_GPIO_BTN_RESET 11 > + > +#define MINIBOX_V1_GPIO_LED_SYSTEM 1 > + > +#define MINIBOX_V1_KEYS_POLL_INTERVAL 20 /* msecs */ > +#define MINIBOX_V1_KEYS_DEBOUNCE_INTERVAL (3 * > MINIBOX_V1_KEYS_POLL_INTERVAL) > + > +static const char *MINIBOX_V1_part_probes[] = { > + "tp-link", > + NULL, > +}; > + > +static struct flash_platform_data MINIBOX_V1_flash_data = { > + .part_probes = MINIBOX_V1_part_probes, > +}; > + > +static struct gpio_led MINIBOX_V1_leds_gpio[] __initdata = { > + { > + .name = "minibox-v1:green:system", > + .gpio = MINIBOX_V1_GPIO_LED_SYSTEM, > + .active_low = 0, > + }, > +}; > + > +static struct gpio_keys_button MINIBOX_V1_gpio_keys[] __initdata = { > + { > + .desc = "reset", > + .type = EV_KEY, > + .code = KEY_RESTART, > + .debounce_interval = MINIBOX_V1_KEYS_DEBOUNCE_INTERVAL, > + .gpio = MINIBOX_V1_GPIO_BTN_RESET, > + .active_low = 0, > + }, > +}; > + > +static void __init MINIBOX_V1_setup(void) > +{ > + u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00); > + u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000); > + > + ath79_register_leds_gpio(-1, ARRAY_SIZE(MINIBOX_V1_leds_gpio), > + MINIBOX_V1_leds_gpio); > + > + ath79_register_gpio_keys_polled(-1, MINIBOX_V1_KEYS_POLL_INTERVAL, > + ARRAY_SIZE(MINIBOX_V1_gpio_keys), > + MINIBOX_V1_gpio_keys); > + > + ath79_register_usb(); > + > + ath79_register_m25p80(&MINIBOX_V1_flash_data); > + ath79_init_mac(ath79_eth0_data.mac_addr, mac, 1); > + ath79_init_mac(ath79_eth1_data.mac_addr, mac, -1); > + > + ath79_register_mdio(0, 0x0); > + ath79_register_eth(1); > + ath79_register_eth(0); > + > + ath79_register_wmac(ee, mac); > +} > + > +MIPS_MACHINE(ATH79_MACH_MINIBOX_V1, "MINIBOX-V1", > + "MiniBox V1.0", MINIBOX_V1_setup); > Index: > openwrt/trunk/target/linux/ar71xx/generic/profiles/minibox-v1.mk > =================================================================== > --- /dev/null > +++ openwrt/trunk/target/linux/ar71xx/generic/profiles/minibox-v1.mk > @@ -0,0 +1,17 @@ > +# > +# Copyright (C) 2015 OpenWrt.org > +# > +# This is free software, licensed under the GNU General Public > License v2. > +# See /LICENSE for more information. > +# > + > +define Profile/MINIBOXV1 > + NAME:=MINIBOX V1.0 > + PACKAGES:=kmod-usb-core kmod-usb2 kmod-ledtrig-usbdev > +endef > + > + > +define Profile/MINIBOXV1/Description > + Package set optimized for the MINIBOX V1.0 > +endef > +$(eval $(call Profile,MINIBOXV1)) > Index: openwrt/trunk/target/linux/ar71xx/image/Makefile > =================================================================== > --- openwrt.orig/trunk/target/linux/ar71xx/image/Makefile > +++ openwrt/trunk/target/linux/ar71xx/image/Makefile > @@ -902,6 +902,15 @@ endef > > TARGET_DEVICES += ubnt-uap-pro ubnt-unifi-outdoor-plus > > +define Device/minibox-v1 > + $(Device/tplink-16mlzma) > + BOARDNAME := MINIBOX-V1 > + DEVICE_PROFILE := MINIBOXV1 > + TPLINK_HWID := 0x3C000201 > + CONSOLE := ttyATH0,115200 > +endef > +TARGET_DEVICES += minibox-v1 > + > rootfs_type=$(patsubst jffs2-%,jffs2,$(patsubst > squashfs-%,squashfs,$(1))) > > # $(1): rootfs type. > Index: > openwrt/trunk/target/linux/ar71xx/patches-4.1/799-MIPS-ath79-add-minibox-v1-support.patch > =================================================================== > --- /dev/null > +++ > openwrt/trunk/target/linux/ar71xx/patches-4.1/799-MIPS-ath79-add-minibox-v1-support.patch > @@ -0,0 +1,39 @@ > +--- a/arch/mips/ath79/machtypes.h > ++++ b/arch/mips/ath79/machtypes.h > +@@ -61,6 +61,7 @@ enum ath79_mach_type { > + ATH79_MACH_ESR1750, /* EnGenius ESR1750 */ > + ATH79_MACH_GL_INET, /* GL-CONNECT GL-INET */ > + ATH79_MACH_GS_OOLITE, /* GS OOLITE V1.0 */ > ++ ATH79_MACH_MINIBOX_V1, /* MINIBOX V1.0 */ > + ATH79_MACH_HIWIFI_HC6361, /* HiWiFi HC6361 */ > + ATH79_MACH_JA76PF, /* jjPlus JA76PF */ > + ATH79_MACH_JA76PF2, /* jjPlus JA76PF2 */ > +--- a/arch/mips/ath79/Kconfig > ++++ b/arch/mips/ath79/Kconfig > +@@ -446,6 +446,16 @@ config ATH79_MACH_GS_OOLITE > + select ATH79_DEV_USB > + select ATH79_DEV_WMAC > + > ++config ATH79_MACH_MINIBOX_V1 > ++ bool "OOLITE BOX V1.0 support" > ++ select SOC_AR933X > ++ select ARH79_DEV_ETH > ++ select ARH79_DEV_GPIO_BUTTONS > ++ select ATH79_DEV_LEDS_GPIO > ++ select ATH79_DEV_M25P80 > ++ select ATH79_DEV_USB > ++ select ATH79_DEV_WMAC > ++ > + config ATH79_MACH_HIWIFI_HC6361 > + bool "HiWiFi HC6361 board support" > + select SOC_AR933X > +--- a/arch/mips/ath79/Makefile > ++++ b/arch/mips/ath79/Makefile > +@@ -72,6 +72,7 @@ obj-$(CONFIG_ATH79_MACH_DIR_825_C1) += m > + obj-$(CONFIG_ATH79_MACH_ESR1750) += mach-esr1750.o > + obj-$(CONFIG_ATH79_MACH_GL_INET) += mach-gl-inet.o > + obj-$(CONFIG_ATH79_MACH_GS_OOLITE) += mach-gs-oolite.o > ++obj-$(CONFIG_ATH79_MACH_MINIBOX_V1) += mach-minibox-v1.o > + obj-$(CONFIG_ATH79_MACH_HIWIFI_HC6361) += mach-hiwifi-hc6361.o > + obj-$(CONFIG_ATH79_MACH_JA76PF) += mach-ja76pf.o > + obj-$(CONFIG_ATH79_MACH_JWAP003) += mach-jwap003.o >
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 This has many cases where you have added the board out of order. The lists are generally alphabetically sorted, and should be maintained that way, even though a few boards escaped this. More comments inline. Stijn Segers <francesco.borromini@inventati.org> wrote: > Hello, > > The patch below adds support for the Gainstrong Minibox v1.0 mini > router into trunk. This is based off the Barrier Breaker based source > code at http://ooioe.com/miniboxv1/Sourcecode/. > > Patch applies cleanly, has been compile-tested on a 15.05 tree (the > patch below is for the trunk ar17xx target with kernel 4.1). For those > interested, I can provide the 15.05 patch as well. > > Any questions, let me know. > > Thank you > > Stijn > > > > > Index: openwrt/trunk/target/linux/ar71xx/base-files/etc/diag.sh > =================================================================== > --- openwrt.orig/trunk/target/linux/ar71xx/base-files/etc/diag.sh > +++ openwrt/trunk/target/linux/ar71xx/base-files/etc/diag.sh > @@ -222,6 +222,9 @@ get_status_led() { > qihoo-c301) > status_led="qihoo:green:status" > ;; > + minibox-v1) > + status_led="minibox-v1:green:system" > + ;; > tew-632brp) > status_led="tew-632brp:green:status" > ;; > @@ -366,7 +369,7 @@ set_state() { > status_led_blink_preinit_regular > ;; > done) > - status_led_on > + status_led_off Pretty sure you can't just change this for everyone. If you have an active low/active high issue, you should fix that in your board file. > case $(ar71xx_board_name) in > qihoo-c301) > local n=$(fw_printenv activeregion | cut -d = -f 2) > Index: > openwrt/trunk/target/linux/ar71xx/base-files/etc/uci-defaults/02_network > =================================================================== > --- > openwrt.orig/trunk/target/linux/ar71xx/base-files/etc/uci-defaults/02_network > +++ > openwrt/trunk/target/linux/ar71xx/base-files/etc/uci-defaults/02_network > @@ -419,6 +419,7 @@ ja76pf |\ > mc-mac1200r|\ > mynet-n600 |\ > oolite |\ > +minibox-v1 |\ I know gainstrong makes the oolite too, but at this point in this file, that's irrelevant, keep the alphabetical sorting. > qihoo-c301 |\ > rb-750 |\ > rb-751 |\ > Index: openwrt/trunk/target/linux/ar71xx/base-files/lib/ar71xx.sh > =================================================================== > --- openwrt.orig/trunk/target/linux/ar71xx/base-files/lib/ar71xx.sh > +++ openwrt/trunk/target/linux/ar71xx/base-files/lib/ar71xx.sh > @@ -119,6 +119,9 @@ tplink_board_detect() { > "3C0001"*) > model="OOLITE" > ;; > + "3C0002"*) > + model="MINIBOX_V1" > + ;; > "070300"*) > model="TP-Link TL-WR703N" > ;; > @@ -320,6 +323,9 @@ ar71xx_board_detect() { > *"AC1750DB") > name="f9k1115v2" > ;; > + *"MiniBox V1.0") > + name="minibox-v1" > + ;; Bad sort. > *"AirGateway") > name="airgateway" > ;; > Index: > openwrt/trunk/target/linux/ar71xx/base-files/lib/upgrade/platform.sh > =================================================================== > --- > openwrt.orig/trunk/target/linux/ar71xx/base-files/lib/upgrade/platform.sh > +++ openwrt/trunk/target/linux/ar71xx/base-files/lib/upgrade/platform.sh > @@ -315,6 +315,7 @@ platform_check_image() { > mc-mac1200r | \ > onion-omega | \ > oolite | \ > + minibox-v1 |\ Bad sort. > smart-300 | \ > tl-mr10u | \ > tl-mr11u | \ > Index: openwrt/trunk/target/linux/ar71xx/config-4.1 > =================================================================== > --- openwrt.orig/trunk/target/linux/ar71xx/config-4.1 > +++ openwrt/trunk/target/linux/ar71xx/config-4.1 > @@ -73,6 +73,7 @@ CONFIG_ATH79_MACH_EW_DORIN=y > CONFIG_ATH79_MACH_F9K1115V2=y > CONFIG_ATH79_MACH_GL_INET=y > CONFIG_ATH79_MACH_GS_OOLITE=y > +CONFIG_ATH79_MACH_MINIBOX_V1=y very bad sort. config files have even strong sorting requirements. > CONFIG_ATH79_MACH_HIWIFI_HC6361=y > CONFIG_ATH79_MACH_HORNET_UB=y > CONFIG_ATH79_MACH_JA76PF=y > Index: > openwrt/trunk/target/linux/ar71xx/files/arch/mips/ath79/mach-minibox-v1.c > =================================================================== > --- /dev/null > +++ > openwrt/trunk/target/linux/ar71xx/files/arch/mips/ath79/mach-minibox-v1.c > @@ -0,0 +1,85 @@ > +/* > + * Oolite board support Wrong. Oolite is the board you copied. This file should be accurately describe what it does, not what it used to do at some point. > + * > + * > + * 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 <asm/mach-ath79/ar71xx_regs.h> > + > +#include "common.h" > +#include "dev-eth.h" > +#include "dev-gpio-buttons.h" > +#include "dev-leds-gpio.h" > +#include "dev-m25p80.h" > +#include "dev-wmac.h" > +#include "machtypes.h" > +#include "dev-usb.h" It's a matter of taste, but you didn't think of putting all the dev- includes together? > + > +#define MINIBOX_V1_GPIO_BTN_RESET 11 > + > +#define MINIBOX_V1_GPIO_LED_SYSTEM 1 > + > +#define MINIBOX_V1_KEYS_POLL_INTERVAL 20 /* msecs */ > +#define MINIBOX_V1_KEYS_DEBOUNCE_INTERVAL (3 * > MINIBOX_V1_KEYS_POLL_INTERVAL) > + > +static const char *MINIBOX_V1_part_probes[] = { > + "tp-link", > + NULL, > +}; > + > +static struct flash_platform_data MINIBOX_V1_flash_data = { > + .part_probes = MINIBOX_V1_part_probes, > +}; > + > +static struct gpio_led MINIBOX_V1_leds_gpio[] __initdata = { > + { > + .name = "minibox-v1:green:system", > + .gpio = MINIBOX_V1_GPIO_LED_SYSTEM, > + .active_low = 0, > + }, > +}; > + > +static struct gpio_keys_button MINIBOX_V1_gpio_keys[] __initdata = { > + { > + .desc = "reset", > + .type = EV_KEY, > + .code = KEY_RESTART, > + .debounce_interval = MINIBOX_V1_KEYS_DEBOUNCE_INTERVAL, > + .gpio = MINIBOX_V1_GPIO_BTN_RESET, > + .active_low = 0, > + }, > +}; > + > +static void __init MINIBOX_V1_setup(void) > +{ > + u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00); > + u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000); > + > + ath79_register_leds_gpio(-1, ARRAY_SIZE(MINIBOX_V1_leds_gpio), > + MINIBOX_V1_leds_gpio); > + > + ath79_register_gpio_keys_polled(-1, MINIBOX_V1_KEYS_POLL_INTERVAL, > + ARRAY_SIZE(MINIBOX_V1_gpio_keys), > + MINIBOX_V1_gpio_keys); > + > + ath79_register_usb(); > + > + ath79_register_m25p80(&MINIBOX_V1_flash_data); > + ath79_init_mac(ath79_eth0_data.mac_addr, mac, 1); > + ath79_init_mac(ath79_eth1_data.mac_addr, mac, -1); > + > + ath79_register_mdio(0, 0x0); > + ath79_register_eth(1); > + ath79_register_eth(0); > + > + ath79_register_wmac(ee, mac); > +} > + > +MIPS_MACHINE(ATH79_MACH_MINIBOX_V1, "MINIBOX-V1", > + "MiniBox V1.0", MINIBOX_V1_setup); > Index: openwrt/trunk/target/linux/ar71xx/generic/profiles/minibox-v1.mk > =================================================================== > --- /dev/null > +++ openwrt/trunk/target/linux/ar71xx/generic/profiles/minibox-v1.mk > @@ -0,0 +1,17 @@ > +# > +# Copyright (C) 2015 OpenWrt.org > +# > +# This is free software, licensed under the GNU General Public License > v2. > +# See /LICENSE for more information. > +# > + > +define Profile/MINIBOXV1 > + NAME:=MINIBOX V1.0 > + PACKAGES:=kmod-usb-core kmod-usb2 kmod-ledtrig-usbdev > +endef > + > + > +define Profile/MINIBOXV1/Description > + Package set optimized for the MINIBOX V1.0 > +endef > +$(eval $(call Profile,MINIBOXV1)) > Index: openwrt/trunk/target/linux/ar71xx/image/Makefile > =================================================================== > --- openwrt.orig/trunk/target/linux/ar71xx/image/Makefile > +++ openwrt/trunk/target/linux/ar71xx/image/Makefile > @@ -902,6 +902,15 @@ endef > > TARGET_DEVICES += ubnt-uap-pro ubnt-unifi-outdoor-plus > > +define Device/minibox-v1 > + $(Device/tplink-16mlzma) > + BOARDNAME := MINIBOX-V1 > + DEVICE_PROFILE := MINIBOXV1 > + TPLINK_HWID := 0x3C000201 > + CONSOLE := ttyATH0,115200 > +endef > +TARGET_DEVICES += minibox-v1 > + > rootfs_type=$(patsubst jffs2-%,jffs2,$(patsubst > squashfs-%,squashfs,$(1))) > > # $(1): rootfs type. > Index: > openwrt/trunk/target/linux/ar71xx/patches-4.1/799-MIPS-ath79-add-minibox-v1-support.patch > =================================================================== > --- /dev/null > +++ > openwrt/trunk/target/linux/ar71xx/patches-4.1/799-MIPS-ath79-add-minibox-v1-support.patch > @@ -0,0 +1,39 @@ > +--- a/arch/mips/ath79/machtypes.h > ++++ b/arch/mips/ath79/machtypes.h > +@@ -61,6 +61,7 @@ enum ath79_mach_type { > + ATH79_MACH_ESR1750, /* EnGenius ESR1750 */ > + ATH79_MACH_GL_INET, /* GL-CONNECT GL-INET */ > + ATH79_MACH_GS_OOLITE, /* GS OOLITE V1.0 */ > ++ ATH79_MACH_MINIBOX_V1, /* MINIBOX V1.0 */ > + ATH79_MACH_HIWIFI_HC6361, /* HiWiFi HC6361 */ > + ATH79_MACH_JA76PF, /* jjPlus JA76PF */ > + ATH79_MACH_JA76PF2, /* jjPlus JA76PF2 */ > +--- a/arch/mips/ath79/Kconfig > ++++ b/arch/mips/ath79/Kconfig > +@@ -446,6 +446,16 @@ config ATH79_MACH_GS_OOLITE > + select ATH79_DEV_USB > + select ATH79_DEV_WMAC > + > ++config ATH79_MACH_MINIBOX_V1 > ++ bool "OOLITE BOX V1.0 support" wrong board name again. > ++ select SOC_AR933X > ++ select ARH79_DEV_ETH > ++ select ARH79_DEV_GPIO_BUTTONS > ++ select ATH79_DEV_LEDS_GPIO > ++ select ATH79_DEV_M25P80 > ++ select ATH79_DEV_USB > ++ select ATH79_DEV_WMAC > ++ > + config ATH79_MACH_HIWIFI_HC6361 > + bool "HiWiFi HC6361 board support" > + select SOC_AR933X > +--- a/arch/mips/ath79/Makefile > ++++ b/arch/mips/ath79/Makefile > +@@ -72,6 +72,7 @@ obj-$(CONFIG_ATH79_MACH_DIR_825_C1) += m > + obj-$(CONFIG_ATH79_MACH_ESR1750) += mach-esr1750.o > + obj-$(CONFIG_ATH79_MACH_GL_INET) += mach-gl-inet.o > + obj-$(CONFIG_ATH79_MACH_GS_OOLITE) += mach-gs-oolite.o > ++obj-$(CONFIG_ATH79_MACH_MINIBOX_V1) += mach-minibox-v1.o > + obj-$(CONFIG_ATH79_MACH_HIWIFI_HC6361) += mach-hiwifi-hc6361.o > + obj-$(CONFIG_ATH79_MACH_JA76PF) += mach-ja76pf.o > + obj-$(CONFIG_ATH79_MACH_JWAP003) += mach-jwap003.o > > > _______________________________________________ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel - -- Sent using Mailpile, Free Software from www.mailpile.is -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBAgAGBQJVyKMrAAoJEBmotQ/U1cr2eTgQAMCTCTW+tAdMfbstFBud1M7U MqsY2mZWQODU24pCQg4eJX5jskj5zXbxQCPBwZ8xwAfbZ/DBOQH23xauPfFDCqi2 U1mxC60GqS6C5bm0ZF8+kJeSRWnlwOX3vckwpZAnQYvyZUemGWef2JIUc7glS2kn NvQxCkwhl4PYWMl+Nox1De5NgOi0Ft1dUdXVAdLBm3abZMIYMcijWhR0iMjS3Snt SAzReHPr0v3XCXwQ+bc7aN1el1KeXhT+Bkv1WPKDrfvACjB6kZup8WKtXGYUy15L 7tMdOeiyHHfZZOaKg+qUzRCj+9g4DQpDqsQVtu/f5eicfOHjDZRA7kyZnxrcUJy1 6v3L8/2vNDxZY/z5gz7ilPl9k+EPECn56GtepWKjE9yzOSgRg1enlmfXh4g2SJgF +G1GSKsoyO4FuhzGMJ0xd5UMNE93nncK05vYHmUs3+OXoTj+eA8QGnIzByVJT197 NL7Ared98MpB6SenOQVnwKoi8YtPHWqjK2lnjplu0Jxb0ULdAVVa7SlV8Cmyd+89 +KtINxWxKdokzQKPus17YaSdJtcKVtExfaadCqA2HGbIwNCAx+KS7UxGESA/iSaD XMSAPyCXQCqg9eznZGtZEwq7q0PRvyw98UbdyYG9AMUtO2XdCgxHImxfbb9RMo6p 0EUe8DdJPkWLEXxHd21D =saX1 -----END PGP SIGNATURE-----
Hi Karl, Thanks for your time. I have reworked the patch and re-ordered where possible (files like ar71xx.sh and diag.sh lack any alphabetical order). I have removed the code that set the led to status_led_off. What file should I be looking at, when you talk about the board file? Is it the minibox-v1.mk file? I diffed from the vendor's code (and added a profile by comparing with other devices) but that was it. I don't have the hardware myself but I have found a tester willing to run the image (and see how the LED behaves with the default OpenWrt settings). The new patch can be found here: https://volatilesystems.org/dl/openwrt/targets/add-minibox-target-trunk.patch If that doesn't work, a backup: http://sprunge.us/AUbX And for those wanting to try on 15.05: https://volatilesystems.org/dl/openwrt/targets/add-minibox-target-15.05.patch Thanks Stijn Op ma, 10 aug 2015 om 3:12 , schreef Karl Palsson <karlp@tweak.net.au>: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > This has many cases where you have added the board out of order. The > lists are generally alphabetically sorted, and should be maintained > that > way, even though a few boards escaped this. > > More comments inline. > > > Stijn Segers <francesco.borromini@inventati.org> wrote: >> Hello, >> >> The patch below adds support for the Gainstrong Minibox v1.0 mini >> router into trunk. This is based off the Barrier Breaker based >> source >> code at http://ooioe.com/miniboxv1/Sourcecode/. >> >> Patch applies cleanly, has been compile-tested on a 15.05 tree (the >> patch below is for the trunk ar17xx target with kernel 4.1). For >> those >> interested, I can provide the 15.05 patch as well. >> >> Any questions, let me know. >> >> Thank you >> >> Stijn >> >> >> >> >> Index: openwrt/trunk/target/linux/ar71xx/base-files/etc/diag.sh >> =================================================================== >> --- openwrt.orig/trunk/target/linux/ar71xx/base-files/etc/diag.sh >> +++ openwrt/trunk/target/linux/ar71xx/base-files/etc/diag.sh >> @@ -222,6 +222,9 @@ get_status_led() { >> qihoo-c301) >> status_led="qihoo:green:status" >> ;; >> + minibox-v1) >> + status_led="minibox-v1:green:system" >> + ;; >> tew-632brp) >> status_led="tew-632brp:green:status" >> ;; >> @@ -366,7 +369,7 @@ set_state() { >> status_led_blink_preinit_regular >> ;; >> done) >> - status_led_on >> + status_led_off > > Pretty sure you can't just change this for everyone. If you have an > active low/active high issue, you should fix that in your board file. > >> case $(ar71xx_board_name) in >> qihoo-c301) >> local n=$(fw_printenv activeregion | cut -d = -f 2) >> Index: >> >> openwrt/trunk/target/linux/ar71xx/base-files/etc/uci-defaults/02_network >> =================================================================== >> --- >> >> openwrt.orig/trunk/target/linux/ar71xx/base-files/etc/uci-defaults/02_network >> +++ >> >> openwrt/trunk/target/linux/ar71xx/base-files/etc/uci-defaults/02_network >> @@ -419,6 +419,7 @@ ja76pf |\ >> mc-mac1200r|\ >> mynet-n600 |\ >> oolite |\ >> +minibox-v1 |\ > > > I know gainstrong makes the oolite too, but at this point in this > file, > that's irrelevant, keep the alphabetical sorting. > >> qihoo-c301 |\ >> rb-750 |\ >> rb-751 |\ >> Index: openwrt/trunk/target/linux/ar71xx/base-files/lib/ar71xx.sh >> =================================================================== >> --- openwrt.orig/trunk/target/linux/ar71xx/base-files/lib/ar71xx.sh >> +++ openwrt/trunk/target/linux/ar71xx/base-files/lib/ar71xx.sh >> @@ -119,6 +119,9 @@ tplink_board_detect() { >> "3C0001"*) >> model="OOLITE" >> ;; >> + "3C0002"*) >> + model="MINIBOX_V1" >> + ;; >> "070300"*) >> model="TP-Link TL-WR703N" >> ;; >> @@ -320,6 +323,9 @@ ar71xx_board_detect() { >> *"AC1750DB") >> name="f9k1115v2" >> ;; >> + *"MiniBox V1.0") >> + name="minibox-v1" >> + ;; > > Bad sort. > >> *"AirGateway") >> name="airgateway" >> ;; >> Index: >> openwrt/trunk/target/linux/ar71xx/base-files/lib/upgrade/platform.sh >> =================================================================== >> --- >> >> openwrt.orig/trunk/target/linux/ar71xx/base-files/lib/upgrade/platform.sh >> +++ >> openwrt/trunk/target/linux/ar71xx/base-files/lib/upgrade/platform.sh >> @@ -315,6 +315,7 @@ platform_check_image() { >> mc-mac1200r | \ >> onion-omega | \ >> oolite | \ >> + minibox-v1 |\ > > Bad sort. > >> smart-300 | \ >> tl-mr10u | \ >> tl-mr11u | \ >> Index: openwrt/trunk/target/linux/ar71xx/config-4.1 >> =================================================================== >> --- openwrt.orig/trunk/target/linux/ar71xx/config-4.1 >> +++ openwrt/trunk/target/linux/ar71xx/config-4.1 >> @@ -73,6 +73,7 @@ CONFIG_ATH79_MACH_EW_DORIN=y >> CONFIG_ATH79_MACH_F9K1115V2=y >> CONFIG_ATH79_MACH_GL_INET=y >> CONFIG_ATH79_MACH_GS_OOLITE=y >> +CONFIG_ATH79_MACH_MINIBOX_V1=y > > > very bad sort. config files have even strong sorting requirements. > >> CONFIG_ATH79_MACH_HIWIFI_HC6361=y >> CONFIG_ATH79_MACH_HORNET_UB=y >> CONFIG_ATH79_MACH_JA76PF=y >> Index: >> >> openwrt/trunk/target/linux/ar71xx/files/arch/mips/ath79/mach-minibox-v1.c >> =================================================================== >> --- /dev/null >> +++ >> >> openwrt/trunk/target/linux/ar71xx/files/arch/mips/ath79/mach-minibox-v1.c >> @@ -0,0 +1,85 @@ >> +/* >> + * Oolite board support > > > Wrong. Oolite is the board you copied. This file should be > accurately > describe what it does, not what it used to do at some point. > >> + * >> + * >> + * 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 <asm/mach-ath79/ar71xx_regs.h> >> + >> +#include "common.h" >> +#include "dev-eth.h" >> +#include "dev-gpio-buttons.h" >> +#include "dev-leds-gpio.h" >> +#include "dev-m25p80.h" >> +#include "dev-wmac.h" >> +#include "machtypes.h" >> +#include "dev-usb.h" > > > It's a matter of taste, but you didn't think of putting all the dev- > includes together? > >> + >> +#define MINIBOX_V1_GPIO_BTN_RESET 11 >> + >> +#define MINIBOX_V1_GPIO_LED_SYSTEM 1 >> + >> +#define MINIBOX_V1_KEYS_POLL_INTERVAL 20 /* msecs */ >> +#define MINIBOX_V1_KEYS_DEBOUNCE_INTERVAL (3 * >> MINIBOX_V1_KEYS_POLL_INTERVAL) >> + >> +static const char *MINIBOX_V1_part_probes[] = { >> + "tp-link", >> + NULL, >> +}; >> + >> +static struct flash_platform_data MINIBOX_V1_flash_data = { >> + .part_probes = MINIBOX_V1_part_probes, >> +}; >> + >> +static struct gpio_led MINIBOX_V1_leds_gpio[] __initdata = { >> + { >> + .name = "minibox-v1:green:system", >> + .gpio = MINIBOX_V1_GPIO_LED_SYSTEM, >> + .active_low = 0, >> + }, >> +}; >> + >> +static struct gpio_keys_button MINIBOX_V1_gpio_keys[] __initdata = >> { >> + { >> + .desc = "reset", >> + .type = EV_KEY, >> + .code = KEY_RESTART, >> + .debounce_interval = MINIBOX_V1_KEYS_DEBOUNCE_INTERVAL, >> + .gpio = MINIBOX_V1_GPIO_BTN_RESET, >> + .active_low = 0, >> + }, >> +}; >> + >> +static void __init MINIBOX_V1_setup(void) >> +{ >> + u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00); >> + u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000); >> + >> + ath79_register_leds_gpio(-1, ARRAY_SIZE(MINIBOX_V1_leds_gpio), >> + MINIBOX_V1_leds_gpio); >> + >> + ath79_register_gpio_keys_polled(-1, MINIBOX_V1_KEYS_POLL_INTERVAL, >> + ARRAY_SIZE(MINIBOX_V1_gpio_keys), >> + MINIBOX_V1_gpio_keys); >> + >> + ath79_register_usb(); >> + >> + ath79_register_m25p80(&MINIBOX_V1_flash_data); >> + ath79_init_mac(ath79_eth0_data.mac_addr, mac, 1); >> + ath79_init_mac(ath79_eth1_data.mac_addr, mac, -1); >> + >> + ath79_register_mdio(0, 0x0); >> + ath79_register_eth(1); >> + ath79_register_eth(0); >> + >> + ath79_register_wmac(ee, mac); >> +} >> + >> +MIPS_MACHINE(ATH79_MACH_MINIBOX_V1, "MINIBOX-V1", >> + "MiniBox V1.0", MINIBOX_V1_setup); >> Index: >> openwrt/trunk/target/linux/ar71xx/generic/profiles/minibox-v1.mk >> =================================================================== >> --- /dev/null >> +++ openwrt/trunk/target/linux/ar71xx/generic/profiles/minibox-v1.mk >> @@ -0,0 +1,17 @@ >> +# >> +# Copyright (C) 2015 OpenWrt.org >> +# >> +# This is free software, licensed under the GNU General Public >> License >> v2. >> +# See /LICENSE for more information. >> +# >> + >> +define Profile/MINIBOXV1 >> + NAME:=MINIBOX V1.0 >> + PACKAGES:=kmod-usb-core kmod-usb2 kmod-ledtrig-usbdev >> +endef >> + >> + >> +define Profile/MINIBOXV1/Description >> + Package set optimized for the MINIBOX V1.0 >> +endef >> +$(eval $(call Profile,MINIBOXV1)) >> Index: openwrt/trunk/target/linux/ar71xx/image/Makefile >> =================================================================== >> --- openwrt.orig/trunk/target/linux/ar71xx/image/Makefile >> +++ openwrt/trunk/target/linux/ar71xx/image/Makefile >> @@ -902,6 +902,15 @@ endef >> >> TARGET_DEVICES += ubnt-uap-pro ubnt-unifi-outdoor-plus >> >> +define Device/minibox-v1 >> + $(Device/tplink-16mlzma) >> + BOARDNAME := MINIBOX-V1 >> + DEVICE_PROFILE := MINIBOXV1 >> + TPLINK_HWID := 0x3C000201 >> + CONSOLE := ttyATH0,115200 >> +endef >> +TARGET_DEVICES += minibox-v1 >> + >> rootfs_type=$(patsubst jffs2-%,jffs2,$(patsubst >> squashfs-%,squashfs,$(1))) >> >> # $(1): rootfs type. >> Index: >> >> openwrt/trunk/target/linux/ar71xx/patches-4.1/799-MIPS-ath79-add-minibox-v1-support.patch >> =================================================================== >> --- /dev/null >> +++ >> >> openwrt/trunk/target/linux/ar71xx/patches-4.1/799-MIPS-ath79-add-minibox-v1-support.patch >> @@ -0,0 +1,39 @@ >> +--- a/arch/mips/ath79/machtypes.h >> ++++ b/arch/mips/ath79/machtypes.h >> +@@ -61,6 +61,7 @@ enum ath79_mach_type { >> + ATH79_MACH_ESR1750, /* EnGenius ESR1750 */ >> + ATH79_MACH_GL_INET, /* GL-CONNECT GL-INET */ >> + ATH79_MACH_GS_OOLITE, /* GS OOLITE V1.0 */ >> ++ ATH79_MACH_MINIBOX_V1, /* MINIBOX V1.0 */ >> + ATH79_MACH_HIWIFI_HC6361, /* HiWiFi HC6361 */ >> + ATH79_MACH_JA76PF, /* jjPlus JA76PF */ >> + ATH79_MACH_JA76PF2, /* jjPlus JA76PF2 */ >> +--- a/arch/mips/ath79/Kconfig >> ++++ b/arch/mips/ath79/Kconfig >> +@@ -446,6 +446,16 @@ config ATH79_MACH_GS_OOLITE >> + select ATH79_DEV_USB >> + select ATH79_DEV_WMAC >> + >> ++config ATH79_MACH_MINIBOX_V1 >> ++ bool "OOLITE BOX V1.0 support" > > wrong board name again. > > >> ++ select SOC_AR933X >> ++ select ARH79_DEV_ETH >> ++ select ARH79_DEV_GPIO_BUTTONS >> ++ select ATH79_DEV_LEDS_GPIO >> ++ select ATH79_DEV_M25P80 >> ++ select ATH79_DEV_USB >> ++ select ATH79_DEV_WMAC >> ++ >> + config ATH79_MACH_HIWIFI_HC6361 >> + bool "HiWiFi HC6361 board support" >> + select SOC_AR933X >> +--- a/arch/mips/ath79/Makefile >> ++++ b/arch/mips/ath79/Makefile >> +@@ -72,6 +72,7 @@ obj-$(CONFIG_ATH79_MACH_DIR_825_C1) += m >> + obj-$(CONFIG_ATH79_MACH_ESR1750) += mach-esr1750.o >> + obj-$(CONFIG_ATH79_MACH_GL_INET) += mach-gl-inet.o >> + obj-$(CONFIG_ATH79_MACH_GS_OOLITE) += mach-gs-oolite.o >> ++obj-$(CONFIG_ATH79_MACH_MINIBOX_V1) += mach-minibox-v1.o >> + obj-$(CONFIG_ATH79_MACH_HIWIFI_HC6361) += mach-hiwifi-hc6361.o >> + obj-$(CONFIG_ATH79_MACH_JA76PF) += mach-ja76pf.o >> + obj-$(CONFIG_ATH79_MACH_JWAP003) += mach-jwap003.o >> >> >> _______________________________________________ >> openwrt-devel mailing list >> openwrt-devel@lists.openwrt.org >> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > > - -- > Sent using Mailpile, Free Software from www.mailpile.is > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.11 (GNU/Linux) > > iQIcBAEBAgAGBQJVyKMrAAoJEBmotQ/U1cr2eTgQAMCTCTW+tAdMfbstFBud1M7U > MqsY2mZWQODU24pCQg4eJX5jskj5zXbxQCPBwZ8xwAfbZ/DBOQH23xauPfFDCqi2 > U1mxC60GqS6C5bm0ZF8+kJeSRWnlwOX3vckwpZAnQYvyZUemGWef2JIUc7glS2kn > NvQxCkwhl4PYWMl+Nox1De5NgOi0Ft1dUdXVAdLBm3abZMIYMcijWhR0iMjS3Snt > SAzReHPr0v3XCXwQ+bc7aN1el1KeXhT+Bkv1WPKDrfvACjB6kZup8WKtXGYUy15L > 7tMdOeiyHHfZZOaKg+qUzRCj+9g4DQpDqsQVtu/f5eicfOHjDZRA7kyZnxrcUJy1 > 6v3L8/2vNDxZY/z5gz7ilPl9k+EPECn56GtepWKjE9yzOSgRg1enlmfXh4g2SJgF > +G1GSKsoyO4FuhzGMJ0xd5UMNE93nncK05vYHmUs3+OXoTj+eA8QGnIzByVJT197 > NL7Ared98MpB6SenOQVnwKoi8YtPHWqjK2lnjplu0Jxb0ULdAVVa7SlV8Cmyd+89 > +KtINxWxKdokzQKPus17YaSdJtcKVtExfaadCqA2HGbIwNCAx+KS7UxGESA/iSaD > XMSAPyCXQCqg9eznZGtZEwq7q0PRvyw98UbdyYG9AMUtO2XdCgxHImxfbb9RMo6p > 0EUe8DdJPkWLEXxHd21D > =saX1 > -----END PGP SIGNATURE-----
There was an error in the patch on Sprunge, so new link: http://sprunge.us/biVc The other links are fine. Cheers Stijn Op wo, 12 aug 2015 om 8:28 , schreef Stijn Segers <francesco.borromini@inventati.org>: > Hi Karl, > > Thanks for your time. > > I have reworked the patch and re-ordered where possible (files like > ar71xx.sh and diag.sh lack any alphabetical > order). I have removed the code that set the led to status_led_off. > What file should I be looking at, when you talk > about the board file? Is it the minibox-v1.mk file? I diffed from the > vendor's code (and added a profile by comparing > with other devices) but that was it. > > I don't have the hardware myself but I have found a tester willing to > run the image (and see how the LED behaves with > the default OpenWrt settings). > > > The new patch can be found here: > > https://volatilesystems.org/dl/openwrt/targets/add-minibox-target-trunk.patch > > If that doesn't work, a backup: http://sprunge.us/AUbX > > > And for those wanting to try on 15.05: > > https://volatilesystems.org/dl/openwrt/targets/add-minibox-target-15.05.patch > > Thanks > > Stijn > > > > Op ma, 10 aug 2015 om 3:12 , schreef Karl Palsson > <karlp@tweak.net.au>: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> This has many cases where you have added the board out of order. The >> lists are generally alphabetically sorted, and should be maintained >> that >> way, even though a few boards escaped this. >> >> More comments inline. >> >> >> Stijn Segers <francesco.borromini@inventati.org> wrote: >>> Hello, >>> >>> The patch below adds support for the Gainstrong Minibox v1.0 mini >>> router into trunk. This is based off the Barrier Breaker based >>> source >>> code at http://ooioe.com/miniboxv1/Sourcecode/. >>> >>> Patch applies cleanly, has been compile-tested on a 15.05 tree (the >>> patch below is for the trunk ar17xx target with kernel 4.1). For >>> those >>> interested, I can provide the 15.05 patch as well. >>> >>> Any questions, let me know. >>> >>> Thank you >>> >>> Stijn >>> >>> >>> >>> >>> Index: openwrt/trunk/target/linux/ar71xx/base-files/etc/diag.sh >>> =================================================================== >>> --- openwrt.orig/trunk/target/linux/ar71xx/base-files/etc/diag.sh >>> +++ openwrt/trunk/target/linux/ar71xx/base-files/etc/diag.sh >>> @@ -222,6 +222,9 @@ get_status_led() { >>> qihoo-c301) >>> status_led="qihoo:green:status" >>> ;; >>> + minibox-v1) >>> + status_led="minibox-v1:green:system" >>> + ;; >>> tew-632brp) >>> status_led="tew-632brp:green:status" >>> ;; >>> @@ -366,7 +369,7 @@ set_state() { >>> status_led_blink_preinit_regular >>> ;; >>> done) >>> - status_led_on >>> + status_led_off >> >> Pretty sure you can't just change this for everyone. If you have an >> active low/active high issue, you should fix that in your board file. >> >>> case $(ar71xx_board_name) in >>> qihoo-c301) >>> local n=$(fw_printenv activeregion | cut -d = -f 2) >>> Index: >>> >>> openwrt/trunk/target/linux/ar71xx/base-files/etc/uci-defaults/02_network >>> =================================================================== >>> --- >>> >>> openwrt.orig/trunk/target/linux/ar71xx/base-files/etc/uci-defaults/02_network >>> +++ >>> >>> openwrt/trunk/target/linux/ar71xx/base-files/etc/uci-defaults/02_network >>> @@ -419,6 +419,7 @@ ja76pf |\ >>> mc-mac1200r|\ >>> mynet-n600 |\ >>> oolite |\ >>> +minibox-v1 |\ >> >> >> I know gainstrong makes the oolite too, but at this point in this >> file, >> that's irrelevant, keep the alphabetical sorting. >> >>> qihoo-c301 |\ >>> rb-750 |\ >>> rb-751 |\ >>> Index: openwrt/trunk/target/linux/ar71xx/base-files/lib/ar71xx.sh >>> =================================================================== >>> --- openwrt.orig/trunk/target/linux/ar71xx/base-files/lib/ar71xx.sh >>> +++ openwrt/trunk/target/linux/ar71xx/base-files/lib/ar71xx.sh >>> @@ -119,6 +119,9 @@ tplink_board_detect() { >>> "3C0001"*) >>> model="OOLITE" >>> ;; >>> + "3C0002"*) >>> + model="MINIBOX_V1" >>> + ;; >>> "070300"*) >>> model="TP-Link TL-WR703N" >>> ;; >>> @@ -320,6 +323,9 @@ ar71xx_board_detect() { >>> *"AC1750DB") >>> name="f9k1115v2" >>> ;; >>> + *"MiniBox V1.0") >>> + name="minibox-v1" >>> + ;; >> >> Bad sort. >> >>> *"AirGateway") >>> name="airgateway" >>> ;; >>> Index: >>> >>> openwrt/trunk/target/linux/ar71xx/base-files/lib/upgrade/platform.sh >>> =================================================================== >>> --- >>> >>> openwrt.orig/trunk/target/linux/ar71xx/base-files/lib/upgrade/platform.sh >>> +++ >>> openwrt/trunk/target/linux/ar71xx/base-files/lib/upgrade/platform.sh >>> @@ -315,6 +315,7 @@ platform_check_image() { >>> mc-mac1200r | \ >>> onion-omega | \ >>> oolite | \ >>> + minibox-v1 |\ >> >> Bad sort. >> >>> smart-300 | \ >>> tl-mr10u | \ >>> tl-mr11u | \ >>> Index: openwrt/trunk/target/linux/ar71xx/config-4.1 >>> =================================================================== >>> --- openwrt.orig/trunk/target/linux/ar71xx/config-4.1 >>> +++ openwrt/trunk/target/linux/ar71xx/config-4.1 >>> @@ -73,6 +73,7 @@ CONFIG_ATH79_MACH_EW_DORIN=y >>> CONFIG_ATH79_MACH_F9K1115V2=y >>> CONFIG_ATH79_MACH_GL_INET=y >>> CONFIG_ATH79_MACH_GS_OOLITE=y >>> +CONFIG_ATH79_MACH_MINIBOX_V1=y >> >> >> very bad sort. config files have even strong sorting requirements. >> >>> CONFIG_ATH79_MACH_HIWIFI_HC6361=y >>> CONFIG_ATH79_MACH_HORNET_UB=y >>> CONFIG_ATH79_MACH_JA76PF=y >>> Index: >>> >>> openwrt/trunk/target/linux/ar71xx/files/arch/mips/ath79/mach-minibox-v1.c >>> =================================================================== >>> --- /dev/null >>> +++ >>> >>> openwrt/trunk/target/linux/ar71xx/files/arch/mips/ath79/mach-minibox-v1.c >>> @@ -0,0 +1,85 @@ >>> +/* >>> + * Oolite board support >> >> >> Wrong. Oolite is the board you copied. This file should be >> accurately >> describe what it does, not what it used to do at some point. >> >>> + * >>> + * >>> + * 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 <asm/mach-ath79/ar71xx_regs.h> >>> + >>> +#include "common.h" >>> +#include "dev-eth.h" >>> +#include "dev-gpio-buttons.h" >>> +#include "dev-leds-gpio.h" >>> +#include "dev-m25p80.h" >>> +#include "dev-wmac.h" >>> +#include "machtypes.h" >>> +#include "dev-usb.h" >> >> >> It's a matter of taste, but you didn't think of putting all the dev- >> includes together? >> >>> + >>> +#define MINIBOX_V1_GPIO_BTN_RESET 11 >>> + >>> +#define MINIBOX_V1_GPIO_LED_SYSTEM 1 >>> + >>> +#define MINIBOX_V1_KEYS_POLL_INTERVAL 20 /* msecs */ >>> +#define MINIBOX_V1_KEYS_DEBOUNCE_INTERVAL (3 * >>> MINIBOX_V1_KEYS_POLL_INTERVAL) >>> + >>> +static const char *MINIBOX_V1_part_probes[] = { >>> + "tp-link", >>> + NULL, >>> +}; >>> + >>> +static struct flash_platform_data MINIBOX_V1_flash_data = { >>> + .part_probes = MINIBOX_V1_part_probes, >>> +}; >>> + >>> +static struct gpio_led MINIBOX_V1_leds_gpio[] __initdata = { >>> + { >>> + .name = "minibox-v1:green:system", >>> + .gpio = MINIBOX_V1_GPIO_LED_SYSTEM, >>> + .active_low = 0, >>> + }, >>> +}; >>> + >>> +static struct gpio_keys_button MINIBOX_V1_gpio_keys[] __initdata >>> = { >>> + { >>> + .desc = "reset", >>> + .type = EV_KEY, >>> + .code = KEY_RESTART, >>> + .debounce_interval = MINIBOX_V1_KEYS_DEBOUNCE_INTERVAL, >>> + .gpio = MINIBOX_V1_GPIO_BTN_RESET, >>> + .active_low = 0, >>> + }, >>> +}; >>> + >>> +static void __init MINIBOX_V1_setup(void) >>> +{ >>> + u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00); >>> + u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000); >>> + >>> + ath79_register_leds_gpio(-1, ARRAY_SIZE(MINIBOX_V1_leds_gpio), >>> + MINIBOX_V1_leds_gpio); >>> + >>> + ath79_register_gpio_keys_polled(-1, >>> MINIBOX_V1_KEYS_POLL_INTERVAL, >>> + ARRAY_SIZE(MINIBOX_V1_gpio_keys), >>> + MINIBOX_V1_gpio_keys); >>> + >>> + ath79_register_usb(); >>> + >>> + ath79_register_m25p80(&MINIBOX_V1_flash_data); >>> + ath79_init_mac(ath79_eth0_data.mac_addr, mac, 1); >>> + ath79_init_mac(ath79_eth1_data.mac_addr, mac, -1); >>> + >>> + ath79_register_mdio(0, 0x0); >>> + ath79_register_eth(1); >>> + ath79_register_eth(0); >>> + >>> + ath79_register_wmac(ee, mac); >>> +} >>> + >>> +MIPS_MACHINE(ATH79_MACH_MINIBOX_V1, "MINIBOX-V1", >>> + "MiniBox V1.0", MINIBOX_V1_setup); >>> Index: >>> openwrt/trunk/target/linux/ar71xx/generic/profiles/minibox-v1.mk >>> =================================================================== >>> --- /dev/null >>> +++ >>> openwrt/trunk/target/linux/ar71xx/generic/profiles/minibox-v1.mk >>> @@ -0,0 +1,17 @@ >>> +# >>> +# Copyright (C) 2015 OpenWrt.org >>> +# >>> +# This is free software, licensed under the GNU General Public >>> License >>> v2. >>> +# See /LICENSE for more information. >>> +# >>> + >>> +define Profile/MINIBOXV1 >>> + NAME:=MINIBOX V1.0 >>> + PACKAGES:=kmod-usb-core kmod-usb2 kmod-ledtrig-usbdev >>> +endef >>> + >>> + >>> +define Profile/MINIBOXV1/Description >>> + Package set optimized for the MINIBOX V1.0 >>> +endef >>> +$(eval $(call Profile,MINIBOXV1)) >>> Index: openwrt/trunk/target/linux/ar71xx/image/Makefile >>> =================================================================== >>> --- openwrt.orig/trunk/target/linux/ar71xx/image/Makefile >>> +++ openwrt/trunk/target/linux/ar71xx/image/Makefile >>> @@ -902,6 +902,15 @@ endef >>> >>> TARGET_DEVICES += ubnt-uap-pro ubnt-unifi-outdoor-plus >>> >>> +define Device/minibox-v1 >>> + $(Device/tplink-16mlzma) >>> + BOARDNAME := MINIBOX-V1 >>> + DEVICE_PROFILE := MINIBOXV1 >>> + TPLINK_HWID := 0x3C000201 >>> + CONSOLE := ttyATH0,115200 >>> +endef >>> +TARGET_DEVICES += minibox-v1 >>> + >>> rootfs_type=$(patsubst jffs2-%,jffs2,$(patsubst >>> squashfs-%,squashfs,$(1))) >>> >>> # $(1): rootfs type. >>> Index: >>> >>> openwrt/trunk/target/linux/ar71xx/patches-4.1/799-MIPS-ath79-add-minibox-v1-support.patch >>> =================================================================== >>> --- /dev/null >>> +++ >>> >>> openwrt/trunk/target/linux/ar71xx/patches-4.1/799-MIPS-ath79-add-minibox-v1-support.patch >>> @@ -0,0 +1,39 @@ >>> +--- a/arch/mips/ath79/machtypes.h >>> ++++ b/arch/mips/ath79/machtypes.h >>> +@@ -61,6 +61,7 @@ enum ath79_mach_type { >>> + ATH79_MACH_ESR1750, /* EnGenius ESR1750 */ >>> + ATH79_MACH_GL_INET, /* GL-CONNECT GL-INET */ >>> + ATH79_MACH_GS_OOLITE, /* GS OOLITE V1.0 */ >>> ++ ATH79_MACH_MINIBOX_V1, /* MINIBOX V1.0 */ >>> + ATH79_MACH_HIWIFI_HC6361, /* HiWiFi HC6361 */ >>> + ATH79_MACH_JA76PF, /* jjPlus JA76PF */ >>> + ATH79_MACH_JA76PF2, /* jjPlus JA76PF2 */ >>> +--- a/arch/mips/ath79/Kconfig >>> ++++ b/arch/mips/ath79/Kconfig >>> +@@ -446,6 +446,16 @@ config ATH79_MACH_GS_OOLITE >>> + select ATH79_DEV_USB >>> + select ATH79_DEV_WMAC >>> + >>> ++config ATH79_MACH_MINIBOX_V1 >>> ++ bool "OOLITE BOX V1.0 support" >> >> wrong board name again. >> >> >>> ++ select SOC_AR933X >>> ++ select ARH79_DEV_ETH >>> ++ select ARH79_DEV_GPIO_BUTTONS >>> ++ select ATH79_DEV_LEDS_GPIO >>> ++ select ATH79_DEV_M25P80 >>> ++ select ATH79_DEV_USB >>> ++ select ATH79_DEV_WMAC >>> ++ >>> + config ATH79_MACH_HIWIFI_HC6361 >>> + bool "HiWiFi HC6361 board support" >>> + select SOC_AR933X >>> +--- a/arch/mips/ath79/Makefile >>> ++++ b/arch/mips/ath79/Makefile >>> +@@ -72,6 +72,7 @@ obj-$(CONFIG_ATH79_MACH_DIR_825_C1) += m >>> + obj-$(CONFIG_ATH79_MACH_ESR1750) += mach-esr1750.o >>> + obj-$(CONFIG_ATH79_MACH_GL_INET) += mach-gl-inet.o >>> + obj-$(CONFIG_ATH79_MACH_GS_OOLITE) += mach-gs-oolite.o >>> ++obj-$(CONFIG_ATH79_MACH_MINIBOX_V1) += mach-minibox-v1.o >>> + obj-$(CONFIG_ATH79_MACH_HIWIFI_HC6361) += mach-hiwifi-hc6361.o >>> + obj-$(CONFIG_ATH79_MACH_JA76PF) += mach-ja76pf.o >>> + obj-$(CONFIG_ATH79_MACH_JWAP003) += mach-jwap003.o >>> >>> >>> _______________________________________________ >>> openwrt-devel mailing list >>> openwrt-devel@lists.openwrt.org >>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel >> >> - -- >> Sent using Mailpile, Free Software from www.mailpile.is >> >> -----BEGIN PGP SIGNATURE----- >> Version: GnuPG v1.4.11 (GNU/Linux) >> >> iQIcBAEBAgAGBQJVyKMrAAoJEBmotQ/U1cr2eTgQAMCTCTW+tAdMfbstFBud1M7U >> MqsY2mZWQODU24pCQg4eJX5jskj5zXbxQCPBwZ8xwAfbZ/DBOQH23xauPfFDCqi2 >> U1mxC60GqS6C5bm0ZF8+kJeSRWnlwOX3vckwpZAnQYvyZUemGWef2JIUc7glS2kn >> NvQxCkwhl4PYWMl+Nox1De5NgOi0Ft1dUdXVAdLBm3abZMIYMcijWhR0iMjS3Snt >> SAzReHPr0v3XCXwQ+bc7aN1el1KeXhT+Bkv1WPKDrfvACjB6kZup8WKtXGYUy15L >> 7tMdOeiyHHfZZOaKg+qUzRCj+9g4DQpDqsQVtu/f5eicfOHjDZRA7kyZnxrcUJy1 >> 6v3L8/2vNDxZY/z5gz7ilPl9k+EPECn56GtepWKjE9yzOSgRg1enlmfXh4g2SJgF >> +G1GSKsoyO4FuhzGMJ0xd5UMNE93nncK05vYHmUs3+OXoTj+eA8QGnIzByVJT197 >> NL7Ared98MpB6SenOQVnwKoi8YtPHWqjK2lnjplu0Jxb0ULdAVVa7SlV8Cmyd+89 >> +KtINxWxKdokzQKPus17YaSdJtcKVtExfaadCqA2HGbIwNCAx+KS7UxGESA/iSaD >> XMSAPyCXQCqg9eznZGtZEwq7q0PRvyw98UbdyYG9AMUtO2XdCgxHImxfbb9RMo6p >> 0EUe8DdJPkWLEXxHd21D >> =saX1 >> -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Stijn Segers <francesco.borromini@inventati.org> wrote: > Hi Karl, > > Thanks for your time. > > I have reworked the patch and re-ordered where possible (files like > ar71xx.sh and diag.sh lack any alphabetical > order). I have removed the code that set the led to status_led_off. > What file should I be looking at, when you talk > about the board file? Is it the minibox-v1.mk file? I diffed from the > vendor's code (and added a profile by comparing > with other devices) but that was it. I meant target/linux/ar71xx/files/arch/mips/ath79/mach-minibox-v1.c > > I don't have the hardware myself but I have found a tester willing to > run the image (and see how the LED behaves with > the default OpenWrt settings). It's not relevant how it behaves for them on their board. My problem here was that you were changing the behaviour for _all_ boards. And by the sound of it, you were working around an active low/high misconfiguration, which should be addressed by properly configuring the polarity of the leds in your board file, target/linux/ar71xx/files/arch/mips/ath79/mach-minibox-v1.c > > > The new patch can be found here: > > https://volatilesystems.org/dl/openwrt/targets/add-minibox-target-trunk.patch > > If that doesn't work, a backup: http://sprunge.us/AUbX No-one's looking at that. I'm being helpful by reviewing your earlier mangled patch, but if you want this to be applied, you _will_ need to follow https://dev.openwrt.org/wiki/SubmittingPatches Pay particular attention to item 6. Yes, this is the graybeard stone age, lowest common denominator of email behaviour, but those are the _rules_ I recommend git-send-email to avoid the mangling that most clients will do. I expect the problem here: https://patchwork.ozlabs.org/patch/505479/ was that you trying to use diff manually to generate the patch set (from your .orig directory) While I'm sure that's possible, there's a reason most people use git or svn. Cheers, Karl P -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBAgAGBQJVzJtSAAoJEBmotQ/U1cr2WT4QALzDtq4XEBLaooi/Bu8qr+WI 83MRsoZHHd6GzEq+x8+2P07vPqrOHu6xbKGgx34KbAj4W6YXAUme8HYRm0/rIoYm PnJj5xJzn/JOkQbUU21+Fj+mXFEKWAyNC0byjmzFRIeo7viMSUCuPfU6NPm+aQua iDDj4iZTbgtPVRdBWAu6glBSLFajrS35PFbcLOfX1bvJ/ci930PWymfSWgY0bH+0 AyXzHcRbfM/apf09e3VxicfzmFCWLYMkAdStjPXKuok3hXom7E7gk6iMHE5j9B0A JxTBlahs+yoi4A0eEEGQs+D5+hisFzXB0mbGHqTBmpGyXFzo21V4sZfb00UrGtVx h1lcXKAU3IC4MVRm0I3/Ef0LCBeDCW1w/yNNBt/X4POGPm1ZUYl8B3z27/1AX6M9 /B4f35/A0g1X2sQLv4fZppJVbOhoxlgpxEo+Ms7TgVX/ERTUbN/n37b37UQg6frA MIG5OWHK+9HQk7NYXFvQWoW/jBLfU2HLR9ki1AUJtEfNQpYtOxJjZcF1SMlA46/0 aPUYbu/NObBYpA2CtheJuzb8MgeeE6QQs4D8Ik6de5NeBrO93XCe2nkJg9XCLkM/ a1uCq4R+p35nAq7Vrb94V/LjQasxwIOzJpSVMmAWIjQb8H5j6iYtwJlONrJCQGq2 WtF+/zcBO3X9fFVnlM7Q =zcDx -----END PGP SIGNATURE-----
Index: openwrt/trunk/target/linux/ar71xx/base-files/etc/diag.sh =================================================================== --- openwrt.orig/trunk/target/linux/ar71xx/base-files/etc/diag.sh +++ openwrt/trunk/target/linux/ar71xx/base-files/etc/diag.sh @@ -222,6 +222,9 @@ get_status_led() { qihoo-c301) status_led="qihoo:green:status" ;; + minibox-v1) + status_led="minibox-v1:green:system" + ;; tew-632brp) status_led="tew-632brp:green:status" ;; @@ -366,7 +369,7 @@ set_state() { status_led_blink_preinit_regular ;; done) - status_led_on + status_led_off case $(ar71xx_board_name) in qihoo-c301) local n=$(fw_printenv activeregion | cut -d = -f 2) Index: openwrt/trunk/target/linux/ar71xx/base-files/etc/uci-defaults/02_network =================================================================== --- openwrt.orig/trunk/target/linux/ar71xx/base-files/etc/uci-defaults/02_network +++ openwrt/trunk/target/linux/ar71xx/base-files/etc/uci-defaults/02_network @@ -419,6 +419,7 @@ ja76pf |\ mc-mac1200r|\ mynet-n600 |\ oolite |\ +minibox-v1 |\ qihoo-c301 |\ rb-750 |\ rb-751 |\ Index: openwrt/trunk/target/linux/ar71xx/base-files/lib/ar71xx.sh =================================================================== --- openwrt.orig/trunk/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ openwrt/trunk/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -119,6 +119,9 @@ tplink_board_detect() { "3C0001"*) model="OOLITE" ;; + "3C0002"*) + model="MINIBOX_V1" + ;; "070300"*) model="TP-Link TL-WR703N" ;; @@ -320,6 +323,9 @@ ar71xx_board_detect() { *"AC1750DB") name="f9k1115v2" ;; + *"MiniBox V1.0") + name="minibox-v1" + ;; *"AirGateway") name="airgateway" ;; Index: openwrt/trunk/target/linux/ar71xx/base-files/lib/upgrade/platform.sh =================================================================== --- openwrt.orig/trunk/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ openwrt/trunk/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -315,6 +315,7 @@ platform_check_image() { mc-mac1200r | \ onion-omega | \ oolite | \ + minibox-v1 |\ smart-300 | \ tl-mr10u | \ tl-mr11u | \ Index: openwrt/trunk/target/linux/ar71xx/config-4.1 =================================================================== --- openwrt.orig/trunk/target/linux/ar71xx/config-4.1 +++ openwrt/trunk/target/linux/ar71xx/config-4.1 @@ -73,6 +73,7 @@ CONFIG_ATH79_MACH_EW_DORIN=y CONFIG_ATH79_MACH_F9K1115V2=y CONFIG_ATH79_MACH_GL_INET=y CONFIG_ATH79_MACH_GS_OOLITE=y +CONFIG_ATH79_MACH_MINIBOX_V1=y CONFIG_ATH79_MACH_HIWIFI_HC6361=y CONFIG_ATH79_MACH_HORNET_UB=y CONFIG_ATH79_MACH_JA76PF=y Index: openwrt/trunk/target/linux/ar71xx/files/arch/mips/ath79/mach-minibox-v1.c =================================================================== --- /dev/null +++ openwrt/trunk/target/linux/ar71xx/files/arch/mips/ath79/mach-minibox-v1.c @@ -0,0 +1,85 @@ +/* + * Oolite board support + * + * + * 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 <asm/mach-ath79/ar71xx_regs.h> + +#include "common.h" +#include "dev-eth.h" +#include "dev-gpio-buttons.h" +#include "dev-leds-gpio.h" +#include "dev-m25p80.h" +#include "dev-wmac.h" +#include "machtypes.h" +#include "dev-usb.h" + +#define MINIBOX_V1_GPIO_BTN_RESET 11 + +#define MINIBOX_V1_GPIO_LED_SYSTEM 1 + +#define MINIBOX_V1_KEYS_POLL_INTERVAL 20 /* msecs */ +#define MINIBOX_V1_KEYS_DEBOUNCE_INTERVAL (3 * MINIBOX_V1_KEYS_POLL_INTERVAL) + +static const char *MINIBOX_V1_part_probes[] = { + "tp-link", + NULL, +}; + +static struct flash_platform_data MINIBOX_V1_flash_data = { + .part_probes = MINIBOX_V1_part_probes, +}; + +static struct gpio_led MINIBOX_V1_leds_gpio[] __initdata = { + { + .name = "minibox-v1:green:system", + .gpio = MINIBOX_V1_GPIO_LED_SYSTEM, + .active_low = 0, + }, +}; + +static struct gpio_keys_button MINIBOX_V1_gpio_keys[] __initdata = { + { + .desc = "reset", + .type = EV_KEY, + .code = KEY_RESTART, + .debounce_interval = MINIBOX_V1_KEYS_DEBOUNCE_INTERVAL, + .gpio = MINIBOX_V1_GPIO_BTN_RESET, + .active_low = 0, + }, +}; + +static void __init MINIBOX_V1_setup(void) +{ + u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00); + u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000); + + ath79_register_leds_gpio(-1, ARRAY_SIZE(MINIBOX_V1_leds_gpio), + MINIBOX_V1_leds_gpio); + + ath79_register_gpio_keys_polled(-1, MINIBOX_V1_KEYS_POLL_INTERVAL, + ARRAY_SIZE(MINIBOX_V1_gpio_keys), + MINIBOX_V1_gpio_keys); + + ath79_register_usb(); + + ath79_register_m25p80(&MINIBOX_V1_flash_data); + ath79_init_mac(ath79_eth0_data.mac_addr, mac, 1); + ath79_init_mac(ath79_eth1_data.mac_addr, mac, -1); + + ath79_register_mdio(0, 0x0); + ath79_register_eth(1); + ath79_register_eth(0); + + ath79_register_wmac(ee, mac); +} + +MIPS_MACHINE(ATH79_MACH_MINIBOX_V1, "MINIBOX-V1", + "MiniBox V1.0", MINIBOX_V1_setup); Index: openwrt/trunk/target/linux/ar71xx/generic/profiles/minibox-v1.mk =================================================================== --- /dev/null +++ openwrt/trunk/target/linux/ar71xx/generic/profiles/minibox-v1.mk @@ -0,0 +1,17 @@ +# +# Copyright (C) 2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/MINIBOXV1 + NAME:=MINIBOX V1.0 + PACKAGES:=kmod-usb-core kmod-usb2 kmod-ledtrig-usbdev +endef + + +define Profile/MINIBOXV1/Description + Package set optimized for the MINIBOX V1.0 +endef +$(eval $(call Profile,MINIBOXV1)) Index: openwrt/trunk/target/linux/ar71xx/image/Makefile =================================================================== --- openwrt.orig/trunk/target/linux/ar71xx/image/Makefile +++ openwrt/trunk/target/linux/ar71xx/image/Makefile @@ -902,6 +902,15 @@ endef TARGET_DEVICES += ubnt-uap-pro ubnt-unifi-outdoor-plus +define Device/minibox-v1 + $(Device/tplink-16mlzma) + BOARDNAME := MINIBOX-V1 + DEVICE_PROFILE := MINIBOXV1 + TPLINK_HWID := 0x3C000201 + CONSOLE := ttyATH0,115200 +endef +TARGET_DEVICES += minibox-v1 + rootfs_type=$(patsubst jffs2-%,jffs2,$(patsubst squashfs-%,squashfs,$(1)))