Re: [OpenWrt-Devel] [PATCH 2/2] arc770: move arc patches to taregt/linux/generic
On 2016-01-15 00:12, Alexey Brodkin wrote: > Given those patches are relevant to any ARC platform and even > ISA version it makes perfect sense for patches to exist > in one place instead of being duplicated for each new ARC-based ASIC. > > Note this is a prerequisite for upstreaming of ARC HS38 support in > OpenWRT. > > Signed-off-by: Alexey Brodkin> Cc: Felix Fietkau > Cc: Jo-Philipp Wich > Cc: Jonas Gorski > --- /dev/null > +++ > b/target/linux/generic/patches-4.4/331-arc-remove-dependency-on-DEVTMPFS.patch > @@ -0,0 +1,36 @@ > +From adfbf9e6cad93281cffceab078e7f6f2a8e094f9 Mon Sep 17 00:00:00 2001 > +From: Alexey Brodkin > +Date: Thu, 13 Aug 2015 01:56:02 +0300 > +Subject: [PATCH 1/2] openwrt: arc - remove dependency on DEVTMPFS > + > +OpenWRT builds initramfs so that it doesn't require DEVTMPFS so dropping > +this dependency. That helps to escape 2 separate kernel rebuilds with > +and without initramfs. > + > +2 builds happen because OpenWRT first builds kernel and later modules. > +When building entire kernel with simple "make" INITRAMFS sets to a real > +value and so was triggering DEVTMPFS selection. Then when building only > +modules with "make modules" command INITRAMFS is zeroed and so kernel > +config was changing that lead to full kernel rebuild. > + > +Signed-off-by: Alexey Brodkin > +--- > + arch/arc/Kconfig | 2 -- > + 1 file changed, 2 deletions(-) > + > +diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig > +index 6312f60..a95bab3 100644 > +--- a/arch/arc/Kconfig > b/arch/arc/Kconfig > +@@ -12,8 +12,6 @@ config ARC > + select BUILDTIME_EXTABLE_SORT > + select COMMON_CLK > + select CLONE_BACKWARDS > +-# ARC Busybox based initramfs absolutely relies on DEVTMPFS for /dev > +-select DEVTMPFS if !INITRAMFS_SOURCE="" > + select GENERIC_ATOMIC64 > + select GENERIC_CLOCKEVENTS > + select GENERIC_FIND_FIRST_BIT Could you please send this one upstream as well? - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 2/2] arc770: move arc patches to taregt/linux/generic
On 2016-01-15 13:25, Vineet Gupta wrote: > +CC Thomas, Peter > > On Friday 15 January 2016 04:19 PM, Alexey Brodkin wrote: >> Hi Felix, >> >> On Fri, 2016-01-15 at 11:45 +0100, Felix Fietkau wrote: >>> On 2016-01-15 00:12, Alexey Brodkin wrote: Given those patches are relevant to any ARC platform and even ISA version it makes perfect sense for patches to exist in one place instead of being duplicated for each new ARC-based ASIC. Note this is a prerequisite for upstreaming of ARC HS38 support in OpenWRT. Signed-off-by: Alexey BrodkinCc: Felix Fietkau Cc: Jo-Philipp Wich Cc: Jonas Gorski --- /dev/null +++ b/target/linux/generic/patches-4.4/331-arc-remove-dependency-on-DEVTMPFS.patch @@ -0,0 +1,36 @@ +From adfbf9e6cad93281cffceab078e7f6f2a8e094f9 Mon Sep 17 00:00:00 2001 +From: Alexey Brodkin +Date: Thu, 13 Aug 2015 01:56:02 +0300 +Subject: [PATCH 1/2] openwrt: arc - remove dependency on DEVTMPFS + +OpenWRT builds initramfs so that it doesn't require DEVTMPFS so dropping +this dependency. > > Really ? AFAIKR (circa 2012) DEVTMPFS was *needed* for dynamic device nodes > and > that included the common case of initramfs NOT having static device nodes. > > So back then I added the code in question to kernel Kconfig because initramfs > was > my primary workflow and occassionally I would fail to include DEVTMPFS causing > userspace boot to go bonkers (FWIW I was using the buildroot trick of a > pre-init > script which would automount devtmpfs before exec'ing the real init) > > Now arguably I can add DEVTMPFS to defconfigs, but then we don't need the > kconfig > dependency framework at all. > > Another idea is to add DEVTMPFS unconditionally to Kconfig, but I fail to > remember > why I didn't do it at the time. Does anyone know if it interferes with real > rootfs > backed by real devices ? OpenWrt works just fine without DEVTMPFS - doesn't matter if initramfs is enabled or not. I also don't think there's anything architecture specific about requiring DEVTMPFS or not, so I'd say it doesn't make any sense to select it from arch/arc/Kconfig. That helps to escape 2 separate kernel rebuilds with +and without initramfs. + +2 builds happen because OpenWRT first builds kernel and later modules. +When building entire kernel with simple "make" INITRAMFS sets to a real +value and so was triggering DEVTMPFS selection. Then when building only +modules with "make modules" command INITRAMFS is zeroed and so kernel +config was changing that lead to full kernel rebuild. > > Just curious, why does make module zero out INITRAMFS - to save a bit of > build time ? OpenWrt builds both initramfs and non-initramfs images, so it resets the INITRAMFS config item when it generates the kernel config for the first time. - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 2/2] arc770: move arc patches to taregt/linux/generic
Hi Felix, On Fri, 2016-01-15 at 11:45 +0100, Felix Fietkau wrote: > On 2016-01-15 00:12, Alexey Brodkin wrote: > > Given those patches are relevant to any ARC platform and even > > ISA version it makes perfect sense for patches to exist > > in one place instead of being duplicated for each new ARC-based ASIC. > > > > Note this is a prerequisite for upstreaming of ARC HS38 support in > > OpenWRT. > > > > Signed-off-by: Alexey Brodkin> > Cc: Felix Fietkau > > Cc: Jo-Philipp Wich > > Cc: Jonas Gorski > > --- /dev/null > > +++ > > b/target/linux/generic/patches-4.4/331-arc-remove-dependency-on-DEVTMPFS.patch > > @@ -0,0 +1,36 @@ > > +From adfbf9e6cad93281cffceab078e7f6f2a8e094f9 Mon Sep 17 00:00:00 2001 > > +From: Alexey Brodkin > > +Date: Thu, 13 Aug 2015 01:56:02 +0300 > > +Subject: [PATCH 1/2] openwrt: arc - remove dependency on DEVTMPFS > > + > > +OpenWRT builds initramfs so that it doesn't require DEVTMPFS so dropping > > +this dependency. That helps to escape 2 separate kernel rebuilds with > > +and without initramfs. > > + > > +2 builds happen because OpenWRT first builds kernel and later modules. > > +When building entire kernel with simple "make" INITRAMFS sets to a real > > +value and so was triggering DEVTMPFS selection. Then when building only > > +modules with "make modules" command INITRAMFS is zeroed and so kernel > > +config was changing that lead to full kernel rebuild. > > + > > +Signed-off-by: Alexey Brodkin > > +--- > > + arch/arc/Kconfig | 2 -- > > + 1 file changed, 2 deletions(-) > > + > > +diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig > > +index 6312f60..a95bab3 100644 > > +--- a/arch/arc/Kconfig > > b/arch/arc/Kconfig > > +@@ -12,8 +12,6 @@ config ARC > > + select BUILDTIME_EXTABLE_SORT > > + select COMMON_CLK > > + select CLONE_BACKWARDS > > +- # ARC Busybox based initramfs absolutely relies on DEVTMPFS for /dev > > +- select DEVTMPFS if !INITRAMFS_SOURCE="" > > + select GENERIC_ATOMIC64 > > + select GENERIC_CLOCKEVENTS > > + select GENERIC_FIND_FIRST_BIT > Could you please send this one upstream as well? Adding Vineet so he may comment if that change makes sense upstream. -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] dropbear: use Openwrt default PATH also in dropbear
Dropbear defines its own default PATH for new sessions. When 500-set-default-path.patch was introduced by r32620, the goal was to match /etc/profile. Adjust 500-set-default-path.patch to match the current default PATH as defined in https://dev.openwrt.org/changeset/47080/ PATH=/usr/sbin:/usr/bin:/sbin:/bin (In practice that PATH will be overridden by /etc/profile if that exists.) Reference also to: https://dev.openwrt.org/changeset/32620/ https://dev.openwrt.org/changeset/47590/ https://dev.openwrt.org/changeset/48235/ and http://git.openwrt.org/?p=project/procd.git;a=commit;h=45cb04fd85d788a37367a5385e5e90dd98a0a991 Signed-off-by: Hannu Nyman--- (I am not bumping the PKG_REVISION as dropbear version was bumped up today.) After yesterday's fix to procd, I noticed that one process still had a different PATH. It took a while to realize that it was coming from hardcoded defaults in dropbear. Process 23582 has different PATH than other processes: root@OpenWrt:~# grep -r PATH /proc/*/environ /proc/1/environ:PATH=/usr/sbin:/usr/bin:/sbin:/bin /proc/1299/environ:PATH=/usr/sbin:/usr/bin:/sbin:/bin ... /proc/23582/environ:PATH=/bin:/sbin:/usr/bin:/usr/sbin /proc/2401/environ:PATH=/usr/sbin:/usr/bin:/sbin:/bin /proc/2415/environ:PATH=/usr/sbin:/usr/bin:/sbin:/bin ... /proc/516/environ:PATH=/usr/sbin:/usr/bin:/sbin:/bin /proc/self/environ:PATH=/usr/sbin:/usr/bin:/sbin:/bin /proc/thread-self/environ:PATH=/usr/sbin:/usr/bin:/sbin:/bin root@OpenWrt:~# ps | grep ash 516 root 896 S/sbin/askfirst /bin/ash --login 23582 root 1196 S-ash 23591 root 1192 Sgrep ash After this patch also the ash process has the same PATH as others: root@OpenWrt:~# grep -r PATH /proc/*/environ /proc/1/environ:PATH=/usr/sbin:/usr/bin:/sbin:/bin /proc/1288/environ:PATH=/usr/sbin:/usr/bin:/sbin:/bin ... /proc/4115/environ:PATH=/usr/sbin:/usr/bin:/sbin:/bin /proc/479/environ:PATH=/usr/sbin:/usr/bin:/sbin:/bin /proc/516/environ:PATH=/usr/sbin:/usr/bin:/sbin:/bin /proc/self/environ:PATH=/usr/sbin:/usr/bin:/sbin:/bin /proc/thread-self/environ:PATH=/usr/sbin:/usr/bin:/sbin:/bin root@OpenWrt:~# ps | grep ash 516 root 896 S/sbin/askfirst /bin/ash --login 4115 root 1196 S-ash 4126 root 1192 Sgrep ash package/network/services/dropbear/patches/500-set-default-path.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/services/dropbear/patches/500-set-default-path.patch b/package/network/services/dropbear/patches/500-set-default-path.patch index 648c391..7e8a4ff 100644 --- a/package/network/services/dropbear/patches/500-set-default-path.patch +++ b/package/network/services/dropbear/patches/500-set-default-path.patch @@ -5,7 +5,7 @@ /* The default path. This will often get replaced by the shell */ -#define DEFAULT_PATH "/usr/bin:/bin" -+#define DEFAULT_PATH "/bin:/sbin:/usr/bin:/usr/sbin" ++#define DEFAULT_PATH "/usr/sbin:/usr/bin:/sbin:/bin" /* Some other defines (that mostly should be left alone) are defined * in sysoptions.h */ -- 2.5.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 1/1] use NTP server received via DHCP
* Amine Aouled Hamed[15.01.2016 10:03]: > > please make var 'iface' local and while you are there, move > > all the 'local' declaration to the head of the function. > > Wouldn't be better if the local vars inside of the if and for statements > stay inside? maybe thats personal preference, i like it outside a loop. > I mean what is the point of declaring ifaces if I will be using all the > ifaces? in term of performance(even if it is negligible and clarity of the > code). you are right, performance is not an issue here. i just spotted this in memory if a former double-local-crash-bug in busybox (which is what happens in a for-loop) also: declaring iface 'local' means, that it is thrown away when the functions returns, otherwise it will pollute your env-space. 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] kernel: Add kernel module for Freescale SNVS RTC on chip module
On 2016-01-08 11:21, Petr Štetiar wrote: > Signed-off-by: Petr Štetiar> --- > package/kernel/linux/modules/other.mk | 16 > 1 file changed, 16 insertions(+) > > diff --git a/package/kernel/linux/modules/other.mk > b/package/kernel/linux/modules/other.mk > index 62fdc3c..69099a5 100644 > --- a/package/kernel/linux/modules/other.mk > +++ b/package/kernel/linux/modules/other.mk > @@ -656,6 +656,22 @@ endef > > $(eval $(call KernelPackage,rtc-pt7c4338)) > > +define KernelPackage/rtc-snvs > + SUBMENU:=$(OTHER_MENU) > + TITLE:=Freescale SNVS RTC support > + DEPENDS:=@RTC_SUPPORT I think you should make this depend on the imx target. - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 2/2] arc770: move arc patches to taregt/linux/generic
On 2016-01-15 14:17, Vineet Gupta wrote: > On Friday 15 January 2016 06:29 PM, Felix Fietkau wrote: >> +Subject: [PATCH 1/2] openwrt: arc - remove dependency on DEVTMPFS >> + >> +OpenWRT builds initramfs so that it doesn't require DEVTMPFS so >> dropping >> +this dependency. >>> > >>> > Really ? AFAIKR (circa 2012) DEVTMPFS was *needed* for dynamic device >>> > nodes and >>> > that included the common case of initramfs NOT having static device nodes. >>> > >>> > So back then I added the code in question to kernel Kconfig because >>> > initramfs was >>> > my primary workflow and occassionally I would fail to include DEVTMPFS >>> > causing >>> > userspace boot to go bonkers (FWIW I was using the buildroot trick of a >>> > pre-init >>> > script which would automount devtmpfs before exec'ing the real init) >>> > >>> > Now arguably I can add DEVTMPFS to defconfigs, but then we don't need the >>> > kconfig >>> > dependency framework at all. >>> > >>> > Another idea is to add DEVTMPFS unconditionally to Kconfig, but I fail to >>> > remember >>> > why I didn't do it at the time. Does anyone know if it interferes with >>> > real rootfs >>> > backed by real devices ? >> OpenWrt works just fine without DEVTMPFS - doesn't matter if initramfs >> is enabled or not. > > The discussion is about adding a patch to up upstream ARC kernel, not > specific to > openwrt. Right. I belive that the upstream kernel should not arbitrarily force DEVTMPFS support for some architectures, as long as there are user space implementations (such as OpenWrt) that can do without it. > BTW if openwrt builds for initramfs, it has to enable DEVTMPFS under the hood. > Perhaps there are dependencies in openwrt build system which take care of that > already - o/w it just won't work (assuming dynamic dev nodes). Incorrect. OpenWrt does not use DEVTMPFS, it does not even get compiled into the image. We would like to keep it that way. Our user space takes care of creating all required device nodes very early during boot. - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] imx6: kernel: Add Micrel PHY used on Apalis SOM
On Fri, Jan 8, 2016 at 2:24 AM, Petr Štetiarwrote: > Signed-off-by: Petr Štetiar > Cc: Luka Perkov > --- > target/linux/imx6/config-4.1 |1 + > 1 file changed, 1 insertion(+) > > diff --git a/target/linux/imx6/config-4.1 b/target/linux/imx6/config-4.1 > index 52544a7..e07a5b7 100644 > --- a/target/linux/imx6/config-4.1 > +++ b/target/linux/imx6/config-4.1 > @@ -223,6 +223,7 @@ CONFIG_LZO_COMPRESS=y > CONFIG_LZO_DECOMPRESS=y > CONFIG_MDIO_BOARDINFO=y > CONFIG_MFD_SYSCON=y > +CONFIG_MICREL_PHY=y > CONFIG_MIGHT_HAVE_CACHE_L2X0=y > CONFIG_MIGHT_HAVE_PCI=y > CONFIG_MMC=y > -- > 1.7.9.5 > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel Petr, This just got committed but not that we also added this for you into the the config for the 4.4 kernel which just got committed as well. You can move up to 4.4 by applying https://patchwork.ozlabs.org/patch/567857/. Regards, Tim ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] [package] Allow UCI dhcp classifier to accept a MAC list
From: nworbnhojdnsmasq offers to group DHCP options and their values by a network-id and to send options only to hosts which have been tagged with that network-id. uci accepts the mac classifier, but only for a single MAC config mac 'opnvpn' option mac '00:FF:*:*:*:*' option networkid 'opnvpn' list dhcp_option '3' this patch allows a list of macs to be assigned to a network-id config mac 'opnvpn' list mac '00:00:00:00:00:AA' list mac '00:00:00:00:00:BB' list mac '00:00:00:00:00:CC' option networkid 'opnvpn' list dhcp_option '3' Signed-off-by: John A Brown --- package/network/services/dnsmasq/files/dnsmasq.init | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init index efc9627..4470d75 100644 --- a/package/network/services/dnsmasq/files/dnsmasq.init +++ b/package/network/services/dnsmasq/files/dnsmasq.init @@ -361,9 +361,9 @@ dhcp_mac_add() { [ -n "$networkid" ] || return 0 config_get mac "$cfg" mac - [ -n "$mac" ] || return 0 - - xappend "--dhcp-mac=$networkid,$mac" + for o in $mac; do + xappend "--dhcp-mac=$networkid,$mac" + done dhcp_option_add "$cfg" "$networkid" } @@ -562,7 +562,7 @@ start_service() { procd_add_jail dnsmasq ubus log procd_add_jail_mount $CONFIGFILE $TRUSTANCHORSFILE $HOSTFILE /etc/passwd /etc/group /etc/TZ /dev/null /dev/urandom /etc/dnsmasq.conf /tmp/dnsmasq.d /tmp/resolv.conf.auto /etc/hosts /etc/ethers procd_add_jail_mount_rw /var/run/dnsmasq/ /tmp/dhcp.leases $TIMESTAMPFILE - + procd_close_instance # before we can call xappend -- 2.5.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH resend] ar71xx: add support for Netgear WPN824N
Add support for Netgear WPN824N. Hardware specs: * AR7240, 4 LAN ports, 1 WAN port * AR9285 WLAN * 32 MB RAM * 4 MB Flash * 16 LEDs (LAN, WAN and Power/Status contain two LEDs for dual color effect) * 3 Buttons (not supported) Signed-off-by: Hartmut Knaack--- Development Thread: https://forum.openwrt.org/viewtopic.php?id=30388 Wiki Page: https://wiki.openwrt.org/toh/netgear/wpn824n Any suggestions about a better default configuration of the LAN/WAN LEDs, to make use of their second color, are highly appreciated. Resending, since PGP messed up previous message. --- target/linux/ar71xx/base-files/etc/board.d/01_leds | 20 +++- .../linux/ar71xx/base-files/etc/board.d/02_network | 3 +- target/linux/ar71xx/base-files/etc/diag.sh | 3 +- target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 + .../lib/preinit/05_set_preinit_iface_ar71xx| 1 + .../ar71xx/base-files/lib/upgrade/platform.sh | 3 +- .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt | 2 +- .../ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c | 124 - .../linux/ar71xx/files/arch/mips/ath79/machtypes.h | 1 + target/linux/ar71xx/generic/profiles/netgear.mk| 10 ++ target/linux/ar71xx/image/Makefile | 1 + .../files/drivers/mtd/mtdsplit/mtdsplit_uimage.c | 2 + 12 files changed, 166 insertions(+), 7 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 cfb42a5..151eac2 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds @@ -684,7 +684,25 @@ wnr2000-v4) ucidef_set_led_switch "lan3" "LAN3" "netgear:amber:lan3" "switch0" "0x08" ucidef_set_led_switch "lan4" "LAN4" "netgear:amber:lan4" "switch0" "0x10" ucidef_set_led_usbdev "usb" "USB" "netgear:amber:status" "1-1" -;; + ;; + +wpn824n) + ucidef_set_led_netdev "wan-amber" "WAN (amber)" "netgear:amber:wan" "eth0" + ucidef_set_led_wlan "wlan" "WLAN" "netgear:blue:wlan" "phy0tpt" + ucidef_set_led_switch "lan1amber" "LAN1 (amber)" "netgear:amber:lan1" "switch0" "0x02" + ucidef_set_led_switch "lan2amber" "LAN2 (amber)" "netgear:amber:lan2" "switch0" "0x04" + ucidef_set_led_switch "lan3amber" "LAN3 (amber)" "netgear:amber:lan3" "switch0" "0x08" + ucidef_set_led_switch "lan4amber" "LAN4 (amber)" "netgear:amber:lan4" "switch0" "0x10" + ucidef_set_led_default "lan1green" "LAN1 (green)" "netgear:green:lan1" "0" + ucidef_set_led_default "lan2green" "LAN2 (green)" "netgear:green:lan2" "0" + ucidef_set_led_default "lan3green" "LAN3 (green)" "netgear:green:lan3" "0" + ucidef_set_led_default "lan4green" "LAN4 (green)" "netgear:green:lan4" "0" + ucidef_set_led_default "wan-green" "WAN (green)" "netgear:green:wan" "0" + ucidef_set_led_default "wps1" "WPS1" "netgear:blue:wps1" "0" + ucidef_set_led_default "wps2" "WPS2" "netgear:blue:wps2" "0" + ucidef_set_led_default "status" "STATUS" "netgear:amber:status" "0" + ucidef_set_led_default "test" "TEST" "netgear:amber:test" "0" + ;; wzr-hp-ag300h) ucidef_set_led_default "diag" "DIAG" "buffalo:red:diag" "0" 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 6b6c6a4..ed568b8 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/02_network +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network @@ -226,7 +226,8 @@ wnr2000-v3 |\ wnr2000-v4 |\ wnr2200 |\ wnr612-v2 |\ -wnr1000-v2) +wnr1000-v2 |\ +wpn824n) ucidef_set_interfaces_lan_wan "eth1" "eth0" ucidef_add_switch "switch0" \ "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4@eth1" # XXX: confirm! diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index 13a0a98..c0e73ad 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -370,7 +370,8 @@ get_status_led() { wnr2000 | \ wnr2200 |\ wnr612-v2 |\ - wnr1000-v2) + wnr1000-v2 |\ + wpn824n) status_led="netgear:green:power" ;; wp543) diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 678482e..34d5741 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -974,6 +974,9 @@ ar71xx_board_detect() { *"WNR1000 V2") name="wnr1000-v2" ;; + *WPN824N) + name="wpn824n" + ;; *WRT160NL) name="wrt160nl" ;; diff --git a/target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx b/target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx
Re: [OpenWrt-Devel] lantiq: Initial linux 4.4 support (with SPI problems)
Hi Daniel, On Wed, Jan 13, 2016 at 9:05 PM, Daniel Schwierzeckwrote: > could you retry with the attached driver? > > It is a complete rewrite with DT support and runs against the UGW-6.1.1 > kernel. Unfortunately I hadn't time yet to adapt and test it with > OpenWRT. Maybe you want to volunteer for that ;) Thanks for this update! I am going to test it on kernel 4.1 in the next days and let you know about the results. Do you have any plans for upstreaming this patch (assuming it works on 4.1/4.4)? Do you also have any other patches prepared in your tree which we should look into? Martin ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] lantiq: replace the target specific mtdsplit parsers
This patchset solves multiple problems: - mtdsplit code for TP-Link images was partially duplicated within the lantiq target. The generic implementation supports also v1 and v3 images, instead of "just" v2. - mtdsplit_brnimage fixes a bug in the existing brnImage parser. The old code assumed that rootfs_data can be extended to the end of the partition. This is not true (at least for brnboot 1.07 and newer), because there is a brnboot specific 12 byte footer at the end of each firmware partition. Once OpenWrt was booted on such devices (for example VGV7510KW22) brnboot refused to boot the image again because the footer was overwritten by the rootfs_data partition. - mtdsplit_eva was the last parser within the lantiq target. As far as I know EVA images could also be used on AR7 and "Ikanos" devices, so I decided to move this code as well. - mtdsplit_squashfs assumes so far that the end of the "parent" partition is aligned at an erase-block. However for brnImages this is not the case (see the description above - there is a 12 byte footer at the end of the parent partition which mtdsplit_squashfs must not touch). Thus we round the size to the previous erase-block (which should not change anything for any of the existing image parsers, except brnImage). Martin ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 4/4] lantiq: Switch to the generic mtdsplit parser implementations
This removes the arch-specific mtdsplit parsers and enables the generic implementations for brnImage, EVA and TP-Link instead. Signed-off-by: Martin Blumenstingl--- target/linux/lantiq/config-4.1 | 3 + .../linux/lantiq/patches-4.1/0101-mtd-split.patch | 192 - 2 files changed, 3 insertions(+), 192 deletions(-) delete mode 100644 target/linux/lantiq/patches-4.1/0101-mtd-split.patch diff --git a/target/linux/lantiq/config-4.1 b/target/linux/lantiq/config-4.1 index a68ad16..35a1233 100644 --- a/target/linux/lantiq/config-4.1 +++ b/target/linux/lantiq/config-4.1 @@ -104,7 +104,10 @@ CONFIG_MTD_LANTIQ=y CONFIG_MTD_M25P80=y # CONFIG_MTD_NAND_XWAY is not set CONFIG_MTD_SPI_NOR=y +CONFIG_MTD_SPLIT_BRNIMAGE_FW=y +CONFIG_MTD_SPLIT_EVA_FW=y CONFIG_MTD_SPLIT_FIRMWARE=y +CONFIG_MTD_SPLIT_TPLINK_FW=y CONFIG_MTD_UIMAGE_SPLIT=y CONFIG_NEED_DMA_MAP_STATE=y CONFIG_NEED_PER_CPU_KM=y diff --git a/target/linux/lantiq/patches-4.1/0101-mtd-split.patch b/target/linux/lantiq/patches-4.1/0101-mtd-split.patch deleted file mode 100644 index e3c3633..000 --- a/target/linux/lantiq/patches-4.1/0101-mtd-split.patch +++ /dev/null @@ -1,192 +0,0 @@ a/arch/mips/lantiq/xway/Makefile -+++ b/arch/mips/lantiq/xway/Makefile -@@ -1,6 +1,6 @@ - obj-y := prom.o sysctrl.o clk.o reset.o dma.o timer.o dcdc.o - --obj-y += vmmc.o tffs.o -+obj-y += vmmc.o tffs.o mtd_split.o - - obj-y += eth_mac.o - obj-$(CONFIG_PCI) += ath_eep.o rt_eep.o pci-ath-fixup.o /dev/null -+++ b/arch/mips/lantiq/xway/mtd_split.c -@@ -0,0 +1,129 @@ -+#include -+#include -+#include -+#include -+ -+#define ROOTFS_SPLIT_NAME "rootfs_data" -+ -+struct squashfs_super_block { -+ __le32 s_magic; -+ __le32 pad0[9]; -+ __le64 bytes_used; -+}; -+ -+static void split_brnimage_kernel(struct mtd_info *master, const char *name, -+ int offset, int size) -+{ -+ unsigned long buf[4]; -+ // Assume at most 2MB of kernel image -+ unsigned long end = offset + (2 << 20); -+ unsigned long part_size = offset + 0x400 - 12; -+ size_t len; -+ int ret; -+ -+ if (strcmp(name, "firmware") != 0) -+ return; -+ while (part_size < end) { -+ long size_min = part_size - 0x400 - 12 - offset; -+ long size_max = part_size + 12 - offset; -+ ret = mtd_read(master, part_size, 16, , (void *)buf); -+ if (ret || len != 16) -+ return; -+ -+ if (le32_to_cpu(buf[0]) < size_min || -+ le32_to_cpu(buf[0]) > size_max) { -+ part_size += 0x400; -+ continue; -+ } -+ -+ if (le32_to_cpu(buf[3]) == SQUASHFS_MAGIC) { -+ part_size += 12 - offset; -+ __mtd_add_partition(master, "rootfs", offset + part_size, -+ size - part_size, false); -+ return; -+ } -+ part_size += 0x400; -+ } -+} -+ -+static void split_eva_kernel(struct mtd_info *master, const char *name, -+ int offset, int size) -+{ -+#define EVA_MAGIC 0xfeed1281 -+ unsigned long magic = 0; -+ unsigned long part_size = 0, p; -+ size_t len; -+ int ret; -+ -+ if (strcmp(name, CONFIG_MTD_SPLIT_FIRMWARE_NAME) != 0) -+ return; -+ -+ ret = mtd_read(master, offset, 4, , (void *)); -+ if (ret || len != sizeof(magic)) -+ return; -+ -+ if (le32_to_cpu(magic) != EVA_MAGIC) -+ return; -+ -+ ret = mtd_read(master, offset + 4, 4, , (void *)_size); -+ if (ret || len != sizeof(part_size)) -+ return; -+ -+ p = part_size = le32_to_cpu(part_size) + 0x18; -+ p &= ~0x; -+ p += 0x1; -+ -+ ret = mtd_read(master, offset + p, 4, , (void *)); -+ if (ret || len != sizeof(magic)) -+ return; -+ -+ if (magic == SQUASHFS_MAGIC) -+ part_size = p + 0x100; -+ else -+ part_size = mtd_pad_erasesize(master, offset, len); -+ -+ if (part_size + master->erasesize > size) -+ return; -+ -+ __mtd_add_partition(master, "rootfs", offset + part_size, -+ size - part_size, false); -+} -+ -+static void split_tplink_kernel(struct mtd_info *master, const char *name, -+ int offset, int size) -+{ -+#define TPLINK_MAGIC 0x0002 -+ unsigned long magic = 0; -+ unsigned long part_size = 0; -+ size_t len; -+ int ret; -+ -+ if (strcmp(name, CONFIG_MTD_SPLIT_FIRMWARE_NAME) != 0) -+ return; -+ -+ ret = mtd_read(master, offset, 4, , (void *)); -+ if (ret || len != sizeof(magic)) -+ return; -+ -+ if (le32_to_cpu(magic) != TPLINK_MAGIC) -+
Re: [OpenWrt-Devel] [PATCH] Enable ATIIXP on x64
On 15/01/16 03:25, Lucian Cristian wrote: > Also support ATI PATA on x64 target > > Signed-off-by: Lucian CristianHas already been NACKd before: https://lists.openwrt.org/pipermail/openwrt-devel/2015-September/036155.html Not entirely sure the situation has changed since then. Regards, Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 3/4] kernel: mtdsplit_squashfs: Align with the erase-block size
On most image types the rootfs ends at an erase-block. However, at least with brnImages this is not the case: while the partitions are aligned with the erase-block size there is a 12 byte footer at the end of the partition which must not be touched by any filesystem. This lead to a rootfs_data partition which was not aligned properly (and thus ended up being readonly): 0x0048-0x0085a800 : "rootfs_data" (128 KiB EB) Signed-off-by: Martin Blumenstingl--- target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_squashfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_squashfs.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_squashfs.c index 3d80e07..5329037 100644 --- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_squashfs.c +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_squashfs.c @@ -49,7 +49,7 @@ mtdsplit_parse_squashfs(struct mtd_info *master, part->name = ROOTFS_SPLIT_NAME; part->offset = mtd_roundup_to_eb(part_offset + squashfs_len, parent_mtd) - part_offset; - part->size = master->size - part->offset; + part->size = mtd_rounddown_to_eb(master->size - part->offset, master); *pparts = part; return 1; -- 2.7.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/4] kernel: mtdsplit: add support for EVA images
This allows splitting EVA images (usually found in fritz devices). The firmware will be split into a kernel and a separate rootfs partition. Signed-off-by: Martin Blumenstingl--- target/linux/generic/config-3.18 | 1 + target/linux/generic/config-4.1| 1 + target/linux/generic/config-4.3| 1 + target/linux/generic/config-4.4| 1 + .../generic/files/drivers/mtd/mtdsplit/Kconfig | 5 ++ .../generic/files/drivers/mtd/mtdsplit/Makefile| 1 + .../files/drivers/mtd/mtdsplit/mtdsplit_eva.c | 96 ++ 7 files changed, 106 insertions(+) create mode 100644 target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_eva.c diff --git a/target/linux/generic/config-3.18 b/target/linux/generic/config-3.18 index c8ba328..f3ec88d 100644 --- a/target/linux/generic/config-3.18 +++ b/target/linux/generic/config-3.18 @@ -2266,6 +2266,7 @@ CONFIG_MTD_ROOTFS_SPLIT=y # CONFIG_MTD_SPINAND_MT29F is not set CONFIG_MTD_SPLIT=y # CONFIG_MTD_SPLIT_BRNIMAGE_FW is not set +# CONFIG_MTD_SPLIT_EVA_FW is not set # CONFIG_MTD_SPLIT_FIRMWARE is not set CONFIG_MTD_SPLIT_FIRMWARE_NAME="firmware" # CONFIG_MTD_SPLIT_FIT_FW is not set diff --git a/target/linux/generic/config-4.1 b/target/linux/generic/config-4.1 index ade6807..222f8c1 100644 --- a/target/linux/generic/config-4.1 +++ b/target/linux/generic/config-4.1 @@ -2358,6 +2358,7 @@ CONFIG_MTD_ROOTFS_ROOT_DEV=y # CONFIG_MTD_SPINAND_MT29F is not set CONFIG_MTD_SPLIT=y # CONFIG_MTD_SPLIT_BRNIMAGE_FW is not set +# CONFIG_MTD_SPLIT_EVA_FW is not set # CONFIG_MTD_SPLIT_FIRMWARE is not set CONFIG_MTD_SPLIT_FIRMWARE_NAME="firmware" # CONFIG_MTD_SPLIT_FIT_FW is not set diff --git a/target/linux/generic/config-4.3 b/target/linux/generic/config-4.3 index f5d8ce8..23e6048 100644 --- a/target/linux/generic/config-4.3 +++ b/target/linux/generic/config-4.3 @@ -2416,6 +2416,7 @@ CONFIG_MTD_ROOTFS_ROOT_DEV=y # CONFIG_MTD_SPINAND_MT29F is not set CONFIG_MTD_SPLIT=y # CONFIG_MTD_SPLIT_BRNIMAGE_FW is not set +# CONFIG_MTD_SPLIT_EVA_FW is not set # CONFIG_MTD_SPLIT_FIRMWARE is not set CONFIG_MTD_SPLIT_FIRMWARE_NAME="firmware" # CONFIG_MTD_SPLIT_FIT_FW is not set diff --git a/target/linux/generic/config-4.4 b/target/linux/generic/config-4.4 index c27192d..6ad3008 100644 --- a/target/linux/generic/config-4.4 +++ b/target/linux/generic/config-4.4 @@ -2319,6 +2319,7 @@ CONFIG_MTD_ROOTFS_ROOT_DEV=y # CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set CONFIG_MTD_SPLIT=y # CONFIG_MTD_SPLIT_BRNIMAGE_FW is not set +# CONFIG_MTD_SPLIT_EVA_FW is not set # CONFIG_MTD_SPLIT_FIRMWARE is not set CONFIG_MTD_SPLIT_FIRMWARE_NAME="firmware" # CONFIG_MTD_SPLIT_FIT_FW is not set diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/Kconfig b/target/linux/generic/files/drivers/mtd/mtdsplit/Kconfig index 0370a21..131a74f 100644 --- a/target/linux/generic/files/drivers/mtd/mtdsplit/Kconfig +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/Kconfig @@ -54,3 +54,8 @@ config MTD_SPLIT_BRNIMAGE_FW bool "brnImage (brnboot image) firmware parser" depends on MTD_SPLIT_SUPPORT select MTD_SPLIT + +config MTD_SPLIT_EVA_FW + bool "EVA image based firmware partition parser" + depends on MTD_SPLIT_SUPPORT + select MTD_SPLIT diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/Makefile b/target/linux/generic/files/drivers/mtd/mtdsplit/Makefile index ca24c71..acf799e 100644 --- a/target/linux/generic/files/drivers/mtd/mtdsplit/Makefile +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/Makefile @@ -7,3 +7,4 @@ obj-$(CONFIG_MTD_SPLIT_LZMA_FW) += mtdsplit_lzma.o obj-$(CONFIG_MTD_SPLIT_TPLINK_FW) += mtdsplit_tplink.o obj-$(CONFIG_MTD_SPLIT_TRX_FW) += mtdsplit_trx.o obj-$(CONFIG_MTD_SPLIT_BRNIMAGE_FW) += mtdsplit_brnimage.o +obj-$(CONFIG_MTD_SPLIT_EVA_FW) += mtdsplit_eva.o diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_eva.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_eva.c new file mode 100644 index 000..d262e60 --- /dev/null +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_eva.c @@ -0,0 +1,96 @@ +/* + * Copyright (C) 2012 John Crispin + * Copyright (C) 2015 Martin Blumenstingl + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + * + */ + +#include +#include +#include +#include +#include +#include +#include + +#include "mtdsplit.h" + +#define EVA_NR_PARTS 2 +#define EVA_MAGIC 0xfeed1281 +#define EVA_FOOTER_SIZE0x18 +#define EVA_DUMMY_SQUASHFS_SIZE0x100 + +struct eva_image_header { + uint32_tmagic; + uint32_tsize; +}; + +static int mtdsplit_parse_eva(struct mtd_info *master, +
[OpenWrt-Devel] [PATCH 1/4] kernel: mtdsplit: add support for brnImages
This adds brnImage (used with the brnboot bootloader) firmware parsing support. brnboot verifies the integrity of the firmware stored on the "Code Image" partitions by looking at the 12 byte footer at the very end of the partition. This footer contains the checksum of the original brnImage (kernel + rootfs/squashfs) and must not be touched (by our JFFS2 rootfs_data - otherwise the image will not be bootable anymore). Big thanks to Mathias Kresin for analyzing the brnImage structure and finding out the information how to keep images valid even when adding a nested rootfs_data partition. Signed-off-by: Martin Blumenstingl--- target/linux/generic/config-3.18 | 1 + target/linux/generic/config-4.1| 1 + target/linux/generic/config-4.3| 1 + target/linux/generic/config-4.4| 1 + .../generic/files/drivers/mtd/mtdsplit/Kconfig | 5 + .../generic/files/drivers/mtd/mtdsplit/Makefile| 1 + .../files/drivers/mtd/mtdsplit/mtdsplit_brnimage.c | 104 + 7 files changed, 114 insertions(+) create mode 100644 target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_brnimage.c diff --git a/target/linux/generic/config-3.18 b/target/linux/generic/config-3.18 index 36d8590..c8ba328 100644 --- a/target/linux/generic/config-3.18 +++ b/target/linux/generic/config-3.18 @@ -2265,6 +2265,7 @@ CONFIG_MTD_ROOTFS_SPLIT=y # CONFIG_MTD_SPI_NOR is not set # CONFIG_MTD_SPINAND_MT29F is not set CONFIG_MTD_SPLIT=y +# CONFIG_MTD_SPLIT_BRNIMAGE_FW is not set # CONFIG_MTD_SPLIT_FIRMWARE is not set CONFIG_MTD_SPLIT_FIRMWARE_NAME="firmware" # CONFIG_MTD_SPLIT_FIT_FW is not set diff --git a/target/linux/generic/config-4.1 b/target/linux/generic/config-4.1 index 0f76041..ade6807 100644 --- a/target/linux/generic/config-4.1 +++ b/target/linux/generic/config-4.1 @@ -2357,6 +2357,7 @@ CONFIG_MTD_ROOTFS_ROOT_DEV=y # CONFIG_MTD_SPI_NOR is not set # CONFIG_MTD_SPINAND_MT29F is not set CONFIG_MTD_SPLIT=y +# CONFIG_MTD_SPLIT_BRNIMAGE_FW is not set # CONFIG_MTD_SPLIT_FIRMWARE is not set CONFIG_MTD_SPLIT_FIRMWARE_NAME="firmware" # CONFIG_MTD_SPLIT_FIT_FW is not set diff --git a/target/linux/generic/config-4.3 b/target/linux/generic/config-4.3 index 5ec85fe..f5d8ce8 100644 --- a/target/linux/generic/config-4.3 +++ b/target/linux/generic/config-4.3 @@ -2415,6 +2415,7 @@ CONFIG_MTD_ROOTFS_ROOT_DEV=y # CONFIG_MTD_SPI_NOR is not set # CONFIG_MTD_SPINAND_MT29F is not set CONFIG_MTD_SPLIT=y +# CONFIG_MTD_SPLIT_BRNIMAGE_FW is not set # CONFIG_MTD_SPLIT_FIRMWARE is not set CONFIG_MTD_SPLIT_FIRMWARE_NAME="firmware" # CONFIG_MTD_SPLIT_FIT_FW is not set diff --git a/target/linux/generic/config-4.4 b/target/linux/generic/config-4.4 index 5313222..c27192d 100644 --- a/target/linux/generic/config-4.4 +++ b/target/linux/generic/config-4.4 @@ -2318,6 +2318,7 @@ CONFIG_MTD_ROOTFS_ROOT_DEV=y # CONFIG_MTD_SPI_NOR is not set # CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set CONFIG_MTD_SPLIT=y +# CONFIG_MTD_SPLIT_BRNIMAGE_FW is not set # CONFIG_MTD_SPLIT_FIRMWARE is not set CONFIG_MTD_SPLIT_FIRMWARE_NAME="firmware" # CONFIG_MTD_SPLIT_FIT_FW is not set diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/Kconfig b/target/linux/generic/files/drivers/mtd/mtdsplit/Kconfig index c4e3418..0370a21 100644 --- a/target/linux/generic/files/drivers/mtd/mtdsplit/Kconfig +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/Kconfig @@ -49,3 +49,8 @@ config MTD_SPLIT_TRX_FW bool "TRX image based firmware partition parser" depends on MTD_SPLIT_SUPPORT select MTD_SPLIT + +config MTD_SPLIT_BRNIMAGE_FW + bool "brnImage (brnboot image) firmware parser" + depends on MTD_SPLIT_SUPPORT + select MTD_SPLIT diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/Makefile b/target/linux/generic/files/drivers/mtd/mtdsplit/Makefile index e09476b..ca24c71 100644 --- a/target/linux/generic/files/drivers/mtd/mtdsplit/Makefile +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/Makefile @@ -6,3 +6,4 @@ obj-$(CONFIG_MTD_SPLIT_FIT_FW) += mtdsplit_fit.o obj-$(CONFIG_MTD_SPLIT_LZMA_FW) += mtdsplit_lzma.o obj-$(CONFIG_MTD_SPLIT_TPLINK_FW) += mtdsplit_tplink.o obj-$(CONFIG_MTD_SPLIT_TRX_FW) += mtdsplit_trx.o +obj-$(CONFIG_MTD_SPLIT_BRNIMAGE_FW) += mtdsplit_brnimage.o diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_brnimage.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_brnimage.c new file mode 100644 index 000..7ddd69b --- /dev/null +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_brnimage.c @@ -0,0 +1,104 @@ +/* + * Copyright (C) 2012 John Crispin + * Copyright (C) 2015 Martin Blumenstingl + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free
Re: [OpenWrt-Devel] [PATCH 1/1] use NTP server received via DHCP
> > please make var 'iface' local and while you are there, move > all the 'local' declaration to the head of the function. Wouldn't be better if the local vars inside of the if and for statements stay inside? I mean what is the point of declaring ifaces if I will be using all the ifaces? in term of performance(even if it is negligible and clarity of the code). Thanks for following the patch! Regards, Amine On Thu, Jan 14, 2016 at 10:44 AM, Bastian Bittorfwrote: > * amine ahd [14.01.2016 10:29]: > > thank you, patch applies... > > > start_service() { > > - local server enabled enable_server peer > > + local server enabled enable_server peer ntpservers > > + local use_dhcp="$(uci -q get system.ntp.use_dhcp)" > > > > validate_ntp_section ntp || { > > echo "validation failed" > > @@ -21,13 +25,33 @@ start_service() { > > } > > > > [ $enabled = 0 ] && return > > - > > - [ -z "$server" ] && return > > + [ -z "$server" ] && [ "$use_dhcp" = 0 ] && return > > i'am ok with this, if you like you can reuse > 'config_get_bool()' from /lib/functions.sh > > > procd_open_instance > > procd_set_param command "$PROG" -n > > [ "$enable_server" = "1" ] && procd_append_param command -l > > [ -x "$HOTPLUG_SCRIPT" ] && procd_append_param command -S > "$HOTPLUG_SCRIPT" > > + > > + local dhcp_ifaces="$(uci -q get system.ntp.dhcp_ifaces)" > > + [ "$use_dhcp" = 1 ] && { > > this should also be 'bool' > > > + if [ -z "$dhcp_ifaces" ]; then > > + local dump="$(ubus call network.interface dump)" > > + ntpservers=$(jsonfilter -s "$dump" -e > '$["interface"][*]["data"]["ntpserver"]') > > + else > > + for iface in $dhcp_ifaces; do > > please make var 'iface' local and while you are there, move > all the 'local' declaration to the head of the function. > > the rest looks OK to me. - thank you > > bye, bastian > -- Amine Hamed | Software Engineer Ocedo GmbH | Hirschstrasse 7 | 76133 Karlsruhe | Germany Email aha...@ocedo.com REGISTERED OFFICE: KARLSRUHE | DISTRICT COURT: MANNHEIM | REGISTER NUMBER: HRB 717873 MANAGING DIRECTOR: MARKUS HENNIG|JAN HICHERT ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] kernel: add missing kmod-video-videobuf2's object file in 4.4
CONFIG_VIDEOBUF2_CORE produces two object files in Linux >= 4.4. Conditionally add the new file to FILES of kmod-video-videobuf2. Signed-off-by: Jan Čermák--- package/kernel/linux/modules/video.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/kernel/linux/modules/video.mk b/package/kernel/linux/modules/video.mk index 3b06a14..0fcacb2 100644 --- a/package/kernel/linux/modules/video.mk +++ b/package/kernel/linux/modules/video.mk @@ -127,9 +127,10 @@ define KernelPackage/video-videobuf2 CONFIG_VIDEOBUF2_VMALLOC FILES:= \ $(LINUX_DIR)/drivers/media/$(V4L2_DIR)/videobuf2-core.ko \ + $(LINUX_DIR)/drivers/media/$(V4L2_DIR)/videobuf2-v4l2.ko@ge4.4 \ $(LINUX_DIR)/drivers/media/$(V4L2_DIR)/videobuf2-memops.ko \ $(LINUX_DIR)/drivers/media/$(V4L2_DIR)/videobuf2-vmalloc.ko - AUTOLOAD:=$(call AutoLoad,65,videobuf2-core videobuf2-memops videobuf2-vmalloc) + AUTOLOAD:=$(call AutoLoad,65,videobuf2-core videobuf-v4l2@ge4.4 videobuf2-memops videobuf2-vmalloc) $(call AddDepends/video) endef -- 2.7.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] Enable ATIIXP on x64
Also support ATI PATA on x64 target Signed-off-by: Lucian Cristian--- diff --git a/target/linux/x86/64/config-default b/target/linux/x86/64/config-default index a5947a2..b4c8b98 100644 --- a/target/linux/x86/64/config-default +++ b/target/linux/x86/64/config-default @@ -39,7 +39,8 @@ CONFIG_ARCH_SUPPORTS_INT128=y CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH=y -# CONFIG_ATA_SFF is not set +CONFIG_ATA_SFF=y +CONFIG_PATA_ATIIXP=y CONFIG_AUDIT_ARCH=y CONFIG_BLK_DEV_INTEGRITY=y CONFIG_CALGARY_IOMMU=y ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel