[OpenWrt-Devel] [PATCH] config: Add option to make crypto default when there is an config option for it
From: Daniel Dickinson This patch it mostly for SDK builds since base packages seem to all have PolarSSL support as an option and but there are packages in the feeds that have the property of offering a configuration option for building with or without crypto support, but which do not go so far as to build both flavours. Signed-off-by: Daniel Dickinson --- config/Config-build.in | 10 ++ 1 file changed, 10 insertions(+) diff --git a/config/Config-build.in b/config/Config-build.in index 2523a18..1a35c5d 100644 --- a/config/Config-build.in +++ b/config/Config-build.in @@ -65,6 +65,16 @@ menu "Global build settings" Useful for release builds, so that kernel issues can be debugged offline later. + config CRYPTO_DEFAULT + bool + prompt "Enable SSL/Encryption by default for non-flavoured packages" + default n + help + This defaults to using encryption when there are packages to have an + option to use or not use encryption, but which do not have both + encrypted and unencrypted flavours, even when the encryption library + is a 'heavier' one such as OpenSSL. + comment "Kernel build options" source "config/Config-kernel.in" -- 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 Note] Explaination of config option to make crypto default
The patch listed below which will be in a separate email (so this isn't in the commit message) was created for a similar reason to CONFIG_ALL - to create a single config option that saves doing a lot of individual configuration settings. In particular the config option this creates is intended to be used in packages in the packages (and perhaps other) feeds for which there is the option to build with or without encryption/SSL but for which the package has not implemented building multiple flavours. It can be convenient to enable encryption for all such packages without having manually tweak many packages through menuconfig or manual modifications to .config (for people not building public releases and who therefore have created a proper release machinery). [PATCH] config: Add option to make crypto default when there is an ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] config: Add option to make crypto default when there is an config option for it
Erg, reversed the texts of the commit and the comment. Will resend so the commit message actually makes sense (but not tonight likely). Regards, Daniel On 23/12/15 03:16 AM, open...@daniel.thecshore.com wrote: From: Daniel Dickinson This patch it mostly for SDK builds since base packages seem to all have PolarSSL support as an option and but there are packages in the feeds that have the property of offering a configuration option for building with or without crypto support, but which do not go so far as to build both flavours. Signed-off-by: Daniel Dickinson --- config/Config-build.in | 10 ++ 1 file changed, 10 insertions(+) diff --git a/config/Config-build.in b/config/Config-build.in index 2523a18..1a35c5d 100644 --- a/config/Config-build.in +++ b/config/Config-build.in @@ -65,6 +65,16 @@ menu "Global build settings" Useful for release builds, so that kernel issues can be debugged offline later. + config CRYPTO_DEFAULT + bool + prompt "Enable SSL/Encryption by default for non-flavoured packages" + default n + help + This defaults to using encryption when there are packages to have an + option to use or not use encryption, but which do not have both + encrypted and unencrypted flavours, even when the encryption library + is a 'heavier' one such as OpenSSL. + comment "Kernel build options" source "config/Config-kernel.in" ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Why default of XATTR in kernel but not userspace?
Hi Daniel, When I added attr and acl initially, I enabled xattr and acl support for filesystems, but then that part was removed, possibly because dependency logic didn't conform standards (just in case, I'm not blaming anyone, that was one of my first patches submitted), see https://github.com/openwrt/packages/commit/c43ecd25564391d518039971a86cd692e5a685fb. I like your idea of having single place to control ACL and XATTR support, but that may mean that attr and acl have to become core components, not packages. On 12/20/15 10:18, Daniel Dickinson wrote: > Hi all, > > I've been working on a patch for making POSIX ACL support and userspace > support of POSIX ACL and XATTR (extended attributes) a configuration > option at compile time and noticed something rather wonky: > > While for POSIX ACL the default is disabled both at the kernel > level and in userpace (i.e. filesystem modules by default do > not support POSIX ACL and programs don't use libacl). > > OTOH for XATTR support the default is for kernel modules and built-ins > to support XATTR, but block mount does not support XATTR so I'm not sure > any filesystems are actually mounted with xattr support enabled, and, in > addition, no programs are compiled with xattr support (that is the > default is not support xattr in userspace by default). > > I'm a little puzzled as to why this is and what is acommplished by > having XATTR support by filesystem modules, when it doesn't appear > anything uses that support (unless overlayfs uses with jffs2 and/or > tmpfs uses it via procd, but the support would fail for anything not > mounted by procd). > > What is exactly is logic/reason for this configuration and what is > actually going on here? Is xattr used at all? If it is, why the mixed > bag of support vs. lack of support depending on how a filesystem > is mounted? > > My plan is to make a config option that, when enabled, makes POSIX ACL > support in both kernel and userpace the default (with certain exceptions > like JFFS2 and TMPFS), along with userpace xattr support. > In addition I add to the build options menu (if the above option is > enabled), the ability to turn on and off POSIX ACL support for each > filesystem. > > (The option if enabled also manages (on by default) NFSv4 (and off by > default) old NFS ACL support). > > In addition I have a patch to fstools that lets block mount mount with > posix acl and xattr support enabled. > > (I make this an ifdef since it's pointless without the appropriate > kernel support). > > > Regards, > > Daniel > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel -- Best regards, Maxim Storchak mailto:m.storc...@gmail.com ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] wpa_supplicant: set regulatory domain the same way as hostapd
In sta-only configuration, wpa_supplicant needs correct regulatory domain because otherwise it may skip channel of its AP during scan. Another alternative is to fix "iw reg set" in mac80211 netifd script. Currently it fails if some phy has private regulatory domain which matches configured one. Signed-off-by: Dmitry Ivanov --- package/network/services/hostapd/files/netifd.sh | 6 ++ 1 file changed, 6 insertions(+) diff --git a/package/network/services/hostapd/files/netifd.sh b/package/network/services/hostapd/files/netifd.sh index 5541e4d..6aca7f7 100644 --- a/package/network/services/hostapd/files/netifd.sh +++ b/package/network/services/hostapd/files/netifd.sh @@ -536,9 +536,15 @@ wpa_supplicant_prepare_interface() { _w_modestr="mode=1" } + local country_str= + [ -n "$network_bridge" ] && { + country_str="country=$country" + } + wpa_supplicant_teardown_interface "$ifname" cat > "$_config"
Re: [OpenWrt-Devel] [PATCH] wpa_supplicant: set regulatory domain the same way as hostapd
On 2015-12-23 12:12, Dmitry Ivanov wrote: > In sta-only configuration, wpa_supplicant needs correct regulatory > domain because otherwise it may skip channel of its AP during scan. > > Another alternative is to fix "iw reg set" in mac80211 netifd script. > Currently it fails if some phy has private regulatory domain which > matches configured one. > > Signed-off-by: Dmitry Ivanov > --- > package/network/services/hostapd/files/netifd.sh | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/package/network/services/hostapd/files/netifd.sh > b/package/network/services/hostapd/files/netifd.sh > index 5541e4d..6aca7f7 100644 > --- a/package/network/services/hostapd/files/netifd.sh > +++ b/package/network/services/hostapd/files/netifd.sh > @@ -536,9 +536,15 @@ wpa_supplicant_prepare_interface() { > _w_modestr="mode=1" > } > > + local country_str= > + [ -n "$network_bridge" ] && { > + country_str="country=$country" Looks like a copy&paste error to me, should be -n "$country" - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v1] kernel: make kmod-thermal dependency conditional to match upstream kernel module configuration dependency for hwmon-pwmfan
Signed-off-by: Sebastian Careba --- package/kernel/linux/modules/hwmon.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/linux/modules/hwmon.mk b/package/kernel/linux/modules/hwmon.mk index ca0ff66..26bfc00 100644 --- a/package/kernel/linux/modules/hwmon.mk +++ b/package/kernel/linux/modules/hwmon.mk @@ -289,7 +289,7 @@ define KernelPackage/hwmon-pwmfan KCONFIG:=CONFIG_SENSORS_PWM_FAN FILES:=$(LINUX_DIR)/drivers/hwmon/pwm-fan.ko AUTOLOAD:=$(call AutoLoad,60,pwm-fan) - $(call AddDepends/hwmon,) + $(call AddDepends/hwmon +PACKAGE_kmod-thermal:kmod-thermal) endef define KernelPackage/hwmon-pwmfan/description -- 2.1.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v1] kernel: make kmod-thermal dependency conditional to match upstream kernel module configuration dependency for hwmon-pwmfan
Signed-off-by: Sebastian Careba --- package/kernel/linux/modules/hwmon.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/linux/modules/hwmon.mk b/package/kernel/linux/modules/hwmon.mk index ca0ff66..26bfc00 100644 --- a/package/kernel/linux/modules/hwmon.mk +++ b/package/kernel/linux/modules/hwmon.mk @@ -289,7 +289,7 @@ define KernelPackage/hwmon-pwmfan KCONFIG:=CONFIG_SENSORS_PWM_FAN FILES:=$(LINUX_DIR)/drivers/hwmon/pwm-fan.ko AUTOLOAD:=$(call AutoLoad,60,pwm-fan) - $(call AddDepends/hwmon,) + $(call AddDepends/hwmon, +PACKAGE_kmod-thermal:kmod-thermal) endef define KernelPackage/hwmon-pwmfan/description -- 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] base-files utils/busybox: Make requiring login in console default for easily accessed devices
On 12/23/2015 08:54 AM, Daniel Dickinson wrote: > On 23/12/15 02:44 AM, Heinrich Schuchardt wrote: >> Hello Daniel, >> >> my TP-LINK MR3020 (AR71XX, OpenWrt 15.05) uses /dev/ttyATH0 as serial >> console . >> >> I could not find this device in the getty commands of the inittab that >> you create in the patch below. > > For that patch for ar71xx it is somewhat tricky because different boards > have different serial devices so it is necessary to use an uci-default > scriptlet that modifies inittab based on the actual console device > (which on ar71xx is on kernel commandline). > > However, I don't particularly like that solution and am investigating > alternative measures that allow to embed a working inittab in the > squashfs (basically I'm hoping I'm reading agetty docs right and I can > 'cheat' and sidestep the question of the name of the console device; but > will test; fortunately I have ar71xx since that's the hardest one, > although ramips I couldn't find what the serial console was either, so > it may actually need this even more). > >> >> I would feel more comfortable having a password verification on my >> router. Shouldn't this be default on all targets? > > Not my call. If the core devs want to do that once I get this resolved > that is up to them. Dear core devs, A case that has to be opened does not provide any real security at all. A password for console access is a necessity. Every non-free router has a console password, why not OpenWrt? > > Besides having passwordless serial console on a typical router is not a > significant issue because you have to hack the hardware to get a serial > attached (at least opening the case being required is the norm). The > reason I create this patch was more for situations like running OpenWrt > on generic PC's or Raspberry Pi/Pi2 where it's trivial to get hardware > console access (even for someone with basically no skills or specialized > equipment). A Raspberry typically is also in a case which has to be opened to get access to the serial port: https://www.raspberrypi.org/blog/raspberry-pi-official-case/ Regards Heinrich Schuchardt ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2] wpa_supplicant: set regulatory domain the same way as hostapd
In sta-only configuration, wpa_supplicant needs correct regulatory domain because otherwise it may skip channel of its AP during scan. Another alternative is to fix "iw reg set" in mac80211 netifd script. Currently it fails if some phy has private regulatory domain which matches configured one. Signed-off-by: Dmitry Ivanov --- package/network/services/hostapd/files/netifd.sh | 6 ++ 1 file changed, 6 insertions(+) diff --git a/package/network/services/hostapd/files/netifd.sh b/package/network/services/hostapd/files/netifd.sh index 5541e4d..6aca7f7 100644 --- a/package/network/services/hostapd/files/netifd.sh +++ b/package/network/services/hostapd/files/netifd.sh @@ -536,9 +536,15 @@ wpa_supplicant_prepare_interface() { _w_modestr="mode=1" } + local country_str= + [ -n "$country" ] && { + country_str="country=$country" + } + wpa_supplicant_teardown_interface "$ifname" cat > "$_config"
[OpenWrt-Devel] [PATCH] package/lldpd: Remove extraneous select
From: Daniel Dickinson Only the conditional dependency ought to be required; if build fails with JSON there is some other problem at work. Signed-off-by: Daniel Dickinson --- package/network/services/lldpd/Config.in | 1 - 1 file changed, 1 deletion(-) diff --git a/package/network/services/lldpd/Config.in b/package/network/services/lldpd/Config.in index 72150e7..93d84e2 100644 --- a/package/network/services/lldpd/Config.in +++ b/package/network/services/lldpd/Config.in @@ -49,7 +49,6 @@ config LLDPD_WITH_CUSTOM config LLDPD_WITH_JSON bool prompt "Enable JSON output for the LLDP Command-Line Interface" - select PACKAGE_json-c default n endmenu -- 2.4.3 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] base-files utils/busybox: Make requiring login in console default for easily accessed devices
Hi Daniel, On Wed, 23 Dec 2015 07:58:59 +0100, Daniel Dickinson wrote: I am reworking this (requiring console login) as couple of packages for the packages feed, although it may require an image.mk or packages Makefile hook in order to embed an appropriate inittab into the image (since the inittab will need to be modified and we need to guarantee the correct order of actions; and inittab comes from base-files which is last thing done in the packages Makefile). I hope the other devs will chime in, but FWIW I would make this enabled unconditionally across all targets. As we already have a way to do a "factory reset" using the reset button, IMHO failsafe should also enforce login passwords everywhere, including the serial console. Imre ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] base-files utils/busybox: Make requiring login in console default for easily accessed devices
On 23/12/2015 13:05, Imre Kaloz wrote: > Hi Daniel, > > On Wed, 23 Dec 2015 07:58:59 +0100, Daniel Dickinson > wrote: > >> I am reworking this (requiring console login) as couple of packages >> for the packages feed, although it may require an image.mk or packages >> Makefile hook in order to embed an appropriate inittab into the image >> (since the inittab will need to be modified and we need to guarantee >> the correct order of actions; and inittab comes from base-files which >> is last thing done in the packages Makefile). > > I hope the other devs will chime in, but FWIW I would make this enabled > unconditionally across all targets. As we already have a way to do a > "factory reset" using the reset button, IMHO failsafe should also > enforce login passwords everywhere, including the serial console. > default on, once root passwd is set sounds good. an optional opt-out feature would be nice to avoid people having to add dirty hacks to get rid of the login prompt on tty shells. this could be hidden inside a wrapper script called by inittab. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] base-files utils/busybox: Make requiring login in console default for easily accessed devices
Actually once root password is set is unncessary. Busybox login with no password set allows passwordless login, so there is no issue. Regards, Daniel On 23/12/15 07:24 AM, John Crispin wrote: On 23/12/2015 13:05, Imre Kaloz wrote: Hi Daniel, On Wed, 23 Dec 2015 07:58:59 +0100, Daniel Dickinson wrote: I am reworking this (requiring console login) as couple of packages for the packages feed, although it may require an image.mk or packages Makefile hook in order to embed an appropriate inittab into the image (since the inittab will need to be modified and we need to guarantee the correct order of actions; and inittab comes from base-files which is last thing done in the packages Makefile). I hope the other devs will chime in, but FWIW I would make this enabled unconditionally across all targets. As we already have a way to do a "factory reset" using the reset button, IMHO failsafe should also enforce login passwords everywhere, including the serial console. default on, once root passwd is set sounds good. an optional opt-out feature would be nice to avoid people having to add dirty hacks to get rid of the login prompt on tty shells. this could be hidden inside a wrapper script called by inittab. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] base-files utils/busybox: Make requiring login in console default for easily accessed devices
Hi Imre, Thanks for this! This indeed would be my preference, I just thought there wouldn't be any appetite for it on the grounds I mentioned. Before I work up a version of the patch that isn't as desirable from a security perspective, I have another concept that ought to solve the ar71xx problem of unknown serial console for purposes of inittab in squashfs (leaving ramips as the one platform that I don't know if the serial console is known but and just wasn't considered required for inittab, or if the reason not in inittab is that you can't predict the serial device). Regards, Daniel On 23/12/15 07:05 AM, Imre Kaloz wrote: Hi Daniel, On Wed, 23 Dec 2015 07:58:59 +0100, Daniel Dickinson wrote: I am reworking this (requiring console login) as couple of packages for the packages feed, although it may require an image.mk or packages Makefile hook in order to embed an appropriate inittab into the image (since the inittab will need to be modified and we need to guarantee the correct order of actions; and inittab comes from base-files which is last thing done in the packages Makefile). I hope the other devs will chime in, but FWIW I would make this enabled unconditionally across all targets. As we already have a way to do a "factory reset" using the reset button, IMHO failsafe should also enforce login passwords everywhere, including the serial console. Imre ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] base-files utils/busybox: Make requiring login in console default for easily accessed devices
I'm inclined to make the opt-out an image generation time decision rather than configurable on the overlayfs for what I think are obvious reasons. Regards, Daniel On 23/12/15 07:24 AM, John Crispin wrote: On 23/12/2015 13:05, Imre Kaloz wrote: Hi Daniel, On Wed, 23 Dec 2015 07:58:59 +0100, Daniel Dickinson wrote: I am reworking this (requiring console login) as couple of packages for the packages feed, although it may require an image.mk or packages Makefile hook in order to embed an appropriate inittab into the image (since the inittab will need to be modified and we need to guarantee the correct order of actions; and inittab comes from base-files which is last thing done in the packages Makefile). I hope the other devs will chime in, but FWIW I would make this enabled unconditionally across all targets. As we already have a way to do a "factory reset" using the reset button, IMHO failsafe should also enforce login passwords everywhere, including the serial console. default on, once root passwd is set sounds good. an optional opt-out feature would be nice to avoid people having to add dirty hacks to get rid of the login prompt on tty shells. this could be hidden inside a wrapper script called by inittab. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] base-files utils/busybox: Make requiring login in console default for easily accessed devices
On 23/12/2015 13:32, Daniel Dickinson wrote: > I'm inclined to make the opt-out an image generation time decision > rather than configurable on the overlayfs for what I think are obvious > reasons. yep, that would be the best choice. > > Regards, > > Daniel > > On 23/12/15 07:24 AM, John Crispin wrote: >> >> >> On 23/12/2015 13:05, Imre Kaloz wrote: >>> Hi Daniel, >>> >>> On Wed, 23 Dec 2015 07:58:59 +0100, Daniel Dickinson >>> wrote: >>> I am reworking this (requiring console login) as couple of packages for the packages feed, although it may require an image.mk or packages Makefile hook in order to embed an appropriate inittab into the image (since the inittab will need to be modified and we need to guarantee the correct order of actions; and inittab comes from base-files which is last thing done in the packages Makefile). >>> >>> I hope the other devs will chime in, but FWIW I would make this enabled >>> unconditionally across all targets. As we already have a way to do a >>> "factory reset" using the reset button, IMHO failsafe should also >>> enforce login passwords everywhere, including the serial console. >>> >> >> default on, once root passwd is set sounds good. an optional opt-out >> feature would be nice to avoid people having to add dirty hacks to get >> rid of the login prompt on tty shells. this could be hidden inside a >> wrapper script called by inittab. >> ___ >> openwrt-devel mailing list >> openwrt-devel@lists.openwrt.org >> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel >> > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] base-files utils/busybox: Make requiring login in console default for easily accessed devices
Oh, and I think that initially this should be default off configuration option that people who are able to flash firmware via bootloader in case of getting locked out encourage to test before pushing this as default. I'd hate to have some corner case result in bricked routers for people who have no means of recovering from a bad flash. Regards, Daniel On 23/12/15 07:35 AM, John Crispin wrote: On 23/12/2015 13:32, Daniel Dickinson wrote: I'm inclined to make the opt-out an image generation time decision rather than configurable on the overlayfs for what I think are obvious reasons. yep, that would be the best choice. Regards, Daniel On 23/12/15 07:24 AM, John Crispin wrote: On 23/12/2015 13:05, Imre Kaloz wrote: Hi Daniel, On Wed, 23 Dec 2015 07:58:59 +0100, Daniel Dickinson wrote: I am reworking this (requiring console login) as couple of packages for the packages feed, although it may require an image.mk or packages Makefile hook in order to embed an appropriate inittab into the image (since the inittab will need to be modified and we need to guarantee the correct order of actions; and inittab comes from base-files which is last thing done in the packages Makefile). I hope the other devs will chime in, but FWIW I would make this enabled unconditionally across all targets. As we already have a way to do a "factory reset" using the reset button, IMHO failsafe should also enforce login passwords everywhere, including the serial console. default on, once root passwd is set sounds good. an optional opt-out feature would be nice to avoid people having to add dirty hacks to get rid of the login prompt on tty shells. this could be hidden inside a wrapper script called by inittab. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] base-files utils/busybox: Make requiring login in console default for easily accessed devices
On Wed, 23 Dec 2015 13:43:14 +0100, Daniel Dickinson wrote: Oh, and I think that initially this should be default off configuration option that people who are able to flash firmware via bootloader in case of getting locked out encourage to test before pushing this as default. I'd hate to have some corner case result in bricked routers for people who have no means of recovering from a bad flash. You can reflash from the bootloader all the time, we are talking about userland here. IMHO this should be just a normal change, like dropping telnet. Enforcing login should be on by default, specially since if one forgets the password they can just reset everything to defaults keeping the reset button pressed. Imre ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/2] ledtrig-netdev: switch rwlock to spinlock
Read/write lock was adding useless complexity, there wasn't any real gain in case of this driver. Also switch to _bh variants to avoid deadlocks. Signed-off-by: Rafał Miłecki --- .../generic/files/drivers/leds/ledtrig-netdev.c| 40 +++--- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/target/linux/generic/files/drivers/leds/ledtrig-netdev.c b/target/linux/generic/files/drivers/leds/ledtrig-netdev.c index 5e9b95f..018392a 100644 --- a/target/linux/generic/files/drivers/leds/ledtrig-netdev.c +++ b/target/linux/generic/files/drivers/leds/ledtrig-netdev.c @@ -68,7 +68,7 @@ #define MODE_RX 4 struct led_netdev_data { - rwlock_t lock; + spinlock_t lock; struct timer_list timer; struct notifier_block notifier; @@ -102,9 +102,9 @@ static ssize_t led_device_name_show(struct device *dev, struct led_classdev *led_cdev = dev_get_drvdata(dev); struct led_netdev_data *trigger_data = led_cdev->trigger_data; - read_lock(&trigger_data->lock); + spin_lock_bh(&trigger_data->lock); sprintf(buf, "%s\n", trigger_data->device_name); - read_unlock(&trigger_data->lock); + spin_unlock_bh(&trigger_data->lock); return strlen(buf) + 1; } @@ -118,7 +118,7 @@ static ssize_t led_device_name_store(struct device *dev, if (size < 0 || size >= IFNAMSIZ) return -EINVAL; - write_lock(&trigger_data->lock); + spin_lock_bh(&trigger_data->lock); strcpy(trigger_data->device_name, buf); if (size > 0 && trigger_data->device_name[size-1] == '\n') @@ -132,7 +132,7 @@ static ssize_t led_device_name_store(struct device *dev, set_baseline_state(trigger_data); /* updates LEDs, may start timers */ } - write_unlock(&trigger_data->lock); + spin_unlock_bh(&trigger_data->lock); return size; } @@ -144,7 +144,7 @@ static ssize_t led_mode_show(struct device *dev, struct led_classdev *led_cdev = dev_get_drvdata(dev); struct led_netdev_data *trigger_data = led_cdev->trigger_data; - read_lock(&trigger_data->lock); + spin_lock_bh(&trigger_data->lock); if (trigger_data->mode == 0) { strcpy(buf, "none\n"); @@ -158,7 +158,7 @@ static ssize_t led_mode_show(struct device *dev, strcat(buf, "\n"); } - read_unlock(&trigger_data->lock); + spin_unlock_bh(&trigger_data->lock); return strlen(buf)+1; } @@ -199,10 +199,10 @@ static ssize_t led_mode_store(struct device *dev, if (new_mode == -1) return -EINVAL; - write_lock(&trigger_data->lock); + spin_lock_bh(&trigger_data->lock); trigger_data->mode = new_mode; set_baseline_state(trigger_data); - write_unlock(&trigger_data->lock); + spin_unlock_bh(&trigger_data->lock); return size; } @@ -215,9 +215,9 @@ static ssize_t led_interval_show(struct device *dev, struct led_classdev *led_cdev = dev_get_drvdata(dev); struct led_netdev_data *trigger_data = led_cdev->trigger_data; - read_lock(&trigger_data->lock); + spin_lock_bh(&trigger_data->lock); sprintf(buf, "%u\n", jiffies_to_msecs(trigger_data->interval)); - read_unlock(&trigger_data->lock); + spin_unlock_bh(&trigger_data->lock); return strlen(buf) + 1; } @@ -237,10 +237,10 @@ static ssize_t led_interval_store(struct device *dev, /* impose some basic bounds on the timer interval */ if (count == size && value >= 5 && value <= 1) { - write_lock(&trigger_data->lock); + spin_lock_bh(&trigger_data->lock); trigger_data->interval = msecs_to_jiffies(value); set_baseline_state(trigger_data); /* resets timer */ - write_unlock(&trigger_data->lock); + spin_unlock_bh(&trigger_data->lock); ret = count; } @@ -259,7 +259,7 @@ static int netdev_trig_notify(struct notifier_block *nb, if (evt != NETDEV_UP && evt != NETDEV_DOWN && evt != NETDEV_CHANGE && evt != NETDEV_REGISTER && evt != NETDEV_UNREGISTER) return NOTIFY_DONE; - write_lock(&trigger_data->lock); + spin_lock_bh(&trigger_data->lock); if (strcmp(dev->name, trigger_data->device_name)) goto done; @@ -285,7 +285,7 @@ static int netdev_trig_notify(struct notifier_block *nb, set_baseline_state(trigger_data); done: - write_unlock(&trigger_data->lock); + spin_unlock_bh(&trigger_data->lock); return NOTIFY_DONE; } @@ -297,7 +297,7 @@ static void netdev_trig_timer(unsigned long arg) unsigned new_activity; struct rtnl_link_stats64 temp; - write_lock(&trigger_data->lock); + spin_lock(&trigger_data->lock); if (!trigger_data->link_up || !trigger_data->net_dev || (trigger_data->mode & (MODE_TX | MODE_RX)) == 0) {
[OpenWrt-Devel] [PATCH 2/2] ledtrig-netdev: drop locking from timer callback function
We may just delete timer on every trigger update and then start it again if needed. This will let us avoid both: races and locking in frequently called timer callback. Signed-off-by: Rafał Miłecki --- .../generic/files/drivers/leds/ledtrig-netdev.c| 24 -- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/target/linux/generic/files/drivers/leds/ledtrig-netdev.c b/target/linux/generic/files/drivers/leds/ledtrig-netdev.c index 018392a..4e0844a 100644 --- a/target/linux/generic/files/drivers/leds/ledtrig-netdev.c +++ b/target/linux/generic/files/drivers/leds/ledtrig-netdev.c @@ -92,8 +92,6 @@ static void set_baseline_state(struct led_netdev_data *trigger_data) if ((trigger_data->mode & (MODE_TX | MODE_RX)) != 0 && trigger_data->link_up) mod_timer(&trigger_data->timer, jiffies + trigger_data->interval); - else - del_timer(&trigger_data->timer); } static ssize_t led_device_name_show(struct device *dev, @@ -119,6 +117,7 @@ static ssize_t led_device_name_store(struct device *dev, return -EINVAL; spin_lock_bh(&trigger_data->lock); + del_timer_sync(&trigger_data->timer); strcpy(trigger_data->device_name, buf); if (size > 0 && trigger_data->device_name[size-1] == '\n') @@ -129,10 +128,11 @@ static ssize_t led_device_name_store(struct device *dev, trigger_data->net_dev = dev_get_by_name(&init_net, trigger_data->device_name); if (trigger_data->net_dev != NULL) trigger_data->link_up = (dev_get_flags(trigger_data->net_dev) & IFF_LOWER_UP) != 0; - set_baseline_state(trigger_data); /* updates LEDs, may start timers */ } + set_baseline_state(trigger_data); spin_unlock_bh(&trigger_data->lock); + return size; } @@ -200,7 +200,10 @@ static ssize_t led_mode_store(struct device *dev, return -EINVAL; spin_lock_bh(&trigger_data->lock); + del_timer_sync(&trigger_data->timer); + trigger_data->mode = new_mode; + set_baseline_state(trigger_data); spin_unlock_bh(&trigger_data->lock); @@ -238,9 +241,13 @@ static ssize_t led_interval_store(struct device *dev, /* impose some basic bounds on the timer interval */ if (count == size && value >= 5 && value <= 1) { spin_lock_bh(&trigger_data->lock); + del_timer_sync(&trigger_data->timer); + trigger_data->interval = msecs_to_jiffies(value); + set_baseline_state(trigger_data); /* resets timer */ spin_unlock_bh(&trigger_data->lock); + ret = count; } @@ -260,6 +267,7 @@ static int netdev_trig_notify(struct notifier_block *nb, return NOTIFY_DONE; spin_lock_bh(&trigger_data->lock); + del_timer_sync(&trigger_data->timer); if (strcmp(dev->name, trigger_data->device_name)) goto done; @@ -297,12 +305,10 @@ static void netdev_trig_timer(unsigned long arg) unsigned new_activity; struct rtnl_link_stats64 temp; - spin_lock(&trigger_data->lock); - if (!trigger_data->link_up || !trigger_data->net_dev || (trigger_data->mode & (MODE_TX | MODE_RX)) == 0) { /* we don't need to do timer work, just reflect link state. */ led_set_brightness(trigger_data->led_cdev, ((trigger_data->mode & MODE_LINK) != 0 && trigger_data->link_up) ? LED_FULL : LED_OFF); - goto no_restart; + return; } dev_stats = dev_get_stats(trigger_data->net_dev, &temp); @@ -334,9 +340,6 @@ static void netdev_trig_timer(unsigned long arg) trigger_data->last_activity = new_activity; mod_timer(&trigger_data->timer, jiffies + trigger_data->interval); - -no_restart: - spin_unlock(&trigger_data->lock); } static void netdev_trig_activate(struct led_classdev *led_cdev) @@ -400,6 +403,7 @@ static void netdev_trig_deactivate(struct led_classdev *led_cdev) device_remove_file(led_cdev->dev, &dev_attr_interval); spin_lock_bh(&trigger_data->lock); + del_timer_sync(&trigger_data->timer); if (trigger_data->net_dev) { dev_put(trigger_data->net_dev); @@ -408,8 +412,6 @@ static void netdev_trig_deactivate(struct led_classdev *led_cdev) spin_unlock_bh(&trigger_data->lock); - del_timer_sync(&trigger_data->timer); - kfree(trigger_data); } } -- 1.8.4.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [Patch] ipq806x: add support for Netgear D7800
Hi, you sent the patch as an attachment. because of this patchwork did not pick it up. could you please resend with the patch inline rather than attached. John On 14/12/2015 10:37, Tathagata Das wrote: > Add support for the Netgear D7800 and build appropariate sysupgrade and > factory images. > > Known issues: > . USB ports are not working > . DSL is not added > > Signed-off-by: Tathagata Das > > > > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 2/3] initial support for TP-Link Archer C2600
Hi, could you please resend the patches with the following changes * prefix each one with "ipq806x: " * dont copy paste the same subject for all 3 patches but describe what is in the patch please. John On 17/12/2015 13:35, Josh Bendavid wrote: > The device tree file is similar to the current ap148 dts, with sata and nand > removed, and buttons/led's added. > > Signed-off-by: Josh Bendavid > > --- > ...qcom-add-TP-Link-Archer-C2600-device-tree.patch | 300 > + > ...qcom-add-TP-Link-Archer-C2600-device-tree.patch | 300 > + > 2 files changed, 600 insertions(+) > create mode 100644 > target/linux/ipq806x/patches-3.18/711-ARM-qcom-add-TP-Link-Archer-C2600-device-tree.patch > create mode 100644 > target/linux/ipq806x/patches-4.1/711-ARM-qcom-add-TP-Link-Archer-C2600-device-tree.patch > > diff --git > a/target/linux/ipq806x/patches-3.18/711-ARM-qcom-add-TP-Link-Archer-C2600-device-tree.patch > > b/target/linux/ipq806x/patches-3.18/711-ARM-qcom-add-TP-Link-Archer-C2600-device-tree.patch > new file mode 100644 > index 000..536ae57 > --- /dev/null > +++ > b/target/linux/ipq806x/patches-3.18/711-ARM-qcom-add-TP-Link-Archer-C2600-device-tree.patch > @@ -0,0 +1,300 @@ > +diff -urN a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile > +--- a/arch/arm/boot/dts/Makefile 2015-11-25 22:51:15.148899604 +0100 > b/arch/arm/boot/dts/Makefile 2015-12-06 14:33:31.092396982 +0100 > +@@ -362,6 +362,7 @@ > + qcom-ipq8064-ap148.dtb \ > + qcom-ipq8064-db149.dtb \ > + qcom-ipq8064-r7500.dtb \ > ++qcom-ipq8064-c2600.dtb \ > + qcom-msm8660-surf.dtb \ > + qcom-msm8960-cdp.dtb \ > + qcom-msm8974-sony-xperia-honami.dtb > +diff -urN a/arch/arm/boot/dts/qcom-ipq8064-c2600.dts > b/arch/arm/boot/dts/qcom-ipq8064-c2600.dts > +--- a/arch/arm/boot/dts/qcom-ipq8064-c2600.dts 1970-01-01 > 01:00:00.0 +0100 > b/arch/arm/boot/dts/qcom-ipq8064-c2600.dts 2015-12-06 > 14:20:05.152365670 +0100 > +@@ -0,0 +1,285 @@ > ++#include "qcom-ipq8064-v1.0.dtsi" > ++#include > ++ > ++/ { > ++model = "TP-Link Archer C2600"; > ++compatible = "tplink,c2600", "qcom,ipq8064"; > ++ > ++memory@0 { > ++reg = <0x4200 0x1e00>; > ++device_type = "memory"; > ++}; > ++ > ++reserved-memory { > ++#address-cells = <1>; > ++#size-cells = <1>; > ++ranges; > ++rsvd@4120 { > ++reg = <0x4120 0x30>; > ++no-map; > ++}; > ++}; > ++ > ++aliases { > ++serial0 = &uart4; > ++mdio-gpio0 = &mdio0; > ++}; > ++ > ++chosen { > ++linux,stdout-path = "serial0:115200n8"; > ++}; > ++ > ++soc { > ++pinmux@80 { > ++i2c4_pins: i2c4_pinmux { > ++pins = "gpio12", "gpio13"; > ++function = "gsbi4"; > ++bias-disable; > ++}; > ++ > ++spi_pins: spi_pins { > ++mux { > ++pins = "gpio18", "gpio19", "gpio21"; > ++function = "gsbi5"; > ++drive-strength = <10>; > ++bias-none; > ++}; > ++}; > ++ > ++nand_pins: nand_pins { > ++mux { > ++pins = "gpio34", "gpio35", "gpio36", > ++ "gpio37", "gpio38", "gpio39", > ++ "gpio40", "gpio41", "gpio42", > ++ "gpio43", "gpio44", "gpio45", > ++ "gpio46", "gpio47"; > ++function = "nand"; > ++drive-strength = <10>; > ++bias-disable; > ++}; > ++ > ++pullups { > ++pins = "gpio39"; > ++bias-pull-up; > ++}; > ++ > ++hold { > ++pins = "gpio40", "gpio41", "gpio42", > ++ "gpio43", "gpio44", "gpio45", > ++ "gpio46", "gpio47"; > ++bias-bus-hold; > ++}; > ++}; > ++ > ++mdio0_pins: mdio0_pins { > ++mux { > ++pins = "gpio0", "gpio1"; > ++function = "gpio"; > ++drive-stre
Re: [OpenWrt-Devel] [Patch] ipq806x: add support for Netgear D7800
Hi John, Please check the content of the patch below. -- Index: trunk/target/linux/ipq806x/image/Makefile === --- trunk/target/linux/ipq806x/image/Makefile (revision 47890) +++ trunk/target/linux/ipq806x/image/Makefile (working copy) @@ -121,6 +121,17 @@ BOARD_NAME := r7500 endef -TARGET_DEVICES += AP148 AP148-legacy DB149 R7500 +define Device/D7800 + $(call Device/DniImage) + DEVICE_DTS := qcom-ipq8064-d7800 + KERNEL_SIZE := 2097152 + NETGEAR_BOARD_ID := D7800 + NETGEAR_HW_ID := 29764958+0+128+512+4x4+4x4 + BLOCKSIZE := 128KiB + PAGESIZE := 2048 + BOARD_NAME := d7800 +endef +TARGET_DEVICES += AP148 AP148-legacy DB149 R7500 D7800 + $(eval $(call BuildImage)) Index: trunk/target/linux/ipq806x/profiles/netgear.mk === --- trunk/target/linux/ipq806x/profiles/netgear.mk (revision 47890) +++ trunk/target/linux/ipq806x/profiles/netgear.mk (working copy) @@ -17,4 +17,18 @@ define Profile/R7500/Description Package set for the Netgear Nighthawk X4 R7500. endef + +define Profile/D7800 + NAME:=Netgear Nighthawk X4 D7800 + PACKAGES:= \ + kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-ledtrig-usbdev \ + kmod-usb3 kmod-usb-dwc3-qcom kmod-usb-phy-qcom-dwc3 \ + kmod-ath10k wpad-mini ath10k-firmware-qca99x0 +endef + +define Profile/D7800/Description + Package set for the Netgear Nighthawk X4 D7800. +endef + $(eval $(call Profile,R7500)) +$(eval $(call Profile,D7800)) Index: trunk/target/linux/ipq806x/base-files/lib/upgrade/platform.sh === --- trunk/target/linux/ipq806x/base-files/lib/upgrade/platform.sh (revision 47890) +++ trunk/target/linux/ipq806x/base-files/lib/upgrade/platform.sh (working copy) @@ -7,7 +7,8 @@ case "$board" in AP148 |\ - r7500) + r7500 |\ + d7800) nand_do_platform_check $board $1 return $?; ;; @@ -21,7 +22,8 @@ case "$board" in AP148 |\ - r7500) + r7500 |\ + d7800) nand_do_upgrade "$1" ;; esac Index: trunk/target/linux/ipq806x/base-files/lib/ipq806x.sh === --- trunk/target/linux/ipq806x/base-files/lib/ipq806x.sh(revision 47890) +++ trunk/target/linux/ipq806x/base-files/lib/ipq806x.sh(working copy) @@ -23,6 +23,9 @@ *"R7500") name="r7500" ;; + *"D7800") + name="d7800" + ;; esac [ -z "$name" ] && name="unknown" Index: trunk/target/linux/ipq806x/base-files/etc/board.d/01_leds === --- trunk/target/linux/ipq806x/base-files/etc/board.d/01_leds (revision 47890) +++ trunk/target/linux/ipq806x/base-files/etc/board.d/01_leds (working copy) @@ -11,7 +11,8 @@ board=$(ipq806x_board_name) case "$board" in -r7500) +r7500 |\ +d7800) ucidef_set_led_usbdev "usb1" "USB 1" "r7500:white:usb1" "1-1" ucidef_set_led_usbdev "usb2" "USB 2" "r7500:white:usb3" "3-1" ucidef_set_led_netdev "wan" "WAN" "r7500:white:wan" "eth0" Index: trunk/target/linux/ipq806x/base-files/etc/board.d/02_network === --- trunk/target/linux/ipq806x/base-files/etc/board.d/02_network (revision 47890) +++ trunk/target/linux/ipq806x/base-files/etc/board.d/02_network (working copy) @@ -13,7 +13,8 @@ case "$board" in ap148 |\ -r7500) +r7500 |\ +d7800) ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0" ;; Index: trunk/target/linux/ipq806x/patches-3.18/801-ARM-qcom-add-Netgear-Nighthawk-X 4-D7800-device-tree.patch === --- trunk/target/linux/ipq806x/patches-3.18/801-ARM-qcom-add-Netgear-Nighthawk-X 4-D7800-device-tree.patch (revision 0) +++ trunk/target/linux/ipq806x/patches-3.18/801-ARM-qcom-add-Netgear-Nighthawk-X 4-D7800-device-tree.patch (revision 0) @@ -0,0 +1,381 @@ +--- a/arch/arm/boot/dts/Makefile 2015-09-22 18:30:09.033530282 +0530 b/arch/arm/boot/dts/Makefile 2015-09-23 17:06:44.892947581 +0530 +@@ -362,6 +362,7 @@ + qcom-ipq8064-ap148.dtb \ + qcom-ipq8064-db149.dtb \ + qcom-ipq8064-r7500.dtb \ ++ qcom-ipq8064-d7800.dtb \ + qcom-msm8660-surf.dtb \ + qcom-msm8960-cdp.dtb \ + qcom-msm8974-sony-xperia-honami.dtb +--- a/arch/arm/boot/dts/qcom-ipq8064-d7800.dts 1970-01-01 05:30:00.0 +0530 b/arch/arm/boot/dts/qcom-ipq8064-d7800.dts 2015-09-23 17:06:45.336947567 +0530 +@@ -0,0 +1,368
Re: [OpenWrt-Devel] [Patch] ipq806x: add support for Netgear D7800
On Wed, 23 Dec 2015 14:12:00 +0100, Tathagata Das wrote: - r7500) + r7500 |\ + d7800) nand_do_platform_check $board $1 return $?; ;; @@ -21,7 +22,8 @@ case "$board" in AP148 |\ - r7500) + r7500 |\ + d7800) nand_do_upgrade "$1" ;; esac Please follow the abc, please ;) Index: trunk/target/linux/ipq806x/base-files/lib/ipq806x.sh === --- trunk/target/linux/ipq806x/base-files/lib/ipq806x.sh(revision 47890) +++ trunk/target/linux/ipq806x/base-files/lib/ipq806x.sh(working copy) @@ -23,6 +23,9 @@ *"R7500") name="r7500" ;; + *"D7800") + name="d7800" + ;; esac [ -z "$name" ] && name="unknown" ditto Index: trunk/target/linux/ipq806x/base-files/etc/board.d/01_leds === --- trunk/target/linux/ipq806x/base-files/etc/board.d/01_leds (revision 47890) +++ trunk/target/linux/ipq806x/base-files/etc/board.d/01_leds (working copy) @@ -11,7 +11,8 @@ board=$(ipq806x_board_name) case "$board" in -r7500) +r7500 |\ +d7800) ucidef_set_led_usbdev "usb1" "USB 1" "r7500:white:usb1" "1-1" ucidef_set_led_usbdev "usb2" "USB 2" "r7500:white:usb3" "3-1" ucidef_set_led_netdev "wan" "WAN" "r7500:white:wan" "eth0" Index: trunk/target/linux/ipq806x/base-files/etc/board.d/02_network === --- trunk/target/linux/ipq806x/base-files/etc/board.d/02_network (revision 47890) +++ trunk/target/linux/ipq806x/base-files/etc/board.d/02_network (working copy) @@ -13,7 +13,8 @@ case "$board" in ap148 |\ -r7500) +r7500 |\ +d7800) ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0" ;; ditto Index: trunk/target/linux/ipq806x/patches-3.18/801-ARM-qcom-add-Netgear-Nighthawk-X 4-D7800-device-tree.patch === --- trunk/target/linux/ipq806x/patches-3.18/801-ARM-qcom-add-Netgear-Nighthawk-X 4-D7800-device-tree.patch (revision 0) +++ trunk/target/linux/ipq806x/patches-3.18/801-ARM-qcom-add-Netgear-Nighthawk-X 4-D7800-device-tree.patch (revision 0) @@ -0,0 +1,381 @@ +--- a/arch/arm/boot/dts/Makefile 2015-09-22 18:30:09.033530282 +0530 b/arch/arm/boot/dts/Makefile 2015-09-23 17:06:44.892947581 +0530 +@@ -362,6 +362,7 @@ + qcom-ipq8064-ap148.dtb \ + qcom-ipq8064-db149.dtb \ + qcom-ipq8064-r7500.dtb \ ++ qcom-ipq8064-d7800.dtb \ + qcom-msm8660-surf.dtb \ + qcom-msm8960-cdp.dtb \ + qcom-msm8974-sony-xperia-honami.dtb ditto +--- a/arch/arm/boot/dts/qcom-ipq8064-d7800.dts 1970-01-01 05:30:00.0 +0530 b/arch/arm/boot/dts/qcom-ipq8064-d7800.dts 2015-09-23 17:06:45.336947567 +0530 +@@ -0,0 +1,368 @@ This should be qcom-ipq8064-netgear-d7800.dts ++ chosen { ++ bootargs = "rootfstype=squashfs noinitrd"; I doubt this is needed. Imre ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [Patch] ipq806x: add support for Netgear D7800
nope that did not work properly. please consider using git to send the patch --> https://patchwork.ozlabs.org/patch/560543/ On 23/12/2015 14:12, Tathagata Das wrote: > Hi John, > > Please check the content of the patch below. > > > -- > Index: trunk/target/linux/ipq806x/image/Makefile > === > --- trunk/target/linux/ipq806x/image/Makefile (revision 47890) > +++ trunk/target/linux/ipq806x/image/Makefile (working copy) > @@ -121,6 +121,17 @@y. > BOARD_NAME := r7500 > endef > > -TARGET_DEVICES += AP148 AP148-legacy DB149 R7500 > +define Device/D7800 > + $(call Device/DniImage) > + DEVICE_DTS := qcom-ipq8064-d7800 > + KERNEL_SIZE := 2097152 > + NETGEAR_BOARD_ID := D7800 > + NETGEAR_HW_ID := 29764958+0+128+512+4x4+4x4 > + BLOCKSIZE := 128KiB > + PAGESIZE := 2048 > + BOARD_NAME := d7800 > +endef > > +TARGET_DEVICES += AP148 AP148-legacy DB149 R7500 D7800 > + > $(eval $(call BuildImage)) > Index: trunk/target/linux/ipq806x/profiles/netgear.mk > === > --- trunk/target/linux/ipq806x/profiles/netgear.mk(revision 47890) > +++ trunk/target/linux/ipq806x/profiles/netgear.mk(working copy) > @@ -17,4 +17,18 @@ > define Profile/R7500/Description > Package set for the Netgear Nighthawk X4 R7500. > endef > + > +define Profile/D7800 > + NAME:=Netgear Nighthawk X4 D7800 > + PACKAGES:= \ > + kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-ledtrig-usbdev \ > + kmod-usb3 kmod-usb-dwc3-qcom kmod-usb-phy-qcom-dwc3 \ > + kmod-ath10k wpad-mini ath10k-firmware-qca99x0 > +endef > + > +define Profile/D7800/Description > + Package set for the Netgear Nighthawk X4 D7800. > +endef > + > $(eval $(call Profile,R7500)) > +$(eval $(call Profile,D7800)) > Index: trunk/target/linux/ipq806x/base-files/lib/upgrade/platform.sh > === > --- trunk/target/linux/ipq806x/base-files/lib/upgrade/platform.sh > (revision 47890) > +++ trunk/target/linux/ipq806x/base-files/lib/upgrade/platform.sh > (working copy) > @@ -7,7 +7,8 @@ > > case "$board" in > AP148 |\ > - r7500) > + r7500 |\ > + d7800) > nand_do_platform_check $board $1 > return $?; > ;; > @@ -21,7 +22,8 @@ > > case "$board" in > AP148 |\ > - r7500) > + r7500 |\ > + d7800) > nand_do_upgrade "$1" > ;; > esac > Index: trunk/target/linux/ipq806x/base-files/lib/ipq806x.sh > === > --- trunk/target/linux/ipq806x/base-files/lib/ipq806x.sh (revision > 47890) > +++ trunk/target/linux/ipq806x/base-files/lib/ipq806x.sh (working > copy) > @@ -23,6 +23,9 @@ > *"R7500") > name="r7500" > ;; > + *"D7800") > + name="d7800" > + ;; > esac > > [ -z "$name" ] && name="unknown" > Index: trunk/target/linux/ipq806x/base-files/etc/board.d/01_leds > === > --- trunk/target/linux/ipq806x/base-files/etc/board.d/01_leds (revision > 47890) > +++ trunk/target/linux/ipq806x/base-files/etc/board.d/01_leds (working > copy) > @@ -11,7 +11,8 @@ > board=$(ipq806x_board_name) > > case "$board" in > -r7500) > +r7500 |\ > +d7800) > ucidef_set_led_usbdev "usb1" "USB 1" "r7500:white:usb1" "1-1" > ucidef_set_led_usbdev "usb2" "USB 2" "r7500:white:usb3" "3-1" > ucidef_set_led_netdev "wan" "WAN" "r7500:white:wan" "eth0" > Index: trunk/target/linux/ipq806x/base-files/etc/board.d/02_network > === > --- trunk/target/linux/ipq806x/base-files/etc/board.d/02_network > (revision 47890) > +++ trunk/target/linux/ipq806x/base-files/etc/board.d/02_network > (working copy) > @@ -13,7 +13,8 @@ > > case "$board" in > ap148 |\ > -r7500) > +r7500 |\ > +d7800) > ucidef_add_switch "switch0" \ > "1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0" > ;; > Index: > trunk/target/linux/ipq806x/patches-3.18/801-ARM-qcom-add-Netgear-Nighthawk-X > 4-D7800-device-tree.patch > === > --- > trunk/target/linux/ipq806x/patches-3.18/801-ARM-qcom-add-Netgear-Nighthawk-X > 4-D7800-device-tree.patch (revision 0) > +++ > trunk/target/linux/ipq806x/patches-3.18/801-ARM-qcom-add-Netgear-Nighthawk-X > 4-D7800-device-tree.patch (revision 0) > @@ -0,0 +1,381 @@ > +--- a/arch/arm/boot/dts/Makefile 2015-09-22 18:30:09.033530282 +0530 > b/arch/arm/boot/dts/Makefile 2015-09-23 17:06:44.892947581 +0530 > +@@ -362,6 +362,7 @@ > + qcom-ipq8064-ap148.dtb \ > + qcom-ipq8064-db149.dtb \ > + qcom-ipq8064-r
Re: [OpenWrt-Devel] [PATCH] base-files utils/busybox: Make requiring login in console default for easily accessed devices
* Imre Kaloz [23.12.2015 16:22]: > >I'd hate to have some corner case result in bricked routers for > >people who have no means of recovering from a bad flash. > > You can reflash from the bootloader all the time, we are talking > about userland here. IMHO this should be just a normal change, like > dropping telnet. Enforcing login should be on by default, specially > since if one forgets the password they can just reset everything to > defaults keeping the reset button pressed. I am against asking for a password in failsafe mode: failsafe is failsafe is failsafe. You have to run mount_root which does _things_ and can break. bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] base-files utils/busybox: Make requiring login in console default for easily accessed devices
On 2015-12-16 15:59, open...@daniel.thecshore.com wrote: > From: Daniel Dickinson > > Some devices like generic PC's and Raspberry Pi/Pi2 are much more trivial to > get hardware console access than a typical router scenario and therefore > really > ought to require login even on hardware console rather than a hardware console > granting passwordless root access. > > Since we're at it, we also make requiring login on hardware console an > easily configured build-time option. > > Signed-off-by: Daniel Dickinson > diff --git a/target/linux/adm5120/base-files-console/etc/inittab > b/target/linux/adm5120/base-files-console/etc/inittab > new file mode 100644 > index 000..fb677d6 > --- /dev/null > +++ b/target/linux/adm5120/base-files-console/etc/inittab > @@ -0,0 +1,5 @@ > +::sysinit:/etc/init.d/rcS S boot > +::shutdown:/etc/init.d/rcS K shutdown > +tts/0::respawn:/sbin/getty -L 115200 tts/0 > +ttyAM0::respawn:/sbin/getty -L 115200 ttyAM0 > +tty1::respawn:/sbin/getty -L 115200 tty1 NACK on this kind of inittab change. We intentionally made the code auto-detect the console based on what the kernel provides. Please find a way to use this autodetection for login, e.g. by making a wrapper that either spawns a shell or runs getty. This would even be a nice way to make this feature runtime-configurable. - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] base-files utils/busybox: Make requiring login in console default for easily accessed devices
On 2015-12-23 16:27, Bastian Bittorf wrote: > * Imre Kaloz [23.12.2015 16:22]: >> >I'd hate to have some corner case result in bricked routers for >> >people who have no means of recovering from a bad flash. >> >> You can reflash from the bootloader all the time, we are talking >> about userland here. IMHO this should be just a normal change, like >> dropping telnet. Enforcing login should be on by default, specially >> since if one forgets the password they can just reset everything to >> defaults keeping the reset button pressed. > > I am against asking for a password in failsafe mode: > failsafe is failsafe is failsafe. > > You have to run mount_root which does _things_ and can break. I completely agree with this. Failsafe needs to be robust. - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 00/12] lantiq: switch to devicename:colour:function naming scheme
I chose to use Device Tree Source files to define some common used leds. This way it's possible to prevent the bloating (as it can be seen on other tragets) of the led board.d file as well as the diag.sh file. No need to carry dozen of - unrelated - board specific led definitions with each board. The devicename is the same for all boards: "soc". Using for example the TDW8970. The leds of this board are defined in the TDW89x0.dtsi include file and shared with the TWD8980. Therefore I would name the device part of the led label "TWD89x0". When it comes to the situation that for these boards a led mapping needs to be added to board.d led file, the $board approach wouldn't work. This is unnecessary error prone and therefore I used "soc". The colours where matched to the names used in the board manual. The function names are either the led lable printed on the board cases or the name used in the manual. If I found a led missing, I left a comment in the dts file. Due to missing board manuals or insufficient informations in the board manual, I wasn't able to rename the leds of the following boards: ARV7519PW, ARV7510PW22, ARV4510PW and ARV4518PWR01*. The ARV4518PWR01* boards are somehow special, since the leds doesn't match the leds from the manual or pictures I found (e.g. there shouldn't be a wps led). If someone can provide the required informations for the mentioned boards, feel free to contact me. The first few patches are only for cleaning up some of the dts files, which made it easier for me to rename the leds later on. Patch 11 "Add support for indicating the boot state using three leds" doesn't match directly the purpose of the series, but it allows me to remove even more leds form the board.d led file before renaming. HELP: In addition, I tried to allow dsl_notify.sh to control a shared dsl/internet LED as well. But I missed that dsl_notify.sh assigns a timer trigger to the LED and therefore replaces the netdev trigger. Till now, I couldn't figure out, how to reload the configuration of a single led (here at the dsl_notify UP event to re-add the netdev trigger). Did I missed something or does this functionality need to be implemented. GENERAL NOTE: Since I have to had a look at all dts files, I noticed the following oddness: - ARV4525PW: doesn't have bootargs - GIGASX76X: doesn't have leds defined, where the old mach file had This series has been runtime tested on BTHOMEHUBV5A, TDW8980, VGV7510KW22 and ARV752DPW22. All other boards are compile tested. Mathias Kresin (12): lantiq: P2812HNUFX - move leds to dtsi lantiq: BTHOMEHUBV2B - remove missing usb led workaround lantiq: ARV4518PWR01* move redundant parts to dtsi lantiq: DGN1000B - fix typo in dts file lantiq: ARV752DPW22 - fix dts file lantiq: ARV752DPW - fix dts file lantiq: define default leds in dts files lantiq: use default leds defined in DTS lantiq: use power leds defined in DTS lantiq: use dsl led defined in DTS lantiq: add support for indicating the boot state using three leds lantiq: use soc:colour:function led naming scheme target/linux/lantiq/base-files/etc/board.d/01_leds | 63 ++- target/linux/lantiq/base-files/etc/diag.sh | 50 ++ .../lantiq/base-files/lib/functions/lantiq.sh | 16 ++ target/linux/lantiq/base-files/sbin/dsl_notify.sh | 14 +- target/linux/lantiq/dts/ARV4510PW.dts | 27 ++- target/linux/lantiq/dts/ARV4518PWR01.dts | 179 +-- target/linux/lantiq/dts/ARV4518PWR01.dtsi | 196 + target/linux/lantiq/dts/ARV4518PWR01A.dts | 179 +-- target/linux/lantiq/dts/ARV4519PW.dts | 60 --- target/linux/lantiq/dts/ARV4520PW.dts | 56 -- target/linux/lantiq/dts/ARV4525PW.dts | 29 ++- target/linux/lantiq/dts/ARV452CQW.dts | 55 +++--- target/linux/lantiq/dts/ARV7510PW22.dts| 16 +- target/linux/lantiq/dts/ARV7518PW.dts | 54 +++--- target/linux/lantiq/dts/ARV7519PW.dts | 24 ++- target/linux/lantiq/dts/ARV7519RW22.dts| 30 ++-- target/linux/lantiq/dts/ARV7525PW.dts | 31 ++-- target/linux/lantiq/dts/ARV752DPW.dts | 47 +++-- target/linux/lantiq/dts/ARV752DPW22.dts| 67 --- target/linux/lantiq/dts/ARV8539PW22.dts| 30 +++- target/linux/lantiq/dts/BTHOMEHUBV2B.dts | 21 ++- target/linux/lantiq/dts/BTHOMEHUBV3A.dts | 21 ++- target/linux/lantiq/dts/BTHOMEHUBV5A.dts | 23 ++- target/linux/lantiq/dts/DGN1000B.dts | 32 ++-- target/linux/lantiq/dts/DGN3500.dtsi | 44 +++-- target/linux/lantiq/dts/EASY80920.dtsi | 35 ++-- target/linux/lantiq/dts/FRITZ3370.dts | 35 ++-- target/linux/lantiq/dts/FRITZ7320.dts | 31 ++-- target/linux/lantiq/dts/GR7000.dts | 28 +-- target/linux/lantiq/dts/H201L.d
[OpenWrt-Devel] [PATCH 01/12] lantiq: P2812HNUFX - move leds to dtsi
Beside the used labels, they are the same on both boards. Signed-off-by: Mathias Kresin --- target/linux/lantiq/dts/P2812HNUF1.dts | 61 - target/linux/lantiq/dts/P2812HNUF3.dts | 53 target/linux/lantiq/dts/P2812HNUFX.dtsi | 61 + 3 files changed, 61 insertions(+), 114 deletions(-) diff --git a/target/linux/lantiq/dts/P2812HNUF1.dts b/target/linux/lantiq/dts/P2812HNUF1.dts index 24ded3e..4dcaf27 100644 --- a/target/linux/lantiq/dts/P2812HNUF1.dts +++ b/target/linux/lantiq/dts/P2812HNUF1.dts @@ -42,65 +42,4 @@ compatible = "ralink,eeprom"; ralink,eeprom = "RT3062.eeprom"; }; - - gpio-leds { - compatible = "gpio-leds"; - - internet_red { /* red */ - label = "internet_red"; - gpios = <&stp 16 1>; - }; - internet_green { - label = "internet_green"; /* green */ - gpios = <&stp 17 1>; - }; - dsl { - label = "dsl"; - gpios = <&stp 18 1>; - }; - dsl2 { - label = "dsl2"; - gpios = <&stp 19 1>; - }; - wireless_red { /* red */ - label = "wireless_red"; - gpios = <&stp 20 1>; - }; - wireless_green {/* green */ - label = "wireless_green"; - gpios = <&stp 21 1>; - }; - power { /* red */ - label = "power"; - gpios = <&stp 22 1>; - }; - power2 {/* green */ - label = "power2"; - gpios = <&stp 23 1>; - }; - usb1 { /* green */ - label = "usb1"; - gpios = <&gpio 38 1>; - }; - usb2 { /* green */ - label = "usb2"; - gpios = <&gpio 44 1>; - }; - phone1 {/* green */ - label = "phone1"; - gpios = <&gpio 11 1>; - }; - phone1warn {/* red */ - label = "phone1warn"; - gpios = <&gpio 12 1>; - }; - phone2warn {/* red */ - label = "phone2warn"; - gpios = <&gpio 26 1>; - }; - phone2 {/* green */ - label = "phone2"; - gpios = <&gpio 28 1>; - }; - }; }; diff --git a/target/linux/lantiq/dts/P2812HNUF3.dts b/target/linux/lantiq/dts/P2812HNUF3.dts index 5d25c3c..a293f59 100644 --- a/target/linux/lantiq/dts/P2812HNUF3.dts +++ b/target/linux/lantiq/dts/P2812HNUF3.dts @@ -53,57 +53,4 @@ compatible = "ralink,eeprom"; ralink,eeprom = "RT3092.eeprom"; }; - - gpio-leds { - compatible = "gpio-leds"; - - internet2 { - label = "internet2"; - gpios = <&stp 16 1>; - }; - internet { - label = "internet"; - gpios = <&stp 17 1>; - }; - dsl { - label = "dsl"; - gpios = <&stp 18 1>; - }; - dsl2 { - label = "dsl2"; - gpios = <&stp 19 1>; - }; - wireless_red { - label = "wireless_red"; - gpios = <&stp 20 1>; - }; - wireless_green { - label = "wireless_green"; - gpios = <&stp 21 1>; - }; - power2 { - label = "power2"; - gpios = <&stp 22 1>; - }; - power { - label = "power"; - gpios = <&stp 23 1>; - }; - phone1 { - label = "phone1"; - gpios = <&gpio 11 1>; - }; - phone1warn { - label = "phone1warn"; - gpios = <&gpio 12 1>; - }; - phone2 { - label = "phone2"; - gpio
[OpenWrt-Devel] [PATCH 03/12] lantiq: ARV4518PWR01* move redundant parts to dtsi
Signed-off-by: Mathias Kresin --- target/linux/lantiq/dts/ARV4518PWR01.dts | 179 + target/linux/lantiq/dts/ARV4518PWR01.dtsi | 184 ++ target/linux/lantiq/dts/ARV4518PWR01A.dts | 179 + 3 files changed, 186 insertions(+), 356 deletions(-) create mode 100644 target/linux/lantiq/dts/ARV4518PWR01.dtsi diff --git a/target/linux/lantiq/dts/ARV4518PWR01.dts b/target/linux/lantiq/dts/ARV4518PWR01.dts index f2a2e18..7dfdb6f 100644 --- a/target/linux/lantiq/dts/ARV4518PWR01.dts +++ b/target/linux/lantiq/dts/ARV4518PWR01.dts @@ -1,192 +1,15 @@ /dts-v1/; -/include/ "danube.dtsi" +/include/ "ARV4518PWR01.dtsi" / { model = "ARV4518PWR01 - SMC7908A-ISP"; - chosen { - bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; - }; - - memory@0 { - reg = <0x0 0x400>; - }; - - sram@1F00 { - vmmc@107000 { - status = "okay"; - gpios = <&gpio 31 0>; - }; - }; - fpi@1000 { - localbus@0 { - nor-boot@0 { - compatible = "lantiq,nor"; - bank-width = <2>; - reg = <0 0x0 0x200>; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "uboot"; - reg = <0x0 0x1>; /* 64 KB */ - read-only; - }; - - partition@1 { - label = "uboot_env"; - reg = <0x1 0x1>; /* 64 KB */ - read-only; - }; - - partition@2 { - label = "firmware"; - reg = <0x2 0x3d>; - }; - - partition@40 { - label = "boardconfig"; - reg = <0x3f 0x1>; - read-only; - }; - }; - - gpiomm: gpiomm@400 { - compatible = "lantiq,gpio-mm"; - reg = <1 0x0 0x10 >; - #address-cells = <1>; - #size-cells = <1>; - #gpio-cells = <2>; - gpio-controller; - lantiq,shadow = <0x0>; - }; - - mac_addr { - compatible = "lantiq,eth-mac"; - reg = <0 0x3f0016 0x6>; - mac-increment = <2>; - }; - - ath5k_eep { - compatible = "ath5k,eeprom"; - reg = <0 0x3f0400 0x1000 - 0 0x3f0016 0x6>; - ath,mac-increment = <1>; - ath,eep-swap; - }; - }; - - gpio: pinmux@E100B10 { - pinctrl-names = "default"; - pinctrl-0 = <&state_default>; - - state_default: pinmux { - ebu { - lantiq,groups = "ebu cs1"; - lantiq,function = "ebu"; - }; - pci_in { - lantiq,groups = "req1", "req2"; - lantiq,function = "pci"; - lantiq,open-drain = <1>; - lantiq,pull = <2>; - lantiq,output = <0>; - }; - pci_out { - lantiq,groups = "gnt1", "gnt2"; - lantiq,function = "pci"; - lantiq,pull = <0>; - lantiq,output = <1>; - }; - }; - }; - - etop@E18 { - phy-mode = "mii"; - }; - - ifxhcd@E101000 { - status = "okay"; - gpios = <&gpio 14 0>; - }; pc
[OpenWrt-Devel] [PATCH 02/12] lantiq: BTHOMEHUBV2B - remove missing usb led workaround
The workaround shouldn't be in the default configuration. Signed-off-by: Mathias Kresin --- target/linux/lantiq/base-files/etc/board.d/01_leds | 1 - 1 file changed, 1 deletion(-) diff --git a/target/linux/lantiq/base-files/etc/board.d/01_leds b/target/linux/lantiq/base-files/etc/board.d/01_leds index b5801ca..9d57cf3 100755 --- a/target/linux/lantiq/base-files/etc/board.d/01_leds +++ b/target/linux/lantiq/base-files/etc/board.d/01_leds @@ -25,7 +25,6 @@ BTHOMEHUBV2B) # ucidef_set_led_wlan "wifi" "wifi" "soc:blue:wireless" "phy0radio" ucidef_set_led_wlan "wifi" "wifi" "soc:blue:wireless" "phy0tpt" ucidef_set_led_netdev "internet" "internet" "soc:blue:broadband" "pppoa-wan" - ucidef_set_led_usbdev "usb" "usb" "soc:blue:phone" "1-1" ;; BTHOMEHUBV3A) ucidef_set_led_default "power" "power" "soc:blue:power" "1" -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 05/12] lantiq: ARV752DPW22 - fix dts file
No need to switch (and keep) on all leds at boot. Use the same led logic and labels as the OEM firmware (red = okay, blue = failure). Add the red internet led. Signed-off-by: Mathias Kresin --- target/linux/lantiq/dts/ARV752DPW22.dts | 34 - 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/target/linux/lantiq/dts/ARV752DPW22.dts b/target/linux/lantiq/dts/ARV752DPW22.dts index ec4a3ab..168dc66 100644 --- a/target/linux/lantiq/dts/ARV752DPW22.dts +++ b/target/linux/lantiq/dts/ARV752DPW22.dts @@ -174,80 +174,70 @@ gpio-leds { compatible = "gpio-leds"; - power { - label = "power"; + power1 { + label = "power1"; gpios = <&gpio 3 1>; - default-state = "on"; + }; + internet { + label = "internet"; + gpios = <&gpio 4 1>; }; message { label = "message"; gpios = <&gpio 5 1>; - default-state = "on"; }; - power1 { - label = "power1"; + power { + label = "power"; gpios = <&gpio 6 1>; - default-state = "on"; + default-state = "keep"; }; voice1 { label = "voice1"; gpios = <&gpio 8 1>; - default-state = "on"; }; microphone { - label = "microphone"; + label = "umts"; gpios = <&gpiomm 3 1>; - default-state = "on"; }; wifi { label = "wifi_rt"; gpios = <&gpiomm 4 1>; - default-state = "on"; }; fxs1 { label = "fxs1"; gpios = <&gpiomm 5 1>; - default-state = "on"; }; fxs2 { label = "fxs2"; gpios = <&gpiomm 6 1>; - default-state = "on"; }; fxo { label = "fxo"; gpios = <&gpiomm 7 1>; - default-state = "on"; }; - dsl { - label = "dsl"; + internet2 { + label = "internet2"; gpios = <&gpiomm 8 1>; - default-state = "on"; }; voice2 { label = "voice2"; gpios = <&gpiomm 9 1>; - default-state = "on"; }; eth1 { label = "eth1"; gpios = <&gpiomm 11 1>; -default-state = "on"; }; eth2 { label = "eth2"; gpios = <&gpiomm 12 1>; - default-state = "on"; }; eth3 { label = "eth3"; gpios = <&gpiomm 13 1>; - default-state = "on"; }; eth4 { label = "eth4"; gpios = <&gpiomm 14 1>; - default-state = "on"; }; }; }; -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 04/12] lantiq: DGN1000B - fix typo in dts file
Signed-off-by: Mathias Kresin --- target/linux/lantiq/dts/DGN1000B.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/lantiq/dts/DGN1000B.dts b/target/linux/lantiq/dts/DGN1000B.dts index 4ccab93..199d3a9 100644 --- a/target/linux/lantiq/dts/DGN1000B.dts +++ b/target/linux/lantiq/dts/DGN1000B.dts @@ -107,7 +107,7 @@ }; gpio-leds { - cmpatible = "gpio-leds"; + compatible = "gpio-leds"; dsl { label = "dsl"; gpios = <&gpio 1 1>; -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 08/12] lantiq: use default leds defined in DTS
Remove all now double defined leds from the led board file. Use pppoe as default for all broadband connections, since it's the default in OpenWrt now. Rename the the wifi leds to make sure, the not applicable default values get overwritten. Signed-off-by: Mathias Kresin --- target/linux/lantiq/base-files/etc/board.d/01_leds | 27 ++ .../lantiq/base-files/lib/functions/lantiq.sh | 16 + 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/target/linux/lantiq/base-files/etc/board.d/01_leds b/target/linux/lantiq/base-files/etc/board.d/01_leds index 9d57cf3..7a25b6d 100755 --- a/target/linux/lantiq/base-files/etc/board.d/01_leds +++ b/target/linux/lantiq/base-files/etc/board.d/01_leds @@ -9,10 +9,10 @@ board_config_update -[ -e "/sys/class/leds/wifi" ] && ucidef_set_led_wlan "wifi" "wifi" "wifi" "phy0tpt" -[ -e "/sys/class/leds/usb" ] && ucidef_set_led_usbdev "usb" "usb" "usb" "1-1" -[ -e "/sys/class/leds/usb2" ] && ucidef_set_led_usbdev "usb2" "usb2" "usb2" "2-1" -[ -e "/sys/class/leds/internet" ] && ucidef_set_led_netdev "internet" "internet" "internet" "pppoe-wan" +[ -n "$(lantiq_is_dt_led_chosen wifi)" ] && ucidef_set_led_wlan "wifi" "wifi" "$(lantiq_get_dt_led_chosen wifi)" "phy0tpt" +[ -n "$(lantiq_is_dt_led_chosen usb)" ] && ucidef_set_led_usbdev "usb" "usb" "$(lantiq_get_dt_led_chosen usb)" "1-1" +[ -n "$(lantiq_is_dt_led_chosen usb2)" ] && ucidef_set_led_usbdev "usb2" "usb2" "$(lantiq_get_dt_led_chosen usb2)" "2-1" +[ -n "$(lantiq_is_dt_led_chosen internet)" ] && ucidef_set_led_netdev "internet" "internet" "$(lantiq_get_dt_led_chosen internet)" "pppoe-wan" board=$(lantiq_board_name) @@ -22,19 +22,12 @@ VG3503J) ;; BTHOMEHUBV2B) ucidef_set_led_default "power" "power" "soc:blue:power" "1" -# ucidef_set_led_wlan "wifi" "wifi" "soc:blue:wireless" "phy0radio" - ucidef_set_led_wlan "wifi" "wifi" "soc:blue:wireless" "phy0tpt" - ucidef_set_led_netdev "internet" "internet" "soc:blue:broadband" "pppoa-wan" ;; BTHOMEHUBV3A) ucidef_set_led_default "power" "power" "soc:blue:power" "1" - ucidef_set_led_wlan "wifi" "wifi" "soc:blue:wireless" "phy0tpt" - ucidef_set_led_netdev "internet" "internet" "soc:blue:broadband" "pppoa-wan" ;; BTHOMEHUBV5A) ucidef_set_led_default "power" "power" "soc:blue:power" "1" - ucidef_set_led_wlan "wifi" "wifi" "soc:blue:wireless" "phy0tpt" - ucidef_set_led_netdev "internet" "internet" "soc:blue:broadband" "pppoa-wan" ucidef_set_led_default "dimmed" "dimmed" "dimmed" "0" ;; VGV7510KW22) @@ -42,33 +35,27 @@ VGV7510KW22) ucidef_set_led_default "power2" "power2" "power2" "0" ucidef_set_led_wlan "wifi" "wifi" "wifi" "phy0radio" ucidef_set_led_netdev "dsl" "dsl" "dsl" "nas0" - ucidef_set_led_netdev "internet_green" "internet_green" "internet_green" "pppoe-wan" ;; VGV7519) ucidef_set_led_default "power" "power" "power" "0" ucidef_set_led_default "power2" "power2" "power2" "1" - ucidef_set_led_wlan "wireless_yellow" "wireless_yellow" "wireless_yellow" "phy0radio" - ucidef_set_led_netdev "internet_yellow" "internet_yellow" "internet_yellow" "nas0" - ucidef_set_led_netdev "broadband_yellow" "broadband_yellow" "broadband_yellow" "pppoe-wan" + ucidef_set_led_wlan "wifi" "wifi" "wireless_yellow" "phy0radio" + ucidef_set_led_netdev "broadband_yellow" "broadband_yellow" "broadband_yellow" "nas0" ;; P2812HNUF*) ucidef_set_led_default "power" "power" "power" "0" ucidef_set_led_default "power2" "power2" "power2" "1" - ucidef_set_led_wlan "wireless_green" "wireless_green" "wireless_green" "phy0radio" + ucidef_set_led_wlan "wifi" "wifi" "wireless_green" "phy0radio" ucidef_set_led_netdev "dsl" "dsl" "dsl" "nas0" - ucidef_set_led_netdev "internet_green" "internet_green" "internet_green" "pppoe-wan" ;; ARV7519RW22) ucidef_set_led_default "power" "power" "power" "1" - ucidef_set_led_netdev "internet_green" "internet_green" "internet_green" "pppoe-wan" ucidef_set_led_netdev "lan" "lan" "lan" "eth0.1" ;; ARV8539PW22) ucidef_set_led_default "power" "power" "soc:green:power" "1" ucidef_set_led_default "power2" "power2" "soc:red:power" "0" -ucidef_set_led_wlan "wifi" "wifi" "soc:green:wireless" "phy0tpt" ucidef_set_led_netdev "dsl" "dsl" "soc:green:dsl" "nas0" -ucidef_set_led_netdev "online" "online" "soc:green:online" "pppoe-wan" ;; *) ;; diff --git a/target/linux/lantiq/base-files/lib/functions/lantiq.sh b/target/linux/lantiq/base-files/lib/functions/lantiq.sh index 88da794..845c43d 100644 --- a/target/linux/lantiq/base-files/lib/functions/lantiq.sh +++ b/target/linux/lantiq/base-files/lib/functions/lantiq.sh @@ -27,3 +27,19 @@ lantiq_board_name() { echo "$name" } + +lantiq_is_dt_l
[OpenWrt-Devel] [PATCH 07/12] lantiq: define default leds in dts files
- ARV7525PW: use the power led as dsl led as done by the stock firmware - FRITZ3370: use the info led as internet led - FRITZ7320: use the power led as dsl led as done by the stock firmware Signed-off-by: Mathias Kresin --- target/linux/lantiq/dts/ARV4510PW.dts | 24 +--- target/linux/lantiq/dts/ARV4518PWR01.dtsi | 18 +- target/linux/lantiq/dts/ARV4519PW.dts | 21 +++-- target/linux/lantiq/dts/ARV4520PW.dts | 21 +++-- target/linux/lantiq/dts/ARV4525PW.dts | 16 +--- target/linux/lantiq/dts/ARV452CQW.dts | 15 +++ target/linux/lantiq/dts/ARV7510PW22.dts | 12 +--- target/linux/lantiq/dts/ARV7518PW.dts | 21 +++-- target/linux/lantiq/dts/ARV7519PW.dts | 18 +- target/linux/lantiq/dts/ARV7519RW22.dts | 9 +++-- target/linux/lantiq/dts/ARV7525PW.dts | 16 target/linux/lantiq/dts/ARV752DPW.dts | 15 +++ target/linux/lantiq/dts/ARV752DPW22.dts | 15 +++ target/linux/lantiq/dts/ARV8539PW22.dts | 17 + target/linux/lantiq/dts/BTHOMEHUBV2B.dts | 9 +++-- target/linux/lantiq/dts/BTHOMEHUBV3A.dts | 11 --- target/linux/lantiq/dts/BTHOMEHUBV5A.dts | 9 +++-- target/linux/lantiq/dts/DGN1000B.dts | 12 +--- target/linux/lantiq/dts/DGN3500.dtsi | 21 +++-- target/linux/lantiq/dts/EASY80920.dtsi| 12 +--- target/linux/lantiq/dts/FRITZ3370.dts | 18 +- target/linux/lantiq/dts/FRITZ7320.dts | 13 ++--- target/linux/lantiq/dts/GR7000.dts| 15 +++ target/linux/lantiq/dts/H201L.dts | 18 +- target/linux/lantiq/dts/P2601HNFX.dts | 18 +- target/linux/lantiq/dts/P2812HNUFX.dtsi | 24 +--- target/linux/lantiq/dts/TDW89X0.dtsi | 19 ++- target/linux/lantiq/dts/VG3503J.dtsi | 12 +--- target/linux/lantiq/dts/VGV7510KW22.dtsi | 18 +- target/linux/lantiq/dts/VGV7519.dtsi | 18 +- target/linux/lantiq/dts/WBMR.dts | 21 +++-- 31 files changed, 371 insertions(+), 135 deletions(-) diff --git a/target/linux/lantiq/dts/ARV4510PW.dts b/target/linux/lantiq/dts/ARV4510PW.dts index 4772495..427cd54 100644 --- a/target/linux/lantiq/dts/ARV4510PW.dts +++ b/target/linux/lantiq/dts/ARV4510PW.dts @@ -7,6 +7,16 @@ chosen { bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; + + leds { + dsl = &adsl; + internet = &internet; + power = &power; + power2 = &power2; + usb = &usb; + usb2 = &usb2; + wifi = &wifi; + }; }; memory@0 { @@ -139,11 +149,11 @@ gpio-leds { compatible = "gpio-leds"; - power { + power: power { label = "power"; gpios = <&gpios 21 0>; }; - power2 { + power2: power2 { label = "power2"; gpios = <&gpios 20 0>; }; @@ -163,15 +173,15 @@ label = "lan4"; gpios = <&gpios 16 0>; }; - wifi { + wifi: wifi { label = "wifi"; gpios = <&gpios 15 0>; }; - adsl { + adsl: adsl { label = "adsl"; gpios = <&gpios 14 0>; }; - internet { + internet: internet { label = "internet"; gpios = <&gpios 13 0>; }; @@ -191,11 +201,11 @@ label = "phone2"; gpios = <&gpios 9 0>; }; - usb { + usb: usb { label = "usb"; gpios = <&gpios 8 0>; }; - usb2 { + usb2: usb2 { label = "usb2"; gpios = <&gpios 7 0>; }; diff --git a/target/linux/lantiq/dts/ARV4518PWR01.dtsi b/target/linux/lantiq/dts/ARV4518PWR01.dtsi index 0699707..41d17de 100644 --- a/target/linux/lantiq/dts/ARV4518PWR01.dtsi +++ b/target/linux/lantiq/dts/ARV4518PWR01.dtsi @@ -3,6 +3,14 @@ / { chosen { bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; + + leds { + dsl = &dsl; + internet = &online; + power = &power; + usb = &usb; + wifi = &wi
[OpenWrt-Devel] [PATCH 10/12] lantiq: use dsl led defined in DTS
dsl_control (dsl_notify.sh) is the only process which is aware of the state of the atm/ptm interface. Use the dsl led exclusive for the dsl line state. On boards which don't have a distinct internet and a dsl led, let the netdev status of the atm interface trigger the shared led. Triggering the shared led according to the status of the ppp interface isn't suitable, since the led would be switched of if the ppp connection goes down, but the line is still in sync. Signed-off-by: Mathias Kresin --- target/linux/lantiq/base-files/etc/board.d/01_leds | 19 +++ target/linux/lantiq/base-files/sbin/dsl_notify.sh | 14 +++--- target/linux/lantiq/dts/ARV452CQW.dts | 2 +- target/linux/lantiq/dts/VG3503J.dtsi | 2 +- 4 files changed, 20 insertions(+), 17 deletions(-) diff --git a/target/linux/lantiq/base-files/etc/board.d/01_leds b/target/linux/lantiq/base-files/etc/board.d/01_leds index 7a25b6d..a95c72c 100755 --- a/target/linux/lantiq/base-files/etc/board.d/01_leds +++ b/target/linux/lantiq/base-files/etc/board.d/01_leds @@ -12,14 +12,21 @@ board_config_update [ -n "$(lantiq_is_dt_led_chosen wifi)" ] && ucidef_set_led_wlan "wifi" "wifi" "$(lantiq_get_dt_led_chosen wifi)" "phy0tpt" [ -n "$(lantiq_is_dt_led_chosen usb)" ] && ucidef_set_led_usbdev "usb" "usb" "$(lantiq_get_dt_led_chosen usb)" "1-1" [ -n "$(lantiq_is_dt_led_chosen usb2)" ] && ucidef_set_led_usbdev "usb2" "usb2" "$(lantiq_get_dt_led_chosen usb2)" "2-1" -[ -n "$(lantiq_is_dt_led_chosen internet)" ] && ucidef_set_led_netdev "internet" "internet" "$(lantiq_get_dt_led_chosen internet)" "pppoe-wan" + +[ -n "$(lantiq_is_dt_led_chosen internet)" ] && { + interface="nas0" + + [ -n "$(lantiq_is_dt_led_chosen dsl)" ] && { + interface="pppoe-wan" + ucidef_set_led_default "dsl" "dsl" "$(lantiq_get_dt_led_chosen dsl)" "0" + } + + ucidef_set_led_netdev "internet" "internet" "$(lantiq_get_dt_led_chosen internet)" "$interface" +} board=$(lantiq_board_name) case "$board" in -VG3503J) - ucidef_set_led_netdev "vdsl" "vdsl" "bt:green:dsl" "ptm0" - ;; BTHOMEHUBV2B) ucidef_set_led_default "power" "power" "soc:blue:power" "1" ;; @@ -34,19 +41,16 @@ VGV7510KW22) ucidef_set_led_default "power" "power" "power" "1" ucidef_set_led_default "power2" "power2" "power2" "0" ucidef_set_led_wlan "wifi" "wifi" "wifi" "phy0radio" - ucidef_set_led_netdev "dsl" "dsl" "dsl" "nas0" ;; VGV7519) ucidef_set_led_default "power" "power" "power" "0" ucidef_set_led_default "power2" "power2" "power2" "1" ucidef_set_led_wlan "wifi" "wifi" "wireless_yellow" "phy0radio" - ucidef_set_led_netdev "broadband_yellow" "broadband_yellow" "broadband_yellow" "nas0" ;; P2812HNUF*) ucidef_set_led_default "power" "power" "power" "0" ucidef_set_led_default "power2" "power2" "power2" "1" ucidef_set_led_wlan "wifi" "wifi" "wireless_green" "phy0radio" - ucidef_set_led_netdev "dsl" "dsl" "dsl" "nas0" ;; ARV7519RW22) ucidef_set_led_default "power" "power" "power" "1" @@ -55,7 +59,6 @@ ARV7519RW22) ARV8539PW22) ucidef_set_led_default "power" "power" "soc:green:power" "1" ucidef_set_led_default "power2" "power2" "soc:red:power" "0" -ucidef_set_led_netdev "dsl" "dsl" "soc:green:dsl" "nas0" ;; *) ;; diff --git a/target/linux/lantiq/base-files/sbin/dsl_notify.sh b/target/linux/lantiq/base-files/sbin/dsl_notify.sh index b514e25..01d0488 100755 --- a/target/linux/lantiq/base-files/sbin/dsl_notify.sh +++ b/target/linux/lantiq/base-files/sbin/dsl_notify.sh @@ -16,15 +16,15 @@ include /lib/network scan_interfaces -local default +local led config_load system -config_get default led_adsl default -if [ "$default" != 1 ]; then +config_get led led_dsl sysfs +if [ -n "$led" ]; then case "$DSL_INTERFACE_STATUS" in - "HANDSHAKE") led_timer dsl 500 500;; - "TRAINING") led_timer dsl 200 200;; - "UP") led_on dsl;; - *)led_off dsl + "HANDSHAKE") led_timer $led 500 500;; + "TRAINING") led_timer $led 200 200;; + "UP") led_on $led;; + *)led_off $led esac fi diff --git a/target/linux/lantiq/dts/ARV452CQW.dts b/target/linux/lantiq/dts/ARV452CQW.dts index 320e5f5..38618f1 100644 --- a/target/linux/lantiq/dts/ARV452CQW.dts +++ b/target/linux/lantiq/dts/ARV452CQW.dts @@ -9,7 +9,7 @@ bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; leds { - dsl = &dsl; + internet = &dsl; power1 = &power1; usb = &usb; wifi = &wifi; diff --git a/target/linux/lantiq/dts/VG3503J.dtsi b/target/linux/lantiq/dts/VG3503J.dtsi index 50ab0b6..e567923 100644 --- a/target
[OpenWrt-Devel] [PATCH 06/12] lantiq: ARV752DPW - fix dts file
Use the same led logic and labels as the OEM firmware (red = okay, blue = failure). Add the red internet led. Remove missing usb led workaround. The workaround shouldn't be in the default configuration. Signed-off-by: Mathias Kresin --- target/linux/lantiq/dts/ARV752DPW.dts | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/target/linux/lantiq/dts/ARV752DPW.dts b/target/linux/lantiq/dts/ARV752DPW.dts index fe478e1..8848c71 100644 --- a/target/linux/lantiq/dts/ARV752DPW.dts +++ b/target/linux/lantiq/dts/ARV752DPW.dts @@ -170,25 +170,29 @@ gpio-leds { compatible = "gpio-leds"; - power { - label = "power"; + power1 { + label = "power1"; gpios = <&gpio 3 1>; }; + internet { + label = "internet"; + gpios = <&gpio 4 1>; + }; message { label = "message"; gpios = <&gpio 5 1>; }; - power1 { - label = "power1"; + power { + label = "power"; gpios = <&gpio 6 1>; + default-state = "keep"; }; voice1 { label = "voice1"; gpios = <&gpio 8 1>; }; microphone { - /* use this led as te usb led */ - label = "usb"; + label = "umts"; gpios = <&gpiomm 3 1>; }; wifi { @@ -199,7 +203,7 @@ label = "fxs1"; gpios = <&gpiomm 5 1>; }; - fx2 { + fxs2 { label = "fxs2"; gpios = <&gpiomm 6 1>; }; @@ -207,8 +211,8 @@ label = "fxo"; gpios = <&gpiomm 7 1>; }; - internet { - label = "internet"; + internet2 { + label = "internet2"; gpios = <&gpiomm 8 1>; }; voice2 { -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 09/12] lantiq: use power leds defined in DTS
Use the power leds defined in the dts file instead of hardcoded led names. Signed-off-by: Mathias Kresin --- target/linux/lantiq/base-files/etc/diag.sh | 34 +- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/target/linux/lantiq/base-files/etc/diag.sh b/target/linux/lantiq/base-files/etc/diag.sh index 57a7055..0e65e61 100644 --- a/target/linux/lantiq/base-files/etc/diag.sh +++ b/target/linux/lantiq/base-files/etc/diag.sh @@ -2,49 +2,53 @@ # Copyright (C) 2012-2013 OpenWrt.org . /lib/functions/leds.sh +. /lib/functions/lantiq.sh -status_led=power -[ ! -d /sys/class/leds/power/ ] && [ ! -d /sys/class/leds/power1/ ] && [ ! -d /sys/class/leds/power2/ ] && [ -d /sys/class/leds/wps/ ] && status_led=wps +power="$(lantiq_get_dt_led_chosen power)" +power1="$(lantiq_get_dt_led_chosen power1)" +power2="$(lantiq_get_dt_led_chosen power2)" + +status_led="$power" set_state() { case "$1" in preinit) - if [ -d /sys/class/leds/power2/ ]; then + if [ -n "$power2" ]; then status_led_on - status_led=power2 + status_led="$power2" status_led_blink_preinit - status_led=power + status_led="$power" else status_led_blink_preinit fi ;; failsafe) - if [ -d /sys/class/leds/power2/ ]; then - led_off power2 + if [ -n "$power2" ]; then + led_off "$power2" status_led_blink_failsafe - elif [ -d /sys/class/leds/power1/ ]; then + elif [ -n "$power1" ]; then status_led_off - status_led=power1 + status_led="$power1" status_led_blink_failsafe - status_led=power + status_led="$power" else status_led_blink_failsafe fi ;; preinit_regular) - if [ -d /sys/class/leds/power2/ ]; then + if [ -n "$power2" ]; then status_led_on - status_led=power2 + status_led="$power2" status_led_blink_preinit_regular - status_led=power + status_led="$power" else status_led_blink_preinit_regular fi ;; done) status_led_on - led_off power1 - led_off power2 + led_off "$power1" + led_off "$power2" ;; esac } -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 12/12] lantiq: use soc:colour:function led naming scheme
The leds of the following boards are not renamed due to lack of manuals/informations: - ARV7519PW - ARV7510PW22 - ARV4510PW The leds of the ARV4518PWR01* boards are unchanged, since the leds doesn't match the leds from the manual or pictures (e.g. there shouldn't be a wps led). Signed-off-by: Mathias Kresin --- target/linux/lantiq/base-files/etc/board.d/01_leds | 6 +- target/linux/lantiq/dts/ARV4519PW.dts | 50 target/linux/lantiq/dts/ARV4520PW.dts | 40 +++-- target/linux/lantiq/dts/ARV4525PW.dts | 10 ++-- target/linux/lantiq/dts/ARV452CQW.dts | 48 --- target/linux/lantiq/dts/ARV7518PW.dts | 44 +++--- target/linux/lantiq/dts/ARV7519PW.dts | 2 +- target/linux/lantiq/dts/ARV7519RW22.dts| 14 ++--- target/linux/lantiq/dts/ARV7525PW.dts | 24 target/linux/lantiq/dts/ARV752DPW.dts | 38 ++-- target/linux/lantiq/dts/ARV752DPW22.dts| 46 +++--- target/linux/lantiq/dts/ARV8539PW22.dts| 7 ++- target/linux/lantiq/dts/DGN1000B.dts | 17 +++--- target/linux/lantiq/dts/DGN3500.dtsi | 20 --- target/linux/lantiq/dts/EASY80920.dtsi | 18 +++--- target/linux/lantiq/dts/FRITZ3370.dts | 14 ++--- target/linux/lantiq/dts/FRITZ7320.dts | 18 +++--- target/linux/lantiq/dts/GR7000.dts | 14 ++--- target/linux/lantiq/dts/H201L.dts | 14 ++--- target/linux/lantiq/dts/P2601HNFX.dts | 28 - target/linux/lantiq/dts/P2812HNUFX.dtsi| 64 ++-- target/linux/lantiq/dts/TDW8980.dts| 2 +- target/linux/lantiq/dts/TDW89X0.dtsi | 14 +++-- target/linux/lantiq/dts/VG3503J.dtsi | 16 ++--- target/linux/lantiq/dts/VGV7510KW22.dtsi | 30 +- target/linux/lantiq/dts/VGV7519.dtsi | 70 +++--- target/linux/lantiq/dts/WBMR.dts | 32 +- 27 files changed, 362 insertions(+), 338 deletions(-) diff --git a/target/linux/lantiq/base-files/etc/board.d/01_leds b/target/linux/lantiq/base-files/etc/board.d/01_leds index ac9e14e..08200e3 100755 --- a/target/linux/lantiq/base-files/etc/board.d/01_leds +++ b/target/linux/lantiq/base-files/etc/board.d/01_leds @@ -31,13 +31,13 @@ BTHOMEHUBV5A) ucidef_set_led_default "dimmed" "dimmed" "dimmed" "0" ;; VGV7510KW22) - ucidef_set_led_wlan "wifi" "wifi" "wifi" "phy0radio" + ucidef_set_led_wlan "wifi" "wifi" "soc:green:wlan" "phy0radio" ;; VGV7519) - ucidef_set_led_wlan "wifi" "wifi" "wireless_yellow" "phy0radio" + ucidef_set_led_wlan "wifi" "wifi" "soc:green:wireless" "phy0radio" ;; P2812HNUF*) - ucidef_set_led_wlan "wifi" "wifi" "wireless_green" "phy0radio" + ucidef_set_led_wlan "wifi" "wifi" "soc:green:wlan" "phy0radio" ;; ARV7519RW22) ucidef_set_led_netdev "lan" "lan" "lan" "eth0.1" diff --git a/target/linux/lantiq/dts/ARV4519PW.dts b/target/linux/lantiq/dts/ARV4519PW.dts index be65337..07768a4 100644 --- a/target/linux/lantiq/dts/ARV4519PW.dts +++ b/target/linux/lantiq/dts/ARV4519PW.dts @@ -3,18 +3,18 @@ /include/ "danube.dtsi" / { - model = "ARV4519PW - Vodafone, Pirelli"; + model = "ARV4519PW - Vodafone Netfaster IAD 2, Pirelli P.RG A4201G"; chosen { bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; leds { - boot = &power; - failsafe = &power2; - running = &power; + boot = &power_green; + failsafe = &power_red; + running = &power_green; dsl = &dsl; - internet = &online; + internet = &internet_green; usb = &usb; wifi = &wifi; }; @@ -129,61 +129,61 @@ gpio-leds { compatible = "gpio-leds"; - power: power { - label = "power"; + power_green: power { + label = "soc:green:power"; gpios = <&gpio 2 1>; default-state = "keep"; }; - power2: power2 { - label = "power2"; + power_red: power2 { + label = "soc:red:power"; gpios = <&gpio 7 1>; }; wifi: wifi { - label = "wifi"; + label = "soc:green:wlan"; gpios = <&gpio 6 1>; }; dsl: dsl { - label = "dsl"; + label = "soc:green:dsl"; g
[OpenWrt-Devel] [PATCH 11/12] lantiq: add support for indicating the boot state using three leds
The BTHOMEHUBV5A has a RGB power led, where every colour is perfect to indicate the current boot state. This patch adds support for such cases. The existing led sequences should be the same as before. Boards which are using a led different from power (like TDW89x0) are changed to switch of the led after boot Signed-off-by: Mathias Kresin --- target/linux/lantiq/base-files/etc/board.d/01_leds | 18 target/linux/lantiq/base-files/etc/diag.sh | 52 +++--- target/linux/lantiq/dts/ARV4510PW.dts | 7 ++- target/linux/lantiq/dts/ARV4518PWR01.dtsi | 6 ++- target/linux/lantiq/dts/ARV4519PW.dts | 7 ++- target/linux/lantiq/dts/ARV4520PW.dts | 11 +++-- target/linux/lantiq/dts/ARV4525PW.dts | 9 ++-- target/linux/lantiq/dts/ARV452CQW.dts | 8 +++- target/linux/lantiq/dts/ARV7510PW22.dts| 6 ++- target/linux/lantiq/dts/ARV7518PW.dts | 7 ++- target/linux/lantiq/dts/ARV7519PW.dts | 8 ++-- target/linux/lantiq/dts/ARV7519RW22.dts| 9 ++-- target/linux/lantiq/dts/ARV7525PW.dts | 7 ++- target/linux/lantiq/dts/ARV752DPW.dts | 6 ++- target/linux/lantiq/dts/ARV752DPW22.dts| 6 ++- target/linux/lantiq/dts/ARV8539PW22.dts| 8 +++- target/linux/lantiq/dts/BTHOMEHUBV2B.dts | 12 +++-- target/linux/lantiq/dts/BTHOMEHUBV3A.dts | 12 +++-- target/linux/lantiq/dts/BTHOMEHUBV5A.dts | 14 -- target/linux/lantiq/dts/DGN1000B.dts | 7 ++- target/linux/lantiq/dts/DGN3500.dtsi | 11 +++-- target/linux/lantiq/dts/EASY80920.dtsi | 7 ++- target/linux/lantiq/dts/FRITZ3370.dts | 11 +++-- target/linux/lantiq/dts/FRITZ7320.dts | 6 ++- target/linux/lantiq/dts/GR7000.dts | 7 +-- target/linux/lantiq/dts/H201L.dts | 9 ++-- target/linux/lantiq/dts/P2601HNFX.dts | 8 ++-- target/linux/lantiq/dts/P2812HNUFX.dtsi| 7 ++- target/linux/lantiq/dts/TDW89X0.dtsi | 6 ++- target/linux/lantiq/dts/VG3503J.dtsi | 7 ++- target/linux/lantiq/dts/VGV7510KW22.dtsi | 7 ++- target/linux/lantiq/dts/VGV7519.dtsi | 8 ++-- target/linux/lantiq/dts/WBMR.dts | 7 ++- 33 files changed, 189 insertions(+), 132 deletions(-) diff --git a/target/linux/lantiq/base-files/etc/board.d/01_leds b/target/linux/lantiq/base-files/etc/board.d/01_leds index a95c72c..ac9e14e 100755 --- a/target/linux/lantiq/base-files/etc/board.d/01_leds +++ b/target/linux/lantiq/base-files/etc/board.d/01_leds @@ -27,39 +27,21 @@ board_config_update board=$(lantiq_board_name) case "$board" in -BTHOMEHUBV2B) - ucidef_set_led_default "power" "power" "soc:blue:power" "1" - ;; -BTHOMEHUBV3A) - ucidef_set_led_default "power" "power" "soc:blue:power" "1" - ;; BTHOMEHUBV5A) - ucidef_set_led_default "power" "power" "soc:blue:power" "1" ucidef_set_led_default "dimmed" "dimmed" "dimmed" "0" ;; VGV7510KW22) - ucidef_set_led_default "power" "power" "power" "1" - ucidef_set_led_default "power2" "power2" "power2" "0" ucidef_set_led_wlan "wifi" "wifi" "wifi" "phy0radio" ;; VGV7519) - ucidef_set_led_default "power" "power" "power" "0" - ucidef_set_led_default "power2" "power2" "power2" "1" ucidef_set_led_wlan "wifi" "wifi" "wireless_yellow" "phy0radio" ;; P2812HNUF*) - ucidef_set_led_default "power" "power" "power" "0" - ucidef_set_led_default "power2" "power2" "power2" "1" ucidef_set_led_wlan "wifi" "wifi" "wireless_green" "phy0radio" ;; ARV7519RW22) - ucidef_set_led_default "power" "power" "power" "1" ucidef_set_led_netdev "lan" "lan" "lan" "eth0.1" ;; -ARV8539PW22) -ucidef_set_led_default "power" "power" "soc:green:power" "1" -ucidef_set_led_default "power2" "power2" "soc:red:power" "0" -;; *) ;; esac diff --git a/target/linux/lantiq/base-files/etc/diag.sh b/target/linux/lantiq/base-files/etc/diag.sh index 0e65e61..8356bcd 100644 --- a/target/linux/lantiq/base-files/etc/diag.sh +++ b/target/linux/lantiq/base-files/etc/diag.sh @@ -1,54 +1,34 @@ #!/bin/sh -# Copyright (C) 2012-2013 OpenWrt.org +# Copyright (C) 2010-2015 OpenWrt.org . /lib/functions/leds.sh . /lib/functions/lantiq.sh -power="$(lantiq_get_dt_led_chosen power)" -power1="$(lantiq_get_dt_led_chosen power1)" -power2="$(lantiq_get_dt_led_chosen power2)" - -status_led="$power" +boot="$(lantiq_get_dt_led_chosen boot)" +failsafe="$(lantiq_get_dt_led_chosen failsafe)" +running="$(lantiq_get_dt_led_chosen running)" set_state() { +status_led="$boot" + case "$1" in preinit) - if [ -n "$power2" ]; then - status_led_on - statu
Re: [OpenWrt-Devel] [PATCH] base-files utils/busybox: Make requiring login in console default for easily accessed devices
* Daniel Curran-Dickinson [23.12.2015 17:27]: > I'm implementing without mount_root - that means passwordless > failsafe unless user has preconfigured passwords in their image. > OTOH if they have configured passwords in their image then they will > be required. ok, this sounds good. while we are at it: what about including default private keys for SSH till the real keys are generated? it can last several minutes on some routers and it feels like the box is broken. also: if really something goes wrong during key generating we can at least login. bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] lantiq: TDW89x0 - increase spi frequency
Use the same max spi frequency as set in u-boot. According to the datasheets, the Q64-104HIP as well as the Winbond 25Q64FVSIG support spi frequencies up to 50 MHz. During my tests, the Q64-104HIP couldn't be recognized/initialized if the frequency was > 40MHz. Both chips do support fast read as well. While touching the dts file, I fixed the dtc compiler warnings. Signed-off-by: Mathias Kresin --- target/linux/lantiq/dts/TDW89X0.dtsi | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/target/linux/lantiq/dts/TDW89X0.dtsi b/target/linux/lantiq/dts/TDW89X0.dtsi index b2dbb21..734f618 100644 --- a/target/linux/lantiq/dts/TDW89X0.dtsi +++ b/target/linux/lantiq/dts/TDW89X0.dtsi @@ -27,12 +27,14 @@ interrupt-parent = <&icu0>; interrupts = <22 23 24>; #address-cells = <1>; + #size-cells = <1>; m25p80@0 { #address-cells = <1>; #size-cells = <1>; compatible = "jedec,spi-nor"; - reg = <3>; - spi-max-frequency = <2000>; + reg = <3 0>; + spi-max-frequency = <3325>; + m25p,fast-read; partition@0 { reg = <0x0 0x2>; -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] lantiq: ltq-adsl-mei: fix typo
Signed-off-by: Mathias Kresin --- package/kernel/lantiq/ltq-adsl-mei/patches/100_no-date-time.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/lantiq/ltq-adsl-mei/patches/100_no-date-time.patch b/package/kernel/lantiq/ltq-adsl-mei/patches/100_no-date-time.patch index 741c5b7..219243f 100644 --- a/package/kernel/lantiq/ltq-adsl-mei/patches/100_no-date-time.patch +++ b/package/kernel/lantiq/ltq-adsl-mei/patches/100_no-date-time.patch @@ -6,7 +6,7 @@ seq_printf(s, "%s" MEI_DRV_CRLF, &MEI_WHATVERSION[4]); - seq_printf(s, "Compiled on %s, %s for Linux kernel %s (jiffies: %ld)" MEI_DRV_CRLF, -__DATE__, __TIME__, UTS_RELEASE, jiffies); -+ seq_printf(s, "Compiled on for Linux kernel %s (jiffies: %ld)" MEI_DRV_CRLF, ++ seq_printf(s, "Compiled for Linux kernel %s (jiffies: %ld)" MEI_DRV_CRLF, +UTS_RELEASE, jiffies); } -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] lantiq: fix PCI_DEVICE_ID_LANTIQ_PCIE
It's not necessary to define PCI_* if pci_ids.h is included a few lines above. The change to pci_ids.h doesn't look intentional to me, especially since the former value is added to the top of ifxmips_fixup_pcie.c. Both changes were introduced with the kernel 4.1 support patches and were not present in the 3.18 patches. Signed-off-by: Mathias Kresin --- .../patches-4.1/0001-MIPS-lantiq-add-pcie-driver.patch | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/target/linux/lantiq/patches-4.1/0001-MIPS-lantiq-add-pcie-driver.patch b/target/linux/lantiq/patches-4.1/0001-MIPS-lantiq-add-pcie-driver.patch index e65e982..1b78acd 100644 --- a/target/linux/lantiq/patches-4.1/0001-MIPS-lantiq-add-pcie-driver.patch +++ b/target/linux/lantiq/patches-4.1/0001-MIPS-lantiq-add-pcie-driver.patch @@ -89,7 +89,7 @@ Signed-off-by: John Crispin obj-$(CONFIG_TANBAC_TB0287) += fixup-tb0287.o --- /dev/null +++ b/arch/mips/pci/fixup-lantiq-pcie.c -@@ -0,0 +1,82 @@ +@@ -0,0 +1,74 @@ +/** +** +** FILE NAME: ifxmips_fixup_pcie.c @@ -124,14 +124,6 @@ Signed-off-by: John Crispin + +#include "pcie-lantiq.h" + -+#define PCI_VENDOR_ID_INFINEON 0x15D1 -+#define PCI_DEVICE_ID_INFINEON_DANUBE 0x000F -+#define PCI_DEVICE_ID_INFINEON_PCIE0x0011 -+#define PCI_VENDOR_ID_LANTIQ0x1BEF -+#define PCI_DEVICE_ID_LANTIQ_PCIE 0x0011 -+ -+ -+ +static void +ifx_pcie_fixup_resource(struct pci_dev *dev) +{ @@ -5533,7 +5525,7 @@ Signed-off-by: John Crispin +#define PCI_DEVICE_ID_INFINEON_DANUBE 0x000F +#define PCI_DEVICE_ID_INFINEON_PCIE 0x0011 +#define PCI_VENDOR_ID_LANTIQ 0x1BEF -+#define PCI_DEVICE_ID_LANTIQ_PCIE 0x00 ++#define PCI_DEVICE_ID_LANTIQ_PCIE 0x0011 + #define PCI_VENDOR_ID_WINBOND 0x10ad #define PCI_DEVICE_ID_WINBOND_82C105 0x0105 -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] lantiq: fix Image Builder
Signed-off-by: Mathias Kresin --- target/linux/lantiq/image/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile index 686cb6d..553bdc1 100644 --- a/target/linux/lantiq/image/Makefile +++ b/target/linux/lantiq/image/Makefile @@ -426,8 +426,7 @@ Image/BuildKernel/Profile/VGV7519BRN=$(call Image/BuildKernel/Template,VGV7519BR Image/Build/Profile/VGV7519BRN=$(call Image/Build/$(1),$(1),VGV7519BRN,5D8000,0x12345678,0x2083b8ed,$(1)) define Image/Prepare - $(call Image/Prepare/Profile,VG3503J) - $(call Image/Prepare/Profile,VG3503J_V2) + $(call Image/Prepare/Profile,$(PROFILE)) endef endif -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH v2] lantiq: fall back to a more appropriate default dsl firmware
Hi, does not apply any more. please rebase ! John On 19/12/2015 08:50, Andre Heider wrote: > Hi, > > On Fri, Dec 11, 2015 at 10:36 AM, John Crispin wrote: >>> @@ -69,11 +72,12 @@ start_service() { >>> eval "xtse_adsl=\"\${xtse_adsl_$annex}\"" >>> if [ "${xtse_adsl}" ]; then >>> xtse=$xtse_adsl >>> + [ -z "${firmware}" ] && eval >>> "firmware=/lib/firmware/\${fw_adsl_$annex}" >> >> do we need an eval here ? firmware=/lib/firmware/\${fw_adsl_${annex}} >> should work just aswell without spawning a subshell. ... (does eval >> spawn a subshell these days ?) > > that's just based on the first line seen in this hunk. > > But I just tried. > Using "firmware=/lib/firmware/\${fw_adsl_${annex}}" yields > "/lib/firmware/${fw_adsl_b}" as value, so a missing substitution, and > without the "$" quoting, "firmware=/lib/firmware/${fw_adsl_${annex}}", > the shell errors out with "syntax error: bad substitution". > > So it appears we need that eval. Unless the coffee didn't yet kick in > and I'm having a brain fart :) > > Regards, > Andre > ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] base-files utils/busybox: Make requiring login in console default for easily accessed devices
On Wed, 23 Dec 2015 17:27:37 +0100, Felix Fietkau wrote: On 2015-12-23 16:27, Bastian Bittorf wrote: * Imre Kaloz [23.12.2015 16:22]: >I'd hate to have some corner case result in bricked routers for >people who have no means of recovering from a bad flash. You can reflash from the bootloader all the time, we are talking about userland here. IMHO this should be just a normal change, like dropping telnet. Enforcing login should be on by default, specially since if one forgets the password they can just reset everything to defaults keeping the reset button pressed. I am against asking for a password in failsafe mode: failsafe is failsafe is failsafe. You have to run mount_root which does _things_ and can break. I completely agree with this. Failsafe needs to be robust. Failsafe can be triggered both locally and through the network and gives straight root access. This doesn't make it robust, it makes it insecure. Imre ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] base-files utils/busybox: Make requiring login in console default for easily accessed devices
On Wed, 23 Dec 2015 17:32:06 +0100, Bastian Bittorf wrote: * Daniel Curran-Dickinson [23.12.2015 17:27]: I'm implementing without mount_root - that means passwordless failsafe unless user has preconfigured passwords in their image. OTOH if they have configured passwords in their image then they will be required. ok, this sounds good. while we are at it: what about including default private keys for SSH till the real keys are generated? it can last several minutes on some routers and it feels like the box is broken. also: if really something goes wrong during key generating we can at least login. So make it double unsafe - great idea ;) Imre ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] base-files utils/busybox: Make requiring login in console default for easily accessed devices
On 2015-12-24 00:38, Imre Kaloz wrote: > On Wed, 23 Dec 2015 17:27:37 +0100, Felix Fietkau wrote: > >> On 2015-12-23 16:27, Bastian Bittorf wrote: >>> * Imre Kaloz [23.12.2015 16:22]: >I'd hate to have some corner case result in bricked routers for >people who have no means of recovering from a bad flash. You can reflash from the bootloader all the time, we are talking about userland here. IMHO this should be just a normal change, like dropping telnet. Enforcing login should be on by default, specially since if one forgets the password they can just reset everything to defaults keeping the reset button pressed. >>> >>> I am against asking for a password in failsafe mode: >>> failsafe is failsafe is failsafe. >>> >>> You have to run mount_root which does _things_ and can break. >> I completely agree with this. Failsafe needs to be robust. > > Failsafe can be triggered both locally and through the network and gives > straight root access. This doesn't make it robust, it makes it insecure. How can it be triggered through the network? - Felix ___ 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 the Bitmain Antrouter R1
This patch adds support for the Bitmain Antrouter R! http://wiki.openwrt.org/toh/bitmain/r1 Signed-off-by: L. D. Pinney --- target/linux/ar71xx/base-files/etc/board.d/01_leds| 5 + 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 + target/linux/ar71xx/config-4.1| 1 + target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt | 10 ++ target/linux/ar71xx/files/arch/mips/ath79/Makefile| 1 + target/linux/ar71xx/files/arch/mips/ath79/mach-antrouter-r1.c | 8 +++- target/linux/ar71xx/files/arch/mips/ath79/machtypes.h | 1 + target/linux/ar71xx/generic/profiles/antminer.mk | 11 +++ target/linux/ar71xx/image/Makefile| 10 +- 12 files changed, 53 insertions(+), 2 deletions(-) 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 576d45b..cfb42a5 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds @@ -45,6 +45,11 @@ antminer-s3) ucidef_set_led_default "lan" "LAN" "antminer-s3:yellow:lan" "0" ;; +antrouter-r1) + ucidef_set_led_wlan "wlan" "WLAN" "antrouter-r1:green:wlan" "phy0tpt" + ucidef_set_led_default "btc" "BTC" "antrouter-r1:green:btc" "0" + ;; + arduino-yun) ucidef_set_led_wlan "wlan" "WLAN" "arduino:blue:wlan" "phy0tpt" ucidef_set_led_usbdev "usb" "USB" "arduino:white:usb" "1-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 8c57f2b..6b6c6a4 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/02_network +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network @@ -317,6 +317,7 @@ dlan-pro-1200-ac) all0305 |\ antminer-s1 |\ antminer-s3 |\ +antrouter-r1 |\ aw-nr580 |\ bullet-m |\ c-55 |\ diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index 7e2dac8..13a0a98 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -18,6 +18,9 @@ get_status_led() { antminer-s3) status_led="antminer-s3:green:system" ;; + antminer-r1) + status_led="antminer-r1:green:system" + ;; ap132) status_led="ap132:green:status" ;; diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 46e6311..61dcbba 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -114,6 +114,9 @@ tplink_board_detect() { "044403"*) model="ANTMINER-S3" ;; + "0101"*) + model="ANTROUTER-R1" + ;; "12"*) model="MERCURY MAC1200R" ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index e8998f4..cff7dfe 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -323,6 +323,7 @@ platform_check_image() { antminer-s1 | \ antminer-s3 | \ + antrouter-r1 | \ archer-c5 | \ archer-c7 | \ el-m150 | \ diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1 index 7845aa2..fe1dd68 100644 --- a/target/linux/ar71xx/config-4.1 +++ b/target/linux/ar71xx/config-4.1 @@ -35,6 +35,7 @@ CONFIG_ATH79_MACH_ALL0258N=y CONFIG_ATH79_MACH_ALL0315N=y CONFIG_ATH79_MACH_ANTMINER_S1=y CONFIG_ATH79_MACH_ANTMINER_S3=y +CONFIG_ATH79_MACH_ANTROUTER_R1=y CONFIG_ATH79_MACH_AP113=y CONFIG_ATH79_MACH_AP121=y CONFIG_ATH79_MACH_AP132=y diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt index 84d22fe..cdd4fa2 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt +++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt @@ -72,6 +72,16 @@ config ATH79_MACH_ANTMINER_S3 select ATH79_DEV_USB select ATH79_DEV_WMAC +config ATH79_MACH_ANTROUTER_R1 + bool "Bitmain Antrouter R1 support" + select SOC_AR933X + 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_ARDUINO_YUN bool "Arduino Yun" select SOC_AR933X diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar7
[OpenWrt-Devel] [PATCH] Update iproute2 to 4.3.0
iproute2-4.0 had connmark support added by nbd. This does not work with 4.x kernels. iproute2-4.3 is the latest version and has his changes mainlined. This patch updates the package to iproute2-4.3 and fixes the patches so that it compiles. This should resolve ticket #21374. Signed-off-by: Rob Mosher --- package/network/utils/iproute2/Makefile| 6 +- .../utils/iproute2/patches/007-no_arpd.patch | 21 -- .../utils/iproute2/patches/008-no_netem.patch | 13 ++-- .../utils/iproute2/patches/110-extra-ccopts.patch | 7 +- .../iproute2/patches/130-missing_include.patch | 6 +- .../iproute2/patches/210-add-act_connmark.patch| 87 -- .../utils/iproute2/patches/300-ip_tiny.patch | 18 ++--- .../iproute2/patches/911-fix_in_h_include.patch| 30 8 files changed, 68 insertions(+), 120 deletions(-) delete mode 100644 package/network/utils/iproute2/patches/210-add-act_connmark.patch create mode 100644 package/network/utils/iproute2/patches/911-fix_in_h_include.patch diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile index e5015db..3979269 100644 --- a/package/network/utils/iproute2/Makefile +++ b/package/network/utils/iproute2/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=iproute2 -PKG_VERSION:=4.0.0 -PKG_RELEASE:=3 +PKG_VERSION:=4.3.0 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=http://kernel.org/pub/linux/utils/net/iproute2/ -PKG_MD5SUM:=3adc263ade4ee76c35032e8f50b54108 +PKG_MD5SUM:=1a2bbb80cfc7ab3f3e987e18b3207c2f PKG_BUILD_PARALLEL:=1 PKG_LICENSE:=GPL-2.0 diff --git a/package/network/utils/iproute2/patches/007-no_arpd.patch b/package/network/utils/iproute2/patches/007-no_arpd.patch index 6a7e24e..d33dfe6 100644 --- a/package/network/utils/iproute2/patches/007-no_arpd.patch +++ b/package/network/utils/iproute2/patches/007-no_arpd.patch @@ -1,11 +1,16 @@ --- a/misc/Makefile +++ b/misc/Makefile -@@ -1,7 +1,7 @@ - SSOBJ=ss.o ssfilter.o - LNSTATOBJ=lnstat.o lnstat_util.o - --TARGETS=ss nstat ifstat rtacct arpd lnstat -+TARGETS=ss nstat ifstat rtacct lnstat - +@@ -5,9 +5,9 @@ + include ../Config - + +-ifeq ($(HAVE_BERKELEY_DB),y) +- TARGETS += arpd +-endif ++#ifeq ($(HAVE_BERKELEY_DB),y) ++# TARGETS += arpd ++#endif + + ifeq ($(HAVE_SELINUX),y) + LDLIBS += $(shell pkg-config --libs libselinux) + diff --git a/package/network/utils/iproute2/patches/008-no_netem.patch b/package/network/utils/iproute2/patches/008-no_netem.patch index 165ce0c..232a6ea 100644 --- a/package/network/utils/iproute2/patches/008-no_netem.patch +++ b/package/network/utils/iproute2/patches/008-no_netem.patch @@ -1,11 +1,12 @@ --- a/Makefile +++ b/Makefile -@@ -36,7 +36,7 @@ WFLAGS += -Wmissing-declarations -Wold-s - CFLAGS = $(WFLAGS) $(CCOPTS) -I../include $(DEFINES) +@@ -41,7 +41,7 @@ WFLAGS += -Wmissing-declarations -Wold-s + CFLAGS := $(WFLAGS) $(CCOPTS) -I../include $(DEFINES) $(CFLAGS) YACCFLAGS = -d -t -v - --SUBDIRS=lib ip tc bridge misc netem genl man -+SUBDIRS=lib ip tc bridge misc genl man - + +-SUBDIRS=lib ip tc bridge misc netem genl tipc man ++SUBDIRS=lib ip tc bridge misc genl tipc man + LIBNETLINK=../lib/libnetlink.a ../lib/libutil.a LDLIBS += $(LIBNETLINK) + diff --git a/package/network/utils/iproute2/patches/110-extra-ccopts.patch b/package/network/utils/iproute2/patches/110-extra-ccopts.patch index 0e36230..611b1bc 100644 --- a/package/network/utils/iproute2/patches/110-extra-ccopts.patch +++ b/package/network/utils/iproute2/patches/110-extra-ccopts.patch @@ -1,11 +1,10 @@ --- a/Makefile +++ b/Makefile -@@ -29,7 +29,7 @@ ADDLIB+=ipx_ntop.o ipx_pton.o - CC = gcc - HOSTCC = gcc +@@ -34,7 +34,7 @@ ADDLIB+=ipx_ntop.o ipx_pton.o DEFINES += -D_GNU_SOURCE + # Turn on transparent support for LFS + DEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -CCOPTS = -O2 +CCOPTS = -O2 $(EXTRA_CCOPTS) WFLAGS := -Wall -Wstrict-prototypes -Wmissing-prototypes WFLAGS += -Wmissing-declarations -Wold-style-definition -Wformat=2 - diff --git a/package/network/utils/iproute2/patches/130-missing_include.patch b/package/network/utils/iproute2/patches/130-missing_include.patch index 8856963..6dc63e4 100644 --- a/package/network/utils/iproute2/patches/130-missing_include.patch +++ b/package/network/utils/iproute2/patches/130-missing_include.patch @@ -1,10 +1,10 @@ --- a/lib/namespace.c +++ b/lib/namespace.c -@@ -9,6 +9,7 @@ - +@@ -10,6 +10,7 @@ #include #include + #include +#include - + #include "utils.h" #include "namespace.h" diff --git a/package/network/utils/iproute2/patches/210-add-act_connmark.patch b/package/network/utils/iproute2/patches/210-add-act_connmark.patch deleted file mode 100644 index 10167ae..000 --- a/package/network/utils/iproute2/patches/210-add-act_connmark.patch +++ /dev/null @@ -1,87 +0,0 @@ a/tc/Makefile -+++ b/tc/Makefile -@@ -44,6 +44,7 @@ TCMO
Re: [OpenWrt-Devel] [PATCH] base-files utils/busybox: Make requiring login in console default for easily accessed devices
On 23/12/15 06:49 PM, Felix Fietkau wrote: On 2015-12-24 00:38, Imre Kaloz wrote: On Wed, 23 Dec 2015 17:27:37 +0100, Felix Fietkau wrote: On 2015-12-23 16:27, Bastian Bittorf wrote: * Imre Kaloz [23.12.2015 16:22]: I'd hate to have some corner case result in bricked routers for people who have no means of recovering from a bad flash. You can reflash from the bootloader all the time, we are talking about userland here. IMHO this should be just a normal change, like dropping telnet. Enforcing login should be on by default, specially since if one forgets the password they can just reset everything to defaults keeping the reset button pressed. I am against asking for a password in failsafe mode: failsafe is failsafe is failsafe. You have to run mount_root which does _things_ and can break. I completely agree with this. Failsafe needs to be robust. Failsafe can be triggered both locally and through the network and gives straight root access. This doesn't make it robust, it makes it insecure. How can it be triggered through the network? I'm thinking that's a case if mis-speaking (although Imre may correct me). Based on what I remember doing for failsafe, and what looks like to still be the case in /lib/preinit, failsafe is *triggered* by a) reset button b) OR serial console at which point is may be accessed (previously without password) via: a) serial console b) previously telnet, recently dropbear (i.e. network). The telnet version was passwordless, which is what I think Imre is referring too. I think the dropbear version is only passwordless if the router has been factory reset because based on my testing of the adding the login wrapper to failsafe instead of dropping straight to passwordless root shell, if a password has been configured on the router, it gets used, and I didn't do anything to make that happen, so either the procd work, or the dropear work added mount_root to failsafe sometime ago. Regards, Daniel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] mvebu: configure switch on WRT1200AC and WRT1900ACv2/S
Also collapses the three identical configurations into one block. Signed-off-by: Claudio Leite --- N.B.: I don't have actual hardware to test this on, but I did check the syntax by applying the rule to linksys-mamba (which I have). target/linux/mvebu/base-files/etc/board.d/02_network | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/target/linux/mvebu/base-files/etc/board.d/02_network b/target/linux/mvebu/base-files/etc/board.d/02_network index 289a4b0..5616aaf 100755 --- a/target/linux/mvebu/base-files/etc/board.d/02_network +++ b/target/linux/mvebu/base-files/etc/board.d/02_network @@ -11,14 +11,12 @@ board_config_update board=$(mvebu_board_name) case "$board" in -armada-385-linksys-caiman) - ucidef_set_interfaces_lan_wan "eth1" "eth0" - ;; -armada-385-linksys-cobra) - ucidef_set_interfaces_lan_wan "eth1" "eth0" - ;; +armada-385-linksys-caiman|\ +armada-385-linksys-cobra|\ armada-385-linksys-shelby) ucidef_set_interfaces_lan_wan "eth1" "eth0" + ucidef_add_switch "switch0" \ + "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "6@eth1" "4:wan" "5@eth0" ;; armada-xp-linksys-mamba) ucidef_set_interfaces_lan_wan "eth0" "eth1" -- 2.1.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] V2 ar71xx : Add Support for the Bitmain Antrouter R1
This patch adds support for the Bitmain Antrouter R1 http://wiki.openwrt.org/toh/bitmain/r1 Signed-off-by: L. D. Pinney --- V2 Corrects naming errors in Profile in V1 target/linux/ar71xx/base-files/etc/board.d/01_leds| 5 + 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 + target/linux/ar71xx/config-4.1| 1 + target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt | 10 ++ target/linux/ar71xx/files/arch/mips/ath79/Makefile| 1 + target/linux/ar71xx/files/arch/mips/ath79/mach-antrouter-r1.c | 8 +++- target/linux/ar71xx/files/arch/mips/ath79/machtypes.h | 1 + target/linux/ar71xx/generic/profiles/antminer.mk | 11 +++ target/linux/ar71xx/image/Makefile| 10 +- 12 files changed, 53 insertions(+), 2 deletions(-) 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 576d45b..cfb42a5 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds @@ -45,6 +45,11 @@ antminer-s3) ucidef_set_led_default "lan" "LAN" "antminer-s3:yellow:lan" "0" ;; +antrouter-r1) + ucidef_set_led_wlan "wlan" "WLAN" "antrouter-r1:green:wlan" "phy0tpt" + ucidef_set_led_default "btc" "BTC" "antrouter-r1:green:btc" "0" + ;; + arduino-yun) ucidef_set_led_wlan "wlan" "WLAN" "arduino:blue:wlan" "phy0tpt" ucidef_set_led_usbdev "usb" "USB" "arduino:white:usb" "1-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 8c57f2b..6b6c6a4 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/02_network +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network @@ -317,6 +317,7 @@ dlan-pro-1200-ac) all0305 |\ antminer-s1 |\ antminer-s3 |\ +antrouter-r1 |\ aw-nr580 |\ bullet-m |\ c-55 |\ diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index 7e2dac8..13a0a98 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -18,6 +18,9 @@ get_status_led() { antminer-s3) status_led="antminer-s3:green:system" ;; + antminer-r1) + status_led="antminer-r1:green:system" + ;; ap132) status_led="ap132:green:status" ;; diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 46e6311..61dcbba 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -114,6 +114,9 @@ tplink_board_detect() { "044403"*) model="ANTMINER-S3" ;; + "0101"*) + model="ANTROUTER-R1" + ;; "12"*) model="MERCURY MAC1200R" ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index e8998f4..cff7dfe 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -323,6 +323,7 @@ platform_check_image() { antminer-s1 | \ antminer-s3 | \ + antrouter-r1 | \ archer-c5 | \ archer-c7 | \ el-m150 | \ diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1 index 7845aa2..fe1dd68 100644 --- a/target/linux/ar71xx/config-4.1 +++ b/target/linux/ar71xx/config-4.1 @@ -35,6 +35,7 @@ CONFIG_ATH79_MACH_ALL0258N=y CONFIG_ATH79_MACH_ALL0315N=y CONFIG_ATH79_MACH_ANTMINER_S1=y CONFIG_ATH79_MACH_ANTMINER_S3=y +CONFIG_ATH79_MACH_ANTROUTER_R1=y CONFIG_ATH79_MACH_AP113=y CONFIG_ATH79_MACH_AP121=y CONFIG_ATH79_MACH_AP132=y diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt index 84d22fe..cdd4fa2 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt +++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt @@ -72,6 +72,16 @@ config ATH79_MACH_ANTMINER_S3 select ATH79_DEV_USB select ATH79_DEV_WMAC +config ATH79_MACH_ANTROUTER_R1 + bool "Bitmain Antrouter R1 support" + select SOC_AR933X + 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_ARDUINO_YUN bool "Arduino Yun" select SOC_AR933X diff --git a/target/linux/ar71xx/files/
[OpenWrt-Devel] pre-Xmas bonus security patch
Hi all, The following patch is a much better implementation of the previous patch for requiring login even on hardware console. As per discussion on list, this patch would become the default behaviour for all images, but does have an opt-out which can be set at image generation time or in the overlayfs. This version of patch doesn't use getty because I realized using getty for login is not needed on openwrt because of askfirst/askconsole which setup the console for the login command (on standard distros getty is required because the terminal(s) are not active unless getty activates them; this is not an issue for openwrt). So askfirst or askconsole (depending on platform) are used to setup the console. Once the user presses enter /sbin/login_wrapper is invoked which checks for the presence of /lib/preinit/zz_passwordless_console. If that file exists /bin/ash --login (current behavior) is exec'd and you get passwordless root access. If the file does not exist (or is not readable) then /bin/login is exec'd and the user is prompted for a password. With a default install of openwrt with no previous configuration you can enter user root and the use an empty password (just ENTER) as default for stock openwrt has no password for root. If the image creator embedded a default password for root, then that password would be required at this point. In any event, unless passwordless console has been flagged, once a root password has been set it will be required to login to the hardware/serial console. This behaviour also applies to failsafe mode as previous work, probably for the dropbear failsafe access, has enabled pulling in current configuration for failsafe mode. If it is considered undesirable to have the runtime option of disabling the requirement for password, then the check for /lib/preinit/zz_passwordless_console could be modified to check for the existence of /rom (which indicates a squashfs) and check for /rom/lib/preinit/zz_passwordless_console when it exists, instead of allowing for a writable setting (/rom is the readonly squashfs that is embedded in the flash). Enjoy! Daniel [PATCH] base-files image: Require login even on console (including ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] base-files image: Require login even on console (including failsafe)
From: Daniel Dickinson Passwordless root login is undesirable by default on any platform, therefore make requiring a login to gain root (or any other user) even on hardware console the default. This is an opt-out option that can by disabled at image generation time by passing the variable PASSWORDLESS_CONSOLE=1 in make command line or by otherwise making sure the file /lib/preinit/zz_passwordless_console exists. Signed-off-by: Daniel Dickinson --- include/image.mk | 2 ++ package/base-files/files/etc/inittab | 2 +- package/base-files/files/lib/preinit/99_10_failsafe_login | 3 +-- package/base-files/files/sbin/login_wrapper | 8 package/utils/busybox/Config-defaults.in | 4 ++-- target/imagebuilder/files/Makefile| 4 ++-- target/linux/adm5120/base-files/etc/inittab | 6 +++--- target/linux/ar71xx/base-files/etc/inittab| 2 +- target/linux/arm64/base-files/etc/inittab | 6 +++--- target/linux/brcm2708/base-files/etc/inittab | 4 ++-- target/linux/ipq806x/base-files/etc/inittab | 2 +- target/linux/malta/base-files/etc/inittab | 10 +- target/linux/mediatek/base-files/etc/inittab | 2 +- target/linux/mxs/base-files/etc/inittab | 2 +- target/linux/omap/base-files/etc/inittab | 6 +++--- target/linux/omap24xx/base-files/etc/inittab | 6 +++--- target/linux/ppc44x/base-files/etc/inittab| 4 ++-- target/linux/ramips/base-files/etc/inittab| 2 +- target/linux/realview/base-files/etc/inittab | 6 +++--- target/linux/sunxi/base-files/etc/inittab | 6 +++--- target/linux/x86/base-files/etc/inittab | 4 ++-- target/linux/x86/xen_domu/base-files/etc/inittab | 6 +++--- 22 files changed, 53 insertions(+), 44 deletions(-) create mode 100755 package/base-files/files/sbin/login_wrapper diff --git a/include/image.mk b/include/image.mk index 1522dd7..5413481 100644 --- a/include/image.mk +++ b/include/image.mk @@ -276,6 +276,8 @@ define Image/mkfs/prepare/default - $(FIND) $(TARGET_DIR) -type d -print0 | $(XARGS) -0 chmod u+rwx,g+rx,o+rx $(INSTALL_DIR) $(TARGET_DIR)/tmp $(TARGET_DIR)/overlay chmod 1777 $(TARGET_DIR)/tmp + mkdir -p $(TARGET_DIR)/lib/preinit + $(if $(PASSWORDLESS_CONSOLE),touch $(TARGET_DIR)/lib/preinit/zz_passwordless_console) endef define Image/mkfs/prepare diff --git a/package/base-files/files/etc/inittab b/package/base-files/files/etc/inittab index 7817185..46372f6 100644 --- a/package/base-files/files/etc/inittab +++ b/package/base-files/files/etc/inittab @@ -1,3 +1,3 @@ ::sysinit:/etc/init.d/rcS S boot ::shutdown:/etc/init.d/rcS K shutdown -::askconsole:/bin/ash --login +::askconsole:/sbin/login_wrapper diff --git a/package/base-files/files/lib/preinit/99_10_failsafe_login b/package/base-files/files/lib/preinit/99_10_failsafe_login index b12e317..4319668 100644 --- a/package/base-files/files/lib/preinit/99_10_failsafe_login +++ b/package/base-files/files/lib/preinit/99_10_failsafe_login @@ -8,8 +8,7 @@ failsafe_netlogin () { } failsafe_shell() { - lock /tmp/.failsafe - ash --login + /sbin/login_wrapper echo "Please reboot system when done with failsafe network logins" } diff --git a/package/base-files/files/sbin/login_wrapper b/package/base-files/files/sbin/login_wrapper new file mode 100755 index 000..874d378 --- /dev/null +++ b/package/base-files/files/sbin/login_wrapper @@ -0,0 +1,8 @@ +#!/bin/sh + +if [ -r /lib/preinit/zz_passwordless_console ]; then + exec /bin/ash --login +fi + +exec /bin/login + diff --git a/package/utils/busybox/Config-defaults.in b/package/utils/busybox/Config-defaults.in index 75c5976..3ae08b1 100644 --- a/package/utils/busybox/Config-defaults.in +++ b/package/utils/busybox/Config-defaults.in @@ -1212,10 +1212,10 @@ config BUSYBOX_DEFAULT_GETTY default n config BUSYBOX_DEFAULT_LOGIN bool - default n + default y config BUSYBOX_DEFAULT_LOGIN_SESSION_AS_CHILD bool - default n + default y config BUSYBOX_DEFAULT_LOGIN_SCRIPTS bool default n diff --git a/target/imagebuilder/files/Makefile b/target/imagebuilder/files/Makefile index f612ea9..64e55e2 100644 --- a/target/imagebuilder/files/Makefile +++ b/target/imagebuilder/files/Makefile @@ -43,7 +43,7 @@ Building images: make image PACKAGES=" [ [ ...]]" # include extra packages make image FILES="" # include extra files from make image BIN_DIR="" # alternative output directory for the images - + make image PASSWORDLESS_CONSOLE=1 # Disable requiring login prompt to get console shell endef $(eval $(call shexport,Helptext)) @@ -174,7 +174,7 @@ packag
Re: [OpenWrt-Devel] [PATCH] base-files image: Require login even on console (including failsafe)
I just noticed why failsafe was mounting root - I accidentally deleted the failsafe lock which blocks until login session is complete. Fixing now. On 24/12/15 01:31 AM, open...@daniel.thecshore.com wrote: From: Daniel Dickinson Passwordless root login is undesirable by default on any platform, therefore make requiring a login to gain root (or any other user) even on hardware console the default. This is an opt-out option that can by disabled at image generation time by passing the variable PASSWORDLESS_CONSOLE=1 in make command line or by otherwise making sure the file /lib/preinit/zz_passwordless_console exists. Signed-off-by: Daniel Dickinson --- include/image.mk | 2 ++ package/base-files/files/etc/inittab | 2 +- package/base-files/files/lib/preinit/99_10_failsafe_login | 3 +-- package/base-files/files/sbin/login_wrapper | 8 package/utils/busybox/Config-defaults.in | 4 ++-- target/imagebuilder/files/Makefile| 4 ++-- target/linux/adm5120/base-files/etc/inittab | 6 +++--- target/linux/ar71xx/base-files/etc/inittab| 2 +- target/linux/arm64/base-files/etc/inittab | 6 +++--- target/linux/brcm2708/base-files/etc/inittab | 4 ++-- target/linux/ipq806x/base-files/etc/inittab | 2 +- target/linux/malta/base-files/etc/inittab | 10 +- target/linux/mediatek/base-files/etc/inittab | 2 +- target/linux/mxs/base-files/etc/inittab | 2 +- target/linux/omap/base-files/etc/inittab | 6 +++--- target/linux/omap24xx/base-files/etc/inittab | 6 +++--- target/linux/ppc44x/base-files/etc/inittab| 4 ++-- target/linux/ramips/base-files/etc/inittab| 2 +- target/linux/realview/base-files/etc/inittab | 6 +++--- target/linux/sunxi/base-files/etc/inittab | 6 +++--- target/linux/x86/base-files/etc/inittab | 4 ++-- target/linux/x86/xen_domu/base-files/etc/inittab | 6 +++--- 22 files changed, 53 insertions(+), 44 deletions(-) create mode 100755 package/base-files/files/sbin/login_wrapper diff --git a/include/image.mk b/include/image.mk index 1522dd7..5413481 100644 --- a/include/image.mk +++ b/include/image.mk @@ -276,6 +276,8 @@ define Image/mkfs/prepare/default - $(FIND) $(TARGET_DIR) -type d -print0 | $(XARGS) -0 chmod u+rwx,g+rx,o+rx $(INSTALL_DIR) $(TARGET_DIR)/tmp $(TARGET_DIR)/overlay chmod 1777 $(TARGET_DIR)/tmp + mkdir -p $(TARGET_DIR)/lib/preinit + $(if $(PASSWORDLESS_CONSOLE),touch $(TARGET_DIR)/lib/preinit/zz_passwordless_console) endef define Image/mkfs/prepare diff --git a/package/base-files/files/etc/inittab b/package/base-files/files/etc/inittab index 7817185..46372f6 100644 --- a/package/base-files/files/etc/inittab +++ b/package/base-files/files/etc/inittab @@ -1,3 +1,3 @@ ::sysinit:/etc/init.d/rcS S boot ::shutdown:/etc/init.d/rcS K shutdown -::askconsole:/bin/ash --login +::askconsole:/sbin/login_wrapper diff --git a/package/base-files/files/lib/preinit/99_10_failsafe_login b/package/base-files/files/lib/preinit/99_10_failsafe_login index b12e317..4319668 100644 --- a/package/base-files/files/lib/preinit/99_10_failsafe_login +++ b/package/base-files/files/lib/preinit/99_10_failsafe_login @@ -8,8 +8,7 @@ failsafe_netlogin () { } failsafe_shell() { - lock /tmp/.failsafe - ash --login + /sbin/login_wrapper echo "Please reboot system when done with failsafe network logins" } diff --git a/package/base-files/files/sbin/login_wrapper b/package/base-files/files/sbin/login_wrapper new file mode 100755 index 000..874d378 --- /dev/null +++ b/package/base-files/files/sbin/login_wrapper @@ -0,0 +1,8 @@ +#!/bin/sh + +if [ -r /lib/preinit/zz_passwordless_console ]; then + exec /bin/ash --login +fi + +exec /bin/login + diff --git a/package/utils/busybox/Config-defaults.in b/package/utils/busybox/Config-defaults.in index 75c5976..3ae08b1 100644 --- a/package/utils/busybox/Config-defaults.in +++ b/package/utils/busybox/Config-defaults.in @@ -1212,10 +1212,10 @@ config BUSYBOX_DEFAULT_GETTY default n config BUSYBOX_DEFAULT_LOGIN bool - default n + default y config BUSYBOX_DEFAULT_LOGIN_SESSION_AS_CHILD bool - default n + default y config BUSYBOX_DEFAULT_LOGIN_SCRIPTS bool default n diff --git a/target/imagebuilder/files/Makefile b/target/imagebuilder/files/Makefile index f612ea9..64e55e2 100644 --- a/target/imagebuilder/files/Makefile +++ b/target/imagebuilder/files/Makefile @@ -43,7 +43,7 @@ Building images: make image PACKAGES=" [ [ ...]]" # include extra packages make image FILES="" # include extra files from
[OpenWrt-Devel] Failsafe is not mounting root
Hi all, I just thought I'd try to head of some confusion I may have caused because I thought failsafe was mounting root. The actual issue is that when I modified failsafe I accidentally delete the line that creates a lockfile that causes boot process to block when failsafe is entered (so that e.g. mount root does NOT happen). I am fixing that error now, and will be issuing and updated patch. Regards, Daniel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] add support for WRTnode2P and WRTnode2R
Hi blogic this is a patch is add WRTnode2P and WRTnode2R support by OpenWrt commit d0f7a56ed622a488926bb1705686b950dea34cce Author: xzmu Date: Thu Dec 24 15:30:07 2015 +0800 add support for WRTnode2P and WRTnode2R add led indicator support for WRTnode platform 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 d7d016b..816a1a7 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -175,6 +175,8 @@ ramips_setup_interfaces() hg255d | \ rt-n14u | \ wrtnode | \ + wrtnode2p | \ + wrtnode2r | \ wt3020 | \ ur-326n4g | \ zbt-wa05) diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index a7e2501..d596b8a 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -253,6 +253,11 @@ get_status_led() { zte-q7) status_led="zte:red:status" ;; + wrtnode2r | \ + wrtnode2p | \ + wrtnode) + status_led="wrtnode:blue:indicator" + ;; esac } diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 4141ddd..6c74412 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -391,6 +391,12 @@ ramips_board_detect() { *"WRTNODE") name="wrtnode" ;; + *"WRTnode2R") + name="wrtnode2r" + ;; + *"WRTnode2P") + name="wrtnode2p" + ;; *"Wansview NCS601W") name="ncs601w" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index 2f64d8c..0fc5c26 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -119,6 +119,8 @@ platform_check_image() { wr6202 |\ wr8305rt |\ wrtnode |\ + wrtnode2r |\ + wrtnode2p |\ wt1520 |\ wt3020 |\ x5 |\ diff --git a/target/linux/ramips/dts/WRTNODE2P.dts b/target/linux/ramips/dts/WRTNODE2P.dts new file mode 100644 index 000..59866dd --- /dev/null +++ b/target/linux/ramips/dts/WRTNODE2P.dts @@ -0,0 +1,99 @@ +/dts-v1/; + +/include/ "mt7628an.dtsi" + +/ { + compatible = "mediatek,wrtnode2p", "mediatek,mt7628an-soc"; + model = "WRTnode2P"; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "gpio", "jtag"; + ralink,function = "gpio"; + }; + }; + }; + + palmbus@1000 { + spi@b00 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "w25q256"; + reg = <0 0>; + linux,modalias = "m25p80", "w25q256"; + spi-max-frequency = <1000>; + m25p,chunked-io = <32>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x3>; + read-only; + }; + + partition@3 { + label = "u-boot-env"; + reg = <0x3 0x1>; + read-only; + }; + + factory: partition@4 { + label = "factory"; + reg = <0x4 0x1>; + read-only; + }; + + partition@5 { + label = "firmware"; + reg = <0x5 0x1fb>; + }; + }; + }; + + uart1@d00 { + status = "okay"; + }; + + }; + + ethernet@1010 { + mtd-mac-address = <&factory 0x4>; + ralink,port-map = "w"; + }; + + sdhci@1013 { + status = "okay"; + }; + + pcie@1014 { + status = "okay"; + }; + + gpio-leds { +