Re: [LEDE-DEV] [PATCHv2] ipq806x: add support for ZyXEL NBG6817
Hi André, few comments inline On 17/10/2016 21:22, André Valentin wrote: > CPU: 1.8GHz ARM, RAM: 512MB > Storage: 4MiB Serial Flash, 3.9GiB MMC > NIC: 2x1GBit/s, 5 external and 2 internal Port Switch > WiFi: Dualband, ATH10k 2.4GHz, 5GHz MU-MIMO > > Changes: > -remove kernel compression changes > -give spi-nor.c patch a correct name > > Signed-off-by: André Valentin > --- > .../linux/ipq806x/base-files/etc/board.d/01_leds | 5 + > .../ipq806x/base-files/etc/board.d/02_network | 4 + > .../etc/hotplug.d/firmware/11-ath10k-caldata | 6 + > target/linux/ipq806x/base-files/lib/ipq806x.sh | 3 + > .../base-files/lib/preinit/04_set_mtd_ipq806x.sh | 21 ++ > .../lib/preinit/05_set_iface_mac_ipq806x.sh| 21 ++ > .../ipq806x/base-files/lib/upgrade/platform.sh | 2 + > target/linux/ipq806x/config-4.4| 18 +- > .../arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts | 338 > + > target/linux/ipq806x/image/Makefile| 26 +- > .../linux/ipq806x/patches-4.4/800-devicetree.patch | 3 +- > .../patches-4.4/999-add-spi-nor-mx25u3235f.patch | 10 + > 12 files changed, 449 insertions(+), 8 deletions(-) > create mode 100644 > target/linux/ipq806x/base-files/lib/preinit/04_set_mtd_ipq806x.sh > create mode 100644 > target/linux/ipq806x/base-files/lib/preinit/05_set_iface_mac_ipq806x.sh > create mode 100644 > target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts > create mode 100644 > target/linux/ipq806x/patches-4.4/999-add-spi-nor-mx25u3235f.patch > > diff --git a/target/linux/ipq806x/base-files/etc/board.d/01_leds > b/target/linux/ipq806x/base-files/etc/board.d/01_leds > index a7ace1f..33774e8 100755 > --- a/target/linux/ipq806x/base-files/etc/board.d/01_leds > +++ b/target/linux/ipq806x/base-files/etc/board.d/01_leds > @@ -33,6 +33,11 @@ ea8500) > ucidef_set_led_wlan "wifi" "WIFI" "ea8500:green:wifi" "phy0radio" > ucidef_set_led_default "wps" "WPS" "ea8500:green:wps" "0" > ;; > +nbg6817) > + ucidef_set_led_wlan "wifi" "WIFI" "${board}:white:wifi" "phy0radio" > + ucidef_set_led_wlan "wifi5g" "WIFI5G" "${board}:white:wifi5g" > "phy1radio" > + ucidef_set_led_netdev "wan" "WAN" "${board}:white:internet" "eth0" > + ;; you can drop the brackets around $board alphabetical ordering is wrong here > *) > ;; > esac > diff --git a/target/linux/ipq806x/base-files/etc/board.d/02_network > b/target/linux/ipq806x/base-files/etc/board.d/02_network > index b720455..9168ae7 100755 > --- a/target/linux/ipq806x/base-files/etc/board.d/02_network > +++ b/target/linux/ipq806x/base-files/etc/board.d/02_network > @@ -35,6 +35,10 @@ ea8500) > ucidef_set_interface_macaddr "lan" "$hw_mac_addr" > ucidef_set_interface_macaddr "wan" "$hw_mac_addr" > ;; > +nbg6817) > + ucidef_add_switch "switch0" \ > + "1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0" > + ;; alphabetical ordering is wrong here > *) > echo "Unsupported hardware. Network interfaces not intialized" > ;; > diff --git > a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata > b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata > index c7977e6..0a9004f 100644 > --- a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata > +++ b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata > @@ -60,6 +60,9 @@ case "$FIRMWARE" in > r7800) > ath10kcal_extract "art" 4096 12064 > ;; > + nbg6817) > + ath10kcal_extract "0:ART" 4096 12064 > + ;; alphabetical ordering is wrong here > esac > ;; > "ath10k/cal-pci-0001:01:00.0.bin") > @@ -76,6 +79,9 @@ case "$FIRMWARE" in > r7800) > ath10kcal_extract "art" 20480 12064 > ;; > + nbg6817) > + ath10kcal_extract "0:ART" 20480 12064 > + ;; alphabetical ordering is wrong here > esac > ;; > *) > diff --git a/target/linux/ipq806x/base-files/lib/ipq806x.sh > b/target/linux/ipq806x/base-files/lib/ipq806x.sh > index ea45381..8f3718c 100644 > --- a/target/linux/ipq806x/base-files/lib/ipq806x.sh > +++ b/target/linux/ipq806x/base-files/lib/ipq806x.sh > @@ -38,6 +38,9 @@ ipq806x_board_detect() { > *"R7800") > name="r7800" > ;; > + *"NBG6817") > + name="nbg6817" > + ;; alphabetical ordering is wrong here > esac > > [ -z "$name" ] && name="unknown" > diff --git > a/target/linux/ipq806x/base-files/lib/preinit/04_set_mtd_ipq806x.sh > b/target/linux/ipq806x/base-files/lib/preinit/04_set_mtd_ipq806x.sh > new file mode 100644 > index 000..024cd81 > --- /dev/null > +++ b/target/linux/ipq806x/base-files/lib/preinit/04_set_mtd_ipq806x.sh > @@ -0,0 +1,21 @@ > +# > +# Copyright (C) 2009 OpenWrt.org > +# > + > +. /lib/ipq806x.sh
Re: [LEDE-DEV] [PATCH] rsyslog: do not daemonize and allow procd to manage rsyslogd
On 18/10/2016 03:15, Alexis Green wrote: > This allows user to stop and/or restart the daemon. Currently, running > "/etc/init.d/rsyslogd stop" does not stop the daemon once it's started. > > Signed-off-by: Alexis Green > --- > net/rsyslog/files/rsyslog.init | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/rsyslog/files/rsyslog.init b/net/rsyslog/files/rsyslog.init > index 5fc8849..20eb2a4 100644 > --- a/net/rsyslog/files/rsyslog.init > +++ b/net/rsyslog/files/rsyslog.init > @@ -7,6 +7,6 @@ USE_PROCD=1 > > start_service() { > procd_open_instance > - procd_set_param command /usr/sbin/rsyslogd > + procd_set_param command /usr/sbin/rsyslogd -n > procd_close_instance > } > please post patches for packages in the feed via the github feed. --> https://github.com/openwrt/packages John ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH] Add support for Comfast E380AC v1 and v2
Hi, 2 ordering comments inline. please prefix the patch subject with "ar71xx: " John On 17/10/2016 12:14, Gareth Parker wrote: > The Comfast E380AC is a single port PoE Dual Band AP. > > There are two versions which are only identifiable through the web > administration interface, v1 has 128mb ram and a uboot size of 128k, v2 has > 256mb ram and a uboot size of 256k, the remaining hardware and PCB markings > are the same. > > The factory firmware is built on openwrt and will accept a sysupgrade file, > this patch produces two sysupgrade files for both versions. > > Signed-off-by: Gareth Parker > --- > target/linux/ar71xx/base-files/etc/diag.sh |4 + > .../etc/hotplug.d/firmware/11-ath10k-caldata |5 + > target/linux/ar71xx/base-files/lib/ar71xx.sh |6 + > .../ar71xx/base-files/lib/upgrade/platform.sh | 12 ++ > target/linux/ar71xx/config-4.4 |1 + > .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt | 10 + > target/linux/ar71xx/files/arch/mips/ath79/Makefile |1 + > .../ar71xx/files/arch/mips/ath79/mach-cf-e380ac.c | 197 > > .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |2 + > target/linux/ar71xx/image/generic.mk | 18 ++ > 10 files changed, 256 insertions(+) > create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-cf-e380ac.c > > diff --git a/target/linux/ar71xx/base-files/etc/diag.sh > b/target/linux/ar71xx/base-files/etc/diag.sh > index d6e257d..c8e6b48 100644 > --- a/target/linux/ar71xx/base-files/etc/diag.sh > +++ b/target/linux/ar71xx/base-files/etc/diag.sh > @@ -82,6 +82,10 @@ get_status_led() { > cf-e316n-v2) > status_led="$board:blue:wan" > ;; > + cf-e380ac-v1|\ > + cf-e380ac-v2) > + status_led="cfe380ac:green" > + ;; > cpe510) > status_led="tp-link:green:link4" > ;; > diff --git > a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata > b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata > index 0e93feb..7598a83 100644 > --- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata > +++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata > @@ -47,6 +47,11 @@ board=$(ar71xx_board_name) > case "$FIRMWARE" in > "ath10k/cal-pci-:00:00.0.bin") > case $board in > + cf-e380ac-v1 | \ > + cf-e380ac-v2) > + ath10kcal_extract "art" 20480 2116 > + ath10kcal_patch_mac $(macaddr_add $(cat > /sys/class/net/eth0/address) +3) > + ;; > dlan-pro-1200-ac) > ath10kcal_extract "art" 20480 2116 > ;; > diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh > b/target/linux/ar71xx/base-files/lib/ar71xx.sh > index dae6fb2..fb017f5 100755 > --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh > +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh > @@ -488,6 +488,12 @@ ar71xx_board_detect() { > *"COMFAST CF-E316N v2") > name="cf-e316n-v2" > ;; > + *"COMFAST CF-E380AC-V1") > + name="cf-e380ac-v1" > + ;; > + *"COMFAST CF-E380AC-V2") > + name="cf-e380ac-v2" > + ;; > *"CPE210/220") > name="cpe210" > tplink_pharos_board_detect > diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh > b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh > index 559f97d..2463587 100755 > --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh > +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh > @@ -495,6 +495,16 @@ platform_check_image() { > alfa_check_image "$1" && return 0 > return 1 > ;; > + > + cf-e380ac-v1|\ > + cf-e380ac-v2) > + [ "$magic_long" != "27051956" ] && { > + echo "Invalid image type." > + return 1 > + } > + return 0 > + ;; > + this block is not properly sorted. please stick to alphabetical order. > wndr3700|\ > wnr1000-v2|\ > wnr2000-v3|\ > @@ -597,6 +607,8 @@ platform_do_upgrade() { > om5p) > platform_do_upgrade_openmesh "$ARGV" > ;; > + cf-e380ac-v1|\ > + cf-e380ac-v2|\ > uap-pro|\ > unifi-outdoor-plus) this whole chunk needs to be moved to be alphabetically ordered, > MTD_CONFIG_ARGS="-s 0x18" > diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4 > index 7aeac89..9232c4c 100644 > --- a/target/linux/ar71xx/config-4.4 > +++ b/target/linux/ar71xx/config-4.4 > @@ -60,6 +60,7 @@ CONFIG_ATH79_MACH_CAP324=y > CONFIG_ATH79_MACH_CAP4200AG=y > CONFIG_ATH79_MACH_CARAMBOLA2=y > CONFIG_ATH79_MACH_CF_E316N_V2=y > +CONFIG_ATH79_MACH_CF_E380AC=y > CONFIG_ATH79_MACH_CPE510=y > CONFIG_ATH79_MACH_CR3000=y >
Re: [LEDE-DEV] [PATCH] Add support for Comfast E380AC v1 and v2
On 18/10/2016 07:54, Rafał Miłecki wrote: > On 17 October 2016 at 12:14, Gareth Parker wrote: >> The Comfast E380AC is a single port PoE Dual Band AP. >> >> There are two versions which are only identifiable through the web >> administration interface, v1 has 128mb ram and a uboot size of 128k, v2 has >> 256mb ram and a uboot size of 256k, the remaining hardware and PCB markings >> are the same. > > Minor note: mb means milli-bits. You probably meant MiB which means > mebi-bytes. > https://en.wikipedia.org/wiki/Metric_prefix > https://en.wikipedia.org/wiki/Binary_prefix > > >> diff --git a/target/linux/ar71xx/base-files/etc/diag.sh >> b/target/linux/ar71xx/base-files/etc/diag.sh >> index d6e257d..c8e6b48 100644 >> --- a/target/linux/ar71xx/base-files/etc/diag.sh >> +++ b/target/linux/ar71xx/base-files/etc/diag.sh >> @@ -82,6 +82,10 @@ get_status_led() { >> cf-e316n-v2) >> status_led="$board:blue:wan" >> ;; >> + cf-e380ac-v1|\ >> + cf-e380ac-v2) >> + status_led="cfe380ac:green" >> + ;; >> cpe510) >> status_led="tp-link:green:link4" >> ;; > > See comment below. > > >> +static struct gpio_led cf_e380ac_leds_gpio[] __initdata = { >> + { >> + .name = "cfe380ac:red", >> + .gpio = CF_E380AC_GPIO_LED_RED, >> + .active_low = 0, >> + }, >> + { >> + .name = "cfe380ac:green", >> + .gpio = CF_E380AC_GPIO_LED_GREEN, >> + .active_low = 0, >> + }, >> + { >> + .name = "cfe380ac:blue", >> + .gpio = CF_E380AC_GPIO_LED_BLUE, >> + .active_low = 0, >> + }, >> + >> +}; > > What about functions of these LEDs? Take a look at > Documentation/leds/leds-class.txt, you should be using > "devicename:colour:function". please make sure to use $board instead of the board name when referencing the leds. > > ___ > Lede-dev mailing list > Lede-dev@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/lede-dev > ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH] Add support for Comfast E380AC v1 and v2
On 17 October 2016 at 12:14, Gareth Parker wrote: > The Comfast E380AC is a single port PoE Dual Band AP. > > There are two versions which are only identifiable through the web > administration interface, v1 has 128mb ram and a uboot size of 128k, v2 has > 256mb ram and a uboot size of 256k, the remaining hardware and PCB markings > are the same. Minor note: mb means milli-bits. You probably meant MiB which means mebi-bytes. https://en.wikipedia.org/wiki/Metric_prefix https://en.wikipedia.org/wiki/Binary_prefix > diff --git a/target/linux/ar71xx/base-files/etc/diag.sh > b/target/linux/ar71xx/base-files/etc/diag.sh > index d6e257d..c8e6b48 100644 > --- a/target/linux/ar71xx/base-files/etc/diag.sh > +++ b/target/linux/ar71xx/base-files/etc/diag.sh > @@ -82,6 +82,10 @@ get_status_led() { > cf-e316n-v2) > status_led="$board:blue:wan" > ;; > + cf-e380ac-v1|\ > + cf-e380ac-v2) > + status_led="cfe380ac:green" > + ;; > cpe510) > status_led="tp-link:green:link4" > ;; See comment below. > +static struct gpio_led cf_e380ac_leds_gpio[] __initdata = { > + { > + .name = "cfe380ac:red", > + .gpio = CF_E380AC_GPIO_LED_RED, > + .active_low = 0, > + }, > + { > + .name = "cfe380ac:green", > + .gpio = CF_E380AC_GPIO_LED_GREEN, > + .active_low = 0, > + }, > + { > + .name = "cfe380ac:blue", > + .gpio = CF_E380AC_GPIO_LED_BLUE, > + .active_low = 0, > + }, > + > +}; What about functions of these LEDs? Take a look at Documentation/leds/leds-class.txt, you should be using "devicename:colour:function". ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH] rsyslog: do not daemonize and allow procd to manage rsyslogd
This allows user to stop and/or restart the daemon. Currently, running "/etc/init.d/rsyslogd stop" does not stop the daemon once it's started. Signed-off-by: Alexis Green --- net/rsyslog/files/rsyslog.init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rsyslog/files/rsyslog.init b/net/rsyslog/files/rsyslog.init index 5fc8849..20eb2a4 100644 --- a/net/rsyslog/files/rsyslog.init +++ b/net/rsyslog/files/rsyslog.init @@ -7,6 +7,6 @@ USE_PROCD=1 start_service() { procd_open_instance - procd_set_param command /usr/sbin/rsyslogd + procd_set_param command /usr/sbin/rsyslogd -n procd_close_instance } -- 2.8.1 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH] ath10k-ct: Update to latest 4.7 CT ath10k driver.
From: Ben Greear Adds Sebastian's 160Mhz support (un-tested), remove DMA32 change that broke some x86 systems, allow setting 10.1 CT firmware keepalive watchdog timeout, support QCA 9887 hardware, and some other tweaks. Signed-off-by: Ben Greear --- package/kernel/ath10k-ct/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/kernel/ath10k-ct/Makefile b/package/kernel/ath10k-ct/Makefile index bbff8d8..6ca9db1 100644 --- a/package/kernel/ath10k-ct/Makefile +++ b/package/kernel/ath10k-ct/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ath10k-ct -PKG_VERSION:=2016-08-24 +PKG_VERSION:=2016-10-17 PKG_RELEASE=1 PKG_LICENSE:=GPLv2 @@ -10,7 +10,7 @@ PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/greearb/ath10k-ct.git PKG_SOURCE_PROTO:=git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=cd725d5465e1d4476a504794c541afeeba84b479 +PKG_SOURCE_VERSION:=f2fb96a03d6a2c0cdcd6482e2653a4468956e1f4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz PKG_MAINTAINER:=Ben Greear -- 2.4.11 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [RFC 3/3] config: ext4: use 1K blocks by default to support online resize2fs
Hi, Am Montag, 17. Oktober 2016, 22:08:06 CEST schrieb Jo-Philipp Wich: > Hi Michael, > > > I can't see why adjusting the default partition size would have been > > necessary > > as genext2fs takes (or better: took) the following parameters: > The filesystem is generated okay but due to the total size : blocksize ratio > there are not enough backup block group descriptor entries left to support > online-resizing the rootfs partition, see > http://lists.infradead.org/pipermail/lede-dev/2016-September/002518.html > for a report that describes the problem. I understand the problem and solving this issue would be a great benefit. > I am fine with keeping 4k blocks but in this case we should increase the > default image size to at least the minimum value being able to support > resizing. The report mentions that 512M already work which would allow > resizing up to 512GB (1024 times larger). > > Sorry, but I can only find the default value of 48 MB? Do I miss > > something? > > See > https://git.lede-project.org/?p=source.git;a=blob;f=config/Config-images.in > #l263 > > I don't like reverting to 1k because when you use the image on a real > > device, e.g. eMMC or SD card, then usually the internal blocksize is 4k, > > and internal erase block size is often even 4 MiB. > > Thus using 1k blocksize is not optimal when using a writeable filesystem. > > I understand. As mentioned above, 4K blocks are fine for me too, but in this > case I suggest to bump the rootfs part size to 2GB which would support 2TB > rootfs partitions. > In general, I'm fine with larger default partition size. However, this results in large images available for download at downloads.lede-project.org... mhei ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH] Latest ath10k CT 988X firmware (beta-18).
From: Ben Greear * Backport much of the 10.2 firmware features from upstream QCA driver. This includes ANI support, adaptive CCA, tx-hang workarounds, and lots of other things. Not all of this may be enabled at this point, and more code waits to be backported as time and motivation allows. * Fix some rate-control issues where ath10k in station mode (at least), would sometimes get stuck at low rates. This appeared to be a probe related state machine issue in the firmware, so I added some timeout logic to kick the state machine if it gets stuck. This signicantly improves throughput tests with many stations. * Support configuring WMI WD timeout using SET_SPECIAL API. * Properly configure the rx-mask on bootup to work around problem found by Mr. Kazior. This should remove the need to add the driver hack he posted. * Allow configuring pdev failed-retry threshold. This is how many consecutive tx failures the firmware will allow before resetting the wifi chip (not a full firmware crash). Signed-off-by: Ben Greear --- package/firmware/ath10k-firmware/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/firmware/ath10k-firmware/Makefile b/package/firmware/ath10k-firmware/Makefile index 73309ad..9ddfe92 100644 --- a/package/firmware/ath10k-firmware/Makefile +++ b/package/firmware/ath10k-firmware/Makefile @@ -66,14 +66,14 @@ $(Package/ath10k-firmware-default) CATEGORY:=Firmware endef -QCA988X_FIRMWARE_FILE_CT:=firmware-2-ct-full-community-16.1.bin-lede +QCA988X_FIRMWARE_FILE_CT:=firmware-2-ct-full-community.bin-18.rc1-lede QCA99X0_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-7.bin-lede.004 QCA9984_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-7.bin-lede.004 define Download/ath10k-firmware-qca988x-ct URL:=https://www.candelatech.com/downloads/ FILE:=$(QCA988X_FIRMWARE_FILE_CT) - MD5SUM:=d7e081e9782936ed544b78994c9133fb + MD5SUM:=89b436bad5d80c57bbf74e498095c9d2 endef $(eval $(call Download,ath10k-firmware-qca988x-ct)) -- 2.4.11 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [RFC 3/3] config: ext4: use 1K blocks by default to support online resize2fs
Hi Michael, > I can't see why adjusting the default partition size would have been necessary > as genext2fs takes (or better: took) the following parameters: The filesystem is generated okay but due to the total size : blocksize ratio there are not enough backup block group descriptor entries left to support online-resizing the rootfs partition, see http://lists.infradead.org/pipermail/lede-dev/2016-September/002518.html for a report that describes the problem. I am fine with keeping 4k blocks but in this case we should increase the default image size to at least the minimum value being able to support resizing. The report mentions that 512M already work which would allow resizing up to 512GB (1024 times larger). > Sorry, but I can only find the default value of 48 MB? Do I miss something? See https://git.lede-project.org/?p=source.git;a=blob;f=config/Config-images.in#l263 > I don't like reverting to 1k because when you use the image on a real > device, e.g. eMMC or SD card, then usually the internal blocksize is 4k, > and internal erase block size is often even 4 MiB. > Thus using 1k blocksize is not optimal when using a writeable filesystem. I understand. As mentioned above, 4K blocks are fine for me too, but in this case I suggest to bump the rootfs part size to 2GB which would support 2TB rootfs partitions. ~ Jo ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [RFC 3/3] config: ext4: use 1K blocks by default to support online resize2fs
Hi, Am Sonntag, 16. Oktober 2016, 01:59:44 CEST schrieb Jo-Philipp Wich: > Commit fe20272ab16068765a191f3a846f30f977bc7669 (SVN r40924) introduced > support for specifying ext4 blocksizes but silently switched the implicit > 1K value to 4K by default without also adjusting the default partition size. I can't see why adjusting the default partition size would have been necessary as genext2fs takes (or better: took) the following parameters: -B, --block-size -b, --size-in-blocks The commit introduced -B and adjusted -b accordingly, but did not touch the partition size at all. Image sizes were the same before and after, only block size default changed (silently, yes :-/ ). > > The current default size of 256MB Sorry, but I can only find the default value of 48 MB? Do I miss something? > in conjunction with 4K blocks produces an > ext4 filesystem which lacks the appropriate amount of backup GDT entries to > support online-resizing. > > Revert the 4K blocksize to 1K but keep the 256MB default size - this will > allow online resizing to a maximum of 256GB which should be sufficient > for now. I don't like reverting to 1k because when you use the image on a real device, e.g. eMMC or SD card, then usually the internal blocksize is 4k, and internal erase block size is often even 4 MiB. Thus using 1k blocksize is not optimal when using a writeable filesystem. Regards, Michael > > To support online resizing beyond 256GB we would need to enlarge the default > size to something like 2GB which would allow the FS to grow up to 2TB which > is the current theoretical LEDE limit due to the lack of GPT support on the > boot disk. > > Signed-off-by: Jo-Philipp Wich > --- > config/Config-images.in | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/config/Config-images.in b/config/Config-images.in > index 7d38341..6dfb3d1 100644 > --- a/config/Config-images.in > +++ b/config/Config-images.in > @@ -88,7 +88,7 @@ menu "Target Images" > > choice > prompt "Root filesystem block size" > - default TARGET_EXT4_BLOCKSIZE_4K > + default TARGET_EXT4_BLOCKSIZE_1K > depends on TARGET_ROOTFS_EXT4FS > help > Select the block size of the root filesystem. ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [RFC 2/3] config: ext4: do not set a maximum inode number by default
Hi, Am Sonntag, 16. Oktober 2016, 01:59:43 CEST schrieb Jo-Philipp Wich: > There is very little practical use to limit the number of available inodes > on an ext4 filesystem and the make_ext4fs utility is able to calculate > useful defaults by itself. > > Keep the option I always wondered whether somebody really needs/uses this... So, if nobody speaks up with a real use-case, I'd prefer to see this option to go completely. Regards, Michael > but make it empty by default to allow make_ext4fs to > calculate the optimal number of inodes when generating an ext4 file system. > > Signed-off-by: Jo-Philipp Wich > --- > config/Config-images.in | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/config/Config-images.in b/config/Config-images.in > index 05b817b..7d38341 100644 > --- a/config/Config-images.in > +++ b/config/Config-images.in > @@ -76,7 +76,6 @@ menu "Target Images" > config TARGET_EXT4_MAXINODE > int "Maximum number of inodes in root filesystem" > depends on TARGET_ROOTFS_EXT4FS > - default 6000 > help > Select the maximum number of inodes in the root > filesystem. ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCHv2] ipq806x: add support for ZyXEL NBG6817
CPU: 1.8GHz ARM, RAM: 512MB Storage: 4MiB Serial Flash, 3.9GiB MMC NIC: 2x1GBit/s, 5 external and 2 internal Port Switch WiFi: Dualband, ATH10k 2.4GHz, 5GHz MU-MIMO Changes: -remove kernel compression changes -give spi-nor.c patch a correct name Signed-off-by: André Valentin --- .../linux/ipq806x/base-files/etc/board.d/01_leds | 5 + .../ipq806x/base-files/etc/board.d/02_network | 4 + .../etc/hotplug.d/firmware/11-ath10k-caldata | 6 + target/linux/ipq806x/base-files/lib/ipq806x.sh | 3 + .../base-files/lib/preinit/04_set_mtd_ipq806x.sh | 21 ++ .../lib/preinit/05_set_iface_mac_ipq806x.sh| 21 ++ .../ipq806x/base-files/lib/upgrade/platform.sh | 2 + target/linux/ipq806x/config-4.4| 18 +- .../arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts | 338 + target/linux/ipq806x/image/Makefile| 26 +- .../linux/ipq806x/patches-4.4/800-devicetree.patch | 3 +- .../patches-4.4/999-add-spi-nor-mx25u3235f.patch | 10 + 12 files changed, 449 insertions(+), 8 deletions(-) create mode 100644 target/linux/ipq806x/base-files/lib/preinit/04_set_mtd_ipq806x.sh create mode 100644 target/linux/ipq806x/base-files/lib/preinit/05_set_iface_mac_ipq806x.sh create mode 100644 target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts create mode 100644 target/linux/ipq806x/patches-4.4/999-add-spi-nor-mx25u3235f.patch diff --git a/target/linux/ipq806x/base-files/etc/board.d/01_leds b/target/linux/ipq806x/base-files/etc/board.d/01_leds index a7ace1f..33774e8 100755 --- a/target/linux/ipq806x/base-files/etc/board.d/01_leds +++ b/target/linux/ipq806x/base-files/etc/board.d/01_leds @@ -33,6 +33,11 @@ ea8500) ucidef_set_led_wlan "wifi" "WIFI" "ea8500:green:wifi" "phy0radio" ucidef_set_led_default "wps" "WPS" "ea8500:green:wps" "0" ;; +nbg6817) + ucidef_set_led_wlan "wifi" "WIFI" "${board}:white:wifi" "phy0radio" + ucidef_set_led_wlan "wifi5g" "WIFI5G" "${board}:white:wifi5g" "phy1radio" + ucidef_set_led_netdev "wan" "WAN" "${board}:white:internet" "eth0" + ;; *) ;; esac diff --git a/target/linux/ipq806x/base-files/etc/board.d/02_network b/target/linux/ipq806x/base-files/etc/board.d/02_network index b720455..9168ae7 100755 --- a/target/linux/ipq806x/base-files/etc/board.d/02_network +++ b/target/linux/ipq806x/base-files/etc/board.d/02_network @@ -35,6 +35,10 @@ ea8500) ucidef_set_interface_macaddr "lan" "$hw_mac_addr" ucidef_set_interface_macaddr "wan" "$hw_mac_addr" ;; +nbg6817) + ucidef_add_switch "switch0" \ + "1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0" + ;; *) echo "Unsupported hardware. Network interfaces not intialized" ;; diff --git a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index c7977e6..0a9004f 100644 --- a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -60,6 +60,9 @@ case "$FIRMWARE" in r7800) ath10kcal_extract "art" 4096 12064 ;; + nbg6817) + ath10kcal_extract "0:ART" 4096 12064 + ;; esac ;; "ath10k/cal-pci-0001:01:00.0.bin") @@ -76,6 +79,9 @@ case "$FIRMWARE" in r7800) ath10kcal_extract "art" 20480 12064 ;; + nbg6817) + ath10kcal_extract "0:ART" 20480 12064 + ;; esac ;; *) diff --git a/target/linux/ipq806x/base-files/lib/ipq806x.sh b/target/linux/ipq806x/base-files/lib/ipq806x.sh index ea45381..8f3718c 100644 --- a/target/linux/ipq806x/base-files/lib/ipq806x.sh +++ b/target/linux/ipq806x/base-files/lib/ipq806x.sh @@ -38,6 +38,9 @@ ipq806x_board_detect() { *"R7800") name="r7800" ;; + *"NBG6817") + name="nbg6817" + ;; esac [ -z "$name" ] && name="unknown" diff --git a/target/linux/ipq806x/base-files/lib/preinit/04_set_mtd_ipq806x.sh b/target/linux/ipq806x/base-files/lib/preinit/04_set_mtd_ipq806x.sh new file mode 100644 index 000..024cd81 --- /dev/null +++ b/target/linux/ipq806x/base-files/lib/preinit/04_set_mtd_ipq806x.sh @@ -0,0 +1,21 @@ +# +# Copyright (C) 2009 OpenWrt.org +# + +. /lib/ipq806x.sh +. /lib/functions/system.sh + +preinit_assign_mtd2block() { + case $(ipq806x_board_name) in + nbg6817) + echo "/dev/mmcblk0p2,64KiB,romd" > /sys/module/block2mtd/parameters/block2mtd + echo "/dev/mmcblk0p3,64KiB,header" > /sys/module/block2mtd/parameters/block2mtd + echo "/dev/mmcblk0p4,64KiB,kernel" > /sys/module/block2mtd/parameters/block2mtd + echo "/dev/mmcblk0p
[LEDE-DEV] [RFC] [PATCH] ipq806x: add support for ZyXEL NBG6817
Hi! Please notice that I had to enable sdcard support in the target. I also tried sevaral solutions to integrate the mmc storage into lede. block2mtd seems to be an easy and stable solution. Comments are apreciated. Thanks, André smime.p7s Description: S/MIME Cryptographic Signature ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH] ipq806x: add support for ZyXEL NBG6817
CPU: 1.8GHz ARM, RAM: 512MB Storage: 4MiB Serial Flash, 3.9GiB MMC NIC: 2x1GBit/s, 5 external and 2 internal Port Switch WiFi: Dualband, ATH10k 2.4GHz, 5GHz MU-MIMO Signed-off-by: André Valentin --- .../linux/ipq806x/base-files/etc/board.d/01_leds | 5 + .../ipq806x/base-files/etc/board.d/02_network | 4 + .../etc/hotplug.d/firmware/11-ath10k-caldata | 6 + target/linux/ipq806x/base-files/lib/ipq806x.sh | 3 + .../base-files/lib/preinit/04_set_mtd_ipq806x.sh | 21 ++ .../lib/preinit/05_set_iface_mac_ipq806x.sh| 21 ++ .../ipq806x/base-files/lib/upgrade/platform.sh | 2 + target/linux/ipq806x/config-4.4| 18 +- .../arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts | 338 + target/linux/ipq806x/image/Makefile| 26 +- .../linux/ipq806x/patches-4.4/800-devicetree.patch | 3 +- .../patches-4.4/999-add-spi-nor-mx25u3235f.patch | 10 + 12 files changed, 449 insertions(+), 8 deletions(-) create mode 100644 target/linux/ipq806x/base-files/lib/preinit/04_set_mtd_ipq806x.sh create mode 100644 target/linux/ipq806x/base-files/lib/preinit/05_set_iface_mac_ipq806x.sh create mode 100644 target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts create mode 100644 target/linux/ipq806x/patches-4.4/999-add-spi-nor-mx25u3235f.patch diff --git a/target/linux/ipq806x/base-files/etc/board.d/01_leds b/target/linux/ipq806x/base-files/etc/board.d/01_leds index a7ace1f..33774e8 100755 --- a/target/linux/ipq806x/base-files/etc/board.d/01_leds +++ b/target/linux/ipq806x/base-files/etc/board.d/01_leds @@ -33,6 +33,11 @@ ea8500) ucidef_set_led_wlan "wifi" "WIFI" "ea8500:green:wifi" "phy0radio" ucidef_set_led_default "wps" "WPS" "ea8500:green:wps" "0" ;; +nbg6817) + ucidef_set_led_wlan "wifi" "WIFI" "${board}:white:wifi" "phy0radio" + ucidef_set_led_wlan "wifi5g" "WIFI5G" "${board}:white:wifi5g" "phy1radio" + ucidef_set_led_netdev "wan" "WAN" "${board}:white:internet" "eth0" + ;; *) ;; esac diff --git a/target/linux/ipq806x/base-files/etc/board.d/02_network b/target/linux/ipq806x/base-files/etc/board.d/02_network index b720455..9168ae7 100755 --- a/target/linux/ipq806x/base-files/etc/board.d/02_network +++ b/target/linux/ipq806x/base-files/etc/board.d/02_network @@ -35,6 +35,10 @@ ea8500) ucidef_set_interface_macaddr "lan" "$hw_mac_addr" ucidef_set_interface_macaddr "wan" "$hw_mac_addr" ;; +nbg6817) + ucidef_add_switch "switch0" \ + "1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0" + ;; *) echo "Unsupported hardware. Network interfaces not intialized" ;; diff --git a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index c7977e6..0a9004f 100644 --- a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -60,6 +60,9 @@ case "$FIRMWARE" in r7800) ath10kcal_extract "art" 4096 12064 ;; + nbg6817) + ath10kcal_extract "0:ART" 4096 12064 + ;; esac ;; "ath10k/cal-pci-0001:01:00.0.bin") @@ -76,6 +79,9 @@ case "$FIRMWARE" in r7800) ath10kcal_extract "art" 20480 12064 ;; + nbg6817) + ath10kcal_extract "0:ART" 20480 12064 + ;; esac ;; *) diff --git a/target/linux/ipq806x/base-files/lib/ipq806x.sh b/target/linux/ipq806x/base-files/lib/ipq806x.sh index ea45381..8f3718c 100644 --- a/target/linux/ipq806x/base-files/lib/ipq806x.sh +++ b/target/linux/ipq806x/base-files/lib/ipq806x.sh @@ -38,6 +38,9 @@ ipq806x_board_detect() { *"R7800") name="r7800" ;; + *"NBG6817") + name="nbg6817" + ;; esac [ -z "$name" ] && name="unknown" diff --git a/target/linux/ipq806x/base-files/lib/preinit/04_set_mtd_ipq806x.sh b/target/linux/ipq806x/base-files/lib/preinit/04_set_mtd_ipq806x.sh new file mode 100644 index 000..024cd81 --- /dev/null +++ b/target/linux/ipq806x/base-files/lib/preinit/04_set_mtd_ipq806x.sh @@ -0,0 +1,21 @@ +# +# Copyright (C) 2009 OpenWrt.org +# + +. /lib/ipq806x.sh +. /lib/functions/system.sh + +preinit_assign_mtd2block() { + case $(ipq806x_board_name) in + nbg6817) + echo "/dev/mmcblk0p2,64KiB,romd" > /sys/module/block2mtd/parameters/block2mtd + echo "/dev/mmcblk0p3,64KiB,header" > /sys/module/block2mtd/parameters/block2mtd + echo "/dev/mmcblk0p4,64KiB,kernel" > /sys/module/block2mtd/parameters/block2mtd + echo "/dev/mmcblk0p6,64KiB,header_1" > /sys/module/block2mtd/parameters/block2mtd +
Re: [LEDE-DEV] [PATCH]fstools: added xfs and f2fs to block-mount
On 17/10/2016 17:37, Alberto Bursi wrote: > > > On 10/17/2016 04:31 PM, John Crispin wrote: >>> I'm going to add xfs support to other fstools components in a following >>> patch. >> >> please explain what this would consist of. i was about to merge your >> patch but your comments make me think it is incomplete. >> > > Sorry for the confusion. > > This patch allows block-mount to mount xfs and f2fs on boot, I tested > the patch and it works on my tp-link test router. > > But afterwards I searched for similar checks for code in the same > package/source folder, and yes, in fstools there are more > filesystem-specific checks and operations. > Code for f2fs is already there, but code for xfs is not. > > I didn't yet have the time to look more closely what that does exactly. > > A list of files that must be changed to add xfs: > > /mount_root.c there are filesystem type checks > > /libfstools/find.c line 88 there is a filesystem type check. > > /libfstools/libfstools.h line 25 there is a list of filesystem-specific > variables > > /libfstools/overlay.c line 198, another filesystem type check > > /libfstools/rootdisk.c line 264, there is code to automatically format > the overlay as either f2fs or ext4 if it isn't formatted correctly. > > So while with my patch block mount will work with both f2fs and xfs, > some other operations I didn't know about are not going to work on xfs. ok, please resend the whole patch once xfs support has been properly added to fstools. this current "some works some may not" sounds quirky. lets just drop the patch until; you had time to fully verify and add the missing pieces. thanks for the explaination. John ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH]fstools: added xfs and f2fs to block-mount
On 10/17/2016 04:31 PM, John Crispin wrote: >> I'm going to add xfs support to other fstools components in a following >> patch. > > please explain what this would consist of. i was about to merge your > patch but your comments make me think it is incomplete. > Sorry for the confusion. This patch allows block-mount to mount xfs and f2fs on boot, I tested the patch and it works on my tp-link test router. But afterwards I searched for similar checks for code in the same package/source folder, and yes, in fstools there are more filesystem-specific checks and operations. Code for f2fs is already there, but code for xfs is not. I didn't yet have the time to look more closely what that does exactly. A list of files that must be changed to add xfs: /mount_root.c there are filesystem type checks /libfstools/find.c line 88 there is a filesystem type check. /libfstools/libfstools.h line 25 there is a list of filesystem-specific variables /libfstools/overlay.c line 198, another filesystem type check /libfstools/rootdisk.c line 264, there is code to automatically format the overlay as either f2fs or ext4 if it isn't formatted correctly. So while with my patch block mount will work with both f2fs and xfs, some other operations I didn't know about are not going to work on xfs. -Alberto ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH]fstools: added xfs and f2fs to block-mount
On 16/10/2016 16:23, Alberto Bursi wrote: > Damn, while this patch adds only partial xfs support to fstools (it > allows to mount xfs by block mount). > why only partial ? > Most of fstools have code to use f2fs too already so the fact that block > mount couldn't mount f2fs is 100% a bug and this patch fixes that. it is not a bug but a missing feature. a bug is if a piece of code is incorrect. if a piece of code was never implemented then we call it missing feature. > I'm going to add xfs support to other fstools components in a following > patch. please explain what this would consist of. i was about to merge your patch but your comments make me think it is incomplete. John > -Alberto > > On 10/15/2016 07:25 PM, Alberto Bursi wrote: >> added the code to recognize the filesystem checkers for xfs and f2fs >> added xfs and f2fs to the filesystem whitelist of block. >> >> Signed-off-by: Alberto Bursi >> - >> >> --- fstools/block.c 2016-10-15 19:15:31.916714011 +0200 >> +++ fstools/block.c 2016-10-15 19:22:44.164702448 +0200 >> @@ -702,6 +702,8 @@ static void check_filesystem(struct blki >> { >> pid_t pid; >> struct stat statbuf; >> +const char *xfsck = "/sbin/xfs_repair"; >> +const char *f2fsck = "/usr/sbin/fsck.f2fs"; >> const char *e2fsck = "/usr/sbin/e2fsck"; >> const char *dosfsck = "/usr/sbin/dosfsck"; >> const char *ckfs; >> @@ -712,6 +714,10 @@ static void check_filesystem(struct blki >> >> if (!strncmp(pr->id->name, "vfat", 4)) { >> ckfs = dosfsck; >> +} else if (!strncmp(pr->id->name, "f2fs", 4)) { >> +ckfs = f2fsck; >> +} else if (!strncmp(pr->id->name, "xfs", 3)) { >> +ckfs = xfsck; >> } else if (!strncmp(pr->id->name, "ext", 3)) { >> ckfs = e2fsck; >> } else { >> @@ -1170,8 +1176,10 @@ static int mount_extroot(char *cfg) >> } >> if (pr) { >> if (strncmp(pr->id->name, "ext", 3) && >> -strncmp(pr->id->name, "ubifs", 5)) { >> -ULOG_ERR("extroot: unsupported filesystem %s, try >> ext4\n", >> pr->id->name); >> +strncmp(pr->id->name, "xfs", 3) && >> +strncmp(pr->id->name, "f2fs", 4) && >> +strncmp(pr->id->name, "ubifs", 5)) { >> +ULOG_ERR("extroot: unsupported filesystem %s, try ext4, >> xfs, f2fs, ubifs\n", pr->id->name); >> return -1; >> } >> >> ___ >> Lede-dev mailing list >> Lede-dev@lists.infradead.org >> http://lists.infradead.org/mailman/listinfo/lede-dev >> > > ___ > Lede-dev mailing list > Lede-dev@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/lede-dev > ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH v3 2/4] base-files, mac80211, broadcom-wl: use uci to populate wireless config
Previously, wifi detect simply dumped its generated wireless configuration to STDOUT. A second step was needed to append the configuration to /etc/config/wireless (or create it, if it didn't exist). With this patch, The wifi detection script will now use uci to update the wireless configuration directly. This patch also makes the initially created wifi-iface a named section ('default_radio$X' for mac80211 and 'default_wl$X' for broadcom). With this change, uci will not print the cfgHASH to STDOUT (which would now corrupt the wireless configuration). It will also prevent adding duplicated wifi interface configurations, if the wifi configuration is run concurrently. Signed-off-by: Christian Lamparter --- All changes to base-files, mac80211 and broadcom-wl packages have been integrated into a single patch to play nice with git bisect. v2 -> v3 - used another method to add a new wifi-iface instance, that doesn't produce any stray messages or duplicated wifi-iface configs. - uci should only commit wireless changes. - merged mac80211 and broadcom-wl changes to make the patch bisectalbe. --- package/base-files/files/etc/init.d/boot | 6 +-- .../kernel/broadcom-wl/files/lib/wifi/broadcom.sh | 30 +++ package/kernel/mac80211/files/lib/wifi/mac80211.sh | 43 +++--- 3 files changed, 37 insertions(+), 42 deletions(-) diff --git a/package/base-files/files/etc/init.d/boot b/package/base-files/files/etc/init.d/boot index 904f7db..03b0fa0 100755 --- a/package/base-files/files/etc/init.d/boot +++ b/package/base-files/files/etc/init.d/boot @@ -41,11 +41,7 @@ boot() { # allow wifi modules time to settle sleep 1 - /sbin/wifi detect > /tmp/wireless.tmp - [ -s /tmp/wireless.tmp ] && { - cat /tmp/wireless.tmp >> /etc/config/wireless - } - rm -f /tmp/wireless.tmp + /sbin/wifi detect /bin/config_generate uci_apply_defaults diff --git a/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh b/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh index deb4ddf..2780fa1 100644 --- a/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh +++ b/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh @@ -456,22 +456,22 @@ detect_broadcom() { config_get type wl${i} type [ "$type" = broadcom ] && continue channel=`wlc ifname wl${i} channel` - cat
[LEDE-DEV] [PATCH v3 1/4] base-files: generate /etc/config/wireless, if it doesn't exist
From: Mathias Kresin This patch adds a check in "wifi detect" to test if the wireless configuration file does exist. If it doesn't exist, an empty /etc/config/wireless file will be created. This is necessary because uci doesn't create new files, instead the tool just exits with "uci: Entry not found". Signed-off-by: Mathias Kresin Signed-off-by: Christian Lamparter --- package/base-files/files/sbin/wifi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/base-files/files/sbin/wifi b/package/base-files/files/sbin/wifi index 6bd3544..2ef333a 100755 --- a/package/base-files/files/sbin/wifi +++ b/package/base-files/files/sbin/wifi @@ -146,6 +146,8 @@ wifi_reload() { } wifi_detect() { + [ ! -f /etc/config/wireless ] && touch /etc/config/wireless + for driver in $DRIVERS; do ( if eval "type detect_$driver" 2>/dev/null >/dev/null; then eval "detect_$driver" || echo "$driver: Detect failed" >&2 -- 2.9.3 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH v3 4/4] mac80211: remove ath10k delayed initialization hack
From: Mathias Kresin LEDE no longer requires all PHYs to be initialized to create the configuration files during bootup. This patch removes the now obsolete ath10k patch. Signed-off-by: Mathias Kresin Signed-off-by: Christian Lamparter --- .../921-ath10k_init_devices_synchronously.patch| 33 -- 1 file changed, 33 deletions(-) delete mode 100644 package/kernel/mac80211/patches/921-ath10k_init_devices_synchronously.patch diff --git a/package/kernel/mac80211/patches/921-ath10k_init_devices_synchronously.patch b/package/kernel/mac80211/patches/921-ath10k_init_devices_synchronously.patch deleted file mode 100644 index e417eb8..000 --- a/package/kernel/mac80211/patches/921-ath10k_init_devices_synchronously.patch +++ /dev/null @@ -1,33 +0,0 @@ -From: Sven Eckelmann -Date: Tue, 18 Nov 2014 12:29:28 +0100 -Subject: [PATCH] ath10k: Don't initialize devices asynchronously - -OpenWrt requires all PHYs to be initialized to create the configuration files -during bootup. ath10k violates this because it delays the creation of the PHY -to a not well defined point in the future. - -Forcing the work to be done immediately works around this problem but may also -delay the boot when firmware images cannot be found. - -Signed-off-by: Sven Eckelmann - a/drivers/net/wireless/ath/ath10k/core.c -+++ b/drivers/net/wireless/ath/ath10k/core.c -@@ -2220,6 +2220,16 @@ int ath10k_core_register(struct ath10k * - ar->chip_id = chip_id; - queue_work(ar->workqueue, &ar->register_work); - -+ /* OpenWrt requires all PHYs to be initialized to create the -+ * configuration files during bootup. ath10k violates this -+ * because it delays the creation of the PHY to a not well defined -+ * point in the future. -+ * -+ * Forcing the work to be done immediately works around this problem -+ * but may also delay the boot when firmware images cannot be found. -+ */ -+ flush_workqueue(ar->workqueue); -+ - return 0; - } - EXPORT_SYMBOL(ath10k_core_register); -- 2.9.3 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH] docs: update uci's wireless reconfiguration text
"wifi detect" has been replaced by "wifi config". It no longer needs the file redirection to /etc/config/wireless. It also removes the half sentence about rebuilding the configuration when installing a new device. I think it is bad advice to nuke the entire existing configuration just to add a new wifi device. Signed-off-by: Christian Lamparter --- docs/uci_wireless.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/uci_wireless.txt b/docs/uci_wireless.txt index d43df0e..76bb459 100644 --- a/docs/uci_wireless.txt +++ b/docs/uci_wireless.txt @@ -333,11 +333,11 @@ Wireless interfaces are brought up and down with the 'wifi' command. To (re)star == Regenerate Configuration -To rebuild the configuration file, e.g. after installing a new wireless driver, remove the existing wireless configuration (if any) and use the 'wifi detect' command with stdout redirected to the '/etc/config/wireless' file: +To rebuild the configuration file, remove the existing wireless configuration (if any) and use the 'wifi config' command: rm -f /etc/config/wireless -wifi detect > /etc/config/wireless +wifi config == 40 MHz channel width (up to 300 Mbps) for 802.11n devices ONLY -- 2.9.3 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH v3 3/4] base-files, mac80211, broadcom-wl: wifi detection and configuration
Currently, the wifi detection script is executed as part of the (early) boot process. Pluggable wifi USB devices, which are inserted at a later time are not automatically detected and therefore they don't show up in LuCI. A user has to deal with wifi detection manually, or restart the router. However, the current "sleep 1" window - which the boot process waits for wifi devices to "settle down" - is too short to detect wifi devices for some routers anyway. For example, this can happen with USB WLAN devices on the WNDR4700. This is because the usb controller needs to load its firmware from UBI and initialize, before it can operate. The issue can be seen on a BT HomeHub 5A as well as soon as the caldata are on an ubi volume. This is because the ath9k card has to be initialized by owl-loader first. Which has to wait for the firmware extraction script to retrieve the pci initialization values inside the caldata. This patch moves the wifi configuration to hotplug scripts. For mac80211, the wifi configuration will now automatically run any time a "ieee80211" device is added. Likewise broadcom-wl's script checks for new "net" devices which have the "wl$NUMBER" moniker. Issues with spawning multiple interface configuration - in case the detection script is run concurrently - have been resolved by using a named section for the initial configuration. Concurrent configuration scripts will now simply overwrite the same existing configuration. A workaround which preserves the "sleep 1" window for just the first boot has been added. This allows the existing brcm47xx boot and mvebu uci-default scripts to correctly setup the initial mac addresses and regulatory domain. And finally, the patch renames the "wifi detect" into "wifi config". As the script no longer produces any output that has to be redirected or appended to the configuration file. Thanks to Martin Blumenstingl for helping with the implementation and testing of the patch. Acked-by: Jo-Philipp Wich Signed-off-by: Mathias Kresin Signed-off-by: Christian Lamparter --- All changes to base-files, mac80211 and broadcom-wl packages have been integrated into a single patch to play nice with git bisect. v1 -> v2: - filter for broadcom devices (Mathias) - integrate uci changes (no more /tmp/wireless.tmp) - move locking to detect_mac80211 and detect_broadcom v2 -> v3: - used another method to add a new wifi-iface instance, that doesn't need any additional locking. - renamed "wifi detect" into "wifi config". The documentation (uci_wireless.html) is updated in a separate patch to web.git. - wait on first boot for the wireless configuration to be in place for brcm47xx and mvebu. --- package/base-files/files/etc/init.d/boot | 8 package/base-files/files/sbin/wifi| 4 ++-- .../broadcom-wl/files/etc/hotplug.d/net/00-broadcom-wifi-detect | 5 + package/kernel/mac80211/Makefile | 2 ++ package/kernel/mac80211/files/mac80211.hotplug| 5 + 5 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 package/kernel/broadcom-wl/files/etc/hotplug.d/net/00-broadcom-wifi-detect create mode 100644 package/kernel/mac80211/files/mac80211.hotplug diff --git a/package/base-files/files/etc/init.d/boot b/package/base-files/files/etc/init.d/boot index 03b0fa0..31f245f 100755 --- a/package/base-files/files/etc/init.d/boot +++ b/package/base-files/files/etc/init.d/boot @@ -38,10 +38,10 @@ boot() { /sbin/kmodloader - # allow wifi modules time to settle - sleep 1 - - /sbin/wifi detect + [ ! -f /etc/config/wireless ] && { + # compat for brcm47xx and mvebu + sleep 1 + } /bin/config_generate uci_apply_defaults diff --git a/package/base-files/files/sbin/wifi b/package/base-files/files/sbin/wifi index 2ef333a..c41058f 100755 --- a/package/base-files/files/sbin/wifi +++ b/package/base-files/files/sbin/wifi @@ -145,7 +145,7 @@ wifi_reload() { wifi_reload_legacy } -wifi_detect() { +wifi_config() { [ ! -f /etc/config/wireless ] && touch /etc/config/wireless for driver in $DRIVERS; do ( @@ -229,7 +229,7 @@ scan_wifi case "$1" in down) wifi_updown "disable" "$2";; - detect) wifi_detect ;; + config) wifi_config ;; status) ubus_wifi_cmd "status" "$2";; reload) wifi_reload "$2";; reload_legacy) wifi_reload_legacy "$2";; diff --git a/package/kernel/broadcom-wl/files/etc/hotplug.d/net/00-broadcom-wifi-detect b/package/kernel/broadcom-wl/files/etc/hotplug.d/net/00-broadcom-wifi-detect new file mode 100644 index 000..ba011dc --- /dev/null +++ b/package/kernel/broadcom-wl/files/etc/hotplug.d/net/00-broadcom-wifi-detect @@ -0,0 +1,5 @@ +#!/bin/sh + +[ "${ACTION}" = "add" ] && [ "${INTERFACE%%[0-9]}" = "wl" ]
Re: [LEDE-DEV] Out of tree builds
The scripts/env script is intended to help with this. See https://wiki.openwrt.org/doc/devel/env ./scripts/env new my-target-a make menuconfig/whatever make ./scripts/env new my-target-b make menuconfig/whatever make ./scripts/env switch my-target-a -- back to target a configs now (There might be other, less well documented paths) Sincerely, Karl P David Woodhouse wrote: > Is there a simple trick I'm missing, to build for multiple > targets from the same build tree? > > I'm mostly just manually copying my .config file out of the way > and swapping it for a different one each time — but there's got > to be a better way, surely? > > mv .config .config.wndr3800 > mv .config.tdw8970 .config > make -j32 oldconfig world > > -- > dwmw2 > > > ___ > Lede-dev mailing list > Lede-dev@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/lede-dev signature.asc Description: OpenPGP Digital Signature ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH] kernel: update kernel 4.4 to version 4.4.25
Refresh patches for all targets that support kernel 4.4. compile/run-tested on cns3xxx & imx6. Signed-off-by: Koen Vandeputte --- include/kernel-version.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 5b26cce..2452f6d 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -4,11 +4,11 @@ LINUX_RELEASE?=1 LINUX_VERSION-3.18 = .29 LINUX_VERSION-4.1 = .20 -LINUX_VERSION-4.4 = .24 +LINUX_VERSION-4.4 = .25 LINUX_KERNEL_MD5SUM-3.18.29 = b25737a0bc98e80d12200de93f239c28 LINUX_KERNEL_MD5SUM-4.1.20 = 075c38a3a23ca5bc80437b13606df00a -LINUX_KERNEL_MD5SUM-4.4.24 = 74f1dcafacf29900fecc9c61318269f8 +LINUX_KERNEL_MD5SUM-4.4.25 = 14f7ff09d79088d82685463a70d66464 ifdef KERNEL_PATCHVER LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER))) -- 2.7.4 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH V2 2/3] switch to the new usbport LED trigger
2016-10-17 12:10 GMT+02:00 Rafal Milecki : > On 10/16/2016 03:12 PM, Mathias Kresin wrote: >> >> 13.10.2016 09:44, Rafał Miłecki: >>> >>> diff --git a/package/base-files/files/etc/init.d/led >>> b/package/base-files/files/etc/init.d/led >>> index 79f2904..507dcbf 100755 >>> --- a/package/base-files/files/etc/init.d/led >>> +++ b/package/base-files/files/etc/init.d/led >>> @@ -47,6 +47,8 @@ load_led() { >>> echo 0 >/sys/class/leds/${sysfs}/brightness >>> >>> echo $trigger > /sys/class/leds/${sysfs}/trigger 2> /dev/null >>> +# Backward compatibility >>> +[ $trigger = "usbdev" ] && echo usbport > >>> /sys/class/leds/${sysfs}/trigger 2> /dev/null >>> ret="$?" >>> >>> [ $default = 1 ] && >>> @@ -72,9 +74,14 @@ load_led() { >>> ;; >>> >>> "usbdev") >>> -[ -n "$dev" ] && { >>> -echo $dev > /sys/class/leds/${sysfs}/device_name >>> -echo $interval > >>> /sys/class/leds/${sysfs}/activity_interval >>> +local usbport >>> + >>> +# Translate USB dev/port format of the old usbdev trigger >>> +usbport=$(echo "$dev" | sed -n >>> 's/^\([0-9]*\)-\([0-9]*\)$/usb\1-port\2/p') >>> +[ -z "$usbport" ] && usbport=$(echo "$dev" | sed -n >>> 's/\./-port/p') >> >> >> I'm not sure if I got the purpose of this sed call correctly. As far as I >> can see, it should fixup usb ports defined as "usb1.1". Via a quick grep I >> couldn't find anything like that used. > > > This second sed call is needed for ports of (internal) hubs. If you grep > targets > for ucidef_set_led_usbdev you can find e.g. > ucidef_set_led_usbdev "usb" "USB" "arduino:white:usb" "1-1.1" > ucidef_set_led_usbdev "usb1" "USB1" "tp-link:green:usb1" "1-1.1" > ucidef_set_led_usbdev "usb2" "USB2" "tp-link:green:usb2" "1-1.2" > > So e.g. 2-1 has to be translated into usb2-port1 > While 1-1.1 has to be translated into 1-1-port1 Thanks for the explanation. > > This is what I meant when I wrote: >> Now after coming back home I also tried it with extra hub and: >> ucidef_set_led_usbdev "foo" "FOO" "bcm53xx:red:wan" "2-2.4" > > >> I rather would suggest to add a line which allows to use the new syntax >> instead: >> >> [ -z "$usbport" ] && usbport="${dev}" > > > For using new trigger and its syntax directly, I mean to add a new call like > ucidef_set_led_usbport. It should also support specifying more than 1 USB > port. > You can find my initial work on it in: > https://patchwork.ozlabs.org/patch/678014/ Ah okay. I was fooled by the fact that you old patch is marked as superseded in patchwork. I was the opinion that this patch is the one that supersedes the old one. Personally, I prefer to keep ucidef_set_led_usbdev() and to add the suggested changes. This way we don't need to touch all the board.d/leds files, possibly existing documentation remains valid and boards added in custom trees doesn't need an update as well. It would be possible to add a ucidef_set_led_usbport() function without removing ucidef_set_led_usbdev() to workaround this. But I'm not that addicted of having two function doing basically the same. But I guess it's just a matter of taste. Mathias ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH] Add support for Comfast E380AC v1 and v2
The Comfast E380AC is a single port PoE Dual Band AP. There are two versions which are only identifiable through the web administration interface, v1 has 128mb ram and a uboot size of 128k, v2 has 256mb ram and a uboot size of 256k, the remaining hardware and PCB markings are the same. The factory firmware is built on openwrt and will accept a sysupgrade file, this patch produces two sysupgrade files for both versions. Signed-off-by: Gareth Parker --- target/linux/ar71xx/base-files/etc/diag.sh |4 + .../etc/hotplug.d/firmware/11-ath10k-caldata |5 + target/linux/ar71xx/base-files/lib/ar71xx.sh |6 + .../ar71xx/base-files/lib/upgrade/platform.sh | 12 ++ target/linux/ar71xx/config-4.4 |1 + .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt | 10 + target/linux/ar71xx/files/arch/mips/ath79/Makefile |1 + .../ar71xx/files/arch/mips/ath79/mach-cf-e380ac.c | 197 .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |2 + target/linux/ar71xx/image/generic.mk | 18 ++ 10 files changed, 256 insertions(+) create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-cf-e380ac.c diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index d6e257d..c8e6b48 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -82,6 +82,10 @@ get_status_led() { cf-e316n-v2) status_led="$board:blue:wan" ;; + cf-e380ac-v1|\ + cf-e380ac-v2) + status_led="cfe380ac:green" + ;; cpe510) status_led="tp-link:green:link4" ;; diff --git a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 0e93feb..7598a83 100644 --- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -47,6 +47,11 @@ board=$(ar71xx_board_name) case "$FIRMWARE" in "ath10k/cal-pci-:00:00.0.bin") case $board in + cf-e380ac-v1 | \ + cf-e380ac-v2) + ath10kcal_extract "art" 20480 2116 + ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +3) + ;; dlan-pro-1200-ac) ath10kcal_extract "art" 20480 2116 ;; diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index dae6fb2..fb017f5 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -488,6 +488,12 @@ ar71xx_board_detect() { *"COMFAST CF-E316N v2") name="cf-e316n-v2" ;; + *"COMFAST CF-E380AC-V1") + name="cf-e380ac-v1" + ;; + *"COMFAST CF-E380AC-V2") + name="cf-e380ac-v2" + ;; *"CPE210/220") name="cpe210" tplink_pharos_board_detect diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 559f97d..2463587 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -495,6 +495,16 @@ platform_check_image() { alfa_check_image "$1" && return 0 return 1 ;; + + cf-e380ac-v1|\ + cf-e380ac-v2) + [ "$magic_long" != "27051956" ] && { + echo "Invalid image type." + return 1 + } + return 0 + ;; + wndr3700|\ wnr1000-v2|\ wnr2000-v3|\ @@ -597,6 +607,8 @@ platform_do_upgrade() { om5p) platform_do_upgrade_openmesh "$ARGV" ;; + cf-e380ac-v1|\ + cf-e380ac-v2|\ uap-pro|\ unifi-outdoor-plus) MTD_CONFIG_ARGS="-s 0x18" diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4 index 7aeac89..9232c4c 100644 --- a/target/linux/ar71xx/config-4.4 +++ b/target/linux/ar71xx/config-4.4 @@ -60,6 +60,7 @@ CONFIG_ATH79_MACH_CAP324=y CONFIG_ATH79_MACH_CAP4200AG=y CONFIG_ATH79_MACH_CARAMBOLA2=y CONFIG_ATH79_MACH_CF_E316N_V2=y +CONFIG_ATH79_MACH_CF_E380AC=y CONFIG_ATH79_MACH_CPE510=y CONFIG_ATH79_MACH_CR3000=y CONFIG_ATH79_MACH_CR5000=y diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt index 4cefde1..340d6f3 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt +++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt @@ -1623,6 +1623,16 @@ config ATH79_MACH_CF_E316N_V2 select ATH79_DEV_USB select ATH79_
Re: [LEDE-DEV] [PATCH V2 2/3] switch to the new usbport LED trigger
On 10/16/2016 03:12 PM, Mathias Kresin wrote: 13.10.2016 09:44, Rafał Miłecki: diff --git a/package/base-files/files/etc/init.d/led b/package/base-files/files/etc/init.d/led index 79f2904..507dcbf 100755 --- a/package/base-files/files/etc/init.d/led +++ b/package/base-files/files/etc/init.d/led @@ -47,6 +47,8 @@ load_led() { echo 0 >/sys/class/leds/${sysfs}/brightness echo $trigger > /sys/class/leds/${sysfs}/trigger 2> /dev/null +# Backward compatibility +[ $trigger = "usbdev" ] && echo usbport > /sys/class/leds/${sysfs}/trigger 2> /dev/null ret="$?" [ $default = 1 ] && @@ -72,9 +74,14 @@ load_led() { ;; "usbdev") -[ -n "$dev" ] && { -echo $dev > /sys/class/leds/${sysfs}/device_name -echo $interval > /sys/class/leds/${sysfs}/activity_interval +local usbport + +# Translate USB dev/port format of the old usbdev trigger +usbport=$(echo "$dev" | sed -n 's/^\([0-9]*\)-\([0-9]*\)$/usb\1-port\2/p') +[ -z "$usbport" ] && usbport=$(echo "$dev" | sed -n 's/\./-port/p') I'm not sure if I got the purpose of this sed call correctly. As far as I can see, it should fixup usb ports defined as "usb1.1". Via a quick grep I couldn't find anything like that used. This second sed call is needed for ports of (internal) hubs. If you grep targets for ucidef_set_led_usbdev you can find e.g. ucidef_set_led_usbdev "usb" "USB" "arduino:white:usb" "1-1.1" ucidef_set_led_usbdev "usb1" "USB1" "tp-link:green:usb1" "1-1.1" ucidef_set_led_usbdev "usb2" "USB2" "tp-link:green:usb2" "1-1.2" So e.g. 2-1 has to be translated into usb2-port1 While 1-1.1 has to be translated into 1-1-port1 This is what I meant when I wrote: > Now after coming back home I also tried it with extra hub and: > ucidef_set_led_usbdev "foo" "FOO" "bcm53xx:red:wan" "2-2.4" I rather would suggest to add a line which allows to use the new syntax instead: [ -z "$usbport" ] && usbport="${dev}" For using new trigger and its syntax directly, I mean to add a new call like ucidef_set_led_usbport. It should also support specifying more than 1 USB port. You can find my initial work on it in: https://patchwork.ozlabs.org/patch/678014/ + +[ -n "$usbport" ] && { +echo 1 > /sys/class/leds/${sysfs}/ports/$usbport } What about adding something that allows to add all or multiple usb ports (using the new syntax of course) to a single LED (which is thanks to your usbport trigger now possible): [ "$usbport" = "*" ] && usbport=$(ls /sys/class/leds/${sysfs}/ports/) for port in ${usbport}; do echo 1 > "/sys/class/leds/${sysfs}/ports/${port}" done I'm OK with that, it sounds like a good idea! I'd just rather wait for a new call implementation (ucidef_set_led_usbport?) instead adding more features to this old one. If there won't be any complains about this patchset, I'll push it soon and then I'll try to add support for specifying multiple ports. I'd like to see your patch then! ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] replacing files in base system from a package?
On 10/16/2016 01:04 AM, Jo-Philipp Wich wrote: > Hi Karl, > > let me introduce a not strictly new way but another heavily under > documented buildroot feature which you can use to implement custom > modifications to packages which do not require source code edits. > Wow! - this really deserves an easier to find documentation - I was looking for that feature several times but never got to it. We used to have copies of packages for only minor modifications in init or config files. If it works as described, this will reduce a lot of overhead. Thank you, very helpful. ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev