On Fri, 2012-12-07 at 12:24 -0800, Daniel Gimpelevich wrote: > On Fri, 2012-12-07 at 12:15 -0800, Daniel Gimpelevich wrote: > > On Thu, 2012-11-29 at 07:40 -0800, Daniel Gimpelevich wrote: > > > On Thu, 2012-11-29 at 10:35 +0000, Conor O'Gorman wrote: > > > > I don't want to drag this out longer than necessary. You used the phrase > > > > 'hack'. What do you think is the preferred solution? > > > > > > If I had a better one, I would have used it. RFC, again. > > > > Well, here's a better one; take 2: > > Whoops; minor oversight. This is the patch as it should be:
Third time's a charm: Signed-off-by: Daniel Gimpelevich <dan...@gimpelevich.san-francisco.ca.us> Index: target/linux/lantiq/vr9/target.mk =================================================================== --- target/linux/lantiq/vr9/target.mk (revision 34577) +++ target/linux/lantiq/vr9/target.mk (working copy) @@ -3,7 +3,7 @@ BOARDNAME:=VR9 FEATURES:=squashfs jffs2 atm -DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-tools br2684ctl kmod-ltq-dsl-vr9 ltq-dsl-app swconfig +DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-esi atm-tools br2684ctl kmod-ltq-dsl-vr9 ltq-dsl-app swconfig define Target/Description Lantiq VR9 Index: target/linux/lantiq/image/Makefile =================================================================== --- target/linux/lantiq/image/Makefile (revision 34577) +++ target/linux/lantiq/image/Makefile (working copy) @@ -154,7 +154,7 @@ ifeq ($(CONFIG_TARGET_lantiq_ar9),y) Image/BuildKernel/Profile/WBMR=$(call Image/BuildKernel/Template,WBMR,$(xway_cmdline)) -Image/BuildKernel/Profile/DGN3500B=$(call Image/BuildKernel/Template,DGN3500B,$(xway_cmdline)) +Image/BuildKernel/Profile/DGN3500B=$(call Image/BuildKernel/Template,DGN3500B,$(sx76x_cmdline)) Image/BuildKernel/Profile/P2601HNFX=$(call Image/BuildKernel/Template,P2601HNFX,$(xway_cmdline)) Image/BuildKernel/Profile/H201L=$(call Image/BuildKernel/Template,H201L,$(xway_cmdline)) Image/BuildKernel/Profile/FRITZ7320=$(call Image/BuildKernelEVA/Template,FRITZ7320,$(xway_cmdline)) Index: target/linux/lantiq/ar9/target.mk =================================================================== --- target/linux/lantiq/ar9/target.mk (revision 34577) +++ target/linux/lantiq/ar9/target.mk (working copy) @@ -3,7 +3,7 @@ BOARDNAME:=AR9 FEATURES:=squashfs jffs2 atm -DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-tools br2684ctl kmod-ltq-dsl-ar9 ltq-dsl-app \ +DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-esi atm-tools br2684ctl kmod-ltq-dsl-ar9 ltq-dsl-app \ kmod-input-gpio-keys-polled kmod-ledtrig-netdev kmod-leds-gpio kmod-button-hotplug \ swconfig Index: target/linux/lantiq/danube/target.mk =================================================================== --- target/linux/lantiq/danube/target.mk (revision 34577) +++ target/linux/lantiq/danube/target.mk (working copy) @@ -3,7 +3,7 @@ BOARDNAME:=Danube FEATURES:=squashfs jffs2 atm -DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-tools br2684ctl kmod-ltq-dsl-danube ltq-dsl-app \ +DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-esi atm-tools br2684ctl kmod-ltq-dsl-danube ltq-dsl-app \ kmod-input-gpio-keys-polled kmod-ledtrig-netdev kmod-leds-gpio kmod-button-hotplug \ swconfig Index: target/linux/lantiq/files-3.3/arch/mips/lantiq/xway/mach-netgear.c =================================================================== --- target/linux/lantiq/files-3.3/arch/mips/lantiq/xway/mach-netgear.c (revision 34577) +++ target/linux/lantiq/files-3.3/arch/mips/lantiq/xway/mach-netgear.c (working copy) @@ -77,8 +77,8 @@ static struct gpio_led dgn3500_gpio_leds[] __initdata = { - { .name = "soc:green:power", .gpio = 34, .active_low = 1, }, - { .name = "soc:red:power", .gpio = 39, .active_low = 1, }, + { .name = "soc:green:power", .gpio = 34, .active_low = 1, .default_trigger = "default-on" }, + { .name = "soc:red:power", .gpio = 39, .active_low = 1, .default_trigger = "default-on" }, { .name = "soc:orange:wlan", .gpio = 51, .active_low = 1, }, { .name = "soc:green:wps", .gpio = 52, .active_low = 1, }, { .name = "soc:green:usb", .gpio = 22, .active_low = 1, }, @@ -91,7 +91,7 @@ { .desc = "wps", .type = EV_KEY, - .code = BTN_0, + .code = KEY_WPS_BUTTON, .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL, .gpio = 54, .active_low = 1, @@ -99,8 +99,16 @@ { .desc = "reset", .type = EV_KEY, - .code = BTN_1, + .code = BTN_0, .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL, + .gpio = 53, + .active_low = 1, + }, + { + .desc = "rfkill", + .type = EV_KEY, + .code = KEY_RFKILL, + .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL, .gpio = 36, .active_low = 1, }, @@ -253,5 +261,5 @@ MIPS_MACHINE(LANTIQ_MACH_DGN3500B, "DGN3500B", - "Netgear DGN3500B", + "DGN3500B - Netgear DGN3500 or DGN3500B", dgn3500_init); Index: target/linux/lantiq/ase/target.mk =================================================================== --- target/linux/lantiq/ase/target.mk (revision 34577) +++ target/linux/lantiq/ase/target.mk (working copy) @@ -3,7 +3,7 @@ BOARDNAME:=Amazon-SE FEATURES:=squashfs jffs2 atm -DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-tools br2684ctl kmod-ltq-dsl-ase ltq-dsl-app +DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-esi atm-tools br2684ctl kmod-ltq-dsl-ase ltq-dsl-app define Target/Description Lantiq ASE Index: target/linux/lantiq/base-files/lib/preinit/42_athfix =================================================================== --- target/linux/lantiq/base-files/lib/preinit/42_athfix (revision 34577) +++ target/linux/lantiq/base-files/lib/preinit/42_athfix (working copy) @@ -5,7 +5,7 @@ init_atheeprom() { local board=$(lantiq_board_name) case $board in - "Netgear DGN3500B") + DGN3500B) echo "- loading eeprom -" dd if=/dev/mtd2 of=/sys/firmware/ath_eeprom bs=1k skip=60 count=4 echo 0 > /sys/bus/pci/slots/0000\:00\:0e.0/power Index: target/linux/lantiq/base-files/etc/init.d/ifx-esi =================================================================== --- target/linux/lantiq/base-files/etc/init.d/ifx-esi (revision 0) +++ target/linux/lantiq/base-files/etc/init.d/ifx-esi (revision 0) @@ -0,0 +1,11 @@ +#!/bin/sh /etc/rc.common + +START=15 + +start() { + ethmac=`xargs -n 1 echo < /proc/cmdline | grep '^ethaddr=' | sed -e 's,ethaddr=,,' -e 's,:,,g'` + atmmac=`echo $ethmac | sed 's,......$,,'`$(printf '%06x' $((1+0x`echo $ethmac | sed 's,^......,,'`)) | sed 's,.*\(......\)$,\1,') + for atmdev in `ls /sys/class/atm`; do + esi $atmmac `echo $atmdev | sed 's,[^0-9]*\(.*\)$,\1,'` + done +} Index: target/linux/lantiq/base-files/etc/diag.sh =================================================================== --- target/linux/lantiq/base-files/etc/diag.sh (revision 0) +++ target/linux/lantiq/base-files/etc/diag.sh (revision 0) @@ -0,0 +1,48 @@ +#!/bin/sh +# Copyright (C) 2006-2012 OpenWrt.org + +# This setup gives us 4.5 distinguishable states: +# +# Solid YELLOW: Bootloader running, or kernel hung (timer task stalled) +# Solid RED: preinit +# 5Hz blink: failsafe +# Solid GREEN: normal operation + +. /lib/lantiq.sh + +set_state() { + board=$(lantiq_board_name) + case "$1" in + preinit) + { + case "$board" in + DGN3500B) + echo none >/sys/class/leds/soc\:green\:power/trigger + ;; + esac + } + ;; + failsafe) + { + case "$board" in + DGN3500B) + echo none >/sys/class/leds/soc\:green\:power/trigger + echo timer >/sys/class/leds/soc\:red\:power/trigger + echo 100 >/sys/class/leds/soc\:red\:power/delay_on + echo 100 >/sys/class/leds/soc\:red\:power/delay_off + ;; + esac + } + ;; + done) + { + case "$board" in + DGN3500B) + echo default-on >/sys/class/leds/soc\:green\:power/trigger + echo none >/sys/class/leds/soc\:red\:power/trigger + ;; + esac + } + ;; + esac +} _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel