[LEDE-DEV] Build error since ncurses bump
Hi All, Purely informational: There seem to build a build error since commit: (af35ce1065ac "ncurses: Update to 6.1.") 00 -c ../ncurses/lib_gen.c -o ../objects/lib_gen.o In file included from ../ncurses/curses.priv.h:325:0, from ../ncurses/lib_gen.c:20: _10727.c:978:15: error: expected ')' before 'int' ../include/curses.h:1703:56: note: in definition of macro 'mouse_trafo' #define mouse_trafo(y,x,to_screen) wmouse_trafo(stdscr,y,x,to_screen) ^ Makefile:976: recipe for target '../objects/lib_gen.o' failed make[5]: *** [../objects/lib_gen.o] Error 1 make[5]: Leaving directory '/mnt/ramdisk/test/firmware/builds/generic_rocketm/build_dir/hostpkg/ncurses-6.1/ncurses' Makefile:135: recipe for target 'libs' failed make[4]: *** [libs] Error 2 make[4]: Leaving directory '/mnt/ramdisk/test/firmware/builds/generic_rocketm/build_dir/hostpkg/ncurses-6.1' Makefile:169: recipe for target '/mnt/ramdisk/test/firmware/builds/generic_rocketm/build_dir/hostpkg/ncurses-6.1/.built' failed make[3]: *** [/mnt/ramdisk/test/firmware/builds/generic_rocketm/build_dir/hostpkg/ncurses-6.1/.built] Error 2 make[3]: Leaving directory '/mnt/ramdisk/test/firmware/builds/generic_rocketm/package/libs/ncurses' package/Makefile:107: recipe for target 'package/libs/ncurses/host/compile' failed make[2]: *** [package/libs/ncurses/host/compile] Error 2 make[2]: Leaving directory '/mnt/ramdisk/test/firmware/builds/generic_rocketm' package/Makefile:103: recipe for target '/mnt/ramdisk/test/firmware/builds/generic_rocketm/staging_dir/target-mips_24kc_musl/stamp/.package_compile' failed make[1]: *** [/mnt/ramdisk/test/firmware/builds/generic_rocketm/staging_dir/target-mips_24kc_musl/stamp/.package_compile] Error 2 make[1]: Leaving directory '/mnt/ramdisk/test/firmware/builds/generic_rocketm' /mnt/ramdisk/test/firmware/builds/generic_rocketm/include/toplevel.mk:216: recipe for target 'world' failed make: *** [world] Error 2 Tested on 6 different targets. Koen ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH] add RedPine RS9113 module support
RedPine RS9113 wireless module requires rsi91x driver to be built and linux-firmware/rsi/rs9113_wlan_qspi.rps to be installed. Also we add patch for successful compilation of rsi91x driver. Signed-off-by: Evgeniy Didin Cc: Alexey Brodkin Cc: Hauke Mehrtens Cc: John Crispin --- package/firmware/linux-firmware/rsi.mk | 6 ++ package/kernel/mac80211/Makefile | 32 +++ ...kbuild-reported-build-errors-with-CONFIG_PM-off | 105 + 3 files changed, 143 insertions(+) create mode 100644 package/firmware/linux-firmware/rsi.mk create mode 100644 package/kernel/mac80211/patches/970-rsi-fix-kbuild-reported-build-errors-with-CONFIG_PM-off diff --git a/package/firmware/linux-firmware/rsi.mk b/package/firmware/linux-firmware/rsi.mk new file mode 100644 index 00..6d960a24f2 --- /dev/null +++ b/package/firmware/linux-firmware/rsi.mk @@ -0,0 +1,6 @@ +Package/rs9113-firmware = $(call Package/firmware-default,RedPine Signals rs9113 firmware) +define Package/rs9113-firmware/install + $(INSTALL_DIR) $(1)/lib/firmware/rsi + $(INSTALL_DATA) $(PKG_BUILD_DIR)/rsi/rs9113_wlan_qspi.rps $(1)/lib/firmware/rsi +endef +$(eval $(call BuildPackage,rs9113-firmware)) diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile index 22ed841394..73345ef576 100644 --- a/package/kernel/mac80211/Makefile +++ b/package/kernel/mac80211/Makefile @@ -36,6 +36,7 @@ PKG_DRIVERS = \ mt7601u \ mwl8k mwifiex-pcie mwifiex-sdio \ p54-common p54-pci p54-spi p54-usb \ + rsi91x rsi91x-usb rsi91x-sdio\ rt2x00-lib rt2x00-pci rt2x00-usb \ rt2400-pci rt2500-pci rt2500-usb \ rt2800-lib rt2800-mmio rt2800-pci rt2800-soc rt2800-usb \ @@ -1169,6 +1170,31 @@ define KernelPackage/p54-spi AUTOLOAD:=$(call AutoProbe,p54spi) endef +define KernelPackage/rsi91x + $(call KernelPackage/mac80211/Default) + TITLE:=Redpine Signals Inc 91x WLAN driver support + DEPENDS+= +kmod-mac80211 +rs9113-firmware + FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rsi/rsi_91x.ko +endef + +define KernelPackage/rsi91x-usb + $(call KernelPackage/mac80211/Default) + TITLE:=Redpine Signals USB bus support + DEPENDS+= +kmod-mac80211 +kmod-usb2 +kmod-rsi91x +rs9113-firmware + FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rsi/rsi_usb.ko + AUTOLOAD:=$(call AutoProbe,rsi_usb) +endef + +define KernelPackage/rsi91x-sdio + $(call KernelPackage/mac80211/Default) + TITLE:=Redpine Signals SDIO bus support + DEPENDS+= +kmod-mac80211 +kmod-mmc +kmod-rsi91x +rs9113-firmware + FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rsi/rsi_sdio.ko + AUTOLOAD:=$(call AutoProbe,rsi_sdio) +endef + + + define KernelPackage/rt2x00/Default $(call KernelPackage/mac80211/Default) TITLE:=Ralink Drivers for RT2x00 cards @@ -1691,6 +1717,9 @@ config-$(call config_package,wl12xx) += WL12XX config-$(call config_package,wl18xx) += WL18XX config-y += WL_TI WILINK_PLATFORM_DATA config-$(call config_package,zd1211rw) += ZD1211RW +config-$(call config_package,rsi91x) += RSI_91X +config-$(call config_package,rsi91x-usb) += RSI_USB +config-$(call config_package,rsi91x-sdio) += RSI_SDIO config-$(call config_package,rtlwifi) += RTL_CARDS RTLWIFI config-$(call config_package,rtlwifi-pci) += RTLWIFI_PCI @@ -1883,6 +1912,9 @@ $(eval $(call KernelPackage,p54-common)) $(eval $(call KernelPackage,p54-pci)) $(eval $(call KernelPackage,p54-usb)) $(eval $(call KernelPackage,p54-spi)) +$(eval $(call KernelPackage,rsi91x)) +$(eval $(call KernelPackage,rsi91x-usb)) +$(eval $(call KernelPackage,rsi91x-sdio)) $(eval $(call KernelPackage,rt2x00-lib)) $(eval $(call KernelPackage,rt2x00-mmio)) $(eval $(call KernelPackage,rt2x00-pci)) diff --git a/package/kernel/mac80211/patches/970-rsi-fix-kbuild-reported-build-errors-with-CONFIG_PM-off b/package/kernel/mac80211/patches/970-rsi-fix-kbuild-reported-build-errors-with-CONFIG_PM-off new file mode 100644 index 00..bf0216e955 --- /dev/null +++ b/package/kernel/mac80211/patches/970-rsi-fix-kbuild-reported-build-errors-with-CONFIG_PM-off @@ -0,0 +1,105 @@ +From e6b3b2ed3d270b3c7080c9cf7d28636dc74b0387 Mon Sep 17 00:00:00 2001 +From: Amitkumar Karwar +Date: Wed, 1 Nov 2017 17:42:45 +0530 +Subject: rsi: fix kbuild reported build errors with CONFIG_PM off + +Some wowlan related code was outside CONFIG_PM flag which caused these +build errors. They are fixed by moving that code under CONFIG_PM flag. + +Reported-by: kbuild test robot +Fixes: ef71ed0608c ("rsi: sdio: Add WOWLAN support for S5 shutdown state") +Fixes: a24e35fcee0 ("rsi: sdio: Add WOWLAN support for S4 hibernate state") +Fixes: e1ced6422a3 ("rsi: sdio: add WOWLAN support for S3 suspend state") +Signed-off-by: Amitkumar Karwar +Signed-off-by: Kalle Valo +--- + drivers/net/wireless/rsi/rsi_91x_mac80211.c | 5 - + drivers/net/wireless/rsi/rsi_91x_mgmt.c | 2 ++ + drivers/net/wireless/rsi/rsi_common.h | 2 ++ + drivers/net/wireless/rsi/rsi_mgm
Re: [LEDE-DEV] Build error since ncurses bump
Hi Koen, please try reverting https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=4fb684a7558ea5c11580378be062f73da07f8479 and see if it fixes the issue. The change was likely not tested on systems with a gcc 5 host compiler. ~ Jo ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] Build error since ncurses bump
On Wed, Apr 4, 2018 at 4:17 AM, Jo-Philipp Wich wrote: > Hi Koen, > > please try reverting > https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=4fb684a7558ea5c11580378be062f73da07f8479 > and see if it fixes the issue. > > The change was likely not tested on systems with a gcc 5 host compiler. Not at all. > ~ Jo > > ___ > 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] Build error since ncurses bump
On 2018-04-04 13:21, Rosen Penev wrote: On Wed, Apr 4, 2018 at 4:17 AM, Jo-Philipp Wich wrote: Hi Koen, please try reverting https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=4fb684a7558ea5c11580378be062f73da07f8479 and see if it fixes the issue. Reverting this one indeed fixes the issue. Thanks again for the very accurate suggestion! The change was likely not tested on systems with a gcc 5 host compiler. Not at all. I can interpret this in 2 ways, which is the correct one? - "You are right, It was indeed not tested" - "That's not true! it was tested". In case it's option 1: Isn't it a bit dangerous to alter specific gcc version stuff without actually _testing_ it on the mentioned compiler? ;-) I'm running Ubuntu 16.04 LTS, like very probably a lot of people do. (which comes with gcc 5.4.0 by default) Thanks, Koen ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] octeontx: ieee80211_tx_status: headroom too small
Hi all, I'm getting problems when using monitor mode on an ath10k radio in a octeontx board. Latest LEDE on Gateworks Newport GW6300 (octeontx) with Compex WLE900VX ath10k radio. Using 4.14.13 mainline OpenWrt kernel The syslog is getting spammed with “ieee80211_tx_status: headroom too small” errors when exists a wireless interface using monitor mode and a station gets connected: Thu Jan 1 00:52:00 1970 kern.err kernel: [ 157.740108] ieee80211_tx_status: headroom too small Thu Jan 1 00:52:01 1970 kern.err kernel: [ 158.764099] ieee80211_tx_status: headroom too small Thu Jan 1 00:52:02 1970 kern.err kernel: [ 159.788129] ieee80211_tx_status: headroom too small These errors are shown using ath10k and ath10k-ct driver versions (currently using ath10k-ct) Steps to reproduce: 1) Create a new monitor wireless interface iw phy phy0 interface add mon0 type monitor ip l set dev mon0 up 2) Connect a client to the access point configured radio Thanks, Enrique Rodriguez ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] Build error since ncurses bump
On Wed, Apr 4, 2018 at 4:57 AM, Koen Vandeputte wrote: > > > On 2018-04-04 13:21, Rosen Penev wrote: >> >> On Wed, Apr 4, 2018 at 4:17 AM, Jo-Philipp Wich wrote: >>> >>> Hi Koen, >>> >>> please try reverting >>> >>> https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=4fb684a7558ea5c11580378be062f73da07f8479 >>> and see if it fixes the issue. > > Reverting this one indeed fixes the issue. > Thanks again for the very accurate suggestion! > > >>> The change was likely not tested on systems with a gcc 5 host compiler. >> >> Not at all. > > I can interpret this in 2 ways, which is the correct one? > > - "You are right, It was indeed not tested" > - "That's not true! it was tested". > > > In case it's option 1: > > Isn't it a bit dangerous to alter specific gcc version stuff without > actually _testing_ it on the mentioned compiler? ;-) > I'm running Ubuntu 16.04 LTS, like very probably a lot of people do. (which > comes with gcc 5.4.0 by default) Hmm? I believe jow is talking about the toolchain. It was switched to default to GCC7 recently. I use Arch Linux > > > Thanks, > > Koen ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] Build error since ncurses bump
Hi, > Hmm? I believe jow is talking about the toolchain. It was switched > to default to GCC7 recently. > > I use Arch Linux parts of ncurses are built on the host (mainly the tic compiler) using the host gcc. Arch linux is a bad reference for testing tools updates as it tends to use software versions not being available on various LTS distributions. ~ Jo ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [OpenWrt-Devel] [PATCH v2] kernel: rtl8366-smi: add Realtek switch management via mii-bus
04.04.2018, 00:22, "Florian Fainelli" : > On 04/03/2018 10:13 AM, Сергей Василюгин wrote: > The switch node should be moved under the mdio controller node below, > parent/child relationships imply the control bus. > Ok > > You should have two entry points for your driver, and have shared code, > one entry point is a gpio/platform_driver and the other one is a > mdio_device/driver. They would both call into the same code that does > the register read/write code, but how they are probed should be different. You are right. But rtl8366_smi is not driver. It's only interface lib for real drivers rtl8366rb, rtl8366s, rtl8367b and rtl8367. --- serge ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH] build: log time taken by each packages/steps
Hi Etienne, On 03/30/2018 09:22 PM, Etienne Champetier wrote: > The idea is to easily get the list of packages taking the most time to build, > and see if we can improve them I like the idea a lot although I was not getting timestamps printed for all steps of the build, for instance tools/* seems to have been completely missing while I would expect to see some timestamps printed there to possibly optimize the tools builds. This also applied to the toolchain part, does that match what you would be expecting? > > Use SetupHostCommand as recommended by John > > Signed-off-by: Etienne Champetier > --- > include/prereq-build.mk | 5 + > include/subdir.mk | 1 + > 2 files changed, 6 insertions(+) > > diff --git a/include/prereq-build.mk b/include/prlereq-build.mk > index 6a423d2c7d..7d5b2f2b45 100644 > --- a/include/prereq-build.mk > +++ b/include/prereq-build.mk > @@ -139,6 +139,11 @@ $(eval $(call SetupHostCommand,bzip2,Please install > 'bzip2', \ > $(eval $(call SetupHostCommand,wget,Please install GNU 'wget', \ > wget --version | grep GNU)) > > +$(eval $(call SetupHostCommand,gtime,Please install GNU 'time', \ > + gtime --version 2>&1 | grep GNU, \ > + /usr/bin/time --version 2>&1 | grep GNU, \ > + time --version 2>&1 | grep GNU)) > + > $(eval $(call SetupHostCommand,perl,Please install Perl 5.x, \ > perl --version | grep "perl.*v5")) > > diff --git a/include/subdir.mk b/include/subdir.mk > index 79a80528ae..546ed57ae6 100644 > --- a/include/subdir.mk > +++ b/include/subdir.mk > @@ -43,6 +43,7 @@ log_make = \ >$(if $(BUILD_LOG), \ > set -o pipefail; \ > mkdir -p $(BUILD_LOG_DIR)/$(1)$(if $(4),/$(4));) \ > + gtime -f "time:$(1)$(if $(4),/$(4))/$(if $(3),$(3)-)$(2)\#%U\#%S\#%e" > -- \ Can we add a space between time and $(1) here? > $$(SUBMAKE) $(subdir_make_opts) $(if $(3),$(3)-)$(2) \ > $(if $(BUILD_LOG),SILENT= 2>&1 | tee $(BUILD_LOG_DIR)/$(1)$(if > $(4),/$(4))/$(if $(3),$(3)-)$(2).txt) > > -- Florian ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] Build error since ncurses bump
Citeren Jo-Philipp Wich : Hi, Hmm? I believe jow is talking about the toolchain. It was switched to default to GCC7 recently. I use Arch Linux parts of ncurses are built on the host (mainly the tic compiler) using the host gcc. Arch linux is a bad reference for testing tools updates as it tends to use software versions not being available on various LTS distributions. Maybe related, but maybe not: gpsd (from feeds/packages) won't compile due to a wrong include path. It uses the hosts 'ncurses6-config --libs --cflags', which (on my system) boils down to -lncurses -ltinfo -D_GNU_SOURCE -I/usr/include/ncurses The libraries are probably fine, but the include directory from the host is not such a good idea. Looking at the compilation error, it looks like it will build fine without the --cflags, so that's what I tried. That seems to do the trick. Is this what we would expect here? Do we really trust the ncurses6-config from the host to come up with the proper --libs and --cflags? ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH] build: log time taken by each packages/steps
Hi Florian, 2018-04-04 13:44 GMT-03:00 Florian Fainelli : > Hi Etienne, > > On 03/30/2018 09:22 PM, Etienne Champetier wrote: >> The idea is to easily get the list of packages taking the most time to build, >> and see if we can improve them > > I like the idea a lot although I was not getting timestamps printed for > all steps of the build, for instance tools/* seems to have been > completely missing while I would expect to see some timestamps printed > there to possibly optimize the tools builds. This also applied to the > toolchain part, does that match what you would be expecting? I just wanted to know what packages take the most times but I agree that extending it to all build step is a good thing. I don't fully understand the build process, so if you see a better spot to put this please go ahead > >> >> Use SetupHostCommand as recommended by John >> >> Signed-off-by: Etienne Champetier >> --- >> include/prereq-build.mk | 5 + >> include/subdir.mk | 1 + >> 2 files changed, 6 insertions(+) >> >> diff --git a/include/prereq-build.mk b/include/prlereq-build.mk >> index 6a423d2c7d..7d5b2f2b45 100644 >> --- a/include/prereq-build.mk >> +++ b/include/prereq-build.mk >> @@ -139,6 +139,11 @@ $(eval $(call SetupHostCommand,bzip2,Please install >> 'bzip2', \ >> $(eval $(call SetupHostCommand,wget,Please install GNU 'wget', \ >> wget --version | grep GNU)) >> >> +$(eval $(call SetupHostCommand,gtime,Please install GNU 'time', \ >> + gtime --version 2>&1 | grep GNU, \ >> + /usr/bin/time --version 2>&1 | grep GNU, \ >> + time --version 2>&1 | grep GNU)) >> + >> $(eval $(call SetupHostCommand,perl,Please install Perl 5.x, \ >> perl --version | grep "perl.*v5")) >> >> diff --git a/include/subdir.mk b/include/subdir.mk >> index 79a80528ae..546ed57ae6 100644 >> --- a/include/subdir.mk >> +++ b/include/subdir.mk >> @@ -43,6 +43,7 @@ log_make = \ >>$(if $(BUILD_LOG), \ >> set -o pipefail; \ >> mkdir -p $(BUILD_LOG_DIR)/$(1)$(if $(4),/$(4));) \ >> + gtime -f "time:$(1)$(if $(4),/$(4))/$(if $(3),$(3)-)$(2)\#%U\#%S\#%e" >> -- \ > > Can we add a space between time and $(1) here? Fine with me (I just want something easy to extract then parse) Etienne > >> $$(SUBMAKE) $(subdir_make_opts) $(if $(3),$(3)-)$(2) \ >> $(if $(BUILD_LOG),SILENT= 2>&1 | tee $(BUILD_LOG_DIR)/$(1)$(if >> $(4),/$(4))/$(if $(3),$(3)-)$(2).txt) >> >> > > -- > Florian ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH 0/4] Gemini forward-port to kernel v4.14
This patch set forward-ports Gemini to v4.14 with as good support as I can get. I don't know if all or any patches actually make it through to the devel list. They are also posted here: https://dflund.se/~triad/krad/gemini/openwrt/ It would be nice if we could apply this and get a working modernized base for the Gemini platforms. The v4.14 is a bit patchy. With v4.16 we will be looking pretty neat. Linus Walleij (4): firmware-utils: Add the DNS-313 image header tool gemini: Forward-port to v4.14 gemini: Add kernel v4.14 patches gemini: Delete kernel 4.4 patches target/linux/gemini/Makefile | 15 +- .../linux/gemini/base-files/etc/board.d/03_hdparm | 14 + .../base-files/lib/preinit/05_set_ether_mac_gemini | 25 +- target/linux/gemini/config-4.14| 587 target/linux/gemini/config-4.4 | 165 - .../files/arch/arm/mach-gemini/include/mach/gmac.h | 21 - .../linux/gemini/files/arch/arm/mach-gemini/pci.c | 318 -- .../linux/gemini/files/drivers/ata/pata_gemini.c | 234 -- .../files/drivers/net/ethernet/gemini/Kconfig | 31 - .../files/drivers/net/ethernet/gemini/Makefile |5 - .../files/drivers/net/ethernet/gemini/sl351x.c | 2340 - .../files/drivers/net/ethernet/gemini/sl351x_hw.h | 1436 .../gemini/files/drivers/usb/host/ehci-fotg2.c | 258 -- .../gemini/files/drivers/watchdog/gemini_wdt.c | 378 -- target/linux/gemini/image/Makefile | 166 +- target/linux/gemini/image/dns313-header/Makefile | 34 + .../gemini/image/dns313-header/dns313-header.c | 239 ++ target/linux/gemini/image/slask.mk | 56 + .../0001-cache-patch-from-OpenWRT.patch} |9 + ...0002-pinctrl-gemini-Add-missing-functions.patch | 33 + ...ARM-dts-Add-TVE200-to-the-Gemini-SoC-DTSI.patch | 51 + ...rl-Add-skew-delay-pin-config-and-bindings.patch | 73 + ...0005-pinctrl-gemini-Use-generic-DT-parser.patch | 112 + ...-gemini-Implement-clock-skew-delay-config.patch | 280 ++ .../0007-pinctrl-gemini-Fix-GMAC-groups.patch | 186 + ...nctrl-gemini-Fix-missing-pad-descriptions.patch | 27 + ...inctrl-gemini-Add-two-missing-GPIO-groups.patch | 25 + ...0-pinctrl-gemini-Fix-usage-of-3512-groups.patch | 25 + ...trl-gemini-Support-drive-strength-setting.patch | 198 ++ ...d-ethernet-PHYs-to-the-a-bunch-of-Geminis.patch | 113 + ...s-Add-basic-devicetree-for-D-Link-DNS-313.patch | 272 ++ ...RM-dts-Flags-D-Link-DIR-685-I2C-bus-gpios.patch | 27 + ...0015-ARM-dts-Add-PCI-to-WBD111-and-WBD222.patch | 74 + ...-Add-TVE-TVC-and-ILI9322-panel-to-DIR-685.patch | 113 + ...tchdog-gemini-ftwdt010-rename-DT-bindings.patch | 88 + ...gemini-ftwdt010-rename-driver-and-symbols.patch | 527 +++ ...watchdog-ftwdt010-Make-interrupt-optional.patch | 93 + .../0020-soc-Add-SoC-driver-for-Gemini.patch | 113 + ...t-Add-DT-bindings-for-the-Gemini-ethernet.patch | 119 + ...t-Add-a-driver-for-Gemini-gigabit-etherne.patch | 3661 ...23-ARM-dts-Add-ethernet-to-the-Gemini-SoC.patch | 74 + .../0024-net-gemini-Depend-on-HAS_IOMEM.patch | 30 + ...-dts-Set-D-Link-DNS-313-SATA-to-muxmode-0.patch | 36 + ...r-gemini-poweroff-Avoid-spurious-poweroff.patch | 80 + ...sb-host-add-DT-bindings-for-faraday-fotg2.patch | 65 + ...28-usb-host-fotg2-add-device-tree-probing.patch | 61 + ...usb-host-fotg2-add-silicon-clock-handling.patch | 99 + ...b-host-fotg2-add-Gemini-specific-handling.patch | 131 + ...RM-dts-Add-the-FOTG210-USB-host-to-Gemini.patch | 178 + .../linux/gemini/patches-4.4/050-gpio-to-irq.patch | 21 - .../110-watchdog-add-gemini_wdt-driver.patch | 29 - .../111-arm-gemini-add-watchdog-device.patch | 33 - .../112-arm-gemini-register-watchdog-devices.patch | 40 - .../120-net-add-gemini-gmac-driver.patch | 20 - .../121-arm-gemini-add-gmac-device.patch | 85 - .../122-arm-gemini-register-ethernet.patch | 227 -- .../130-usb-ehci-add-fot2g-driver.patch| 133 - .../131-arm-gemini-add-usb-device.patch| 77 - .../patches-4.4/132-arm-gemini-register-usb.patch | 65 - .../140-arm-gemini-add-pci-support.patch | 66 - .../linux/gemini/patches-4.4/150-gemini-pata.patch | 192 - target/linux/gemini/raidsonic/config-default |5 - target/linux/gemini/raidsonic/target.mk| 17 - target/linux/gemini/wiligear/target.mk | 10 - tools/firmware-utils/Makefile |1 + tools/firmware-utils/src/dns313-header.c | 239 ++ 66 files changed, 8277 insertions(+), 6278 deletions(-) create mode 100755 target/linux/gemini/base-files/etc/board.d/03_hdparm create mode 100644 target/linux/gemini/config-4.14 delete mode 100644 target/linux/gemini/config-4.4 delete mode 100644 target/linux/gemini/files/arch/arm/mach-gemini/include/mach/gmac.h delete mode 1
[LEDE-DEV] [PATCH 1/4] firmware-utils: Add the DNS-313 image header tool
This tool is used to create headers on images for the D-Link DNS-313. Signed-off-by: Linus Walleij --- tools/firmware-utils/Makefile| 1 + tools/firmware-utils/src/dns313-header.c | 239 +++ 2 files changed, 240 insertions(+) create mode 100644 tools/firmware-utils/src/dns313-header.c diff --git a/tools/firmware-utils/Makefile b/tools/firmware-utils/Makefile index ba4df640cefa..63c5daca6160 100644 --- a/tools/firmware-utils/Makefile +++ b/tools/firmware-utils/Makefile @@ -82,6 +82,7 @@ define Host/Compile $(call cc,zyimage, -Wall) $(call cc,mkdhpimg buffalo-lib, -Wall) $(call cc,mkdlinkfw mkdlinkfw-lib, -lz -Wall --std=gnu99) + $(call cc,dns313-header, -Wall) endef define Host/Install diff --git a/tools/firmware-utils/src/dns313-header.c b/tools/firmware-utils/src/dns313-header.c new file mode 100644 index ..e69e57e7baaa --- /dev/null +++ b/tools/firmware-utils/src/dns313-header.c @@ -0,0 +1,239 @@ +/* + * dns313-header.c + * + * Program to add the modified U-Boot header to a binary used with + * the D-Link DNS-313 boot loader when booting directly from an + * EXT2 formatted hard drive. + * + * The DNS313 use the same header on zImage, ramdisk, rootfs. + * + * Written by Linus Walleij + * License terms: GPLv2 + */ +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * This is the U-Boot magic number, so the U-Boot header was used + * (obviously) as a template for this custom header. + */ +#define IH_MAGIC 0x27051956 +#define HEADER_SIZE0x68 + +#define OFFSET_MAGIC 0x00 +#define OFFSET_HCRC0x04 +#define OFFSET_TIME0x08 +#define OFFSET_SIZE0x0c +#define OFFSET_LOAD0x10 +#define OFFSET_EP 0x14 +#define OFFSET_DCRC0x18 +#define OFFSET_OS 0x1c +#define OFFSET_ARCH0x1d +#define OFFSET_TYPE0x1e +#define OFFSET_COMP0x1f +#define OFFSET_NAME0x20 +#define NAME_LEN 0x20 +#define OFFSET_MODEL 0x40 +#define MODEL_LEN 0x10 +#define OFFSET_VERSION 0x50 +#define VERSION_LEN0x10 +#define OFFSET_MAC 0x60 +#define MAC_LEN6 + +static const uint32_t crc32_table[256] = { + 0xUL, 0x77073096UL, 0xee0e612cUL, 0x990951baUL, 0x076dc419UL, + 0x706af48fUL, 0xe963a535UL, 0x9e6495a3UL, 0x0edb8832UL, 0x79dcb8a4UL, + 0xe0d5e91eUL, 0x97d2d988UL, 0x09b64c2bUL, 0x7eb17cbdUL, 0xe7b82d07UL, + 0x90bf1d91UL, 0x1db71064UL, 0x6ab020f2UL, 0xf3b97148UL, 0x84be41deUL, + 0x1adad47dUL, 0x6ddde4ebUL, 0xf4d4b551UL, 0x83d385c7UL, 0x136c9856UL, + 0x646ba8c0UL, 0xfd62f97aUL, 0x8a65c9ecUL, 0x14015c4fUL, 0x63066cd9UL, + 0xfa0f3d63UL, 0x8d080df5UL, 0x3b6e20c8UL, 0x4c69105eUL, 0xd56041e4UL, + 0xa2677172UL, 0x3c03e4d1UL, 0x4b04d447UL, 0xd20d85fdUL, 0xa50ab56bUL, + 0x35b5a8faUL, 0x42b2986cUL, 0xdbbbc9d6UL, 0xacbcf940UL, 0x32d86ce3UL, + 0x45df5c75UL, 0xdcd60dcfUL, 0xabd13d59UL, 0x26d930acUL, 0x51de003aUL, + 0xc8d75180UL, 0xbfd06116UL, 0x21b4f4b5UL, 0x56b3c423UL, 0xcfba9599UL, + 0xb8bda50fUL, 0x2802b89eUL, 0x5f058808UL, 0xc60cd9b2UL, 0xb10be924UL, + 0x2f6f7c87UL, 0x58684c11UL, 0xc1611dabUL, 0xb6662d3dUL, 0x76dc4190UL, + 0x01db7106UL, 0x98d220bcUL, 0xefd5102aUL, 0x71b18589UL, 0x06b6b51fUL, + 0x9fbfe4a5UL, 0xe8b8d433UL, 0x7807c9a2UL, 0x0f00f934UL, 0x9609a88eUL, + 0xe10e9818UL, 0x7f6a0dbbUL, 0x086d3d2dUL, 0x91646c97UL, 0xe6635c01UL, + 0x6b6b51f4UL, 0x1c6c6162UL, 0x856530d8UL, 0xf262004eUL, 0x6c0695edUL, + 0x1b01a57bUL, 0x8208f4c1UL, 0xf50fc457UL, 0x65b0d9c6UL, 0x12b7e950UL, + 0x8bbeb8eaUL, 0xfcb9887cUL, 0x62dd1ddfUL, 0x15da2d49UL, 0x8cd37cf3UL, + 0xfbd44c65UL, 0x4db26158UL, 0x3ab551ceUL, 0xa3bc0074UL, 0xd4bb30e2UL, + 0x4adfa541UL, 0x3dd895d7UL, 0xa4d1c46dUL, 0xd3d6f4fbUL, 0x4369e96aUL, + 0x346ed9fcUL, 0xad678846UL, 0xda60b8d0UL, 0x44042d73UL, 0x33031de5UL, + 0xaa0a4c5fUL, 0xdd0d7cc9UL, 0x5005713cUL, 0x270241aaUL, 0xbe0b1010UL, + 0xc90c2086UL, 0x5768b525UL, 0x206f85b3UL, 0xb966d409UL, 0xce61e49fUL, + 0x5edef90eUL, 0x29d9c998UL, 0xb0d09822UL, 0xc7d7a8b4UL, 0x59b33d17UL, + 0x2eb40d81UL, 0xb7bd5c3bUL, 0xc0ba6cadUL, 0xedb88320UL, 0x9abfb3b6UL, + 0x03b6e20cUL, 0x74b1d29aUL, 0xead54739UL, 0x9dd277afUL, 0x04db2615UL, + 0x73dc1683UL, 0xe3630b12UL, 0x94643b84UL, 0x0d6d6a3eUL, 0x7a6a5aa8UL, + 0xe40ecf0bUL, 0x9309ff9dUL, 0x0a00ae27UL, 0x7d079eb1UL, 0xf00f9344UL, + 0x8708a3d2UL, 0x1e01f268UL, 0x6906c2feUL, 0xf762575dUL, 0x806567cbUL, + 0x196c3671UL, 0x6e6b06e7UL, 0xfed41b76UL, 0x89d32be0UL, 0x10da7a5aUL, + 0x67dd4accUL, 0xf9b9df6fUL, 0x8ebeeff9UL, 0x17b7be43UL, 0x60b08ed5UL, + 0xd6d6a3e8UL, 0xa1d1937eUL, 0x38d8c2c4UL, 0x4fdff252UL, 0xd1bb67f1UL, + 0xa6bc5767UL, 0x3fb506ddUL, 0x48b2364bUL, 0xd80d2bdaUL, 0xaf0a1b4cUL, + 0x36034af6UL, 0x41047a60UL, 0xdf60efc3UL, 0xa867df55UL, 0x316e8eefUL, + 0x4669be79UL, 0xcb61b38cUL, 0xbc66831aUL, 0x
[LEDE-DEV] [PATCH 4/4] gemini: Delete kernel 4.4 patches
The v4.14 kernel is what we should be using so get rid of those old patches. The old patches doesn't even support using device tree. Signed-off-by: Linus Walleij --- target/linux/gemini/config-4.4 | 165 --- .../linux/gemini/patches-4.4/050-gpio-to-irq.patch | 21 -- target/linux/gemini/patches-4.4/060-cache-fa.patch | 41 .../110-watchdog-add-gemini_wdt-driver.patch | 29 --- .../111-arm-gemini-add-watchdog-device.patch | 33 --- .../112-arm-gemini-register-watchdog-devices.patch | 40 .../120-net-add-gemini-gmac-driver.patch | 20 -- .../121-arm-gemini-add-gmac-device.patch | 85 .../122-arm-gemini-register-ethernet.patch | 227 - .../130-usb-ehci-add-fot2g-driver.patch| 133 .../131-arm-gemini-add-usb-device.patch| 77 --- .../patches-4.4/132-arm-gemini-register-usb.patch | 65 -- .../140-arm-gemini-add-pci-support.patch | 66 -- .../linux/gemini/patches-4.4/150-gemini-pata.patch | 192 - 14 files changed, 1194 deletions(-) delete mode 100644 target/linux/gemini/config-4.4 delete mode 100644 target/linux/gemini/patches-4.4/050-gpio-to-irq.patch delete mode 100644 target/linux/gemini/patches-4.4/060-cache-fa.patch delete mode 100644 target/linux/gemini/patches-4.4/110-watchdog-add-gemini_wdt-driver.patch delete mode 100644 target/linux/gemini/patches-4.4/111-arm-gemini-add-watchdog-device.patch delete mode 100644 target/linux/gemini/patches-4.4/112-arm-gemini-register-watchdog-devices.patch delete mode 100644 target/linux/gemini/patches-4.4/120-net-add-gemini-gmac-driver.patch delete mode 100644 target/linux/gemini/patches-4.4/121-arm-gemini-add-gmac-device.patch delete mode 100644 target/linux/gemini/patches-4.4/122-arm-gemini-register-ethernet.patch delete mode 100644 target/linux/gemini/patches-4.4/130-usb-ehci-add-fot2g-driver.patch delete mode 100644 target/linux/gemini/patches-4.4/131-arm-gemini-add-usb-device.patch delete mode 100644 target/linux/gemini/patches-4.4/132-arm-gemini-register-usb.patch delete mode 100644 target/linux/gemini/patches-4.4/140-arm-gemini-add-pci-support.patch delete mode 100644 target/linux/gemini/patches-4.4/150-gemini-pata.patch diff --git a/target/linux/gemini/config-4.4 b/target/linux/gemini/config-4.4 deleted file mode 100644 index 9572196ae8b9.. --- a/target/linux/gemini/config-4.4 +++ /dev/null @@ -1,165 +0,0 @@ -CONFIG_ALIGNMENT_TRAP=y -CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y -CONFIG_ARCH_GEMINI=y -CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y -CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y -CONFIG_ARCH_NR_GPIO=0 -CONFIG_ARCH_REQUIRE_GPIOLIB=y -# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set -# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set -CONFIG_ARCH_USES_GETTIMEOFFSET=y -CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y -CONFIG_ARM=y -# CONFIG_ARM_CPU_SUSPEND is not set -CONFIG_ARM_L1_CACHE_SHIFT=5 -CONFIG_ARM_NR_BANKS=8 -CONFIG_ARM_PATCH_PHYS_VIRT=y -# CONFIG_ARPD is not set -CONFIG_ATA=y -CONFIG_ATAGS=y -# CONFIG_CACHE_L2X0 is not set -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_CLONE_BACKWARDS=y -CONFIG_CMDLINE="root=/dev/mtdblock2 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,19200 mem=32M" -CONFIG_CMDLINE_FROM_BOOTLOADER=y -CONFIG_CPU_32v4=y -CONFIG_CPU_ABRT_EV4=y -# CONFIG_CPU_BPREDICT_DISABLE is not set -CONFIG_CPU_CACHE_FA=y -CONFIG_CPU_CACHE_VIVT=y -CONFIG_CPU_COPY_FA=y -CONFIG_CPU_CP15=y -CONFIG_CPU_CP15_MMU=y -# CONFIG_CPU_DCACHE_WRITETHROUGH is not set -CONFIG_CPU_FA526=y -# CONFIG_CPU_ICACHE_DISABLE is not set -CONFIG_CPU_PABRT_LEGACY=y -CONFIG_CPU_TLB_FA=y -CONFIG_CPU_USE_DOMAINS=y -CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" -# CONFIG_DEBUG_USER is not set -CONFIG_DEBUG_UART_PHYS=0x4200 -CONFIG_DEBUG_UART_VIRT=0xf420 -CONFIG_DEBUG_UART_8250_SHIFT=2 -# CONFIG_DEBUG_UART_8250_WORD is not set -# CONFIG_DEBUG_UART_8250_FLOW_CONTROL is not set -# CONFIG_DLCI is not set -CONFIG_DMADEVICES=y -CONFIG_DNOTIFY=y -# CONFIG_DW_DMAC_CORE is not set -# CONFIG_DW_DMAC_PCI is not set -CONFIG_FRAME_POINTER=y -CONFIG_GEMINI_MEM_SWAP=y -CONFIG_GEMINI_SL351X=y -CONFIG_GEMINI_WATCHDOG=y -CONFIG_GENERIC_ATOMIC64=y -CONFIG_GENERIC_BUG=y -CONFIG_GENERIC_IDLE_POLL_SETUP=y -CONFIG_GENERIC_IO=y -CONFIG_GENERIC_IRQ_SHOW=y -CONFIG_GENERIC_PCI_IOMAP=y -CONFIG_GENERIC_SMP_IDLE_THREAD=y -CONFIG_GENERIC_STRNCPY_FROM_USER=y -CONFIG_GENERIC_STRNLEN_USER=y -CONFIG_GPIOLIB=y -CONFIG_GPIO_DEVRES=y -CONFIG_GPIO_SYSFS=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_HAS_DMA=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y -# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set -CONFIG_HAVE_ARCH_JUMP_LABEL=y -CONFIG_HAVE_ARCH_KGDB=y -CONFIG_HAVE_ARCH_PFN_VALID=y -CONFIG_HAVE_ARCH_SECCOMP_FILTER=y -CONFIG_HAVE_ARCH_TRACEHOOK=y -# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set -CONFIG_HAVE_BPF_JIT=y -CONFIG_HAVE_CONTEXT_TRACKING=y -CONFIG_HAVE_C_RECORDMCOUNT=y -CONFIG_HAVE_DEBUG_KMEMLEAK=y -CONFIG_HAVE_DMA_API_DEBUG=y
[LEDE-DEV] [PATCH v2 0/4] [RFC] base-files: add new backup options
My previous patch on Nov2017 (http://lists.infradead.org/pipermail/lede-dev/2017-November/009892.html) generated some discussion because it depends on the presence of /rom to become effetive. So I opted to turn it into a new sysupgrade option (-u). Besides that, I added some more stuff to sysupgrade that I use in my systems. Each patch in this series is almost indepenly of each other. Except for the first one, they add new sysupgrade options: -u) equivalent to the previous patch. I think that, if adopted as default in future, it will make upgrades cleaner. For now, it is optional. -o) this option tries to save everything that was changed. It includes all new files, conffiles (works with -u), sysupgrade.conf and keep.d. This is what I normally use in my backups as it saves both data and confs, keeping them as clean as possible. -k) This adds a new file that I use to quickly reinstall all extra packages. A future improvement would be to use it in a service that installs install those packages as soon as network is up (similar to uci-default scripts) For now, it is still pending to bump package release. -- Luiz Angelo ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH v2 1/4] base-files: minor cleanups on sysupgrade
Renamed add_uci_conffiles to add_conffiles as it includes any conffiles listed, not only UCI ones. Make do_save_conffiles arg mandatory Allow other options after -l (like -c) Signed-off-by: Luiz Angelo Daros de Luca --- package/base-files/files/sbin/sysupgrade | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade index bf5428af25..46e46c3342 100755 --- a/package/base-files/files/sbin/sysupgrade +++ b/package/base-files/files/sbin/sysupgrade @@ -30,7 +30,7 @@ while [ -n "$1" ]; do -p) export SAVE_PARTITIONS=0;; -b|--create-backup) export CONF_BACKUP="$2" NEED_IMAGE=1; shift;; -r|--restore-backup) export CONF_RESTORE="$2" NEED_IMAGE=1; shift;; - -l|--list-backup) export CONF_BACKUP_LIST=1; break;; + -l|--list-backup) export CONF_BACKUP_LIST=1;; -f) export CONF_IMAGE="$2"; shift;; -F|--force) export FORCE=1;; -T|--test) export TEST=1;; @@ -49,10 +49,10 @@ export CONF_TAR=/tmp/sysupgrade.tgz IMAGE="$1" -[ -z "$IMAGE" -a -z "$NEED_IMAGE" -o $HELP -gt 0 ] && { +[ -z "$IMAGE" -a -z "$NEED_IMAGE" -a $CONF_BACKUP_LIST -eq 0 -o $HELP -gt 0 ] && { cat <...] - $0 [-q] [-i] + $0 [-q] [-i] [-c] upgrade-option: -f restore configuration from .tar.gz (file or url) @@ -115,7 +115,7 @@ list_changed_conffiles() { done } -add_uci_conffiles() { +add_conffiles() { local file="$1" ( find $(sed -ne '/^[[:space:]]*$/d; /^#/d; p' \ /etc/sysupgrade.conf /lib/upgrade/keep.d/* 2>/dev/null) \ @@ -131,6 +131,7 @@ add_overlayfiles() { -e '\,/META_[a-zA-Z0-9]*$,d' \ -e '\,/functions.sh$,d' \ -e '\,/[^/]*-opkg$,d' \ + -e '\,/etc/urandom.seed$,d' \ > "$file" return 0 } @@ -146,13 +147,13 @@ if [ $SAVE_OVERLAY = 1 ]; then } sysupgrade_init_conffiles="add_overlayfiles" else - sysupgrade_init_conffiles="add_uci_conffiles" + sysupgrade_init_conffiles="add_conffiles" fi include /lib/upgrade do_save_conffiles() { - local conf_tar="${1:-$CONF_TAR}" + local conf_tar="$1" [ -z "$(rootfs_type)" ] && { echo "Cannot save config while running from ramdisk." @@ -247,7 +248,7 @@ if [ -n "$CONF_IMAGE" ]; then get_image "$CONF_IMAGE" "cat" > "$CONF_TAR" export SAVE_CONFIG=1 elif ask_bool $SAVE_CONFIG "Keep config files over reflash"; then - [ $TEST -eq 1 ] || do_save_conffiles + [ $TEST -eq 1 ] || do_save_conffiles "$CONF_TAR" export SAVE_CONFIG=1 else [ $TEST -eq 1 ] || rm -f "$CONF_TAR" -- 2.16.3 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH v2 4/4] base-files: add sysupgrade -k to save list of pkgs
When '-k' is used, sysupgrade inserts into backup a new file /etc/sysupgrade.installed which contains pkgname and origin (rom, overlay, unknown). It's maily used to reinstall all extra packages: # opkg update # grep "\toverlay" etc/sysupgrade.installed | cut -f1 | xargs opkg install # rm etc/sysupgrade.installed Signed-off-by: Luiz Angelo Daros de Luca --- package/base-files/files/sbin/sysupgrade | 30 ++ 1 file changed, 30 insertions(+) diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade index 01a942bac6..c5067a757b 100755 --- a/package/base-files/files/sbin/sysupgrade +++ b/package/base-files/files/sbin/sysupgrade @@ -11,6 +11,7 @@ export SAVE_CONFIG=1 export SAVE_OVERLAY=0 export SAVE_OVERLAY_PATH= export SAVE_PARTITIONS=1 +export SAVE_INSTALLED_PKGS=0 export SKIP_UNCHANGED=0 export CONF_IMAGE= export CONF_BACKUP_LIST=0 @@ -31,6 +32,7 @@ while [ -n "$1" ]; do -c) export SAVE_OVERLAY=1 SAVE_OVERLAY_PATH=/etc;; -o) export SAVE_OVERLAY=1 SAVE_OVERLAY_PATH=/;; -p) export SAVE_PARTITIONS=0;; + -k) export SAVE_INSTALLED_PKGS=1;; -u) export SKIP_UNCHANGED=1;; -b|--create-backup) export CONF_BACKUP="$2" NEED_IMAGE=1; shift;; -r|--restore-backup) export CONF_RESTORE="$2" NEED_IMAGE=1; shift;; @@ -50,6 +52,7 @@ done export CONFFILES=/tmp/sysupgrade.conffiles export CONF_TAR=/tmp/sysupgrade.tgz +export INSTALLED_PACKAGES=/etc/sysupgrade.installed IMAGE="$1" @@ -67,6 +70,8 @@ upgrade-option: -u skip from backup files that are equals to those in /rom -n do not save configuration over reflash -p do not attempt to restore the partition table after flash. + -k include in backup a list of current installed packages at +$INSTALLED_PACKAGES -T | --test Verify image and config .tar.gz but do not actually flash. -F | --force @@ -203,6 +208,15 @@ fi include /lib/upgrade +targz_append() { + local tar="$1" + local append_tar="$2" + ( gunzip -c "$tar" | head -c -1024; + gunzip -c $append_tar + ) | gzip > $tar.new + mv -f $tar.new $tar +} + do_save_conffiles() { local conf_tar="$1" @@ -219,6 +233,22 @@ do_save_conffiles() { [ "$VERBOSE" -gt 1 ] && TAR_V="v" || TAR_V="" tar c${TAR_V}zf "$conf_tar" -T "$CONFFILES" 2>/dev/null + if [ "$SAVE_INSTALLED_PKGS" -eq 1 ]; then + mkdir -p /tmp/etc + cd /tmp/ + + # Format: pkg-name{rom,overlay,unkown} + # rom is used for pkgs in /rom, even if updated later + find /usr/lib/opkg/info -name "*.control" \( \ + \( -exec test -f /rom/{} \; -exec echo {} rom \; \) -o \ + \( -exec test -f /overlay/upper/{} \; -exec echo {} overlay \; \) -o \ + \( -exec echo {} unknown \; \) \ + \) | sed -e 's,.*/,,;s/\.control /\t/' > ${INSTALLED_PACKAGES:1} + + tar c${TAR_V}zf sysupgrade.installed.packages.tgz ${INSTALLED_PACKAGES:1} + targz_append "$conf_tar" sysupgrade.installed.packages.tgz + rm -f sysupgrade.installed.packages.tgz ${INSTALLED_PACKAGES:1} + fi rm -f "$CONFFILES" } -- 2.16.3 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH v2 2/4] base-files: add sysupgrade -u to skip unchanged files
With '-u', for a file /aaa/bbb/ccc enlisted for backup, it will only get into backup if /rom/aaa/bbb/ccc does not exist or /aaa/bbb/ccc is different from /rom/aaa/bbb/ccc. It also works with '-c', but only effective for files touched but not modified. Signed-off-by: Luiz Angelo Daros de Luca --- package/base-files/files/sbin/sysupgrade | 27 +++ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade index 46e46c3342..4d221ef5d6 100755 --- a/package/base-files/files/sbin/sysupgrade +++ b/package/base-files/files/sbin/sysupgrade @@ -10,6 +10,7 @@ export VERBOSE=1 export SAVE_CONFIG=1 export SAVE_OVERLAY=0 export SAVE_PARTITIONS=1 +export SKIP_UNCHANGED=0 export CONF_IMAGE= export CONF_BACKUP_LIST=0 export CONF_BACKUP= @@ -28,6 +29,7 @@ while [ -n "$1" ]; do -n) export SAVE_CONFIG=0;; -c) export SAVE_OVERLAY=1;; -p) export SAVE_PARTITIONS=0;; + -u) export SKIP_UNCHANGED=1;; -b|--create-backup) export CONF_BACKUP="$2" NEED_IMAGE=1; shift;; -r|--restore-backup) export CONF_RESTORE="$2" NEED_IMAGE=1; shift;; -l|--list-backup) export CONF_BACKUP_LIST=1;; @@ -52,12 +54,13 @@ IMAGE="$1" [ -z "$IMAGE" -a -z "$NEED_IMAGE" -a $CONF_BACKUP_LIST -eq 0 -o $HELP -gt 0 ] && { cat <...] - $0 [-q] [-i] [-c] + $0 [-q] [-i] [-c] [-u] upgrade-option: -f restore configuration from .tar.gz (file or url) -i interactive mode -c attempt to preserve all changed files in /etc/ + -u skip from backup files that are equals to those in /rom -n do not save configuration over reflash -p do not attempt to restore the partition table after flash. -T | --test @@ -119,20 +122,19 @@ add_conffiles() { local file="$1" ( find $(sed -ne '/^[[:space:]]*$/d; /^#/d; p' \ /etc/sysupgrade.conf /lib/upgrade/keep.d/* 2>/dev/null) \ - -type f -o -type l 2>/dev/null; + \( -type f -o -type l \) $find_filter 2>/dev/null; list_changed_conffiles ) | sort -u > "$file" return 0 } add_overlayfiles() { local file="$1" - find /overlay/upper/etc/ -type f -o -type l | sed \ - -e 's,^/overlay\/upper/,/,' \ - -e '\,/META_[a-zA-Z0-9]*$,d' \ - -e '\,/functions.sh$,d' \ + ( cd /overlay/upper/; find ./etc \( -type f -o -type l \) $find_filter | sed \ + -e 's,^\.,,' \ + -e '\,^/etc/board.json$,d' \ -e '\,/[^/]*-opkg$,d' \ - -e '\,/etc/urandom.seed$,d' \ - > "$file" + -e '\,^/etc/urandom.seed$,d' \ + )> "$file" return 0 } @@ -150,6 +152,15 @@ else sysupgrade_init_conffiles="add_conffiles" fi +find_filter="" +if [ $SKIP_UNCHANGED = 1 ]; then + [ ! -d /rom/ ] && { + echo "'/rom/' is required by '-u'" + exit 1 + } + find_filter='( ( -exec test -e /rom/{} ; -exec cmp -s /{} /rom/{} ; ) -o -print )' +fi + include /lib/upgrade do_save_conffiles() { -- 2.16.3 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH v2 3/4] base-files: add sysupgrade -o to save all overlay files
Add sysupgrade '-o' option in order to include all overlay files in backup, except for those that are from packages but including files listed in conffiles, sysupgrade.conf or /lib/upgrade/keep.d. With '-u' option, it will skip files equals to /rom and conffiles that were not changed. Signed-off-by: Luiz Angelo Daros de Luca --- package/base-files/files/sbin/sysupgrade | 46 +--- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade index 4d221ef5d6..01a942bac6 100755 --- a/package/base-files/files/sbin/sysupgrade +++ b/package/base-files/files/sbin/sysupgrade @@ -9,6 +9,7 @@ export INTERACTIVE=0 export VERBOSE=1 export SAVE_CONFIG=1 export SAVE_OVERLAY=0 +export SAVE_OVERLAY_PATH= export SAVE_PARTITIONS=1 export SKIP_UNCHANGED=0 export CONF_IMAGE= @@ -27,7 +28,8 @@ while [ -n "$1" ]; do -v) export VERBOSE="$(($VERBOSE + 1))";; -q) export VERBOSE="$(($VERBOSE - 1))";; -n) export SAVE_CONFIG=0;; - -c) export SAVE_OVERLAY=1;; + -c) export SAVE_OVERLAY=1 SAVE_OVERLAY_PATH=/etc;; + -o) export SAVE_OVERLAY=1 SAVE_OVERLAY_PATH=/;; -p) export SAVE_PARTITIONS=0;; -u) export SKIP_UNCHANGED=1;; -b|--create-backup) export CONF_BACKUP="$2" NEED_IMAGE=1; shift;; @@ -60,6 +62,8 @@ upgrade-option: -f restore configuration from .tar.gz (file or url) -i interactive mode -c attempt to preserve all changed files in /etc/ + -o attempt to preserve all changed files in /, exept those +from packages but including changed confs. -u skip from backup files that are equals to those in /rom -n do not save configuration over reflash -p do not attempt to restore the partition table after flash. @@ -129,12 +133,48 @@ add_conffiles() { add_overlayfiles() { local file="$1" - ( cd /overlay/upper/; find ./etc \( -type f -o -type l \) $find_filter | sed \ + + local packagesfiles=$1.packagesfiles + touch "$packagesfiles" + + if [ "$SAVE_OVERLAY_PATH" = / ]; then + local conffiles=$1.conffiles + local keepfiles=$1.keepfiles + + list_conffiles | cut -f2 -d ' ' | sort -u > "$conffiles" + + # backup files from /etc/sysupgrade.conf and /lib/upgrade/keep.d, but + # ignore those aready controlled by opkg conffiles + find $(sed -ne '/^[[:space:]]*$/d; /^#/d; p' \ + /etc/sysupgrade.conf /lib/upgrade/keep.d/* 2>/dev/null) \ + \( -type f -o -type l \) 2>/dev/null | sort -u | + grep -h -v -x -F -f $conffiles > "$keepfiles" + + # backup conffiles, but only those changed if '-u' + [ $SKIP_UNCHANGED = 1 ] && + list_changed_conffiles | sort -u > "$conffiles" + + # do not backup files from packages, except those listed + # in conffiles and keep.d + find /usr/lib/opkg/info -type f -name "*.list" | sort -u | + xargs -r grep -h -v -x -F -f $conffiles | + grep -v -x -F -f $keepfiles > "$packagesfiles" + rm -f "$keepfiles" "$conffiles" + fi + + # busybox grep bug when file is empty + [ -s "$packagesfiles" ] || echo > $packagesfiles + + ( cd /overlay/upper/; find .$SAVE_OVERLAY_PATH \( -type f -o -type l \) $find_filter | sed \ -e 's,^\.,,' \ -e '\,^/etc/board.json$,d' \ -e '\,/[^/]*-opkg$,d' \ -e '\,^/etc/urandom.seed$,d' \ - )> "$file" + -e '\,^/usr/lib/opkg/.*,d' \ + ) | grep -v -x -F -f $packagesfiles > "$file" + + rm -f "$packagesfiles" + return 0 } -- 2.16.3 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] kernel version status
Dear John Crispin and Felix Fietkau, Could either of you please consider moving the Ramips target to kernel 4.14 before the fork to 18.04 happens? Without it, the new flow_offload goodies won't be usable on Ramips, which would be a shame in my opinion. Or are there good reasons to keep the target on kernel 4.9 for now? Yours sincerely, Jaap Buurman On Mon, Apr 2, 2018 at 2:11 PM, Hauke Mehrtens wrote: > On 04/02/2018 10:54 AM, Jaap Buurman wrote: >> Dear Hauke, >> >> Quick question from my side: I was wondering why Ramips will probably >> stay with 4.9, even though the patches for 4.14 have been in master >> for quite a while. Since flow_offload is part of master, and it >> requires 4.14, I think 4.14 would be a very welcome addition for >> Ramips. My 2 cents :) >> >> Yours sincerely, >> >> Jaap Buurman > > Hi Jaap, > > I do not know what Felix's and John's plans are for this target. Fi this > should go to kernel 4.14 we should switch soon. > > Hauke ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev