Re: [OpenWrt-Devel] [PATCH 6/8] mvebu: add vendor to device names

2019-05-03 Thread Petr Štetiar
Hauke Mehrtens  [2019-05-04 00:00:25]:

Hi,

> On 5/1/19 7:42 PM, Tomasz Maciej Nowak wrote:
> > Replace SoC names with vendors in device names, in few cases, and add
> > vendor to developemnt boards for easier identyfying potential firmware to
> > flash.
> 
> Will sysupgrade still work after this rename? Isn't there some script
> which checks if the image is compatible with the currently installed image?

SUPPORTED_DEVICES variable is used for this, so it's probably going to work,
but if we're willing to rename it, it might be a good idea to follow the DT
compatible naming scheme as used in other targets.

So instead of this in patch 4/8:

 -  SUPPORTED_DEVICES = $$(DEVICE_DTS)
 +  SUPPORTED_DEVICES = $$(firstword $$(DEVICE_DTS))

Tomasz should be doing following:

 -  SUPPORTED_DEVICES = $$(DEVICE_DTS)
 +  SUPPORTED_DEVICES = $(subst _,$(comma),$(1))

as currently being used in apm821xx, ath79, ipq40xx, ipq806x, kirkwood, lantiq,
omap, oxnas and ramips.

So this

> > -define Device/armada-3720-db
> > +define Device/marvell-armada-3720-db

would become

> > -define Device/armada-3720-db
> > +define Device/marvell_armada-3720-db

and this

> > -TARGET_DEVICES += armada-3720-db
> > +TARGET_DEVICES += marvell-armada-3720-db

would become 

> > -TARGET_DEVICES += armada-3720-db
> > +TARGET_DEVICES += marvell_armada-3720-db
> > -SUPPORTED_DEVICES := marvell,armada-3720-db

as the SUPPORTED_DEVICES variable would be automagically set to the same value
by the code above, following the DRY principle.

If the SUPPORTED_DEVICES variable is going to change as for example here:

> > -define Device/openblocks-ax3-4
> > +define Device/plathome_openblocks-ax3-4
> >DEVICE_DTS := armada-xp-openblocks-ax3-4
> > -  SUPPORTED_DEVICES := $(1)
> > +  SUPPORTED_DEVICES := openblocks-ax3-4
> >BLOCKSIZE := 128k
> >PAGESIZE := 1
> >IMAGES += factory.img
> >IMAGE/factory.img := append-kernel | pad-to $$(BLOCKSIZE) | append-ubi
> >DEVICE_TITLE := Plat'Home OpenBlocks AX3
> >  endef
> > -TARGET_DEVICES += openblocks-ax3-4
> > +TARGET_DEVICES += plathome_openblocks-ax3-4

The old `openblocks-ax3-4` name has to be added by following construct:

 SUPPORTED_DEVICES += openblocks-ax3-4

in order to support the old and new naming schemes, so the SUPPORTED_DEVICES
would actually contain `plathome,openblocks-ax3-4 openblocks-ax3-4` and allow
seamless sysupgrade experience.

-- ynezz

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 7/8] mvebu: use device-tree board detection

2019-05-03 Thread Petr Štetiar
Hauke Mehrtens  [2019-05-04 00:03:29]:

Hi,

> > diff --git a/target/linux/mvebu/base-files/lib/preinit/79_move_config 
> > b/target/linux/mvebu/base-files/lib/preinit/79_move_config
> > index f7e23cc324..640fb5cdad 100644
> > --- a/target/linux/mvebu/base-files/lib/preinit/79_move_config
> > +++ b/target/linux/mvebu/base-files/lib/preinit/79_move_config
> > @@ -9,7 +9,7 @@ move_config() {
> >  
> > if export_bootdevice && export_partdevice partdev 1; then
> > case $(board_name) in
> > -   armada-385-turris-omnia)
> > +   cznic,turris-omnia)
> 
> This does not apply correctly, the old version uses "turris-omnia" and
> not "armada-385-turris-omnia".

Tomasz has added following remark:

 "Series is applicable after "mvebu: fix board_name condition in 79_move_config"
  by Klaus Kudielka.  https://patchwork.ozlabs.org/patch/1090367;

I've this fix queued[1] already, but feel free to take it through your
staging tree completly.

1. 
https://git.openwrt.org/?p=openwrt/staging/ynezz.git;a=commit;h=a2253ed53367980c6151dd3bd6a6a564a7e1a2f3

-- ynezz

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 8/8] mvebu: add images for additional ESPRESSObin boards

2019-05-03 Thread Hauke Mehrtens
On 5/1/19 7:42 PM, Tomasz Maciej Nowak wrote:
> This commit adds support for different iterations of ESPRESSObin.
> The added variants are:
> 
> ESPRESSObin with soldered eMMC,
> 
> ESPRESSObin V7, compared to V5 some passive elements changed and ethernet
> ports labels positions have been reversed,
> 
> ESPRESSObin V7 with soldered eMMC.
> 
> Please refer to:
> 584d7c5 ("mvebu: new subtarget cortex A53")
> for instruction how to boot OpenWrt image placed on SD card. It is
> advised for owners of V5 and previous to upgrade bootloader based on
> U-Boot 2015.01, to the latest version available at:
> http://espressobin.net/tech-spec.
> 
> Signed-off-by: Tomasz Maciej Nowak 
> ---
>  .../marvell/armada-3720-espressobin-emmc.dts  | 28 +++
>  .../armada-3720-espressobin-v7-emmc.dts   | 43 
>  .../marvell/armada-3720-espressobin-v7.dts| 31 
>  target/linux/mvebu/image/cortex-a53.mk| 24 +
>  ...l-armada37xx-Add-emmc-sdio-pinctrl-d.patch | 40 +++
>  ...l-armada-37xx-Enable-emmc-on-espress.patch | 49 +++
>  ...da-3720-espressobin-correct-spi-node.patch |  2 +-
>  ...l-armada-3720-espressobin-add-ports-.patch | 26 ++
>  8 files changed, 242 insertions(+), 1 deletion(-)
>  create mode 100644 
> target/linux/mvebu/files-4.14/arch/arm64/boot/dts/marvell/armada-3720-espressobin-emmc.dts
>  create mode 100644 
> target/linux/mvebu/files-4.14/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7-emmc.dts
>  create mode 100644 
> target/linux/mvebu/files-4.14/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7.dts
>  create mode 100644 
> target/linux/mvebu/patches-4.14/513-arm64-dts-marvell-armada37xx-Add-emmc-sdio-pinctrl-d.patch
>  create mode 100644 
> target/linux/mvebu/patches-4.14/514-arm64-dts-marvell-armada-37xx-Enable-emmc-on-espress.patch
>  create mode 100644 
> target/linux/mvebu/patches-4.14/522-arm64-dts-marvell-armada-3720-espressobin-add-ports-.patch
> 
> diff --git 
> a/target/linux/mvebu/files-4.14/arch/arm64/boot/dts/marvell/armada-3720-espressobin-emmc.dts
>  
> b/target/linux/mvebu/files-4.14/arch/arm64/boot/dts/marvell/armada-3720-espressobin-emmc.dts
> new file mode 100644
> index 00..ef90a1bd38
> --- /dev/null
> +++ 
> b/target/linux/mvebu/files-4.14/arch/arm64/boot/dts/marvell/armada-3720-espressobin-emmc.dts
> @@ -0,0 +1,28 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * Device Tree file for Globalscale Marvell ESPRESSOBin Board with eMMC
> + * Copyright (C) 2018 Marvell
> + *
> + * Romain Perier 
> + * Konstantin Porotchkin 
> + *
> + */
> +
> +#include "armada-3720-espressobin.dts"
> +
> +/ {
> + model = "Globalscale Marvell ESPRESSOBin Board (eMMC)";
> + compatible = "globalscale,espressobin-emmc", "globalscale,espressobin",
> +  "marvell,armada3720", "marvell,armada3710";
> +};
> +
> + {
> + status = "okay";
> +
> + #address-cells = <1>;
> + #size-cells = <0>;
> + mmccard: mmccard@0 {
> + compatible = "mmc-card";
> + reg = <0>;
> + };
> +};
> diff --git 
> a/target/linux/mvebu/files-4.14/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7-emmc.dts
>  
> b/target/linux/mvebu/files-4.14/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7-emmc.dts
> new file mode 100644
> index 00..2b565ca8d8
> --- /dev/null
> +++ 
> b/target/linux/mvebu/files-4.14/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7-emmc.dts
> @@ -0,0 +1,43 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * Device Tree file for Globalscale Marvell ESPRESSOBin Board V7 with eMMC
> + * Copyright (C) 2018 Marvell
> + *
> + * Romain Perier 
> + * Konstantin Porotchkin 
> + *
> + */
> +
> +#include "armada-3720-espressobin.dts"
> +
> +/ {
> + model = "Globalscale Marvell ESPRESSOBin Board V7 (eMMC)";
> + compatible = "globalscale,espressobin-v7-emmc", 
> "globalscale,espressobin-v7",
> +  "globalscale,espressobin", "marvell,armada3720",
> +  "marvell,armada3710";
> +};
> +
> + {
> + port@1 {
> + reg = <1>;
> + label = "lan1";
> + phy-handle = <>;
> + };
> +
> + port@3 {
> + reg = <3>;
> + label = "wan";
> + phy-handle = <>;
> + };
> +};
> +
> + {
> + status = "okay";
> +
> + #address-cells = <1>;
> + #size-cells = <0>;
> + mmccard: mmccard@0 {
> + compatible = "mmc-card";
> + reg = <0>;
> + };
> +};

Are these device tree files already send upstream or will you do so?

Hauke

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 6/8] mvebu: add vendor to device names

2019-05-03 Thread Hauke Mehrtens
On 5/1/19 7:42 PM, Tomasz Maciej Nowak wrote:
> Replace SoC names with vendors in device names, in few cases, and add
> vendor to developemnt boards for easier identyfying potential firmware to
> flash.
> 
> Signed-off-by: Tomasz Maciej Nowak 


> diff --git a/target/linux/mvebu/image/cortex-a72.mk 
> b/target/linux/mvebu/image/cortex-a72.mk
> index 824f6b5d0f..3043f087cc 100644
> --- a/target/linux/mvebu/image/cortex-a72.mk
> +++ b/target/linux/mvebu/image/cortex-a72.mk
> @@ -1,30 +1,30 @@
>  ifeq ($(SUBTARGET),cortexa72)
>  
> -define Device/armada-macchiatobin
> +define Device/marvell-macchiatobin
>$(call Device/Default-arm64)
>DEVICE_TITLE := MACCHIATObin (SolidRun Armada 8040 Community Board)
>DEVICE_PACKAGES += kmod-i2c-core kmod-i2c-mux kmod-i2c-mux-pca954x
>DEVICE_DTS := armada-8040-mcbin
>SUPPORTED_DEVICES := marvell,armada8040-mcbin
>  endef
> -TARGET_DEVICES += armada-macchiatobin
> +TARGET_DEVICES += marvell-macchiatobin

This board is from solidrun

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 7/8] mvebu: use device-tree board detection

2019-05-03 Thread Hauke Mehrtens
On 5/1/19 7:42 PM, Tomasz Maciej Nowak wrote:
> Convert whole target to Device Tree based board detection instead of
> identifying devices by dts file name. With this we can drop mvebu.sh
> translation script and rely on common method for model detection.
> 
> Signed-off-by: Tomasz Maciej Nowak 
> ---
>  .../mvebu/base-files/etc/board.d/01_leds  | 22 ++---
>  .../mvebu/base-files/etc/board.d/02_network   | 60 ++--
>  target/linux/mvebu/base-files/etc/diag.sh | 16 ++--
>  .../base-files/etc/init.d/linksys_recovery|  2 +-
>  .../base-files/etc/uci-defaults/03_wireless   |  4 +-
>  .../base-files/etc/uci-defaults/04_mambafan   |  2 +-
>  target/linux/mvebu/base-files/lib/mvebu.sh| 94 ---
>  .../mvebu/base-files/lib/preinit/01_sysinfo   |  9 --
>  .../base-files/lib/preinit/06_set_iface_mac   | 14 +--
>  .../base-files/lib/preinit/79_move_config |  2 +-
>  .../base-files/lib/preinit/81_linksys_syscfg  |  2 +-
>  .../mvebu/base-files/lib/upgrade/platform.sh  | 10 +-
>  .../mvebu/base-files/lib/upgrade/sdcard.sh|  2 +-
>  target/linux/mvebu/image/cortex-a9.mk | 20 +++-
>  14 files changed, 85 insertions(+), 174 deletions(-)
>  delete mode 100755 target/linux/mvebu/base-files/lib/mvebu.sh
>  delete mode 100644 target/linux/mvebu/base-files/lib/preinit/01_sysinfo
> 

> diff --git a/target/linux/mvebu/base-files/lib/preinit/79_move_config 
> b/target/linux/mvebu/base-files/lib/preinit/79_move_config
> index f7e23cc324..640fb5cdad 100644
> --- a/target/linux/mvebu/base-files/lib/preinit/79_move_config
> +++ b/target/linux/mvebu/base-files/lib/preinit/79_move_config
> @@ -9,7 +9,7 @@ move_config() {
>  
>   if export_bootdevice && export_partdevice partdev 1; then
>   case $(board_name) in
> - armada-385-turris-omnia)
> + cznic,turris-omnia)

This does not apply correctly, the old version uses "turris-omnia" and
not "armada-385-turris-omnia".

>   insmod nls_cp437
>   insmod nls_iso8859-1
>   insmod fat

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 6/8] mvebu: add vendor to device names

2019-05-03 Thread Hauke Mehrtens
On 5/1/19 7:42 PM, Tomasz Maciej Nowak wrote:
> Replace SoC names with vendors in device names, in few cases, and add
> vendor to developemnt boards for easier identyfying potential firmware to
> flash.

Will sysupgrade still work after this rename? Isn't there some script
which checks if the image is compatible with the currently installed image?

> Signed-off-by: Tomasz Maciej Nowak 
> ---
>  package/boot/uboot-mvebu/Makefile  |  2 +-
>  target/linux/mvebu/image/Makefile  |  1 -
>  target/linux/mvebu/image/cortex-a53.mk |  4 +--
>  target/linux/mvebu/image/cortex-a72.mk | 12 +++
>  target/linux/mvebu/image/cortex-a9.mk  | 44 +++---
>  5 files changed, 34 insertions(+), 29 deletions(-)
> 
> diff --git a/package/boot/uboot-mvebu/Makefile 
> b/package/boot/uboot-mvebu/Makefile
> index 61547acb27..06c574594b 100644
> --- a/package/boot/uboot-mvebu/Makefile
> +++ b/package/boot/uboot-mvebu/Makefile
> @@ -24,7 +24,7 @@ endef
>  
>  define U-Boot/clearfog
>NAME:=SolidRun ClearFog A1
> -  BUILD_DEVICES:=armada-388-clearfog-base armada-388-clearfog-pro
> +  BUILD_DEVICES:=solidrun-clearfog-base solidrun-clearfog-pro
>BUILD_SUBTARGET:=cortexa9
>UBOOT_IMAGE:=u-boot-spl.kwb
>  endef
> diff --git a/target/linux/mvebu/image/Makefile 
> b/target/linux/mvebu/image/Makefile
> index 240cc88642..fe74a12c65 100644
> --- a/target/linux/mvebu/image/Makefile
> +++ b/target/linux/mvebu/image/Makefile
> @@ -70,7 +70,6 @@ endef
>  
>  define Device/Default
>PROFILES := Default
> -  DEVICE_DTS := $(1)
>BOARD_NAME = $$(DEVICE_DTS)
>KERNEL_NAME := zImage
>KERNEL := kernel-bin | append-dtb | uImage none
> diff --git a/target/linux/mvebu/image/cortex-a53.mk 
> b/target/linux/mvebu/image/cortex-a53.mk
> index a102f52481..4dd1e44665 100644
> --- a/target/linux/mvebu/image/cortex-a53.mk
> +++ b/target/linux/mvebu/image/cortex-a53.mk
> @@ -8,12 +8,12 @@ define Device/globalscale-espressobin
>  endef
>  TARGET_DEVICES += globalscale-espressobin
>  
> -define Device/armada-3720-db
> +define Device/marvell-armada-3720-db
>$(call Device/Default-arm64)
>DEVICE_TITLE := Marvell Armada 3720 Development Board DB-88F3720-DDR3
>DEVICE_DTS := armada-3720-db
>SUPPORTED_DEVICES := marvell,armada-3720-db
>  endef
> -TARGET_DEVICES += armada-3720-db
> +TARGET_DEVICES += marvell-armada-3720-db
>  
>  endif
> diff --git a/target/linux/mvebu/image/cortex-a72.mk 
> b/target/linux/mvebu/image/cortex-a72.mk
> index 824f6b5d0f..3043f087cc 100644
> --- a/target/linux/mvebu/image/cortex-a72.mk
> +++ b/target/linux/mvebu/image/cortex-a72.mk
> @@ -1,30 +1,30 @@
>  ifeq ($(SUBTARGET),cortexa72)
>  
> -define Device/armada-macchiatobin
> +define Device/marvell-macchiatobin
>$(call Device/Default-arm64)
>DEVICE_TITLE := MACCHIATObin (SolidRun Armada 8040 Community Board)
>DEVICE_PACKAGES += kmod-i2c-core kmod-i2c-mux kmod-i2c-mux-pca954x
>DEVICE_DTS := armada-8040-mcbin
>SUPPORTED_DEVICES := marvell,armada8040-mcbin
>  endef
> -TARGET_DEVICES += armada-macchiatobin
> +TARGET_DEVICES += marvell-macchiatobin
>  
> -define Device/armada-8040-db
> +define Device/marvell-armada-8040-db
>$(call Device/Default-arm64)
>DEVICE_TITLE := Marvell Armada 8040 DB board
>DEVICE_DTS := armada-8040-db
>IMAGE/sdcard.img.gz := boot-img-ext4 | sdcard-img-ext4 | gzip | 
> append-metadata
>SUPPORTED_DEVICES := marvell,armada8040-db
>  endef
> -TARGET_DEVICES += armada-8040-db
> +TARGET_DEVICES += marvell-armada-8040-db
>  
> -define Device/armada-7040-db
> +define Device/marvell-armada-7040-db
>$(call Device/Default-arm64)
>DEVICE_TITLE := Marvell Armada 7040 DB board
>DEVICE_DTS := armada-7040-db
>IMAGE/sdcard.img.gz := boot-img-ext4 | sdcard-img-ext4 | gzip | 
> append-metadata
>SUPPORTED_DEVICES := marvell,armada7040-db
>  endef
> -TARGET_DEVICES += armada-7040-db
> +TARGET_DEVICES += marvell-armada-7040-db
>  
>  endif
> diff --git a/target/linux/mvebu/image/cortex-a9.mk 
> b/target/linux/mvebu/image/cortex-a9.mk
> index 252300b942..e5459dad1a 100644
> --- a/target/linux/mvebu/image/cortex-a9.mk
> +++ b/target/linux/mvebu/image/cortex-a9.mk
> @@ -61,57 +61,63 @@ define Device/linksys-wrt1900ac
>  endef
>  TARGET_DEVICES += linksys-wrt1900ac
>  
> -define Device/openblocks-ax3-4
> +define Device/plathome-openblocks-ax3-4
>DEVICE_DTS := armada-xp-openblocks-ax3-4
> -  SUPPORTED_DEVICES := $(1)
> +  SUPPORTED_DEVICES := openblocks-ax3-4
>BLOCKSIZE := 128k
>PAGESIZE := 1
>IMAGES += factory.img
>IMAGE/factory.img := append-kernel | pad-to $$(BLOCKSIZE) | append-ubi
>DEVICE_TITLE := Plat'Home OpenBlocks AX3
>  endef
> -TARGET_DEVICES += openblocks-ax3-4
> +TARGET_DEVICES += plathome-openblocks-ax3-4
>  
> -define Device/armada-385-db-ap
> +define Device/marvell-armada-385-db-ap
>$(Device/NAND-256K)
> +  DEVICE_DTS := armada-385-db-ap
>IMAGES += factory.img
>KERNEL_SIZE := 8192k
>DEVICE_TITLE := Marvell Armada 385 DB 

Re: [OpenWrt-Devel] [PATCH] mvebu: add kmod-i2c-mux-pca954x for Turris Omnia

2019-05-03 Thread Hauke Mehrtens
On 5/3/19 2:44 PM, Petr Štetiar wrote:
> Josef Schlehofer  [2019-04-20 01:05:05]:
> 
> Hi,
> 
>> The driver is for the I2C mux.
>> Schematic available at https://doc.turris.cz/doc/_media/rtrom01-schema.pdf
>>
>> Signed-off-by: Josef Schlehofer 
>> ---
>>  target/linux/mvebu/image/cortex-a9.mk | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/target/linux/mvebu/image/cortex-a9.mk 
>> b/target/linux/mvebu/image/cortex-a9.mk
>> index 66cf54f9c5..f6d63fa786 100644
>> --- a/target/linux/mvebu/image/cortex-a9.mk
>> +++ b/target/linux/mvebu/image/cortex-a9.mk
>> @@ -163,7 +163,7 @@ define Device/turris-omnia
>>DEVICE_PACKAGES :=  \
>>  mkf2fs e2fsprogs kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1 \
>>  wpad-basic kmod-ath9k kmod-ath10k-ct ath10k-firmware-qca988x-ct \
>> -partx-utils
>> +partx-utils kmod-i2c-core kmod-i2c-mux kmod-i2c-mux-pca954x
> 
> is there any reason for adding explicit kmod-i2c-core and kmod-i2c-mux
> dependencies?

Without giving all these options it is not possible to select
kmod-i2c-mux-pca954x.

kmod-i2c-mux is only shown in the menu if kmod-i2c-core is selected and
kmod-i2c-mux-pca954x is only shown if kmod-i2c-mux is selected, you have
to select all 3.

Hauke

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 04/10] kernel: Remove CONFIG_COMPAT

2019-05-03 Thread Hauke Mehrtens
This removes support for executing old 32 bit applications on 64 bit ARM
and MIPS kernels.
On OpenWrt we normally compile all the user space applications on our
own and do not support third party binary only modules especial not 32
bit applications on 64 bit CPUs.

This reduces the attack surface on such systems and should also save
some memory.

Signed-off-by: Hauke Mehrtens 
---
 target/linux/armvirt/64/config-default| 10 --
 target/linux/brcm2708/bcm2710/config-4.14 |  1 -
 target/linux/generic/config-4.14  |  1 +
 target/linux/generic/config-4.19  |  1 +
 target/linux/generic/config-4.9   |  1 +
 target/linux/layerscape/armv8_64b/config-4.14 | 13 -
 target/linux/malta/be64/config-default|  6 --
 target/linux/malta/le64/config-default|  6 --
 target/linux/mediatek/mt7622/config-4.14  | 11 ---
 target/linux/mvebu/cortexa53/config-default   |  1 -
 target/linux/mvebu/cortexa72/config-default   |  1 -
 target/linux/octeon/config-4.14   |  6 --
 target/linux/octeon/config-4.19   |  7 ---
 target/linux/octeontx/config-4.14 | 11 ---
 target/linux/sunxi/cortexa53/config-4.14  |  1 -
 target/linux/sunxi/cortexa53/config-4.19  |  1 -
 16 files changed, 3 insertions(+), 75 deletions(-)

diff --git a/target/linux/armvirt/64/config-default 
b/target/linux/armvirt/64/config-default
index 23d038cbb6..a70cd20f7e 100644
--- a/target/linux/armvirt/64/config-default
+++ b/target/linux/armvirt/64/config-default
@@ -8,7 +8,6 @@ CONFIG_ARCH_HAS_KCOV=y
 CONFIG_ARCH_MMAP_RND_BITS=18
 CONFIG_ARCH_MMAP_RND_BITS_MAX=24
 CONFIG_ARCH_MMAP_RND_BITS_MIN=18
-CONFIG_ARCH_MMAP_RND_COMPAT_BITS=11
 CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11
 CONFIG_ARCH_PHYS_ADDR_T_64BIT=y
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y
@@ -32,7 +31,6 @@ CONFIG_ARM64_ERRATUM_826319=y
 CONFIG_ARM64_ERRATUM_827319=y
 CONFIG_ARM64_ERRATUM_832075=y
 CONFIG_ARM64_ERRATUM_843419=y
-CONFIG_ARM64_ERRATUM_845719=y
 CONFIG_ARM64_HW_AFDBM=y
 # CONFIG_ARM64_LSE_ATOMICS is not set
 CONFIG_ARM64_MODULE_CMODEL_LARGE=y
@@ -48,7 +46,6 @@ CONFIG_ARM64_VA_BITS=39
 CONFIG_ARM64_VA_BITS_39=y
 # CONFIG_ARM64_VA_BITS_48 is not set
 CONFIG_ARM64_VHE=y
-# CONFIG_ARMV8_DEPRECATED is not set
 CONFIG_ARM_GIC_V3_ITS=y
 CONFIG_ARM_PMU=y
 # CONFIG_ARM_SBSA_WATCHDOG is not set
@@ -56,7 +53,6 @@ CONFIG_ATOMIC64_SELFTEST=y
 CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y
 CONFIG_BACKLIGHT_CLASS_DEVICE=y
 CONFIG_BACKLIGHT_LCD_SUPPORT=y
-CONFIG_BLOCK_COMPAT=y
 CONFIG_BOUNCE=y
 CONFIG_CLKSRC_MMIO=y
 CONFIG_CLKSRC_VERSATILE=y
@@ -64,10 +60,6 @@ CONFIG_CLK_SP810=y
 CONFIG_CLK_VEXPRESS_OSC=y
 CONFIG_COMMON_CLK_VERSATILE=y
 # CONFIG_COMMON_CLK_XGENE is not set
-CONFIG_COMPAT=y
-CONFIG_COMPAT_BINFMT_ELF=y
-CONFIG_COMPAT_NETLINK_MESSAGES=y
-CONFIG_COMPAT_OLD_SIGACTION=y
 # CONFIG_CPU_BIG_ENDIAN is not set
 CONFIG_CPU_IDLE=y
 # CONFIG_CPU_IDLE_GOV_LADDER is not set
@@ -114,7 +106,6 @@ CONFIG_HARDEN_BRANCH_PREDICTOR=y
 CONFIG_HAVE_ALIGNED_STRUCT_PAGE=y
 CONFIG_HAVE_ARCH_HUGE_VMAP=y
 CONFIG_HAVE_ARCH_KASAN=y
-CONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y
 CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y
 CONFIG_HAVE_CMPXCHG_DOUBLE=y
 CONFIG_HAVE_CMPXCHG_LOCAL=y
@@ -176,7 +167,6 @@ CONFIG_SPARSEMEM_MANUAL=y
 CONFIG_SPARSEMEM_VMEMMAP=y
 CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
 CONFIG_SYSCTL_EXCEPTION_TRACE=y
-CONFIG_SYSVIPC_COMPAT=y
 CONFIG_SYS_SUPPORTS_HUGETLBFS=y
 # CONFIG_THUNDER_NIC_BGX is not set
 # CONFIG_THUNDER_NIC_PF is not set
diff --git a/target/linux/brcm2708/bcm2710/config-4.14 
b/target/linux/brcm2708/bcm2710/config-4.14
index 00e3c0c2e5..d7170c7875 100644
--- a/target/linux/brcm2708/bcm2710/config-4.14
+++ b/target/linux/brcm2708/bcm2710/config-4.14
@@ -118,7 +118,6 @@ CONFIG_CMA_SIZE_SEL_MBYTES=y
 # CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
 CONFIG_COMMON_CLK=y
 CONFIG_COMMON_CLK_XGENE=y
-# CONFIG_COMPAT is not set
 CONFIG_CONFIGFS_FS=y
 CONFIG_CONSOLE_TRANSLATIONS=y
 # CONFIG_CPUFREQ_DT is not set
diff --git a/target/linux/generic/config-4.14 b/target/linux/generic/config-4.14
index b4b622dd2c..15200a5431 100644
--- a/target/linux/generic/config-4.14
+++ b/target/linux/generic/config-4.14
@@ -819,6 +819,7 @@ CONFIG_CMDLINE=""
 # CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set
 CONFIG_COMPACTION=y
 # CONFIG_COMPAL_LAPTOP is not set
+# CONFIG_COMPAT is not set
 # CONFIG_COMPAT_BRK is not set
 # CONFIG_COMPILE_TEST is not set
 # CONFIG_CONFIGFS_FS is not set
diff --git a/target/linux/generic/config-4.19 b/target/linux/generic/config-4.19
index adc941cdac..c8b014b338 100644
--- a/target/linux/generic/config-4.19
+++ b/target/linux/generic/config-4.19
@@ -850,6 +850,7 @@ CONFIG_CMDLINE=""
 # CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set
 CONFIG_COMPACTION=y
 # CONFIG_COMPAL_LAPTOP is not set
+# CONFIG_COMPAT is not set
 # CONFIG_COMPAT_BRK is not set
 # CONFIG_COMPILE_TEST is not set
 # CONFIG_CONFIGFS_FS is not set
diff --git a/target/linux/generic/config-4.9 

[OpenWrt-Devel] [PATCH 05/10] kernel: Activate CONFIG_SYN_COOKIES for all targets

2019-05-03 Thread Hauke Mehrtens
Some targets deactivated CONFIG_SYN_COOKIES, for unknown reasons, use
the default setting from the generic configuration which activates
CONFIG_SYN_COOKIES.

This should prevent SYN flooding.

Signed-off-by: Hauke Mehrtens 
---
 target/linux/at91/config-4.9  | 1 -
 target/linux/gemini/config-4.14   | 1 -
 target/linux/gemini/config-4.19   | 1 -
 target/linux/layerscape/armv7/config-4.14 | 1 -
 target/linux/layerscape/armv8_32b/config-4.14 | 1 -
 target/linux/layerscape/armv8_64b/config-4.14 | 1 -
 target/linux/zynq/config-4.14 | 1 -
 7 files changed, 7 deletions(-)

diff --git a/target/linux/at91/config-4.9 b/target/linux/at91/config-4.9
index 308b346161..26c499294b 100644
--- a/target/linux/at91/config-4.9
+++ b/target/linux/at91/config-4.9
@@ -482,7 +482,6 @@ CONFIG_SUSPEND_FREEZER=y
 CONFIG_SWIOTLB=y
 CONFIG_SWPHY=y
 # CONFIG_SWP_EMULATE is not set
-# CONFIG_SYN_COOKIES is not set
 CONFIG_SYSFS_SYSCALL=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
 # CONFIG_TCP_CONG_ADVANCED is not set
diff --git a/target/linux/gemini/config-4.14 b/target/linux/gemini/config-4.14
index ef5900771e..9a7e9240e5 100644
--- a/target/linux/gemini/config-4.14
+++ b/target/linux/gemini/config-4.14
@@ -398,7 +398,6 @@ CONFIG_SRCU=y
 CONFIG_SWIOTLB=y
 CONFIG_SWPHY=y
 CONFIG_SYNC_FILE=y
-# CONFIG_SYN_COOKIES is not set
 CONFIG_SYSFS_SYSCALL=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
 CONFIG_TASKS_RCU=y
diff --git a/target/linux/gemini/config-4.19 b/target/linux/gemini/config-4.19
index 014175ea13..d9b9cd7316 100644
--- a/target/linux/gemini/config-4.19
+++ b/target/linux/gemini/config-4.19
@@ -452,7 +452,6 @@ CONFIG_SRCU=y
 # CONFIG_STRIP_ASM_SYMS is not set
 CONFIG_SWPHY=y
 CONFIG_SYNC_FILE=y
-# CONFIG_SYN_COOKIES is not set
 CONFIG_SYSFS_SYSCALL=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
 CONFIG_TASKS_RCU=y
diff --git a/target/linux/layerscape/armv7/config-4.14 
b/target/linux/layerscape/armv7/config-4.14
index 99df681b54..b2573eb321 100755
--- a/target/linux/layerscape/armv7/config-4.14
+++ b/target/linux/layerscape/armv7/config-4.14
@@ -706,7 +706,6 @@ CONFIG_SWIOTLB=y
 CONFIG_SWPHY=y
 CONFIG_SWP_EMULATE=y
 CONFIG_SYNC_FILE=y
-# CONFIG_SYN_COOKIES is not set
 CONFIG_SYSFS_SYSCALL=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
 CONFIG_SYS_SUPPORTS_HUGETLBFS=y
diff --git a/target/linux/layerscape/armv8_32b/config-4.14 
b/target/linux/layerscape/armv8_32b/config-4.14
index cbbbeaabe9..a7b82fb5b8 100644
--- a/target/linux/layerscape/armv8_32b/config-4.14
+++ b/target/linux/layerscape/armv8_32b/config-4.14
@@ -858,7 +858,6 @@ CONFIG_SWIOTLB=y
 CONFIG_SWPHY=y
 CONFIG_SWP_EMULATE=y
 CONFIG_SYNC_FILE=y
-# CONFIG_SYN_COOKIES is not set
 CONFIG_SYSFS_SYSCALL=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
 CONFIG_SYS_SUPPORTS_HUGETLBFS=y
diff --git a/target/linux/layerscape/armv8_64b/config-4.14 
b/target/linux/layerscape/armv8_64b/config-4.14
index e9da223528..585cad6cc0 100644
--- a/target/linux/layerscape/armv8_64b/config-4.14
+++ b/target/linux/layerscape/armv8_64b/config-4.14
@@ -848,7 +848,6 @@ CONFIG_SWIOTLB=y
 CONFIG_SWIOTLB_XEN=y
 CONFIG_SWPHY=y
 CONFIG_SYNC_FILE=y
-# CONFIG_SYN_COOKIES is not set
 CONFIG_SYSCTL_EXCEPTION_TRACE=y
 CONFIG_SYSFS_SYSCALL=y
 CONFIG_SYS_HYPERVISOR=y
diff --git a/target/linux/zynq/config-4.14 b/target/linux/zynq/config-4.14
index 1e39e1061e..fc33ca1b51 100644
--- a/target/linux/zynq/config-4.14
+++ b/target/linux/zynq/config-4.14
@@ -574,7 +574,6 @@ CONFIG_SWIOTLB=y
 CONFIG_SWPHY=y
 CONFIG_SWP_EMULATE=y
 CONFIG_SYNC_FILE=y
-# CONFIG_SYN_COOKIES is not set
 CONFIG_SYSCTL_SYSCALL=y
 CONFIG_SYSFS_SYSCALL=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
-- 
2.20.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 08/10] x86: Activate CONFIG_X86_SMAP

2019-05-03 Thread Hauke Mehrtens
This activates "Supervisor Mode Access Prevention". modern CPUs will
prevent the kernel code from accessing any data from the userspace
without the usage of copy_to_user() or copy_from_user()

Signed-off-by: Hauke Mehrtens 
---
 target/linux/x86/config-4.14 | 2 +-
 target/linux/x86/config-4.19 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/x86/config-4.14 b/target/linux/x86/config-4.14
index ae96e4d97a..014e7b275b 100644
--- a/target/linux/x86/config-4.14
+++ b/target/linux/x86/config-4.14
@@ -505,7 +505,7 @@ CONFIG_X86_PPRO_FENCE=y
 # CONFIG_X86_REBOOTFIXUPS is not set
 CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y
 CONFIG_X86_RESERVE_LOW=64
-# CONFIG_X86_SMAP is not set
+CONFIG_X86_SMAP=y
 # CONFIG_X86_SPEEDSTEP_CENTRINO is not set
 # CONFIG_X86_SPEEDSTEP_ICH is not set
 # CONFIG_X86_SPEEDSTEP_LIB is not set
diff --git a/target/linux/x86/config-4.19 b/target/linux/x86/config-4.19
index d395876955..d8c2d966d0 100644
--- a/target/linux/x86/config-4.19
+++ b/target/linux/x86/config-4.19
@@ -484,7 +484,7 @@ CONFIG_X86_PLATFORM_DEVICES=y
 # CONFIG_X86_REBOOTFIXUPS is not set
 CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y
 CONFIG_X86_RESERVE_LOW=64
-# CONFIG_X86_SMAP is not set
+CONFIG_X86_SMAP=y
 # CONFIG_X86_SPEEDSTEP_CENTRINO is not set
 # CONFIG_X86_SPEEDSTEP_ICH is not set
 # CONFIG_X86_SPEEDSTEP_SMI is not set
-- 
2.20.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 01/10] Kernel: Activate CONFIG_HARDENED_USERCOPY

2019-05-03 Thread Hauke Mehrtens
This adds additional checks to the copy_from_user() and copy_to_user()
functions. The details are described in this article:
https://lwn.net/Articles/695991/

This should only have a very small performance impact on system calls
and should not affect routing performance.

Signed-off-by: Hauke Mehrtens 
---
 target/linux/generic/config-4.14 | 3 ++-
 target/linux/generic/config-4.19 | 4 +++-
 target/linux/generic/config-4.9  | 3 ++-
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/target/linux/generic/config-4.14 b/target/linux/generic/config-4.14
index 6f2db60989..e607c6dc80 100644
--- a/target/linux/generic/config-4.14
+++ b/target/linux/generic/config-4.14
@@ -1593,7 +1593,8 @@ CONFIG_GENERIC_NET_UTILS=y
 # CONFIG_HAMACHI is not set
 # CONFIG_HAMRADIO is not set
 # CONFIG_HAPPYMEAL is not set
-# CONFIG_HARDENED_USERCOPY is not set
+CONFIG_HARDENED_USERCOPY=y
+# CONFIG_HARDENED_USERCOPY_PAGESPAN is not set
 # CONFIG_HARDLOCKUP_DETECTOR is not set
 # CONFIG_HAVE_AOUT is not set
 CONFIG_HAVE_ARCH_HARDENED_USERCOPY=y
diff --git a/target/linux/generic/config-4.19 b/target/linux/generic/config-4.19
index 3acfbb1f69..7e1528f517 100644
--- a/target/linux/generic/config-4.19
+++ b/target/linux/generic/config-4.19
@@ -1688,7 +1688,9 @@ CONFIG_GPIOLIB_FASTPATH_LIMIT=512
 # CONFIG_HAMACHI is not set
 # CONFIG_HAMRADIO is not set
 # CONFIG_HAPPYMEAL is not set
-# CONFIG_HARDENED_USERCOPY is not set
+CONFIG_HARDENED_USERCOPY=y
+# CONFIG_HARDENED_USERCOPY_FALLBACK is not set
+# CONFIG_HARDENED_USERCOPY_PAGESPAN is not set
 CONFIG_HARDEN_EL2_VECTORS=y
 # CONFIG_HARDLOCKUP_DETECTOR is not set
 # CONFIG_HAVE_AOUT is not set
diff --git a/target/linux/generic/config-4.9 b/target/linux/generic/config-4.9
index 1ed16edf02..cf50b4919c 100644
--- a/target/linux/generic/config-4.9
+++ b/target/linux/generic/config-4.9
@@ -1439,7 +1439,8 @@ CONFIG_GENERIC_NET_UTILS=y
 # CONFIG_HAMACHI is not set
 # CONFIG_HAMRADIO is not set
 # CONFIG_HAPPYMEAL is not set
-# CONFIG_HARDENED_USERCOPY is not set
+CONFIG_HARDENED_USERCOPY=y
+# CONFIG_HARDENED_USERCOPY_PAGESPAN is not set
 # CONFIG_HARDLOCKUP_DETECTOR is not set
 # CONFIG_HAVE_AOUT is not set
 CONFIG_HAVE_ARCH_HARDENED_USERCOPY=y
-- 
2.20.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 06/10] kernel: Do not set CONFIG_DEVMEM or CONFIG_DEVKMEM

2019-05-03 Thread Hauke Mehrtens
This is deactivated by default and should be manually activated in the
OpenWrt kernel configuration

Signed-off-by: Hauke Mehrtens 
---
 target/linux/layerscape/armv7/config-4.14 | 2 --
 target/linux/layerscape/armv8_32b/config-4.14 | 2 --
 target/linux/layerscape/armv8_64b/config-4.14 | 1 -
 target/linux/samsung/s5pv210/config-4.14  | 1 -
 4 files changed, 6 deletions(-)

diff --git a/target/linux/layerscape/armv7/config-4.14 
b/target/linux/layerscape/armv7/config-4.14
index b2573eb321..0880436a20 100755
--- a/target/linux/layerscape/armv7/config-4.14
+++ b/target/linux/layerscape/armv7/config-4.14
@@ -205,8 +205,6 @@ CONFIG_DETECT_HUNG_TASK=y
 # CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND is not set
 # CONFIG_DEVFREQ_GOV_USERSPACE is not set
 # CONFIG_DEVFREQ_THERMAL is not set
-CONFIG_DEVKMEM=y
-CONFIG_DEVMEM=y
 CONFIG_DEVTMPFS=y
 CONFIG_DEVTMPFS_MOUNT=y
 CONFIG_DMADEVICES=y
diff --git a/target/linux/layerscape/armv8_32b/config-4.14 
b/target/linux/layerscape/armv8_32b/config-4.14
index a7b82fb5b8..437081a3a8 100644
--- a/target/linux/layerscape/armv8_32b/config-4.14
+++ b/target/linux/layerscape/armv8_32b/config-4.14
@@ -218,8 +218,6 @@ CONFIG_DEFAULT_CFQ=y
 CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120
 CONFIG_DEFAULT_IOSCHED="cfq"
 CONFIG_DETECT_HUNG_TASK=y
-CONFIG_DEVKMEM=y
-CONFIG_DEVMEM=y
 CONFIG_DEVTMPFS=y
 CONFIG_DEVTMPFS_MOUNT=y
 CONFIG_DMADEVICES=y
diff --git a/target/linux/layerscape/armv8_64b/config-4.14 
b/target/linux/layerscape/armv8_64b/config-4.14
index 585cad6cc0..739ca731f9 100644
--- a/target/linux/layerscape/armv8_64b/config-4.14
+++ b/target/linux/layerscape/armv8_64b/config-4.14
@@ -215,7 +215,6 @@ CONFIG_DEFAULT_CFQ=y
 CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120
 CONFIG_DEFAULT_IOSCHED="cfq"
 CONFIG_DETECT_HUNG_TASK=y
-CONFIG_DEVMEM=y
 CONFIG_DEVTMPFS=y
 CONFIG_DEVTMPFS_MOUNT=y
 CONFIG_DMADEVICES=y
diff --git a/target/linux/samsung/s5pv210/config-4.14 
b/target/linux/samsung/s5pv210/config-4.14
index b72fce16f0..548b198715 100644
--- a/target/linux/samsung/s5pv210/config-4.14
+++ b/target/linux/samsung/s5pv210/config-4.14
@@ -117,7 +117,6 @@ CONFIG_DECOMPRESS_LZO=y
 CONFIG_DECOMPRESS_XZ=y
 CONFIG_DEFAULT_IOSCHED="noop"
 CONFIG_DEFAULT_NOOP=y
-CONFIG_DEVMEM=y
 CONFIG_DM9000=y
 # CONFIG_DM9000_FORCE_SIMPLE_PHY_POLL is not set
 CONFIG_DNOTIFY=y
-- 
2.20.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 02/10] kernel: Activate CONFIG_ARM64_SW_TTBR0_PAN

2019-05-03 Thread Hauke Mehrtens
This activates "Emulate Privileged Access Never using TTBR0_EL1
switching" on ARM64.

This should prevent the kernel from reading code from user space in
kernel context.

Signed-off-by: Hauke Mehrtens 
---
 target/linux/armvirt/64/config-default| 1 -
 target/linux/brcm2708/bcm2710/config-4.14 | 1 -
 target/linux/generic/config-4.14  | 1 +
 target/linux/generic/config-4.19  | 1 +
 target/linux/layerscape/armv8_64b/config-4.14 | 1 -
 target/linux/mediatek/mt7622/config-4.14  | 1 -
 target/linux/mvebu/cortexa53/config-default   | 1 -
 target/linux/mvebu/cortexa72/config-default   | 1 -
 target/linux/octeontx/config-4.14 | 1 -
 target/linux/sunxi/cortexa53/config-4.14  | 1 -
 target/linux/sunxi/cortexa53/config-4.19  | 1 -
 11 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/target/linux/armvirt/64/config-default 
b/target/linux/armvirt/64/config-default
index e5c05b3160..23d038cbb6 100644
--- a/target/linux/armvirt/64/config-default
+++ b/target/linux/armvirt/64/config-default
@@ -43,7 +43,6 @@ CONFIG_ARM64_PAN=y
 # CONFIG_ARM64_PTDUMP_DEBUGFS is not set
 # CONFIG_ARM64_RANDOMIZE_TEXT_OFFSET is not set
 CONFIG_ARM64_SSBD=y
-# CONFIG_ARM64_SW_TTBR0_PAN is not set
 CONFIG_ARM64_UAO=y
 CONFIG_ARM64_VA_BITS=39
 CONFIG_ARM64_VA_BITS_39=y
diff --git a/target/linux/brcm2708/bcm2710/config-4.14 
b/target/linux/brcm2708/bcm2710/config-4.14
index 9faf7f762a..00e3c0c2e5 100644
--- a/target/linux/brcm2708/bcm2710/config-4.14
+++ b/target/linux/brcm2708/bcm2710/config-4.14
@@ -60,7 +60,6 @@ CONFIG_ARM64_PAN=y
 # CONFIG_ARM64_PTDUMP_DEBUGFS is not set
 # CONFIG_ARM64_RANDOMIZE_TEXT_OFFSET is not set
 CONFIG_ARM64_SSBD=y
-# CONFIG_ARM64_SW_TTBR0_PAN is not set
 CONFIG_ARM64_UAO=y
 CONFIG_ARM64_VA_BITS=39
 CONFIG_ARM64_VA_BITS_39=y
diff --git a/target/linux/generic/config-4.14 b/target/linux/generic/config-4.14
index e607c6dc80..f9834b8cf8 100644
--- a/target/linux/generic/config-4.14
+++ b/target/linux/generic/config-4.14
@@ -285,6 +285,7 @@ CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8
 # CONFIG_ARM64_ERRATUM_845719 is not set
 # CONFIG_ARM64_ERRATUM_858921 is not set
 # CONFIG_ARM64_RELOC_TEST is not set
+CONFIG_ARM64_SW_TTBR0_PAN=y
 # CONFIG_ARM_APPENDED_DTB is not set
 # CONFIG_ARM_ARCH_TIMER is not set
 # CONFIG_ARM_BIG_LITTLE_CPUFREQ is not set
diff --git a/target/linux/generic/config-4.19 b/target/linux/generic/config-4.19
index 7e1528f517..dc392ebb56 100644
--- a/target/linux/generic/config-4.19
+++ b/target/linux/generic/config-4.19
@@ -296,6 +296,7 @@ CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8
 # CONFIG_ARM64_ERRATUM_858921 is not set
 # CONFIG_ARM64_RAS_EXTN is not set
 # CONFIG_ARM64_RELOC_TEST is not set
+CONFIG_ARM64_SW_TTBR0_PAN=y
 # CONFIG_ARM_APPENDED_DTB is not set
 # CONFIG_ARM_ARCH_TIMER is not set
 # CONFIG_ARM_BIG_LITTLE_CPUFREQ is not set
diff --git a/target/linux/layerscape/armv8_64b/config-4.14 
b/target/linux/layerscape/armv8_64b/config-4.14
index 782da4e3fb..b925c3c03e 100644
--- a/target/linux/layerscape/armv8_64b/config-4.14
+++ b/target/linux/layerscape/armv8_64b/config-4.14
@@ -65,7 +65,6 @@ CONFIG_ARM64_PAN=y
 # CONFIG_ARM64_PTDUMP_DEBUGFS is not set
 # CONFIG_ARM64_RANDOMIZE_TEXT_OFFSET is not set
 CONFIG_ARM64_SSBD=y
-# CONFIG_ARM64_SW_TTBR0_PAN is not set
 CONFIG_ARM64_UAO=y
 CONFIG_ARM64_VA_BITS=48
 # CONFIG_ARM64_VA_BITS_39 is not set
diff --git a/target/linux/mediatek/mt7622/config-4.14 
b/target/linux/mediatek/mt7622/config-4.14
index 86951e198a..58ab6642fc 100644
--- a/target/linux/mediatek/mt7622/config-4.14
+++ b/target/linux/mediatek/mt7622/config-4.14
@@ -53,7 +53,6 @@ CONFIG_ARM64_PAN=y
 # CONFIG_ARM64_PTDUMP_DEBUGFS is not set
 # CONFIG_ARM64_RANDOMIZE_TEXT_OFFSET is not set
 CONFIG_ARM64_SSBD=y
-# CONFIG_ARM64_SW_TTBR0_PAN is not set
 CONFIG_ARM64_UAO=y
 CONFIG_ARM64_VA_BITS=39
 CONFIG_ARM64_VA_BITS_39=y
diff --git a/target/linux/mvebu/cortexa53/config-default 
b/target/linux/mvebu/cortexa53/config-default
index 674a294460..b0dd2ee39e 100644
--- a/target/linux/mvebu/cortexa53/config-default
+++ b/target/linux/mvebu/cortexa53/config-default
@@ -37,7 +37,6 @@ CONFIG_ARM64_PAGE_SHIFT=12
 # CONFIG_ARM64_PTDUMP_DEBUGFS is not set
 # CONFIG_ARM64_RANDOMIZE_TEXT_OFFSET is not set
 CONFIG_ARM64_SSBD=y
-# CONFIG_ARM64_SW_TTBR0_PAN is not set
 # CONFIG_ARM64_UAO is not set
 CONFIG_ARM64_VA_BITS=39
 CONFIG_ARM64_VA_BITS_39=y
diff --git a/target/linux/mvebu/cortexa72/config-default 
b/target/linux/mvebu/cortexa72/config-default
index 61c3998bb1..8598471f4c 100644
--- a/target/linux/mvebu/cortexa72/config-default
+++ b/target/linux/mvebu/cortexa72/config-default
@@ -37,7 +37,6 @@ CONFIG_ARM64_PAGE_SHIFT=12
 # CONFIG_ARM64_PTDUMP_DEBUGFS is not set
 # CONFIG_ARM64_RANDOMIZE_TEXT_OFFSET is not set
 CONFIG_ARM64_SSBD=y
-# CONFIG_ARM64_SW_TTBR0_PAN is not set
 # CONFIG_ARM64_UAO is not set
 CONFIG_ARM64_VA_BITS=39
 CONFIG_ARM64_VA_BITS_39=y
diff --git a/target/linux/octeontx/config-4.14 
b/target/linux/octeontx/config-4.14
index 

[OpenWrt-Devel] [PATCH 03/10] kernel: Remove CONFIG_DEBUG_RODATA and CONFIG_DEBUG_SET_MODULE_RONX

2019-05-03 Thread Hauke Mehrtens
These were renamed to CONFIG_STRICT_KERNEL_RWX and CONFIG_STRICT_MODULE_RWX and 
are
activated in kernel 4.14 and later by default.

Signed-off-by: Hauke Mehrtens 
---
 target/linux/generic/config-4.14 | 2 --
 target/linux/generic/config-4.19 | 2 --
 2 files changed, 4 deletions(-)

diff --git a/target/linux/generic/config-4.14 b/target/linux/generic/config-4.14
index f9834b8cf8..b4b622dd2c 100644
--- a/target/linux/generic/config-4.14
+++ b/target/linux/generic/config-4.14
@@ -1050,12 +1050,10 @@ CONFIG_DEBUG_KERNEL=y
 # CONFIG_DEBUG_PINCTRL is not set
 # CONFIG_DEBUG_PI_LIST is not set
 # CONFIG_DEBUG_PREEMPT is not set
-# CONFIG_DEBUG_RODATA is not set
 # CONFIG_DEBUG_RODATA_TEST is not set
 # CONFIG_DEBUG_RT_MUTEXES is not set
 # CONFIG_DEBUG_SECTION_MISMATCH is not set
 # CONFIG_DEBUG_SEMIHOSTING is not set
-# CONFIG_DEBUG_SET_MODULE_RONX is not set
 # CONFIG_DEBUG_SG is not set
 # CONFIG_DEBUG_SHIRQ is not set
 # CONFIG_DEBUG_SLAB is not set
diff --git a/target/linux/generic/config-4.19 b/target/linux/generic/config-4.19
index dc392ebb56..adc941cdac 100644
--- a/target/linux/generic/config-4.19
+++ b/target/linux/generic/config-4.19
@@ -1105,14 +1105,12 @@ CONFIG_DEBUG_KERNEL=y
 # CONFIG_DEBUG_PINCTRL is not set
 # CONFIG_DEBUG_PI_LIST is not set
 # CONFIG_DEBUG_PREEMPT is not set
-# CONFIG_DEBUG_RODATA is not set
 # CONFIG_DEBUG_RODATA_TEST is not set
 # CONFIG_DEBUG_RSEQ is not set
 # CONFIG_DEBUG_RT_MUTEXES is not set
 # CONFIG_DEBUG_RWSEMS is not set
 # CONFIG_DEBUG_SECTION_MISMATCH is not set
 # CONFIG_DEBUG_SEMIHOSTING is not set
-# CONFIG_DEBUG_SET_MODULE_RONX is not set
 # CONFIG_DEBUG_SG is not set
 # CONFIG_DEBUG_SHIRQ is not set
 # CONFIG_DEBUG_SLAB is not set
-- 
2.20.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 10/10] gemini: Make kernel text and rodata read-only

2019-05-03 Thread Hauke Mehrtens
This is activate for all other targets except gemini, also activate it
there.

Signed-off-by: Hauke Mehrtens 
---
 target/linux/gemini/config-4.14 | 2 --
 target/linux/gemini/config-4.19 | 2 --
 2 files changed, 4 deletions(-)

diff --git a/target/linux/gemini/config-4.14 b/target/linux/gemini/config-4.14
index 8dddf02018..c049200fe0 100644
--- a/target/linux/gemini/config-4.14
+++ b/target/linux/gemini/config-4.14
@@ -391,8 +391,6 @@ CONFIG_SPI_MASTER=y
 CONFIG_SPLIT_PTLOCK_CPUS=99
 CONFIG_SRCU=y
 # CONFIG_STAGING is not set
-# CONFIG_STRICT_KERNEL_RWX is not set
-# CONFIG_STRICT_MODULE_RWX is not set
 # CONFIG_STRIP_ASM_SYMS is not set
 CONFIG_SWIOTLB=y
 CONFIG_SWPHY=y
diff --git a/target/linux/gemini/config-4.19 b/target/linux/gemini/config-4.19
index 745bad67da..7eee5fe9c0 100644
--- a/target/linux/gemini/config-4.19
+++ b/target/linux/gemini/config-4.19
@@ -446,8 +446,6 @@ CONFIG_SPI_MASTER=y
 CONFIG_SPLIT_PTLOCK_CPUS=99
 CONFIG_SRCU=y
 # CONFIG_STAGING is not set
-# CONFIG_STRICT_KERNEL_RWX is not set
-# CONFIG_STRICT_MODULE_RWX is not set
 # CONFIG_STRIP_ASM_SYMS is not set
 CONFIG_SWPHY=y
 CONFIG_SYNC_FILE=y
-- 
2.20.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 09/10] cns3xxx: Activate CONFIG_CPU_SW_DOMAIN_PAN

2019-05-03 Thread Hauke Mehrtens
This is already activated for all other ARM targets

Signed-off-by: Hauke Mehrtens 
---
 target/linux/cns3xxx/config-4.14 | 1 -
 target/linux/cns3xxx/config-4.19 | 1 -
 2 files changed, 2 deletions(-)

diff --git a/target/linux/cns3xxx/config-4.14 b/target/linux/cns3xxx/config-4.14
index a0c65fa5f0..54f7576ea5 100644
--- a/target/linux/cns3xxx/config-4.14
+++ b/target/linux/cns3xxx/config-4.14
@@ -71,7 +71,6 @@ CONFIG_CPU_HAS_ASID=y
 # CONFIG_CPU_ICACHE_DISABLE is not set
 CONFIG_CPU_PABRT_V6=y
 CONFIG_CPU_RMAP=y
-# CONFIG_CPU_SW_DOMAIN_PAN is not set
 CONFIG_CPU_THUMB_CAPABLE=y
 CONFIG_CPU_TLB_V6=y
 CONFIG_CPU_V6K=y
diff --git a/target/linux/cns3xxx/config-4.19 b/target/linux/cns3xxx/config-4.19
index 63fedc1bea..b92b1e2aef 100644
--- a/target/linux/cns3xxx/config-4.19
+++ b/target/linux/cns3xxx/config-4.19
@@ -67,7 +67,6 @@ CONFIG_CPU_HAS_ASID=y
 # CONFIG_CPU_ICACHE_DISABLE is not set
 CONFIG_CPU_PABRT_V6=y
 CONFIG_CPU_RMAP=y
-# CONFIG_CPU_SW_DOMAIN_PAN is not set
 CONFIG_CPU_THUMB_CAPABLE=y
 CONFIG_CPU_TLB_V6=y
 CONFIG_CPU_V6K=y
-- 
2.20.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 00/10] kernel: Kernel Self Protection Project/Recommended Settings

2019-05-03 Thread Hauke Mehrtens
This activates and deactivates some of the options suggested on the 
Kernel Self Protection Project/Recommended Settings wiki page
https://kernsec.org/wiki/index.php/Kernel_Self_Protection_Project/Recommended_Settings

Hauke Mehrtens (10):
  Kernel: Activate CONFIG_HARDENED_USERCOPY
  kernel: Activate CONFIG_ARM64_SW_TTBR0_PAN
  kernel: Remove CONFIG_DEBUG_RODATA and CONFIG_DEBUG_SET_MODULE_RONX
  kernel: Remove CONFIG_COMPAT
  kernel: Activate CONFIG_SYN_COOKIES for all targets
  kernel: Do not set CONFIG_DEVMEM or CONFIG_DEVKMEM
  kernel: Deactivate CONFIG_BINFMT_MISC
  x86: Activate CONFIG_X86_SMAP
  cns3xxx: Activate CONFIG_CPU_SW_DOMAIN_PAN
  gemini: Make kernel text and rodata read-only

 target/linux/armvirt/64/config-default| 11 ---
 target/linux/at91/config-4.9  |  1 -
 target/linux/brcm2708/bcm2710/config-4.14 |  2 --
 target/linux/cns3xxx/config-4.14  |  1 -
 target/linux/cns3xxx/config-4.19  |  1 -
 target/linux/gemini/config-4.14   |  4 
 target/linux/gemini/config-4.19   |  4 
 target/linux/generic/config-4.14  |  7 ---
 target/linux/generic/config-4.19  |  8 +---
 target/linux/generic/config-4.9   |  4 +++-
 target/linux/layerscape/armv7/config-4.14 |  3 ---
 target/linux/layerscape/armv8_32b/config-4.14 |  3 ---
 target/linux/layerscape/armv8_64b/config-4.14 | 16 
 target/linux/malta/be64/config-default|  6 --
 target/linux/malta/le64/config-default|  6 --
 target/linux/mediatek/mt7622/config-4.14  | 12 
 target/linux/mvebu/cortexa53/config-default   |  2 --
 target/linux/mvebu/cortexa72/config-default   |  2 --
 target/linux/octeon/config-4.14   |  6 --
 target/linux/octeon/config-4.19   |  7 ---
 target/linux/octeontx/config-4.14 | 12 
 target/linux/omap/config-4.14 |  1 -
 target/linux/samsung/s5pv210/config-4.14  |  1 -
 target/linux/sunxi/config-4.14|  1 -
 target/linux/sunxi/config-4.19|  1 -
 target/linux/sunxi/cortexa53/config-4.14  |  2 --
 target/linux/sunxi/cortexa53/config-4.19  |  2 --
 target/linux/uml/config/x86_64|  1 -
 target/linux/x86/config-4.14  |  3 +--
 target/linux/x86/config-4.19  |  3 +--
 target/linux/zynq/config-4.14 |  1 -
 31 files changed, 14 insertions(+), 120 deletions(-)

-- 
2.20.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 07/10] kernel: Deactivate CONFIG_BINFMT_MISC

2019-05-03 Thread Hauke Mehrtens
CONFIG_BINFMT_MISC allows it to add support for new executable formats
to the kernel from user space, the kernel will then detect for example a
java binary and call the java execution program automatically. I am not
aware that this feature is used in OpenWrt and this could be used to
exploit something. Deactivate it for all targets for now.

Signed-off-by: Hauke Mehrtens 
---
 target/linux/gemini/config-4.14 | 1 -
 target/linux/gemini/config-4.19 | 1 -
 target/linux/omap/config-4.14   | 1 -
 target/linux/sunxi/config-4.14  | 1 -
 target/linux/sunxi/config-4.19  | 1 -
 target/linux/uml/config/x86_64  | 1 -
 target/linux/x86/config-4.14| 1 -
 target/linux/x86/config-4.19| 1 -
 8 files changed, 8 deletions(-)

diff --git a/target/linux/gemini/config-4.14 b/target/linux/gemini/config-4.14
index 9a7e9240e5..8dddf02018 100644
--- a/target/linux/gemini/config-4.14
+++ b/target/linux/gemini/config-4.14
@@ -44,7 +44,6 @@ CONFIG_ATA=y
 CONFIG_ATAGS=y
 CONFIG_ATA_VERBOSE_ERROR=y
 CONFIG_AUTO_ZRELADDR=y
-CONFIG_BINFMT_MISC=y
 CONFIG_BLK_DEV_SD=y
 CONFIG_BLK_MQ_PCI=y
 CONFIG_BLK_SCSI_REQUEST=y
diff --git a/target/linux/gemini/config-4.19 b/target/linux/gemini/config-4.19
index d9b9cd7316..745bad67da 100644
--- a/target/linux/gemini/config-4.19
+++ b/target/linux/gemini/config-4.19
@@ -44,7 +44,6 @@ CONFIG_ATA=y
 CONFIG_ATAGS=y
 CONFIG_ATA_VERBOSE_ERROR=y
 CONFIG_AUTO_ZRELADDR=y
-CONFIG_BINFMT_MISC=y
 CONFIG_BLK_DEV_SD=y
 CONFIG_BLK_MQ_PCI=y
 CONFIG_BLK_SCSI_REQUEST=y
diff --git a/target/linux/omap/config-4.14 b/target/linux/omap/config-4.14
index 795ff758e3..67a33d2b23 100644
--- a/target/linux/omap/config-4.14
+++ b/target/linux/omap/config-4.14
@@ -68,7 +68,6 @@ CONFIG_BACKLIGHT_LCD_SUPPORT=y
 # CONFIG_BACKLIGHT_PWM is not set
 # CONFIG_BACKLIGHT_TPS65217 is not set
 CONFIG_BCH=y
-CONFIG_BINFMT_MISC=y
 CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
diff --git a/target/linux/sunxi/config-4.14 b/target/linux/sunxi/config-4.14
index d7d9f60a6d..ab7dc9c9b8 100644
--- a/target/linux/sunxi/config-4.14
+++ b/target/linux/sunxi/config-4.14
@@ -65,7 +65,6 @@ CONFIG_AXP20X_POWER=y
 CONFIG_BACKLIGHT_CLASS_DEVICE=y
 CONFIG_BACKLIGHT_LCD_SUPPORT=y
 CONFIG_BACKLIGHT_PWM=y
-CONFIG_BINFMT_MISC=y
 CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_SD=y
 CONFIG_BLK_SCSI_REQUEST=y
diff --git a/target/linux/sunxi/config-4.19 b/target/linux/sunxi/config-4.19
index c684c04e17..ef5e1b28d3 100644
--- a/target/linux/sunxi/config-4.19
+++ b/target/linux/sunxi/config-4.19
@@ -73,7 +73,6 @@ CONFIG_AXP20X_POWER=y
 CONFIG_BACKLIGHT_CLASS_DEVICE=y
 CONFIG_BACKLIGHT_LCD_SUPPORT=y
 CONFIG_BACKLIGHT_PWM=y
-CONFIG_BINFMT_MISC=y
 CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_SD=y
 CONFIG_BLK_SCSI_REQUEST=y
diff --git a/target/linux/uml/config/x86_64 b/target/linux/uml/config/x86_64
index 22fc8fb7e0..7223edd8a2 100644
--- a/target/linux/uml/config/x86_64
+++ b/target/linux/uml/config/x86_64
@@ -10,7 +10,6 @@ CONFIG_ARCH_HAS_KCOV=y
 # CONFIG_ARCH_OPTIONAL_KERNEL_RWX is not set
 # CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT is not set
 # CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA is not set
-CONFIG_BINFMT_MISC=m
 CONFIG_BLK_DEV_COW_COMMON=y
 CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_UBD=y
diff --git a/target/linux/x86/config-4.14 b/target/linux/x86/config-4.14
index c31783eb8f..ae96e4d97a 100644
--- a/target/linux/x86/config-4.14
+++ b/target/linux/x86/config-4.14
@@ -54,7 +54,6 @@ CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
 CONFIG_ATA=y
 CONFIG_ATA_GENERIC=y
 CONFIG_ATA_PIIX=y
-CONFIG_BINFMT_MISC=y
 CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_SD=y
 CONFIG_BLK_MQ_PCI=y
diff --git a/target/linux/x86/config-4.19 b/target/linux/x86/config-4.19
index 80a94b24d3..d395876955 100644
--- a/target/linux/x86/config-4.19
+++ b/target/linux/x86/config-4.19
@@ -53,7 +53,6 @@ CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
 CONFIG_ATA=y
 CONFIG_ATA_GENERIC=y
 CONFIG_ATA_PIIX=y
-CONFIG_BINFMT_MISC=y
 CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_SD=y
 CONFIG_BLK_MQ_PCI=y
-- 
2.20.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v2 1/2] base-files: improve lib/upgrade/common.sh

2019-05-03 Thread Petr Štetiar
Klaus Kudielka  [2019-05-03 20:16:39]:

> Let me remind you that the common one *alone* breaks sysupgrade for those
> four targets, as Tomasz already pointed out earlier.

Well, how could I know what was wrong with v1 if you didn't included the
changes between v1 -> v2 in your v2 patch :-)

Anyway, thanks for the explanation, it wasn't that much clear to me from the
commit message, so if you don't mind, I'll include the details there as well
in order to help it better understand to other folks.

Merged into my staging tree 
https://git.openwrt.org/?p=openwrt/staging/ynezz.git;a=commit;h=195178f88ee7b3815f9bea66a2454ccfdf2135a5

> In more detail:
> 
> The root of the problem is that the *existing* export_bootdevice in
> /lib/upgrade/common.sh behaves differently, if the kernel is booted with
> root=/dev/..., or if it is booted with root=PARTUUID=...
> 
> In the former case, it reports back major/minor of the root partition,
> in the latter case it reports back major/minor of the complete boot disk.
> 
> The targets mentioned above have added workarounds to this behaviour, by
> specifying *negative* increments to the export_partdevice function.
> 
> And then came the mvebu target to use export_bootdevice /
> export_partdevice as well. Now, different subtargets boot differently,
> and the workaround would be even more complex.
> 
> I think now is the time to make export_bootdevice behave consistently,
> and to report major/minor of the boot disk, period.
> 
> Consequently, those targets, which boot with root=/dev/... *and* use
> export_bootdevice / export_partdevice, have to be adapted to use
> positive increments, otherwise they are broken by the change
> to export_bootdevice.
> 
> The targets affected were easy to spot with find & grep.

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] libbsd: Fix compilation under ARC

2019-05-03 Thread Rosen Penev


On Fri, May 3, 2019 at 11:55 AM, Petr Štetiar  wrote:

Rosen Penev  [2019-05-03 10:49:54]:


 > On May 3, 2019, at 10:17, Petr Štetiar  wrote:
 >
 > Rosen Penev  [2019-05-01 10:04:45]:
 >
 >> The 8 year old file does not have any ARC definitions.
 >
 > I'm wondering if we need to cary another patch forever, thus if 
it wouldn't be
 > better to backport upstreamed patch and/or bump to fixed upstream 
version.


 As I said. This file has not been touched in 8 years. Upstream also 
seems relatively dead.


According to this https://gitlab.freedesktop.org/libbsd/libbsd it 
doesn't seem
that much dead to me, as I wouldn't expect that much changes in such 
compat

library anyway.
All of the merge requests (what GitLab calls pull requests) except one 
have no comments. There are also none that have actually been merged.



-- ynezz




___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] libbsd: Fix compilation under ARC

2019-05-03 Thread Petr Štetiar
Rosen Penev  [2019-05-03 10:49:54]:

> > On May 3, 2019, at 10:17, Petr Štetiar  wrote:
> > 
> > Rosen Penev  [2019-05-01 10:04:45]:
> > 
> >> The 8 year old file does not have any ARC definitions.
> > 
> > I'm wondering if we need to cary another patch forever, thus if it wouldn't 
> > be
> > better to backport upstreamed patch and/or bump to fixed upstream version.
>
> As I said. This file has not been touched in 8 years. Upstream also seems 
> relatively dead.

According to this https://gitlab.freedesktop.org/libbsd/libbsd it doesn't seem
that much dead to me, as I wouldn't expect that much changes in such compat
library anyway.

-- ynezz

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] nftables: Fix compilation with uClibc-ng

2019-05-03 Thread Rosen Penev
On Fri, May 3, 2019 at 4:50 AM Petr Štetiar  wrote:
>
> Rosen Penev  [2019-05-01 10:08:10]:
>
> Hi,
>
> > Missing header for va_list.
>
> shouldn't this go through upstream first? Thanks.
Sent
>
> -- ynezz

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v2 1/2] base-files: improve lib/upgrade/common.sh

2019-05-03 Thread Klaus Kudielka

On 03.05.19 19:05, Petr Štetiar wrote:

Klaus Kudielka  [2019-04-24 21:14:38]:

Hi Klaus,


Remove workarounds for the old, inconsistent behaviour from the following
targets: apm821xx, brcm2708, omap, sunxi.

I'm willing to push the fix for mvebu (which the patch series is about), so
please don't touch other targets.  This should go into separate patch(es) and
in order to push it, I would need some Tested-by, Reviewed-by or Acked-by for
every platform separately.


Petr, do I understand correctly, I should split this single patch into
the common.sh one, and four additional ones (one per target)?

--

Let me remind you that the common one *alone* breaks sysupgrade for those
four targets, as Tomasz already pointed out earlier.

In more detail:

The root of the problem is that the *existing* export_bootdevice in
/lib/upgrade/common.sh behaves differently, if the kernel is booted with
root=/dev/..., or if it is booted with root=PARTUUID=...

In the former case, it reports back major/minor of the root partition,
in the latter case it reports back major/minor of the complete boot disk.

The targets mentioned above have added workarounds to this behaviour, by
specifying *negative* increments to the export_partdevice function.

And then came the mvebu target to use export_bootdevice /
export_partdevice as well. Now, different subtargets boot differently,
and the workaround would be even more complex.

I think now is the time to make export_bootdevice behave consistently,
and to report major/minor of the boot disk, period.

Consequently, those targets, which boot with root=/dev/... *and* use
export_bootdevice / export_partdevice, have to be adapted to use
positive increments, otherwise they are broken by the change
to export_bootdevice.

The targets affected were easy to spot with find & grep.




Fixes: 4e8345ff68 ("mvebu: base-files: autodetect upgrade device")

Signed-off-by: Klaus Kudielka 
Acked-by: Tomasz Maciej Nowak 

Tomasz, you seem pretty confident about this changes, how is that? :-)

-- ynezz



___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] elfutils: Fix compile with uClibc-ng

2019-05-03 Thread Rosen Penev
On Fri, May 3, 2019 at 10:12 AM Petr Štetiar  wrote:
>
> Rosen Penev  [2019-05-01 10:05:20]:
>
> Hi,
>
> > Probably glibc too. argp_help takes a char *. not const char *.
>
> I'm wondering if we need to cary another patch forever, thus if it wouldn't be
> better to backport upstreamed patch and/or bump to fixed upstream version.
Just sent upstream.
>
> -- ynezz
>
> > Signed-off-by: Rosen Penev 
> > ---
> >  package/libs/elfutils/Makefile|  2 +-
> >  .../libs/elfutils/patches/200-uclibc-ng-compat.patch  | 11 +++
> >  2 files changed, 12 insertions(+), 1 deletion(-)
> >  create mode 100644 package/libs/elfutils/patches/200-uclibc-ng-compat.patch
> >
> > diff --git a/package/libs/elfutils/Makefile b/package/libs/elfutils/Makefile
> > index c6b1d6df65..e148df096c 100644
> > --- a/package/libs/elfutils/Makefile
> > +++ b/package/libs/elfutils/Makefile
> > @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
> >
> >  PKG_NAME:=elfutils
> >  PKG_VERSION:=0.176
> > -PKG_RELEASE:=1
> > +PKG_RELEASE:=2
> >
> >  PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
> >  PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION)
> > diff --git a/package/libs/elfutils/patches/200-uclibc-ng-compat.patch 
> > b/package/libs/elfutils/patches/200-uclibc-ng-compat.patch
> > new file mode 100644
> > index 00..b0ae1c7401
> > --- /dev/null
> > +++ b/package/libs/elfutils/patches/200-uclibc-ng-compat.patch
> > @@ -0,0 +1,11 @@
> > +--- a/lib/color.c
> >  b/lib/color.c
> > +@@ -132,7 +132,7 @@ valid arguments are:\n\
> > +   - 'auto', 'tty', 'if-tty'\n"),
> > +  program_invocation_short_name, arg);
> > +   argp_help (_argp, stderr, ARGP_HELP_SEE,
> > +- program_invocation_short_name);
> > ++ (char *) program_invocation_short_name);
> > +   exit (EXIT_FAILURE);
> > + }
> > + }

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] libbsd: Fix compilation under ARC

2019-05-03 Thread Rosen Penev


> On May 3, 2019, at 10:17, Petr Štetiar  wrote:
> 
> Rosen Penev  [2019-05-01 10:04:45]:
> 
> Hi,
> 
>> The 8 year old file does not have any ARC definitions.
> 
> I'm wondering if we need to cary another patch forever, thus if it wouldn't be
> better to backport upstreamed patch and/or bump to fixed upstream version.
As I said. This file has not been touched in 8 years. Upstream also seems 
relatively dead.
> 
> -- ynezz
> 
>> Signed-off-by: Rosen Penev 
>> ---
>> package/libs/libbsd/Makefile  |  2 +-
>> package/libs/libbsd/patches/010-fix-arc.patch | 15 +++
>> 2 files changed, 16 insertions(+), 1 deletion(-)
>> create mode 100644 package/libs/libbsd/patches/010-fix-arc.patch
>> 
>> diff --git a/package/libs/libbsd/Makefile b/package/libs/libbsd/Makefile
>> index 4101d5e0ee..63b9ceafc3 100644
>> --- a/package/libs/libbsd/Makefile
>> +++ b/package/libs/libbsd/Makefile
>> @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
>> 
>> PKG_NAME:=libbsd
>> PKG_VERSION:=0.8.7
>> -PKG_RELEASE:=2
>> +PKG_RELEASE:=3
>> 
>> PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
>> PKG_HASH:=f548f10e5af5a08b1e22889ce84315b1ebe41505b015c9596bad03fd13a12b31
>> diff --git a/package/libs/libbsd/patches/010-fix-arc.patch 
>> b/package/libs/libbsd/patches/010-fix-arc.patch
>> new file mode 100644
>> index 00..7b1bcbe348
>> --- /dev/null
>> +++ b/package/libs/libbsd/patches/010-fix-arc.patch
>> @@ -0,0 +1,15 @@
>> +--- a/src/local-elf.h
>>  b/src/local-elf.h
>> +@@ -53,6 +53,12 @@
>> + #endif
>> + #define ELF_TARG_DATAELFDATA2LSB
>> + 
>> ++#elif defined (__arc__)
>> ++
>> ++#define ELF_TARG_MACHEM_ARC
>> ++#define ELF_TARG_CLASSELFCLASS32
>> ++#define ELF_TARG_DATAELFDATA2LSB
>> ++
>> + #elif defined(__arm__)
>> + 
>> + #define ELF_TARG_MACHEM_ARM

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] libbsd: Fix compilation under ARC

2019-05-03 Thread Petr Štetiar
Rosen Penev  [2019-05-01 10:04:45]:

Hi,

> The 8 year old file does not have any ARC definitions.

I'm wondering if we need to cary another patch forever, thus if it wouldn't be
better to backport upstreamed patch and/or bump to fixed upstream version.

-- ynezz

> Signed-off-by: Rosen Penev 
> ---
>  package/libs/libbsd/Makefile  |  2 +-
>  package/libs/libbsd/patches/010-fix-arc.patch | 15 +++
>  2 files changed, 16 insertions(+), 1 deletion(-)
>  create mode 100644 package/libs/libbsd/patches/010-fix-arc.patch
> 
> diff --git a/package/libs/libbsd/Makefile b/package/libs/libbsd/Makefile
> index 4101d5e0ee..63b9ceafc3 100644
> --- a/package/libs/libbsd/Makefile
> +++ b/package/libs/libbsd/Makefile
> @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
>  
>  PKG_NAME:=libbsd
>  PKG_VERSION:=0.8.7
> -PKG_RELEASE:=2
> +PKG_RELEASE:=3
>  
>  PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
>  PKG_HASH:=f548f10e5af5a08b1e22889ce84315b1ebe41505b015c9596bad03fd13a12b31
> diff --git a/package/libs/libbsd/patches/010-fix-arc.patch 
> b/package/libs/libbsd/patches/010-fix-arc.patch
> new file mode 100644
> index 00..7b1bcbe348
> --- /dev/null
> +++ b/package/libs/libbsd/patches/010-fix-arc.patch
> @@ -0,0 +1,15 @@
> +--- a/src/local-elf.h
>  b/src/local-elf.h
> +@@ -53,6 +53,12 @@
> + #endif
> + #define ELF_TARG_DATA   ELFDATA2LSB
> + 
> ++#elif defined (__arc__)
> ++
> ++#define ELF_TARG_MACH   EM_ARC
> ++#define ELF_TARG_CLASS  ELFCLASS32
> ++#define ELF_TARG_DATA   ELFDATA2LSB
> ++
> + #elif defined(__arm__)
> + 
> + #define ELF_TARG_MACH   EM_ARM

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] elfutils: Fix compile with uClibc-ng

2019-05-03 Thread Petr Štetiar
Rosen Penev  [2019-05-01 10:05:20]:

Hi,

> Probably glibc too. argp_help takes a char *. not const char *.

I'm wondering if we need to cary another patch forever, thus if it wouldn't be
better to backport upstreamed patch and/or bump to fixed upstream version.

-- ynezz

> Signed-off-by: Rosen Penev 
> ---
>  package/libs/elfutils/Makefile|  2 +-
>  .../libs/elfutils/patches/200-uclibc-ng-compat.patch  | 11 +++
>  2 files changed, 12 insertions(+), 1 deletion(-)
>  create mode 100644 package/libs/elfutils/patches/200-uclibc-ng-compat.patch
> 
> diff --git a/package/libs/elfutils/Makefile b/package/libs/elfutils/Makefile
> index c6b1d6df65..e148df096c 100644
> --- a/package/libs/elfutils/Makefile
> +++ b/package/libs/elfutils/Makefile
> @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
>  
>  PKG_NAME:=elfutils
>  PKG_VERSION:=0.176
> -PKG_RELEASE:=1
> +PKG_RELEASE:=2
>  
>  PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
>  PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION)
> diff --git a/package/libs/elfutils/patches/200-uclibc-ng-compat.patch 
> b/package/libs/elfutils/patches/200-uclibc-ng-compat.patch
> new file mode 100644
> index 00..b0ae1c7401
> --- /dev/null
> +++ b/package/libs/elfutils/patches/200-uclibc-ng-compat.patch
> @@ -0,0 +1,11 @@
> +--- a/lib/color.c
>  b/lib/color.c
> +@@ -132,7 +132,7 @@ valid arguments are:\n\
> +   - 'auto', 'tty', 'if-tty'\n"),
> +  program_invocation_short_name, arg);
> +   argp_help (_argp, stderr, ARGP_HELP_SEE,
> +- program_invocation_short_name);
> ++ (char *) program_invocation_short_name);
> +   exit (EXIT_FAILURE);
> + }
> + }

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] elfutils: Fix compile with uClibc-ng

2019-05-03 Thread Petr Štetiar
Rosen Penev  [2019-05-01 10:05:20]:

Hi,

> Probably glibc too. argp_help takes a char *. not const char *.

I'm wondering if we need to cary another patch forever, thus if it wouldn't be
better to backport upstreamed patch and/or bump to fixed upstream version.

-- ynezz

> Signed-off-by: Rosen Penev 
> ---
>  package/libs/elfutils/Makefile|  2 +-
>  .../libs/elfutils/patches/200-uclibc-ng-compat.patch  | 11 +++
>  2 files changed, 12 insertions(+), 1 deletion(-)
>  create mode 100644 package/libs/elfutils/patches/200-uclibc-ng-compat.patch
> 
> diff --git a/package/libs/elfutils/Makefile b/package/libs/elfutils/Makefile
> index c6b1d6df65..e148df096c 100644
> --- a/package/libs/elfutils/Makefile
> +++ b/package/libs/elfutils/Makefile
> @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
>  
>  PKG_NAME:=elfutils
>  PKG_VERSION:=0.176
> -PKG_RELEASE:=1
> +PKG_RELEASE:=2
>  
>  PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
>  PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION)
> diff --git a/package/libs/elfutils/patches/200-uclibc-ng-compat.patch 
> b/package/libs/elfutils/patches/200-uclibc-ng-compat.patch
> new file mode 100644
> index 00..b0ae1c7401
> --- /dev/null
> +++ b/package/libs/elfutils/patches/200-uclibc-ng-compat.patch
> @@ -0,0 +1,11 @@
> +--- a/lib/color.c
>  b/lib/color.c
> +@@ -132,7 +132,7 @@ valid arguments are:\n\
> +   - 'auto', 'tty', 'if-tty'\n"),
> +  program_invocation_short_name, arg);
> +   argp_help (_argp, stderr, ARGP_HELP_SEE,
> +- program_invocation_short_name);
> ++ (char *) program_invocation_short_name);
> +   exit (EXIT_FAILURE);
> + }
> + }

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v2 1/2] base-files: improve lib/upgrade/common.sh

2019-05-03 Thread Petr Štetiar
Klaus Kudielka  [2019-04-24 21:14:38]:

Hi Klaus,

> Remove workarounds for the old, inconsistent behaviour from the following
> targets: apm821xx, brcm2708, omap, sunxi.

I'm willing to push the fix for mvebu (which the patch series is about), so
please don't touch other targets.  This should go into separate patch(es) and
in order to push it, I would need some Tested-by, Reviewed-by or Acked-by for
every platform separately.

> Fixes: 4e8345ff68 ("mvebu: base-files: autodetect upgrade device")
> 
> Signed-off-by: Klaus Kudielka 
> Acked-by: Tomasz Maciej Nowak 

Tomasz, you seem pretty confident about this changes, how is that? :-)

-- ynezz

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v2] ramips: Add support for Head Weblink HDRM200

2019-05-03 Thread Petr Štetiar
Kristian Evensen  [2019-05-03 16:58:52]:

Hi,

> In order to install OpenWRT, you first need to compile an initramfs
> (ramdisk)-image for the device.

if the ramdisk image is needed, then we probably should enable it for that
target and provide it, we shouldn't demand end users to build the ramdisk
images by themselves in order to be able to install OpenWrt, right?

This needs adding `ramdisk` in FEATURES in target.mk.

> * Copy the initramfs-image to your tftp-root (default filename is
> test.bin) and configure networking accordingly (default server IP is
> 10.10.10.3, client 10.10.10.123). Start your tftp server.
> * Open the board and connect to UART. The pins are exposed and clearly
> marked.
> * Boot the board and press 1.
> * Either use the default filename and client/server IP-addresses, or
> specify your own.
> 
> The image should now be loaded to memory and board boot. If the router
> reboots while the image is loading, you need to try again. 

Why does it reboot? Is there any kind of watchdog? Do you get any error in the
bootloader?

> diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds 
> b/target/linux/ramips/base-files/etc/board.d/01_leds
> index fa20ab0714..f9ca5c47b8 100755
> --- a/target/linux/ramips/base-files/etc/board.d/01_leds
> +++ b/target/linux/ramips/base-files/etc/board.d/01_leds
> @@ -184,6 +184,9 @@ hc5861)
>   ucidef_set_led_netdev "wifi5g" "wifi5g" "$boardname:blue:wlan5g" "wlan0"
>   ucidef_set_led_netdev "wifi2g" "wifi2g" "$boardname:blue:wlan2g" "wlan1"
>   ;;
> +hdrm200)

this should match device from the DT compatible property and use generic
board/model detection as introduced in commit b3d699bdd3caa3d ("base-files:
add generic preinit script to extract board/model info from device-tree").

> + set_wifi_led "$boardname:green:wifi"
> + ;;
>  hg255d)
>   set_wifi_led "$boardname:green:wlan"
>   ucidef_set_led_netdev "internet" "internet" "$boardname:green:internet" 
> "eth0.2"
> diff --git a/target/linux/ramips/base-files/etc/board.d/02_network 
> b/target/linux/ramips/base-files/etc/board.d/02_network
> index c2646876a2..8ae41ae59e 100755
> --- a/target/linux/ramips/base-files/etc/board.d/02_network
> +++ b/target/linux/ramips/base-files/etc/board.d/02_network
> @@ -314,6 +314,7 @@ ramips_setup_interfaces()
>   "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "6@eth0"
>   ;;
>   hc5661|\
> + hdrm200|\

ditto here.

>   y1s)
>   ucidef_add_switch "switch0" \
>   "1:lan" "2:lan" "3:lan" "4:lan" "5:lan" "0:wan" "6@eth0"
> diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
> b/target/linux/ramips/base-files/lib/ramips.sh
> index 093303892c..6d5a9cc391 100755
> --- a/target/linux/ramips/base-files/lib/ramips.sh
> +++ b/target/linux/ramips/base-files/lib/ramips.sh
> @@ -229,6 +229,9 @@ ramips_board_detect() {
>   *"HC5962")
>   name="hc5962"
>   ;;
> + *"HDRM200")
> + name="hdrm200"
> + ;;

so this is not necessary anymore and you can drop it.

> diff --git a/target/linux/ramips/dts/HDRM200.dts 
> b/target/linux/ramips/dts/HDRM200.dts
> new file mode 100644
> index 00..05e0b1a6dc
> --- /dev/null
> +++ b/target/linux/ramips/dts/HDRM200.dts

...

> + gpio-export {
> + compatible = "gpio-export";
> + #size-cells = <0>;
> +
> + sim_switch {
> + gpio-export,name = "sim_switch";
> + gpio-export,output = <1>;
> + gpios = < 0 GPIO_ACTIVE_LOW>;
> + };
> +
> + io1 {
> + gpio-export,name = "io1";
> + gpio-export,output = <1>;
> + gpios = < 1 GPIO_ACTIVE_LOW>;
> + };
> +
> + io2 {
> + gpio-export,name = "io2";
> + gpio-export,output = <1>;
> + gpios = < 2 GPIO_ACTIVE_LOW>;
> + };
> +
> + io3 {
> + gpio-export,name = "io3";
> + gpio-export,output = <1>;
> + gpios = < 11 GPIO_ACTIVE_LOW>;
> + };
> +
> + io4 {
> + gpio-export,name = "io4";
> + gpio-export,output = <1>;
> + gpios = < 14 GPIO_ACTIVE_LOW>;
> + };
> +
> + power_mpcie {
> + gpio-export,name = "power_mpcie";
> + gpio-export,output = <1>;
> + gpios = < 21 GPIO_ACTIVE_HIGH>;
> + };
> + };

We're trying to get rid of the `gpio-export` functionality as it's hack for
missing kernel functionality, which was rejected in upstream kernel long time
ago, for details see this email
http://lists.infradead.org/pipermail/openwrt-devel/2019-February/015772.html,
discussion in #1366 or

[OpenWrt-Devel] [PATCH] system: uci: Use config dir on uci_add and support add_/del_list

2019-05-03 Thread Kristian Evensen
This commit makes three changes to the uci shell library:

* A check for UCI_CONFIG_DIR has been added to the command line when
adding anonymous sections. Without this change, adding anonymous
sections to configs not stored in /etc/config is not possible.

* Support for adding/removing items from lists were missing, so I have
added the functions uci_add_list() and uci_del_list() to simplify
working with uci lists from scripts.

Signed-off-by; Kristian Evensen 
---
 package/system/uci/files/lib/config/uci.sh | 20 +++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/package/system/uci/files/lib/config/uci.sh 
b/package/system/uci/files/lib/config/uci.sh
index 78ec277669..803adf9d97 100644
--- a/package/system/uci/files/lib/config/uci.sh
+++ b/package/system/uci/files/lib/config/uci.sh
@@ -85,6 +85,15 @@ uci_set() {
/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} set 
"$PACKAGE.$CONFIG.$OPTION=$VALUE"
 }
 
+uci_add_list() {
+   local PACKAGE="$1"
+   local CONFIG="$2"
+   local OPTION="$3"
+   local VALUE="$4"
+
+   /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} add_list 
"$PACKAGE.$CONFIG.$OPTION=$VALUE"
+}
+
 uci_get_state() {
uci_get "$1" "$2" "$3" "$4" "/var/state"
 }
@@ -108,7 +117,7 @@ uci_add() {
local CONFIG="$3"
 
if [ -z "$CONFIG" ]; then
-   export ${NO_EXPORT:+-n} CONFIG_SECTION="$(/sbin/uci add 
"$PACKAGE" "$TYPE")"
+   export ${NO_EXPORT:+-n} CONFIG_SECTION="$(/sbin/uci 
${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} add "$PACKAGE" "$TYPE")"
else
/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} set 
"$PACKAGE.$CONFIG=$TYPE"
export ${NO_EXPORT:+-n} CONFIG_SECTION="$CONFIG"
@@ -132,6 +141,15 @@ uci_remove() {
/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} del 
"$PACKAGE.$CONFIG${OPTION:+.$OPTION}"
 }
 
+uci_del_list() {
+   local PACKAGE="$1"
+   local CONFIG="$2"
+   local OPTION="$3"
+   local VALUE="$4"
+
+   /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} del_list 
"$PACKAGE.$CONFIG.$OPTION=$VALUE"
+}
+
 uci_commit() {
local PACKAGE="$1"
/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} commit $PACKAGE
-- 
2.19.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2] ramips: Add support for Head Weblink HDRM200

2019-05-03 Thread Kristian Evensen
Head Weblink HDRM200 is a dual-sim router based on MT7620A. The detailed
specifications are:

- MT7620A (580MHz)
- 64MB RAM
- 16MB of flash (SPI NOR)
- 6x 10/100Mbps Ethernet (MT7620A built-in switch)
- 1x microSD slot
- 1x miniPCIe slot (only USB2.0 bus)
- 2x SIM slots (standard size)
- 1x USB2.0 port
- 1x 2.4GHz wifi (rt2800)
- 1x 5GHz wifi (mt7621)
- 1x reset button
- 1x WPS button
- 3x GPIO-controllable LEDs
- 1x 10 pin terminal block (RS232, RS485, 4 x GPIO)

Tested:
- Ethernet switch
- Wifi
- USB slot
- SD card slot
- miniPCIe-slot
- sysupgrade
- reset button

Installation instructions:

Installing OpenWRT for the first time requires a bit of work, as the
board does not ship with OpenWRT. In addition, the bootloader
automatically reboots when installing an image over tftp.

In order to install OpenWRT, you first need to compile an initramfs
(ramdisk)-image for the device. Once the image is ready, you need to do
the following:

* Copy the initramfs-image to your tftp-root (default filename is
test.bin) and configure networking accordingly (default server IP is
10.10.10.3, client 10.10.10.123). Start your tftp server.
* Open the board and connect to UART. The pins are exposed and clearly
marked.
* Boot the board and press 1.
* Either use the default filename and client/server IP-addresses, or
specify your own.

The image should now be loaded to memory and board boot. If the router
reboots while the image is loading, you need to try again. Once the
board has booted, copy the sysupgrade-image to the router and run
sysupgrade in order to install OpenWRT to the flash.

Notes:

- You control which SIM slot to use by writing 0/1 to
/sys/class/gpio/sim_switch/value. In order for the change to take
effect, you can either use AT-commands (AT+CFUN) or power-cycle the
modem (write 0/1 to /sys/class/gpio/power_mpcie/value).
- RS485 is available on /dev/ttyS0.
- RS232 is available on /dev/ttyS1.
- The name of the ioX-gpios map to the labels on the casing.

v1->v2:
* Add SPDX line to DTS (thanks Rafał Miłecki).

Signed-off-by: Kristian Evensen 
---
 .../ramips/base-files/etc/board.d/01_leds |   3 +
 .../ramips/base-files/etc/board.d/02_network  |   1 +
 target/linux/ramips/base-files/lib/ramips.sh  |   3 +
 target/linux/ramips/dts/HDRM200.dts   | 227 ++
 target/linux/ramips/image/mt7620.mk   |   8 +
 5 files changed, 242 insertions(+)
 create mode 100644 target/linux/ramips/dts/HDRM200.dts

diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds 
b/target/linux/ramips/base-files/etc/board.d/01_leds
index fa20ab0714..f9ca5c47b8 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -184,6 +184,9 @@ hc5861)
ucidef_set_led_netdev "wifi5g" "wifi5g" "$boardname:blue:wlan5g" "wlan0"
ucidef_set_led_netdev "wifi2g" "wifi2g" "$boardname:blue:wlan2g" "wlan1"
;;
+hdrm200)
+   set_wifi_led "$boardname:green:wifi"
+   ;;
 hg255d)
set_wifi_led "$boardname:green:wlan"
ucidef_set_led_netdev "internet" "internet" "$boardname:green:internet" 
"eth0.2"
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network 
b/target/linux/ramips/base-files/etc/board.d/02_network
index c2646876a2..8ae41ae59e 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -314,6 +314,7 @@ ramips_setup_interfaces()
"1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "6@eth0"
;;
hc5661|\
+   hdrm200|\
y1s)
ucidef_add_switch "switch0" \
"1:lan" "2:lan" "3:lan" "4:lan" "5:lan" "0:wan" "6@eth0"
diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh
index 093303892c..6d5a9cc391 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -229,6 +229,9 @@ ramips_board_detect() {
*"HC5962")
name="hc5962"
;;
+   *"HDRM200")
+   name="hdrm200"
+   ;;
*"HG255D")
name="hg255d"
;;
diff --git a/target/linux/ramips/dts/HDRM200.dts 
b/target/linux/ramips/dts/HDRM200.dts
new file mode 100644
index 00..05e0b1a6dc
--- /dev/null
+++ b/target/linux/ramips/dts/HDRM200.dts
@@ -0,0 +1,227 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "mt7620a.dtsi"
+
+#include 
+#include 
+
+/ {
+   compatible = "head-weblink,hdrm200", "ralink,mt7620a-soc";
+   model = "Head Weblink HDRM200";
+
+   aliases {
+   led-boot = _system;
+   led-failsafe = _system;
+   led-running = _system;
+   led-upgrade = _system;
+   };
+
+   chosen {
+   bootargs = "console=ttyS1,57600";
+   };
+
+   gpio-export {
+   compatible = 

Re: [OpenWrt-Devel] [PATCH] mvebu: add kmod-i2c-mux-pca954x for Turris Omnia

2019-05-03 Thread Petr Štetiar
Josef Schlehofer  [2019-04-20 01:05:05]:

Hi,

> The driver is for the I2C mux.
> Schematic available at https://doc.turris.cz/doc/_media/rtrom01-schema.pdf
> 
> Signed-off-by: Josef Schlehofer 
> ---
>  target/linux/mvebu/image/cortex-a9.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/linux/mvebu/image/cortex-a9.mk 
> b/target/linux/mvebu/image/cortex-a9.mk
> index 66cf54f9c5..f6d63fa786 100644
> --- a/target/linux/mvebu/image/cortex-a9.mk
> +++ b/target/linux/mvebu/image/cortex-a9.mk
> @@ -163,7 +163,7 @@ define Device/turris-omnia
>DEVICE_PACKAGES :=  \
>  mkf2fs e2fsprogs kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1 \
>  wpad-basic kmod-ath9k kmod-ath10k-ct ath10k-firmware-qca988x-ct \
> -partx-utils
> +partx-utils kmod-i2c-core kmod-i2c-mux kmod-i2c-mux-pca954x

is there any reason for adding explicit kmod-i2c-core and kmod-i2c-mux
dependencies?

-- ynezz

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Merged: uboot-tegra: bump to 2019.04

2019-05-03 Thread Petr Štetiar


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] zynq: add manufactured to device title

2019-05-03 Thread Petr Štetiar
Luis Araneda  [2019-04-28 11:17:14]:

Hi,

> Make the device's title consistent by adding the manufacturer to their
> title, as the other boards on the target.  Additionally, this creates a
> sorted by manufacturer board list on menuconfig

your changes, doesn't correspond with the commit description, see bellow.

> diff --git a/target/linux/zynq/image/Makefile 
> b/target/linux/zynq/image/Makefile
> index d8a882313b..380b07bb82 100644
> --- a/target/linux/zynq/image/Makefile
> +++ b/target/linux/zynq/image/Makefile
> @@ -58,7 +58,7 @@ TARGET_DEVICES += avnet_zynq-zed
>  
>  define Device/digilent_zynq-zybo
>   $(call Device/FitImageGzip)
> - DEVICE_TITLE := ZYBO Development Board
> + DEVICE_TITLE := Digilent Zybo board

why are you removing the development part? I think, that it's useful
information so it shouldn't be removed if you don't have a good reason for
this. Putting appart the fact, that it's marked as trainer board on the
vendor's site[1].

>  define Device/xlnx_zynq-zc702
>   $(call Device/FitImageGzip)
> - DEVICE_TITLE := ZC702 Development Board
> + DEVICE_TITLE := Xilinx ZC702 board

ditto, putting apart the fact, that it's marked as evaluation kit on the
vendor's site[2].

1. https://store.digilentinc.com/zybo-zynq-7000-arm-fpga-soc-trainer-board
2. https://www.xilinx.com/products/boards-and-kits/ek-z7-zc702-g.html

-- ynezz

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] lantiq/xrx200: enable initramfs images

2019-05-03 Thread Petr Štetiar
Stijn Segers  [2019-04-27 18:23:21]:

Hi,

> Commit eae6cac6a3added support for the Fritz!Box 7362 SL, but one needs
> an initramfs image to flash OpenWrt from stock firmware (as described in
> the commit log). This patch has the initramfs image built by default.

I've just applied it to my staging tree[1] with fixed reference to the 
eae6cac6a3
commit.

1. 
https://git.openwrt.org/?p=openwrt/staging/ynezz.git;a=commit;h=71d346e2d8a4b8b2b6a7d553dafa76898351593b

-- ynezz

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Merged: ath79: glinet_gl-ar750s: Use QCA9887 firmware

2019-05-03 Thread Petr Štetiar


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ath79: glinet_gl-ar750s: Use QCA9887 firmware

2019-05-03 Thread Jeff Kletsky
This is a resubmission of the garbled
https://patchwork.ozlabs.org/patch/1088433/

Jeff Kletsky



___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ath79: glinet_gl-ar750s: Use QCA9887 firmware

2019-05-03 Thread Jeff Kletsky
From: Jeff Kletsky 

The GL.iNet AR750S is based around the QCA9563
and requires the QCA9887 firmware for operation.

Signed-off-by: Jeff Kletsky 
---
 target/linux/ath79/image/generic.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ath79/image/generic.mk 
b/target/linux/ath79/image/generic.mk
index 8588e7cdf6..8e162e1d0e 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -363,7 +363,7 @@ TARGET_DEVICES += glinet_gl-ar300m-nor
 define Device/glinet_gl-ar750s
   ATH_SOC := qca9563
   DEVICE_TITLE := GL.iNet GL-AR750S
-  DEVICE_PACKAGES := kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca988x-ct
+  DEVICE_PACKAGES := kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca9887-ct
   IMAGE_SIZE := 16000k
   SUPPORTED_DEVICES += gl-ar750s
 endef
-- 
2.11.0


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] nftables: Fix compilation with uClibc-ng

2019-05-03 Thread Petr Štetiar
Rosen Penev  [2019-05-01 10:08:10]:

Hi,

> Missing header for va_list.

shouldn't this go through upstream first? Thanks.

-- ynezz

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] ath79: glinet_gl-ar750s: Use QCA9887 firmware

2019-05-03 Thread Jeff Kletsky

On 5/3/19 12:20 PM, Petr Štetiar wrote:


Jeff Kletsky  [2019-05-03 12:11:48]:


That's strange -- perhaps another patch updated it?

no, if you look at the patchwork, the patch was simply sent out broken.

-- ynezz


My apologies, resend due to broken patch

(Only applies to and impacts `master` as on ath79 target)

From c553a3becef8c774c7f725cf84035773b868b809 Mon Sep 17 00:00:00 2001
From: Jeff Kletsky 
Date: Sun, 27 Jan 2019 20:17:16 -0800
Subject: [PATCH] ath79: glinet_gl-ar750s: Use QCA9887 firmware

The GL.iNet AR750S is based around the QCA9563
and requires the QCA9887 firmware for operation.

Signed-off-by: Jeff Kletsky 
---
 target/linux/ath79/image/generic.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ath79/image/generic.mk 
b/target/linux/ath79/image/generic.mk
index 8588e7cdf6..8e162e1d0e 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -363,7 +363,7 @@ TARGET_DEVICES += glinet_gl-ar300m-nor
 define Device/glinet_gl-ar750s
   ATH_SOC := qca9563
   DEVICE_TITLE := GL.iNet GL-AR750S
-  DEVICE_PACKAGES := kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca988x-ct
+  DEVICE_PACKAGES := kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca9887-ct
   IMAGE_SIZE := 16000k
   SUPPORTED_DEVICES += gl-ar750s
 endef
--
2.11.0



.
 



___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] tegra: add vendor string to device name

2019-05-03 Thread Petr Štetiar
Tomasz Maciej Nowak  [2019-05-01 19:43:54]:

Hi,

> for better identification. Also create SUPPORTED_DEVICES string from it
> which corresponds to dts compatible string.
> 
> Signed-off-by: Tomasz Maciej Nowak 

...

>  define U-Boot/trimslice
>NAME := CompuLab TrimSlice
> -  BUILD_DEVICES := trimslice
> +  BUILD_DEVICES := compulab_trimslice
>UBOOT_IMAGE := trimslice-mmc.img trimslice-spi.img

what about this files? Shouldn't you rename them as well?

-- ynezz

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] ath79: glinet_gl-ar750s: Use QCA9887 firmware

2019-05-03 Thread Petr Štetiar
Jeff Kletsky  [2019-05-03 12:11:48]:

> That's strange -- perhaps another patch updated it?

no, if you look at the patchwork, the patch was simply sent out broken.

-- ynezz

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] ath79: glinet_gl-ar750s: Use QCA9887 firmware

2019-05-03 Thread Jeff Kletsky

On 5/3/19 11:19 AM, Petr Štetiar wrote:


Jeff Kletsky  [2019-04-20 18:33:10]:


This patch corrects the firmware selection for the ath79 AR750S

The ar71xx AR750S already uses the QCA9887 firmware.

$ fgrep -A 3 Device/gl-ar750s target/linux/ar71xx/image/generic.mk
define Device/gl-ar750s
   DEVICE_TITLE := GL.iNet GL-AR750S
   DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9887-ct kmod-usb-core \
kmod-usb2 kmod-usb-storage


Jeff



 From cb6e411f8d172a8dde5ca7e075cef67994ac0062 Mon Sep 17 00:00:00 2001
From: Jeff Kletsky 
Date: Sun, 27 Jan 2019 20:17:16 -0800
Subject: [PATCH] ath79: glinet_gl-ar750s: Use QCA9887 firmware

The GL.iNet AR750S is based around the QCA9563
and uses the QCA9887 firmware for operation.

Signed-off-by: Jeff Kletsky 
---
  target/linux/ath79/image/generic.mk | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ath79/image/generic.mk 
b/target/linux/ath79/image/generic.mk
index 8588e7cdf6..8e162e1d0e 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -363,7 +363,7 @@ TARGET_DEVICES += glinet_gl-ar300m-nor
  define Device/glinet_gl-ar750s
ATH_SOC := qca9563
DEVICE_TITLE := GL.iNet GL-AR750S
-  DEVICE_PACKAGES := kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca988x-ct
+  DEVICE_PACKAGES := kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca9887-ct
IMAGE_SIZE := 16000k
SUPPORTED_DEVICES += gl-ar750s
  endef
--
2.11.0

something probably went wrong with this patch:

  ../maintainer-tools/patchwork-apply.sh 1088433
  Saved patch to OpenWrt-Devel-ath79-glinet_gl-ar750s-Use-QCA9887-firmware
  Patch is empty.  Was it split wrong?
  If you would prefer to skip this patch, instead run "git am --skip".
  To restore the original branch and stop patching run "git am --abort".
  Failed to apply patch 1088433

-- ynezz


That's strange -- perhaps another patch updated it?

jeff@deb-devel:~/devel/openwrt$ git pull
Already up-to-date.

jeff@deb-devel:~/devel/openwrt$ git log -1 --pretty=oneline
2c3dd70741 (HEAD -> master, openwrt/master, openwrt/HEAD) procd: add 
procd_running() helper for checking running state

jeff@deb-devel:~/devel/openwrt$ fgrep -iA6 ar750s 
target/linux/ath79/image/generic.mk
define Device/glinet_gl-ar750s
  ATH_SOC := qca9563
  DEVICE_TITLE := GL.iNet GL-AR750S
  DEVICE_PACKAGES := kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca988x-ct
  IMAGE_SIZE := 16000k
  SUPPORTED_DEVICES += gl-ar750s
endef
TARGET_DEVICES += glinet_gl-ar750s

jeff@deb-devel:~/devel/openwrt$ git remote -v show openwrt
* remote openwrt
  Fetch URL: https://git.openwrt.org/openwrt/openwrt.git


Jeff

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] ath79: glinet_gl-ar750s: Use QCA9887 firmware

2019-05-03 Thread Petr Štetiar
Jeff Kletsky  [2019-04-20 18:33:10]:

> This patch corrects the firmware selection for the ath79 AR750S
> 
> The ar71xx AR750S already uses the QCA9887 firmware.
> 
> $ fgrep -A 3 Device/gl-ar750s target/linux/ar71xx/image/generic.mk
> define Device/gl-ar750s
>   DEVICE_TITLE := GL.iNet GL-AR750S
>   DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9887-ct kmod-usb-core \
>   kmod-usb2 kmod-usb-storage
> 
> 
> Jeff
> 
> 
> 
> From cb6e411f8d172a8dde5ca7e075cef67994ac0062 Mon Sep 17 00:00:00 2001
> From: Jeff Kletsky 
> Date: Sun, 27 Jan 2019 20:17:16 -0800
> Subject: [PATCH] ath79: glinet_gl-ar750s: Use QCA9887 firmware
> 
> The GL.iNet AR750S is based around the QCA9563
> and uses the QCA9887 firmware for operation.
> 
> Signed-off-by: Jeff Kletsky 
> ---
>  target/linux/ath79/image/generic.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/linux/ath79/image/generic.mk 
> b/target/linux/ath79/image/generic.mk
> index 8588e7cdf6..8e162e1d0e 100644
> --- a/target/linux/ath79/image/generic.mk
> +++ b/target/linux/ath79/image/generic.mk
> @@ -363,7 +363,7 @@ TARGET_DEVICES += glinet_gl-ar300m-nor
>  define Device/glinet_gl-ar750s
>ATH_SOC := qca9563
>DEVICE_TITLE := GL.iNet GL-AR750S
> -  DEVICE_PACKAGES := kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca988x-ct
> +  DEVICE_PACKAGES := kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca9887-ct
>IMAGE_SIZE := 16000k
>SUPPORTED_DEVICES += gl-ar750s
>  endef
> -- 
> 2.11.0

something probably went wrong with this patch:

 ../maintainer-tools/patchwork-apply.sh 1088433
 Saved patch to OpenWrt-Devel-ath79-glinet_gl-ar750s-Use-QCA9887-firmware
 Patch is empty.  Was it split wrong?
 If you would prefer to skip this patch, instead run "git am --skip".
 To restore the original branch and stop patching run "git am --abort".
 Failed to apply patch 1088433

-- ynezz

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Merged: ath79: fix OCEDO Raccoon 10Mbit PLL value

2019-05-03 Thread Petr Štetiar


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] build: fix STAGING_DIR cleaning when filenames contain spaces

2019-05-03 Thread Petr Štetiar
Jeffery To  [2019-05-03 01:33:27]:

> When looping through a package's STAGING_FILES_LIST (a list of
> file/directory paths delimited by newlines), if the path contains
> spaces, then the path will be split by the while loops, and the
> file/directory will not be deleted/removed.
> 
> This sets the internal field separator to the newline only so that the
> entire path is considered when deleting/removing.
> 
> Signed-off-by: Jeffery To 
> ---
>  scripts/clean-package.sh | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/scripts/clean-package.sh b/scripts/clean-package.sh
> index e580566a52..3a824929c6 100755
> --- a/scripts/clean-package.sh
> +++ b/scripts/clean-package.sh
> @@ -1,4 +1,6 @@
>  #!/usr/bin/env bash
> +IFS="
> +"
>  [ -n "$1" -a -n "$2" ] || {
>   echo "Usage: $0  "
>   exit 1

just for the record, copy my comment from your PR[1]:

I'm just wondering, if this proposed fix with this strange looking IFS is the
right direction. Usually if I've problem with whitespaces in filenames, it's
because I've forget to use xargs. If I'm not mistaken, this [ -n "$entry" ] ||
break construct could be replaced with xargs -r, there's even XARGS:=xargs -r
in rules.mk. Just my two cents.

1. https://github.com/openwrt/openwrt/pull/1806#issuecomment-475454138

-- ynezz

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] zlib: Use relative paths in pkg-config metadata file

2019-05-03 Thread Petr Štetiar
Jeffery To  [2019-05-03 00:47:06]:

> The default zlib.pc file generated by cmake contains absolute paths.
> This patches the file to use relative paths (relative to ${prefix} and
> ${exec_prefix}).

I can see that from the diff already, but I miss the information, why do you
need this change. Could this perhaps be upstreamed first as well?

-- ynezz

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel