openwrt/openwrt.git
18 months agouboot-envtools: add support for Linksys EA6350v3
Oever González [Thu, 24 Jan 2019 03:20:55 +0000 (21:20 -0600)]
uboot-envtools: add support for Linksys EA6350v3

This commit adds support for the Linksys EA6350v3 device in the ipq40xx
target.

This is needed for uboot-envtools to access the environment. Without this
patch, the Linksys EA6350v3 will not be able to access the uboot
environment. As a side effect, the feature auto_recovery will make the
device unstable by switching between the latest and the current firmware.

Signed-off-by: Ryan Pannell <ryan@osukl.com>
Signed-off-by: Oever González <notengobattery@gmail.com>
18 months agoipq-wifi: add support for Linksys EA6350v3
Oever González [Thu, 24 Jan 2019 03:20:55 +0000 (21:20 -0600)]
ipq-wifi: add support for Linksys EA6350v3

This commit adds support for the Linksys EA6350v3 device in the ipq-wifi
target.

Without this patch, the Linksys EA6350v3 won't be hable to have fully
functional wireless interfaces. This is not permanent: the board data has
already been sent to ath10k _at_ lists _dot_ infradead _dot_ org

Signed-off-by: Ryan Pannell <ryan@osukl.com>
Signed-off-by: Oever González <notengobattery@gmail.com>
18 months agomac80211: ath: add extra 'regulatory domains'
Oever González [Thu, 24 Jan 2019 03:20:55 +0000 (21:20 -0600)]
mac80211: ath: add extra 'regulatory domains'

This patch adds several country codes to the regd.h and regd_common.h
files in order to support devices whose country codes are not present in
the original list.

Without this patch, all devices whose manufacturer programmed any of these
code in their EEPROM will run without wireless interfaces.

Signed-off-by: Oever González <notengobattery@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [matched signed-off]
18 months agouboot-fritz4040: update package to 2019-01-25
Christian Lamparter [Fri, 25 Jan 2019 17:22:28 +0000 (18:22 +0100)]
uboot-fritz4040: update package to 2019-01-25

David Bauer reported a u-boot crash (data abort) at a odd
place (byteswap) when he ran ping/tftp on his 7530.

|(FRITZ7530) # ping 192.168.1.70
|eth0 PHY0 up Speed :1000 Full duplex
|eth0 PHY1 Down Speed :10 Half duplex
|eth0 PHY2 Down Speed :10 Half duplex
|eth0 PHY3 Down Speed :10 Half duplex
|eth0 PHY4 Down Speed :10 Half duplex
|Using eth0 device
|data abort
|pc : [<84234774>]      lr : [<842351a4>]
|sp : 8412fdb0  ip : 0000009b     fp : 00000000
|r10: 00000000  r9 : 00000001     r8 : 8412ff68
|r7 : 00000000  r6 : 0000002a     r5 : 84244e90  r4 : 8425e28e
|r3 : 84244e90  r2 : 14000045     r1 : 8412fdb0  r0 : 8425e28e
|Flags: nZCv  IRQs off  FIQs off  Mode SVC_32
|Resetting CPU ...
|
|resetting ...

This issue is caused by switch from gcc 5.5 to 7.1+ as explained
in the upstream patch:

|From a768e513b07b5999a8e7d7740ac8d9da04ee7e51 Mon Sep 17 00:00:00 2001
|From: Denis Pynkin <denis.pynkin@collabora.com>
|Date: Fri, 21 Jul 2017 19:28:42 +0300
|Subject: [PATCH] net: Use packed structures for networking
|
|PXE boot is broken with GCC 7.1 due option '-fstore-merging' enabled
|by default for '-O2':
|
|BOOTP broadcast 1
|data abort
|pc : [<8ff8bb30>]          lr : [<00004f1f>]
|reloc pc : [<17832b30>]    lr : [<878abf1f>]
|sp : 8f558bc0  ip : 00000000     fp : 8ffef5a4
|r10: 8ffed248  r9 : 8f558ee0     r8 : 8ffef594
|r7 : 0000000e  r6 : 8ffed700     r5 : 00000000  r4 : 8ffed74e
|r3 : 00060101  r2 : 8ffed230     r1 : 8ffed706  r0 : 00000ddd
|Flags: nzcv  IRQs off  FIQs off  Mode S
|
|Core reason is usage of structures for network headers without packed
|attribute.

Reported-by: David Bauer <mail@david-bauer.net>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
18 months agoath79: dts: Unify naming of gpio-led nodes
Petr Štetiar [Sun, 30 Dec 2018 11:42:53 +0000 (12:42 +0100)]
ath79: dts: Unify naming of gpio-led nodes

In DTS Checklist[1] we're now demanding proper generic node names, as
the name of a node should reflect the function of the device and use
generic name for that[2]. Everybody seems to be copy&pasting from DTS
files available in the repository today, so let's unify that naming
there as well and provide proper examples.

1. https://openwrt.org/submitting-patches#dts_checklist
2. https://github.com/devicetree-org/devicetree-specification/blob/master/source/devicetree-basics.rst#generic-names-recommendation

Signed-off-by: Petr Štetiar <ynezz@true.cz>
[split up, removed entries where it could clash due to ath9k-leds]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
18 months agoath79: dts: Unify naming of gpio-keys nodes
Petr Štetiar [Sun, 30 Dec 2018 11:17:25 +0000 (12:17 +0100)]
ath79: dts: Unify naming of gpio-keys nodes

In DTS Checklist[1] we're now demanding proper generic node names, as
the name of a node should reflect the function of the device and use
generic name for that[2]. Everybody seems to be copy&pasting from DTS
files available in the repository today, so let's unify that naming
there as well and provide proper examples.

1. https://openwrt.org/submitting-patches#dts_checklist
2. https://github.com/devicetree-org/devicetree-specification/blob/master/source/devicetree-basics.rst#generic-names-recommendation

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [split up]
18 months agoramips: fix support for MX25L25635F flash
Deng Qingfang [Sun, 13 Jan 2019 06:25:05 +0000 (14:25 +0800)]
ramips: fix support for MX25L25635F flash

Patch picked from commit 82618062cf7e

This enables 4B opcodes for MX25L25635F, to fix the reboot crash
issue (FS#1120) At least 3 devices are using this flash
- GeHua GHL-R-001
- Youku YK1
- Newifi D1

Now the MX25L25635F can be correctly detected without breaking MX25L25635E
[ 3.034324] spi-mt7621 1e000b00.spi: sys_freq: 220000000
[ 3.045962] m25p80 spi0.0: mx25l25635f (32768 Kbytes)
[ 3.056098] 4 fixed-partitions partitions found on MTD device spi0.0
[ 3.068748] Creating 4 MTD partitions on "spi0.0":

Signed-off-by: Deng Qingfang <dengqf6@mail2.sysu.edu.cn>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [added deprecation notice]
18 months agompc85xx: add support for OCEDO Panda
David Bauer [Wed, 16 Jan 2019 23:43:13 +0000 (00:43 +0100)]
mpc85xx: add support for OCEDO Panda

CPU:   FSL P1020 (2x 800MHz E500 PPC)
RAM:   1GB DDR3
FLASH: 256MiB NAND
WiFi:  2x Atheros AR9382 2x2:2 abgn
ETH:   2x BCM54616S - 1x BCM53128 8-port switch
LED:   5x LEDs (Power, WiFi1, WiFi2, N/D, SYS)
BTN:   1x RESET

Installation
------------

1. Download initrams kernel image, dtb binary and sysupgrade image.

2. Place initramfs kernel into tftp root directory. Rename to
"panda-uimage-factory".

3. Place dtb binary into tftp root directory. Rename to "panda.fdt".

4. Start tftp server on 192.168.100.8/24.

5. Power up the device with the reset button pressed. It will download
the initrams and dtb via tftp and boot into OpenWRT in RAM.

6. SSH into the device and remove the factory partitions.

 > ubirmvol /dev/ubi0 --name=kernel1
 > ubirmvol /dev/ubi0 --name=rootfs1
 > ubirmvol /dev/ubi0 --name=devicetree1

You will have around 60 MiB of free space with that.

You can also delete "kernel2", "devicetree2", "rootfs2" and "storage"
respectively in case you do not want to go back to the vendor firmware.

7. Modify the U-Boot bootcmd to allow for booting OpenWRT

 > fw_setenv bootcmd_owrt "ubi part ubi && ubi read 0x1000000 kernel
   && bootm 0x1000000"

 > fw_setenv bootargs_owrt "setenv bootargs console=ttyS0,115200
   ubi.mtd=3,2048"

 > fw_setenv bootcmd "run bootargs_owrt; run bootcmd_owrt"

8. Transfer the sysupgrade image via scp into the /tmp directory.

9. Upgrade the device

 > sysupgrade -n /tmp/<imagename>

Signed-off-by: David Bauer <mail@david-bauer.net>
18 months agompc85xx: use generic diag.sh
David Bauer [Wed, 16 Jan 2019 23:43:12 +0000 (00:43 +0100)]
mpc85xx: use generic diag.sh

This commit removes the target-specific diag.sh script. This way, the
generic one is used for the target, which uses DT-aliases to specify the
LEDs used.

This way, we are also able to use different LEDs to indicate different
states. We use green status LEDs for indicating boot and a running
system. Where possible, the red status LED is used to indicate failsafe
mode and a running upgrade.

Signed-off-by: David Bauer <mail@david-bauer.net>
18 months agoipq40xx: 4.19: fix pcie wifi unit-address of the MR33 and A62
Christian Lamparter [Fri, 18 Jan 2019 18:54:24 +0000 (19:54 +0100)]
ipq40xx: 4.19: fix pcie wifi unit-address of the MR33 and A62

The unit address should be wifi@1,0 since the device is located
at 0000:01:00.0.

Reported-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
18 months agogemini: add EOD marker to rootfs images
Mathias Kresin [Sat, 26 Jan 2019 09:15:06 +0000 (10:15 +0100)]
gemini: add EOD marker to rootfs images

With 6409b159e8b8 ("gemini: switch to 4.14") the EOF marker were dropped
from the rootfs images. Without the marker the rootfs_data partition
can't be created and it isn't possible to permanently store any
configuration changes.

Signed-off-by: Mathias Kresin <dev@kresin.me>
18 months agogemini: fix ITian Square One SQ201 package selection
Mathias Kresin [Sat, 26 Jan 2019 08:32:52 +0000 (09:32 +0100)]
gemini: fix ITian Square One SQ201 package selection

All kernel modules are prefixed with kmod-. Add the prefix to include
the desired packages.

Signed-off-by: Mathias Kresin <dev@kresin.me>
18 months agogemini: replace date placeholder
Mathias Kresin [Sat, 26 Jan 2019 08:29:10 +0000 (09:29 +0100)]
gemini: replace date placeholder

Replace the data placerholder in ImageInfo-itian_sq201 in a reproducible
way.

The code for the replace was accidentality dropped in 5bac6238959
("gemini: unify and fix ib-nas4220b and sq201 image creation")

Signed-off-by: Mathias Kresin <dev@kresin.me>
18 months agogemini: drop Teltonika RUT1xx artifacts
Mathias Kresin [Sat, 26 Jan 2019 08:17:41 +0000 (09:17 +0100)]
gemini: drop Teltonika RUT1xx artifacts

Support for the Teltonika RUT1xx was added with the switch to kernel
4.4. Hidding such changes in a kernel switch commit is the wrong way and
the support for the Teltonika RUT1xx is pretty much incomplete.

Signed-off-by: Mathias Kresin <dev@kresin.me>
18 months agogemini: add wiligear image build code
Mathias Kresin [Sat, 26 Jan 2019 07:57:34 +0000 (08:57 +0100)]
gemini: add wiligear image build code

They were dropped with 6409b159e8b8 ("gemini: switch to 4.14") without
any explaination.

The image generation is disabled for now as it would break the build for
the target. The mkfwimage2 call need to be adjusted to reflect the real
size of kernel and rootfs. Nevertheless, add the required code to give
interested parties a chance to fix the remaining issues.

The dts would need to use the ecoscentric,redboot-fis-partitions
partition parser to get the correct partition offsets and size. It's
expected that the OEM firmware adjusts the on flash partition table with
the values defined in the image header.

Signed-off-by: Mathias Kresin <dev@kresin.me>
18 months agogemini: fix alphabetical order
Mathias Kresin [Fri, 25 Jan 2019 22:12:32 +0000 (23:12 +0100)]
gemini: fix alphabetical order

Reorder the image recipes to keep the alphabetical order.

Signed-off-by: Mathias Kresin <dev@kresin.me>
18 months agogemini: use dts compatible based image filenames
Mathias Kresin [Fri, 25 Jan 2019 21:04:40 +0000 (22:04 +0100)]
gemini: use dts compatible based image filenames

Use an output image filename based on the compatible string from the dts
files. This way it is way easier to get for which board an image is
intended.

Signed-off-by: Mathias Kresin <dev@kresin.me>
18 months agogemini: drop unnecessary image build default variables
Mathias Kresin [Fri, 25 Jan 2019 20:58:09 +0000 (21:58 +0100)]
gemini: drop unnecessary image build default variables

They are either not required, set to an earlier set default value or
defined due to target features.

Signed-off-by: Mathias Kresin <dev@kresin.me>
18 months agogemini: drop unnecessary images
Mathias Kresin [Fri, 25 Jan 2019 20:55:12 +0000 (21:55 +0100)]
gemini: drop unnecessary images

The root filesystem is already part of the factory image and most likely
not required at all.

The same applies to the kernel images.

Signed-off-by: Mathias Kresin <dev@kresin.me>
18 months agogemini: all images are factory images
Mathias Kresin [Fri, 25 Jan 2019 20:53:12 +0000 (21:53 +0100)]
gemini: all images are factory images

There is no support for sysupgrade in gemini, hence all images are only
suitable for an installation via bootloader or oem firmware.

Signed-off-by: Mathias Kresin <dev@kresin.me>
18 months agogemini: follow common pattern for temp dir naming
Mathias Kresin [Fri, 25 Jan 2019 20:49:46 +0000 (21:49 +0100)]
gemini: follow common pattern for temp dir naming

For temporary directories <imagename>.tmp is a common pattern in image
build code across the tree. Use it for the nas4220b/sq201 recipe as
well.

Signed-off-by: Mathias Kresin <dev@kresin.me>
18 months agogemini: use existing build code where possible
Mathias Kresin [Fri, 25 Jan 2019 20:48:10 +0000 (21:48 +0100)]
gemini: use existing build code where possible

Use the existing image build recipes in favour of introducing deplicate
shell code.

Signed-off-by: Mathias Kresin <dev@kresin.me>
18 months agogemini: make all tar files more reproducible
Mathias Kresin [Fri, 25 Jan 2019 20:42:28 +0000 (21:42 +0100)]
gemini: make all tar files more reproducible

Force a fixed sorting and use the parameters to create reproducible
archives for all tar invocations.

Signed-off-by: Mathias Kresin <dev@kresin.me>
18 months agogemini: build images in temporary directories
Mathias Kresin [Fri, 25 Jan 2019 20:39:49 +0000 (21:39 +0100)]
gemini: build images in temporary directories

Create files in temporary directories within the build directory
instead manipulating files in the (final) output directory.

Signed-off-by: Mathias Kresin <dev@kresin.me>
18 months agogemini: don't hardcode image filenames
Mathias Kresin [Fri, 25 Jan 2019 20:30:36 +0000 (21:30 +0100)]
gemini: don't hardcode image filenames

Use the existing image build code mechanisms to specify the image output
filename.

Signed-off-by: Mathias Kresin <dev@kresin.me>
18 months agogemini: fix parallel build
Mathias Kresin [Wed, 16 Jan 2019 20:57:53 +0000 (21:57 +0100)]
gemini: fix parallel build

Due to the missing PROFILES all images are build, regardless of the
selected (or currently processed in case of a multi profile build).

Because of the race condition builds with eight parallel jobs fail,
which can be seen on the build bots as well.

Add the PROFILES variable for now, till the root cause is identified.

Signed-off-by: Mathias Kresin <dev@kresin.me>
18 months agomvebu: remove default profile
Tomasz Maciej Nowak [Thu, 17 Jan 2019 13:43:36 +0000 (14:43 +0100)]
mvebu: remove default profile

When using Image Builder and building image for Cortex A53 or
A72 subtargets, it'll fail with following message:

Collected errors:
 * opkg_install_cmd: Cannot install package mwlwifi-firmware-88w8864.
 * opkg_install_cmd: Cannot install package mwlwifi-firmware-88w8964.
make[2]: *** [Makefile:153: package_install] Error 255
make[1]: *** [Makefile:114: _call_image] Error 2

This is beacuse both packages are available only for Cortex A9 subtarget
and are included in PACKAGES array in default profile. Instead patching
this, let's remove profiles completely, since all necessary packages are
specified in DEVICE_PACKAGES array for each device.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
18 months agoipq40xx: remove misplaced MR33 UCI definition
David Bauer [Sat, 26 Jan 2019 00:47:38 +0000 (01:47 +0100)]
ipq40xx: remove misplaced MR33 UCI definition

This removes the misplaced UCI-network configuration for the MR33. The
LAN port is set in 01_leds while it is already correctly defined in
02_network.

This was most likely an oversight as no network configuration belongs
into 01_leds.

Signed-off-by: David Bauer <mail@david-bauer.net>
18 months agolantiq: Add support for 2nd USB port on Fritz!Box 7320 and 7330
Robert Resch [Wed, 23 Jan 2019 20:04:30 +0000 (21:04 +0100)]
lantiq: Add support for 2nd USB port on Fritz!Box 7320 and 7330

Enable support for 2nd USB port, which is available on Fritz!Box 7320
and 7330. It was run-tested on 7320 and 7330 as well.

Signed-off-by: Robert Resch <openwrt@webnmail.de>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
18 months agolantiq: make AVM FRITZ!Box naming consistent
David Bauer [Tue, 22 Jan 2019 21:36:17 +0000 (22:36 +0100)]
lantiq: make AVM FRITZ!Box naming consistent

This commit changes the model string and device title of all AVM boards
to fit the naming of the manufacturer.

Drop all provider-specific titles as they are re-used for every device
generation by 1&1. The original AVM model name is printed on the bottom
of every devices.

Exception applies for boards which are only supported by a specific
sub-revision.

Signed-off-by: David Bauer <mail@david-bauer.net>
18 months agoramips: adjust Netgear R6120 model name
David Bauer [Mon, 21 Jan 2019 00:00:49 +0000 (01:00 +0100)]
ramips: adjust Netgear R6120 model name

Adjust the model string and device title to match other Netgear routers
in the ramips target.

Signed-off-by: David Bauer <mail@david-bauer.net>
18 months agoath79: fix GL.iNet AR300M family GPIOs/LEDs
Jeff Kletsky [Sun, 20 Jan 2019 22:48:09 +0000 (14:48 -0800)]
ath79: fix GL.iNet AR300M family GPIOs/LEDs

Change the "status" LED to proper GPIO 12 and "red" naming.

Remove GPIO 2 from definition as a USB LED.

GPIO 2 is used to control power to the USB socket, not an LED.
As such, PWM on the line or typical LED triggers are inappropriate.

Users who wish to control the USB power for custom applications
can manipulate the GPIO through code, or for example, export it
through /sys/class/gpio/export.

Runtime-tested:  GL.iNet AR300M-Lite

Signed-off-by: Jeff Kletsky <git-commits@allycomm.com>
18 months agomt76: update to the latest version
Felix Fietkau [Fri, 25 Jan 2019 17:05:04 +0000 (18:05 +0100)]
mt76: update to the latest version

3e9a7d5 Revert "mt7603: fix txd q_idx field value"
815fd03 mt7603: fix CCA timing values
b35cc8e mt7603: set timing on channel change before starting MAC
79b337c mt7603: move CF-End rate update to mt7603_mac_set_timing
3df341d mt7603: avoid redundant MAC timing updates
1c751f3 mt76: avoid scheduling tx queues for powersave stations
2efa389 mt7603: limit station power save queue length to 64
63a79ff mt76: do not report out-of-range rx nss
fe30bd3 mt7603: issue PSE reset on tx hang
ce8cc5d mt7603: issue PSE client reset on init
e342cc5 mt7603: fix buffered multicast count register
aa470d8 mt7603: fix buffered multicast queue flush
b4ee01f mt76: fix tx status timeout processing
7d00d58 mt76x02: fix per-chain signal strength reporting
64abb35 mt76: fix corrupted software generated tx CCMP PN
0b939dc mt76: fix resetting software IV flag on key delete

Signed-off-by: Felix Fietkau <nbd@nbd.name>
18 months agolibelf: fix library packaging
Jo-Philipp Wich [Fri, 25 Jan 2019 17:57:08 +0000 (18:57 +0100)]
libelf: fix library packaging

The library has an usual shared object file name, which caused the
install glob pattern to miss the actual so.

Fixes: #2082
Fixes; 0e70f69a35 ("treewide: revise library packaging")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
18 months agoppp: update to version 2.4.7.git-2018-06-23
Martin Schiller [Thu, 6 Dec 2018 12:10:54 +0000 (13:10 +0100)]
ppp: update to version 2.4.7.git-2018-06-23

This bumps ppp to latest git version.

There is one upstream commit, which changes DES encryption calls from
libcrypt / glibc to openssl.

As long as we don't use glibc-2.28, revert this commit.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
18 months agokernel: fix sdhci-msm build error
Jo-Philipp Wich [Fri, 25 Jan 2019 08:23:33 +0000 (09:23 +0100)]
kernel: fix sdhci-msm build error

A missing upstream stable backport leads to the following build error:

     CC      drivers/mmc/host/sdhci-msm.o
    drivers/mmc/host/sdhci-msm.c:1158:3: error: 'const struct sdhci_ops' has no member named 'write_w'
      .write_w = sdhci_msm_write_w,
       ^~~~~~~
    drivers/mmc/host/sdhci-msm.c:1158:13: warning: excess elements in struct initializer
      .write_w = sdhci_msm_write_w,
                 ^~~~~~~~~~~~~~~~~
    drivers/mmc/host/sdhci-msm.c:1158:13: note: (near initialization for 'sdhci_msm_ops')
    scripts/Makefile.build:326: recipe for target 'drivers/mmc/host/sdhci-msm.o' failed

Solve the issue by backporting commit
99d570da30 ("mmc: Kconfig: Enable CONFIG_MMC_SDHCI_IO_ACCESSORS")
from linux-stable.

Ref: https://github.com/openwrt/openwrt/commit/528508ae8b33c76deaf18f313973144a7e920678#commitcomment-32049231
Fixes: 528508ae8b ("kernel: bump 4.14 to 4.14.95")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
18 months agoprocd: update to latest git HEAD
Hans Dedecker [Thu, 24 Jan 2019 21:50:21 +0000 (22:50 +0100)]
procd: update to latest git HEAD

e2b055e hotplug.c: Make sure hotplug buffer is NULL terminated

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
18 months agotoolchain: Include hardening.mk for toolchain build
Hauke Mehrtens [Tue, 1 Jan 2019 23:34:18 +0000 (00:34 +0100)]
toolchain: Include hardening.mk for toolchain build

This adds the hardening options also to the toolchain build.
With this change the /usr/lib/libstdc++.so.6.0.24 library will have
stack canaries and the /lib/libgcc_s.so.1 library will have Full RELRO.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
18 months agogemini: unify and fix ib-nas4220b and sq201 image creation
Christian Lamparter [Tue, 22 Jan 2019 21:18:57 +0000 (22:18 +0100)]
gemini: unify and fix ib-nas4220b and sq201 image creation

Both Build/sq201-images and Build/nas4220b-images scripts
are very similar. This patch unifies both methods at the
cost of renaming the produced sysupgrade file names, but
with the benifit of creating better reproducible files.

The patch also fixes a race in parallel builds in which case
the ImageInfo of one device could end up in both sysupgrade
files.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
18 months agogemini: lazy set IMAGE_NAME
Christian Lamparter [Tue, 22 Jan 2019 21:48:57 +0000 (22:48 +0100)]
gemini: lazy set IMAGE_NAME

Currently, IMAGE_NAME is expanded at declaration time
and this causes strange filename in the builder's logs:

|cp: cannot stat '[...]/openwrt-gemini-dlink-dns-313-.': No such file or directory
|cp: cannot stat '[...]/openwrt-gemini-nas4220b-.': No such file or directory
|[...]

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
18 months agolayerscape: dts: Unify naming of gpio-keys nodes
Petr Štetiar [Sun, 30 Dec 2018 11:17:25 +0000 (12:17 +0100)]
layerscape: dts: Unify naming of gpio-keys nodes

In DTS Checklist[1] we're now demanding proper generic node names, as
the name of a node should reflect the function of the device and use
generic name for that[2]. Everybody seems to be copy&pasting from DTS
files available in the repository today, so let's unify that naming
there as well and provide proper examples.

1. https://openwrt.org/submitting-patches#dts_checklist
2. https://github.com/devicetree-org/devicetree-specification/blob/master/source/devicetree-basics.rst#generic-names-recommendation

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [split up]
18 months agooxnas: dts: Unify naming of gpio-led nodes
Petr Štetiar [Sun, 30 Dec 2018 11:42:53 +0000 (12:42 +0100)]
oxnas: dts: Unify naming of gpio-led nodes

In DTS Checklist[1] we're now demanding proper generic node names, as
the name of a node should reflect the function of the device and use
generic name for that[2]. Everybody seems to be copy&pasting from DTS
files available in the repository today, so let's unify that naming
there as well and provide proper examples.

1. https://openwrt.org/submitting-patches#dts_checklist
2. https://github.com/devicetree-org/devicetree-specification/blob/master/source/devicetree-basics.rst#generic-names-recommendation

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [split up]
18 months agooxnas: dts: Unify naming of gpio-keys nodes
Petr Štetiar [Sun, 30 Dec 2018 11:17:25 +0000 (12:17 +0100)]
oxnas: dts: Unify naming of gpio-keys nodes

In DTS Checklist[1] we're now demanding proper generic node names, as
the name of a node should reflect the function of the device and use
generic name for that[2]. Everybody seems to be copy&pasting from DTS
files available in the repository today, so let's unify that naming
there as well and provide proper examples.

1. https://openwrt.org/submitting-patches#dts_checklist
2. https://github.com/devicetree-org/devicetree-specification/blob/master/source/devicetree-basics.rst#generic-names-recommendation

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [split up]
18 months agokernel: 4.19: use upstream usbport led trigger fix
Christian Lamparter [Fri, 18 Jan 2019 12:51:09 +0000 (13:51 +0100)]
kernel: 4.19: use upstream usbport led trigger fix

This patch replaces the current hack with a better
version of the RFC patch has been accepted upstream.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
18 months agoipq806x: dts: Unify naming of gpio-led nodes
Petr Štetiar [Sun, 30 Dec 2018 11:42:53 +0000 (12:42 +0100)]
ipq806x: dts: Unify naming of gpio-led nodes

In DTS Checklist[1] we're now demanding proper generic node names, as
the name of a node should reflect the function of the device and use
generic name for that[2]. Everybody seems to be copy&pasting from DTS
files available in the repository today, so let's unify that naming
there as well and provide proper examples.

1. https://openwrt.org/submitting-patches#dts_checklist
2. https://github.com/devicetree-org/devicetree-specification/blob/master/source/devicetree-basics.rst#generic-names-recommendation

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [split up]
18 months agoipq806x: dts: Unify naming of gpio-keys nodes
Petr Štetiar [Sun, 30 Dec 2018 11:17:25 +0000 (12:17 +0100)]
ipq806x: dts: Unify naming of gpio-keys nodes

In DTS Checklist[1] we're now demanding proper generic node names, as
the name of a node should reflect the function of the device and use
generic name for that[2]. Everybody seems to be copy&pasting from DTS
files available in the repository today, so let's unify that naming
there as well and provide proper examples.

1. https://openwrt.org/submitting-patches#dts_checklist
2. https://github.com/devicetree-org/devicetree-specification/blob/master/source/devicetree-basics.rst#generic-names-recommendation

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [split up]
18 months agoipq40xx: dts: Unify naming of gpio-led nodes
Petr Štetiar [Sun, 30 Dec 2018 11:42:53 +0000 (12:42 +0100)]
ipq40xx: dts: Unify naming of gpio-led nodes

In DTS Checklist[1] we're now demanding proper generic node names, as
the name of a node should reflect the function of the device and use
generic name for that[2]. Everybody seems to be copy&pasting from DTS
files available in the repository today, so let's unify that naming
there as well and provide proper examples.

1. https://openwrt.org/submitting-patches#dts_checklist
2. https://github.com/devicetree-org/devicetree-specification/blob/master/source/devicetree-basics.rst#generic-names-recommendation

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [split up]
18 months agoipq40xx: dts: Unify naming of gpio-keys nodes
Petr Štetiar [Sun, 30 Dec 2018 11:17:25 +0000 (12:17 +0100)]
ipq40xx: dts: Unify naming of gpio-keys nodes

In DTS Checklist[1] we're now demanding proper generic node names, as
the name of a node should reflect the function of the device and use
generic name for that[2]. Everybody seems to be copy&pasting from DTS
files available in the repository today, so let's unify that naming
there as well and provide proper examples.

1. https://openwrt.org/submitting-patches#dts_checklist
2. https://github.com/devicetree-org/devicetree-specification/blob/master/source/devicetree-basics.rst#generic-names-recommendation

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [split up]
18 months agoapm821xx: dts overhaul
Christian Lamparter [Sun, 23 Dec 2018 21:15:34 +0000 (22:15 +0100)]
apm821xx: dts overhaul

 - remove stray #address-cells / #size-cells

 - fix partition unit-addresses in wd-mybooklive.dts

 - remove index from MBL's gpio node name

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
18 months agoapm821xx: dts: Unify naming of gpio-led nodes
Petr Štetiar [Sun, 30 Dec 2018 11:42:53 +0000 (12:42 +0100)]
apm821xx: dts: Unify naming of gpio-led nodes

In DTS Checklist[1] we're now demanding proper generic node names, as
the name of a node should reflect the function of the device and use
generic name for that[2]. Everybody seems to be copy&pasting from DTS
files available in the repository today, so let's unify that naming
there as well and provide proper examples.

1. https://openwrt.org/submitting-patches#dts_checklist
2. https://github.com/devicetree-org/devicetree-specification/blob/master/source/devicetree-basics.rst#generic-names-recommendation

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [split up]
18 months agoapm821xx: dts: Unify naming of gpio-keys nodes
Petr Štetiar [Sun, 30 Dec 2018 11:17:25 +0000 (12:17 +0100)]
apm821xx: dts: Unify naming of gpio-keys nodes

In DTS Checklist[1] we're now demanding proper generic node names, as
the name of a node should reflect the function of the device and use
generic name for that[2]. Everybody seems to be copy&pasting from DTS
files available in the repository today, so let's unify that naming
there as well and provide proper examples.

1. https://openwrt.org/submitting-patches#dts_checklist
2. https://github.com/devicetree-org/devicetree-specification/blob/master/source/devicetree-basics.rst#generic-names-recommendation

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [split up]
18 months agoat91: dts: Unify naming of gpio-keys nodes
Petr Štetiar [Sun, 30 Dec 2018 11:17:25 +0000 (12:17 +0100)]
at91: dts: Unify naming of gpio-keys nodes

In DTS Checklist[1] we're now demanding proper generic node names, as
the name of a node should reflect the function of the device and use
generic name for that[2]. Everybody seems to be copy&pasting from DTS
files available in the repository today, so let's unify that naming
there as well and provide proper examples.

1. https://openwrt.org/submitting-patches#dts_checklist
2. https://github.com/devicetree-org/devicetree-specification/blob/master/source/devicetree-basics.rst#generic-names-recommendation

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [split up]
18 months agomac80211: ath10k: remove "ath10k: fix otp failure result" patch
Christian Lamparter [Tue, 1 Jan 2019 15:03:01 +0000 (16:03 +0100)]
mac80211: ath10k: remove "ath10k: fix otp failure result" patch

Initially this patch was introduced as a quick fix following
the removal of 936-ath10k_skip_otp_check.patch which caused
multiple ath10k pcie devices in various ipq806x and ar71xx/ath79
targets to malfunction.

Thankfully, the affected devices have been updated to utilize
the pre-caldata method. And finally with the switch to ath10k-ct,
which never had the patch or any reports of similar issues, I
think it's time to remove this patch since it is no longer needed.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
18 months agobrcm2708: boot-part feature integration
Christian Lamparter [Thu, 27 Dec 2018 20:56:28 +0000 (21:56 +0100)]
brcm2708: boot-part feature integration

This patch adds the boot-part feature which enables the brcm2708
target move from the custom boot partition size config option to
the generic CONFIG_TARGET_KERNEL_PARTSIZE.

Note:
For people using custom images: Just like with
CONFIG_TARGET_ROOTFS_PARTSIZE changing the value
can cause sysupgrade to repartition the device!
Make sure to have a backup in this case.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
18 months agoiproute2: replace libelf1 dependency with libelf
Jo-Philipp Wich [Thu, 24 Jan 2019 11:56:31 +0000 (12:56 +0100)]
iproute2: replace libelf1 dependency with libelf

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
18 months agoperf: replace libelf1 dependency with libelf
Jo-Philipp Wich [Thu, 24 Jan 2019 11:56:11 +0000 (12:56 +0100)]
perf: replace libelf1 dependency with libelf

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
18 months agoelfutils: rename libelf1 to libelf
Jo-Philipp Wich [Thu, 24 Jan 2019 11:52:23 +0000 (12:52 +0100)]
elfutils: rename libelf1 to libelf

The ABI_VERSION:=1 tag will take care of transforming the binary
library package basename.

Add a virtual PROVIDES:=libelf1 for packages still having libelf1
in their DEPENDS:=... lists.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
18 months agobuild: formatting fixes for per-provide ABI_VERSION suffixes
Jo-Philipp Wich [Thu, 24 Jan 2019 11:48:27 +0000 (12:48 +0100)]
build: formatting fixes for per-provide ABI_VERSION suffixes

 - Filter out potential duplicates with the package name
   (e.g. when renaming libfoo1 w/ ABI_VERSION:=1 to libfoo)
 - Use the GetABISuffix macro to properly separate the suffix
   with a dash in case the basename ends with a number

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
18 months agotreewide: revise library packaging
Jo-Philipp Wich [Tue, 22 Jan 2019 18:17:32 +0000 (19:17 +0100)]
treewide: revise library packaging

- Annotate versionless libraries (such as libubox, libuci etc.) with a fixed
  ABI_VERSION resembling the source date of the last incompatible change
- Annotate packages shipping versioned library objects with ABI_VERSION
- Stop shipping unversioned library symlinks for packages with ABI_VERSION

Ref: https://openwrt.org/docs/guide-developer/package-policies#shared_libraries
Ref: https://github.com/KanjiMonster/maintainer-tools/blob/master/check-abi-versions.pl
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
18 months agobuild: extend ABI_VERSION suffixing to provides
Jo-Philipp Wich [Mon, 21 Jan 2019 16:29:57 +0000 (17:29 +0100)]
build: extend ABI_VERSION suffixing to provides

When a library package specifies additional provides, e.g. libncurses
which provides libncursesw, we should also append the abi version
suffix to each provide, since there may be more than one package
providing the virtual library.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
18 months agouclient: set fixed ABI_VERSION on libuclient
Jo-Philipp Wich [Mon, 21 Jan 2019 15:59:58 +0000 (16:59 +0100)]
uclient: set fixed ABI_VERSION on libuclient

Last incompatible change appeared to be 4924411
("http: add proper error handling to uclient_http_redirect()") which
changed the return value of uclient_http_redirect() from bool to int.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
18 months agokernel: bump 4.14 to 4.14.95
Koen Vandeputte [Wed, 23 Jan 2019 12:15:48 +0000 (13:15 +0100)]
kernel: bump 4.14 to 4.14.95

Refreshed all patches.

Removed superseded patches:
- 0400-Revert-MIPS-smp-mt-Use-CPU-interrupt-controller-IPI-.patch

Compile-tested on: ar71xx, cns3xxx, imx6, lantiq (xrx200, AVM 3370), x86_64
Runtime-tested on: ar71xx, cns3xxx, imx6, lantiq (xrx200, AVM 3370)

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Tested-by: Mathias Kresin <dev@kresin.me>
Tested-by: Robert Resch <openwrt@webnmail.de>
18 months agokernel: bump 4.9 to 4.9.152
Koen Vandeputte [Wed, 23 Jan 2019 12:07:48 +0000 (13:07 +0100)]
kernel: bump 4.9 to 4.9.152

Refreshed all patches.

Compile-tested on: ar7
Runtime-tested on: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
18 months agowireguard: bump to 0.0.20190123
Jason A. Donenfeld [Wed, 23 Jan 2019 13:49:44 +0000 (14:49 +0100)]
wireguard: bump to 0.0.20190123

* tools: curve25519: handle unaligned loads/stores safely

This should fix sporadic crashes with `wg pubkey` on certain architectures.

* netlink: auth socket changes against namespace of socket

In WireGuard, the underlying UDP socket lives in the namespace where the
interface was created and doesn't move if the interface is moved. This
allows one to create the interface in some privileged place that has
Internet access, and then move it into a container namespace that only
has the WireGuard interface for egress. Consider the following
situation:

1. Interface created in namespace A. Socket therefore lives in namespace A.
2. Interface moved to namespace B. Socket remains in namespace A.
3. Namespace B now has access to the interface and changes the listen
port and/or fwmark of socket. Change is reflected in namespace A.

This behavior is arguably _fine_ and perhaps even expected or
acceptable. But there's also an argument to be made that B should have
A's cred to do so. So, this patch adds a simple ns_capable check.

* ratelimiter: build tests with !IPV6

Should reenable building in debug mode for systems without IPv6.

* noise: replace getnstimeofday64 with ktime_get_real_ts64
* ratelimiter: totalram_pages is now a function
* qemu: enable FP on MIPS

Linux 5.0 support.

* keygen-html: bring back pure javascript implementation

Benoît Viguier has proofs that values will stay well within 2^53. We
also have an improved carry function that's much simpler. Probably more
constant time than emscripten's 64-bit integers.

* contrib: introduce simple highlighter library

This is the highlighter library being used in:
- https://twitter.com/EdgeSecurity/status/1085294681003454465
- https://twitter.com/EdgeSecurity/status/1081953278248796165

It's included here as a contrib example, so that others can paste it into
their own GUI clients for having the same strictly validating highlighting.

* netlink: use __kernel_timespec for handshake time

This readies us for Y2038. See https://lwn.net/Articles/776435/ for more info.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
18 months agoiproute2: update to 4.20.0
Deng Qingfang [Tue, 22 Jan 2019 11:55:21 +0000 (19:55 +0800)]
iproute2: update to 4.20.0

Update to the latest version of iproute2; see https://lwn.net/Articles/776174/
for a full overview of the changes in 4.20.
Remove upstream patch 001-fix-print_0xhex-on-32-bit.patch and 002-tc-fix-xtables-incorrect-usage-of-LDFLAGS.patch
Introduce a patch to include <linux/limits.h> for XATTR_SIZE_MAX in tc

Signed-off-by: Deng Qingfang <dengqf6@mail2.sysu.edu.cn>
18 months agoramips: fix two-way hash and auto ageout on MT7621
HsiuWen Yen [Wed, 23 Jan 2019 04:14:19 +0000 (12:14 +0800)]
ramips: fix two-way hash and auto ageout on MT7621

Current code directly writes the FOE entry to hash_val+1 position
when hash collision occurs. However, it is found that this behavior
will cause the cache and the hardware FOE table to be inconsistent.

For example, there are three flows, and their hashed values are all
equal to 100. The first flow is written to the position of 100. The
second flow is written to the position of 100+1. Then, the logic of
the current code will also write the third flow to 100+1.

At this time, the cache has flow 1 and 2; and the hardware FOE table
has flow 1 and 3, where these two parts store different contents.
So it is necessary to check whether the hash_val+1 is also occupied
before writing. If hash_val+1 is also occupied, we won’t bind th
third flow to the FOE table.

Addition to that, we also cancel the processing of foe_entry removal
because the hardware has auto age-out ability. The hardware will
periodically iterate through the FOE table to find out the time-out
entry and set it as INVALID.

Signed-off-by: HsiuWen Yen <y.hsiuwen@gmail.com>
18 months agouboot-ar71xx: fix musl host build
Andy Walsh [Tue, 14 Aug 2018 12:27:47 +0000 (14:27 +0200)]
uboot-ar71xx: fix musl host build

On musl based distributions, u-boot 2010.03 fails to build with:

    u-boot-2010.03/include/u-boot/crc.h:29:50: error: unknown type name 'uint'
      uint32_t crc32 (uint32_t, const unsigned char *, uint);

The issue was fixed in the newer u-boot-2018.03 version, this commit
backports the change to the older version used by ar71xx/ath79.

Signed-off-by: Andy Walsh <andy.walsh44+github@gmail.com>
[add commit message from PR description]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
18 months agolibrpc: remove package
Andy Walsh [Mon, 13 Aug 2018 11:14:17 +0000 (13:14 +0200)]
librpc: remove package

* replaced with packages/libtirpc
* remove busybox options rarely used/deprecated
BUSYBOX_CONFIG_FEATURE_MOUNT_NFS
BUSYBOX_CONFIG_FEATURE_INETD_RPC

Signed-off-by: Andy Walsh <andy.walsh44+github@gmail.com>
18 months agomusl: improve crypt() size hack
Jo-Philipp Wich [Tue, 22 Jan 2019 08:50:09 +0000 (09:50 +0100)]
musl: improve crypt() size hack

Instead of silently downgrading any non-MD5 crypt() request to DES,
cleanly fail with return NULL and errno = ENOSYS. This allows callers
to notice the missing support instead of the unwanted silent fallback
to DES.

Also add a menuconfig toolchain option to optionally disable the crypt
size hack completely. This can be probably made dependant on SMALL_FLASH
or a similar feature indicator in a future commit.

Ref: https://github.com/openwrt/openwrt/pull/1331
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
18 months agobusybox: handle crypt() errors in loginutils
Jo-Philipp Wich [Tue, 22 Jan 2019 11:01:09 +0000 (12:01 +0100)]
busybox: handle crypt() errors in loginutils

The crypt(3) function is allowed to fail with either EINVAL or ENOSYS when
the given salt is either invalid or when the requested algorithm is not
implemented.

In such a case, libbb's pw_encrypt() function will silently convert the
crypt() NULL return value into an empty string which is then processed
without further errors by utilities such as chpasswd or passwd, causing
them to set an empty password when an unsupported cipher is requested.

Patch the relevant users of pw_encrypt() to abort in case an empty hash
is returned by pw_encrypt() in order to mitigate the problem.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
18 months agoncurses: build host libraries with -fPIC
Jo-Philipp Wich [Tue, 22 Jan 2019 10:12:04 +0000 (11:12 +0100)]
ncurses: build host libraries with -fPIC

Since readline/host links ncurses/host now, we need to ensure that the
libncursesw.so host library is built with -fPIC.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
18 months agotools/sed: fix incorrect dependency.
Kuang Rufan [Thu, 27 Sep 2018 14:08:35 +0000 (22:08 +0800)]
tools/sed: fix incorrect dependency.

sed shall depend on xz instead of xz depends on sed.

Signed-off-by: Kuang Rufan <master@a1983.com.cn>
18 months agobuild: Optionally provide file checksums in package metadata
Michal Hrusecky [Wed, 17 Jan 2018 12:25:43 +0000 (13:25 +0100)]
build: Optionally provide file checksums in package metadata

This may be useful if you don't entirely trust your flash and want to be able
to check for corruptions.

Signed-off-by: Michal Hrusecky <Michal@Hrusecky.net>
18 months agoath79: fix port order for dir 825-c1 and 835-a1
Sebastian Kemper [Sun, 20 Jan 2019 08:13:24 +0000 (09:13 +0100)]
ath79: fix port order for dir 825-c1 and 835-a1

LAN ports 1 and 4 and 2 and 3 are interchanged. Fix this in 02_network
so the ports show up in the correct order in luci.

The correct ucidef_add_switch line is already present. This commit moves
the blocks around to keep alphabetical order.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
18 months agoar71xx: ag71xx: preserve port mirror flags during swconfig apply
Milan Krstic [Sun, 20 Jan 2019 11:44:37 +0000 (12:44 +0100)]
ar71xx: ag71xx: preserve port mirror flags during swconfig apply

The swconfig load operation always triggers 'apply' function which in
this driver currently clears port mirroring flags effectively undoing
port mirroring configuration.

This fix preserves port mirroring flags during apply.

Signed-off-by: Milan Krstic <milan.krstic@gmail.com>
18 months agoath79: ag71xx: preserve port mirror flags during swconfig apply
Milan Krstic [Mon, 21 Jan 2019 21:26:33 +0000 (22:26 +0100)]
ath79: ag71xx: preserve port mirror flags during swconfig apply

The swconfig load operation always triggers 'apply' function which in
this driver currently clears port mirroring flags effectively undoing
port mirroring configuration.

Signed-off-by: Milan Krstic <milan.krstic@gmail.com>
18 months agoprocd: Add wrapper for uci_validate_section()
Jeffery To [Sat, 12 Jan 2019 18:14:22 +0000 (02:14 +0800)]
procd: Add wrapper for uci_validate_section()

This adds a wrapper (uci_load_validate) for uci_validate_section() that
allows callers (through a callback function) to access the values set by
uci_validate_section(), without having to manually declare a
(potentially long) list of local variables.

The callback function receives two arguments when called, the config
section name and the return value of uci_validate_section().

If no callback function is given, then the wrapper exits with the value
returned by uci_validate_section().

This also updates several init scripts to use the new wrapper function.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
18 months agoiputils: install ping, ping6, traceroute6 with setuid root
Carsten Wolff [Sun, 8 Apr 2018 19:39:10 +0000 (21:39 +0200)]
iputils: install ping, ping6, traceroute6 with setuid root

these utilities need to run with uid 0 to be useful. Thus,
install them setuid root like other distros do, too.

Signed-off-by: Carsten Wolff <carsten@wolffcarsten.de>
[use INSTALL_SUID macro]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
18 months agofstools: media change detection (eg:sdcard) using kernel polling
Matthias Badaire [Tue, 15 May 2018 22:07:37 +0000 (00:07 +0200)]
fstools: media change detection (eg:sdcard) using kernel polling

Linux kernel has a polling mechanism that can be activated by changing
the parameter /sys/module/block/parameters/events_dfl_poll_msecs which
is deactivated by default or the /sys/block/[device]/events_poll_msecs
for one device.

This patch set the events_poll_msecs when a disk is inserted.
Once the media disk change event is sent by the kernel then we force a
re-read of the devices using /sbin/block info.

With this patch, insertion and ejection of sd card will automatically
generate partition devices in /dev.

Signed-off-by: Matthias Badaire <mbadaire@gmail.com>
[rewrap commit message, fix bashisms, fix non-matching condition,
 bump pkg release]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
18 months agoncurses: package only versioned shared objects
Jo-Philipp Wich [Tue, 22 Jan 2019 07:41:21 +0000 (08:41 +0100)]
ncurses: package only versioned shared objects

Also fix the libxxxw.so* -> libxxx.so* linking to actually work, the
prevsious code failed to properly symlink the versioned .so files.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
18 months agoreadline: Update to 8.0 and various fixes
Daniel Engberg [Sat, 12 Jan 2019 17:07:25 +0000 (18:07 +0100)]
readline: Update to 8.0 and various fixes

Update (lib)readline to 8.0
Remove autoreconf
Remove blankspace at the end of the lines in description
Remove --enable-shared and --enable-static as they're enabled by default
Remove TARGET_CPPFLAGS
Simplify install sections
Install readline.pc (pkgconfig)
Add patch for linking (lib)ncurses

Source:
https://git.buildroot.net/buildroot/plain/package/readline/0000-curses-link.patch

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
18 months agolibnetfilter-conntrack: update to 1.0.7
Peter Wagner [Tue, 22 Jan 2019 07:15:41 +0000 (08:15 +0100)]
libnetfilter-conntrack: update to 1.0.7

Signed-off-by: Peter Wagner <tripolar@gmx.at>
[split from https://github.com/openwrt/openwrt/pull/1274]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
18 months agoconntrack-tools: relocated to packages feed
Jo-Philipp Wich [Tue, 22 Jan 2019 07:14:00 +0000 (08:14 +0100)]
conntrack-tools: relocated to packages feed

In order to prepare the switch from librpc to libtirpc, we need to relocate
conntrack-tools to the packages feed.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
18 months agoscripts: ipkg-remove: handle existing .ipk files without SourceName field
Jo-Philipp Wich [Mon, 21 Jan 2019 15:35:40 +0000 (16:35 +0100)]
scripts: ipkg-remove: handle existing .ipk files without SourceName field

Package archives built before commit e6bcf1e4ac
("build: add ABI_VERSION to binary package names") lack the SourceName
control file field which caused ipkg-remove to skip such archives.

Add fallback code that matches the files by their basename followed by
an underscore, similar to how the old cleanup code worked.

Fixes: #2067
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
18 months agokernel: bump 4.14 to 4.14.94
Koen Vandeputte [Fri, 18 Jan 2019 10:22:01 +0000 (11:22 +0100)]
kernel: bump 4.14 to 4.14.94

Refreshed all patches.

Compile-tested on: ar71xx, cns3xxx, imx6, x86_64
Runtime-tested on: ar71xx, cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
18 months agokernel: bump 4.9 to 4.9.151
Koen Vandeputte [Fri, 18 Jan 2019 10:19:29 +0000 (11:19 +0100)]
kernel: bump 4.9 to 4.9.151

Refreshed all patches.

Compile-tested on: ar7
Compile-tested on: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
18 months agobcm53xx: add support for Phicomm K3
Hao Dong [Sat, 19 Jan 2019 17:39:19 +0000 (17:39 +0000)]
bcm53xx: add support for Phicomm K3

Hardware specifications:

- CPU: Broadcom BCM4709C0 @1.4GHz (Dual-Core ARM)
- RAM: 512 MB (DDR3)
- Flash: 128 MB (NAND)
- LAN ports: 3, LAN speed: 10/100/1000
- WAN ports: 1, WAN speed: 10/100/1000
- 2.4G: BCM4366 4x4 MIMO 1000Mbps -- Skyworks SE2623L 2.4GHz Power Amplifier (x4)
- 5G: BCM4366 4x4 MIMO 2167Mbps -- RFMD RFPA5542 5GHz Power Amplifier Module (x4)
- USB: 1x USB 3.0 port
- 1x LED, 1x reset button, 1x power switch
- 1x system status touch screen

Flash:

- Enter CFE
- Upload the trx file
- Reboot

Signed-off-by: Hao Dong <halbertdong@gmail.com>
18 months agomt76: update to the latest version
Felix Fietkau [Sun, 20 Jan 2019 17:01:57 +0000 (18:01 +0100)]
mt76: update to the latest version

d273ddd mt7603: fix number of frames limit in .release_buffered_frames
63bf183 mt76: add channel switch announcement support
e45db12 mt7603: fix tx status info
9d11596 mt7603: discard bogus tx status data
4bcb2f9 mt7603: fix txd q_idx field value
4206db7 mt76: set IEEE80211_HW_NEEDS_UNIQUE_STA_ADDR flag
c4e4982 mt7603: set IEEE80211_HW_TX_STATUS_NO_AMPDU_LEN
702f557 mt7603: use maximum tx count for buffered multicast packets
158529d mt7603: fix PSE reset retry sequence
fc31457 mt7603: implement support for SMPS

Signed-off-by: Felix Fietkau <nbd@nbd.name>
18 months agomac80211: add support for indicating missing tx A-MPDU length
Felix Fietkau [Wed, 16 Jan 2019 22:07:22 +0000 (23:07 +0100)]
mac80211: add support for indicating missing tx A-MPDU length

Signed-off-by: Felix Fietkau <nbd@nbd.name>
18 months agonghttp2: bump to 1.36.0
Hans Dedecker [Sun, 20 Jan 2019 17:11:32 +0000 (18:11 +0100)]
nghttp2: bump to 1.36.0

e7e8ee5f Update bash_completion
b3b4e335 Update manual pages
bd93d90a Don't treat text as option if it matches -[0-9]
ea69c84b Bump up version number to 1.36.0
783b649b Update AUTHORS
eb21e6f8 Merge branch 'update-http-parser'
ab2aa567 Fix test failure
ff87a542 Use http-parser 0d0a24e19eb5ba232d2ea8859aba2a7cc6c42bc4
439dbce6 Merge branch 'nghttpx-h1-connection-pool-per-addr'
e9c9838c nghttpx: Pool h1 backend connection per address
803d4ba9 Merge branch 'nghttpx-randomize-roundrobin-order'
732245e5 make clang-format
9e8d5433 Use clang-format-7
fdcdb21c nghttpx: Randomize backend address round robin order per thread
11d0533c nghttpx: Ensure that cert serial does not exceed 20 bytes
dbb5f00d Merge pull request #1287 from rckclmbr/fix_serial_size
9cc412e2 Merge pull request #1285 from staticinvocation/master
5b2efc0a Fix getting long serial numbers for openssl < 1.1
7e4c48a4 Disable shared library if ENABLE_SHARED_LIB is OFF
082e162f Merge pull request #1282 from alagoutte/travis
7cc7c06c .travis(.yml): no longer need llvm-toolchain-trusty-7
12ebeb30 .travis(.yml): Update to Xenial
c78abbe1 Update mruby to 2.0.0
124c7848 nghttpx: Add missing return
ce9667c4 Merge branch 'nghttpx-fix-trailing-slash-handling'
f3f40840 nghttpx: Fix broken trailing slash handling
302abf1b h2load: Fix compile error with gcc
089a03be h2load: Write log file with write(2)
de4fe728 Merge branch 'pyos-master'
d1b3a83f h2load: add an option to write per-request logs
eb679253 Merge branch 'puscas-port_in_use'
6800d317 added access to the number of the current server port
c98362ea Bump up version number to 1.36.0-DEV

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
18 months agokernel: N_BADCLASS: fix macro to actually work - class e support
Kevin Darbyshire-Bryant [Sat, 19 Jan 2019 19:42:21 +0000 (19:42 +0000)]
kernel: N_BADCLASS: fix macro to actually work - class e support

Backport upstream patch:

Commit 65cab850f0ee ("net: Allow class-e address assignment via ifconfig
ioctl") modified the IN_BADCLASS macro a bit, but unfortunatly one too
many '(' characters were added to the line, making any code that used
it, not build properly.

Also, the macro now compares an unsigned with a signed value, which
isn't ok, so fix that up by making both types match properly.

Reported-by: Christopher Ferris <cferris@google.com>
Fixes: 65cab850f0ee ("net: Allow class-e address assignment via ifconfig ioctl")
Cc: Dave Taht <dave.taht@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
18 months agobuild: add ABI_VERSION to binary package names
Jo-Philipp Wich [Thu, 17 Jan 2019 16:31:09 +0000 (17:31 +0100)]
build: add ABI_VERSION to binary package names

Add the ABI_VERSION source makefile variable to the binary package basename
and resolve source dependencies on packages with ABI_VERSION set to such
expanded names.

If for example a package specifies DEPENDS:=libopenssl while the OpenSSL
Makefile specifies ABI_VERSION:=1.0.0, the resulting ipk control data
dependency will be "Depends: libopenssl1.0.0" and the libopenssl ipk file
will be called "libopenssl1.0.0_<version>_<arch>.ipk".

The next time a library such as OpenSSL is updated to an incompatible
version, the ABI_VERSION shall be changed accordingly to prevent opkg from
simply upgrading to an incompatible library without considering the
dependencies of already installed packages.

Also introduce another "SourceName" control field which is required by
the newly introduced "scritps/ipkg-remove" to determine the proper related
.ipk files to delete upon buildroot package clean operations.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
18 months agobuild: expose ABI version in .packageauxvars
Jo-Philipp Wich [Fri, 18 Jan 2019 11:43:06 +0000 (12:43 +0100)]
build: expose ABI version in .packageauxvars

Subdequent commits need this information to resolve the ABI version when
computing binary ipk dependencies.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
18 months agobuild: rename .packagesubdirs to .packageauxvars
Jo-Philipp Wich [Fri, 18 Jan 2019 11:32:57 +0000 (12:32 +0100)]
build: rename .packagesubdirs to .packageauxvars

Subsequent commits will put more auxiliary information into this file,
such as the per-package ABI version, so rename the metadata script
subcommand and file names accordingly.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
18 months agopackages: set more explicit ABI_VERSION values
Jo-Philipp Wich [Thu, 17 Jan 2019 16:24:31 +0000 (17:24 +0100)]
packages: set more explicit ABI_VERSION values

In the case of upstream libraries, set the ABI_VERSION variable to the
soname value of the first version version after the last backwards
incompatible change.

For custom OpenWrt libraries, set the ABI_VERSION to the date of the
last Git commit doing backwards incompatible changes to the source,
such as changing function singatures or dropping exported symbols.

The soname values have been determined by either checking
https://abi-laboratory.pro/index.php?view=tracker or - in the case
of OpenWrt libraries - by carefully reviewing the changes made to
header files thorough the corresponding Git history.

In the future, the ABI_VERSION values must be bumped whenever the
library is updated to an incpompatible version but not with every
package update, in order to reduce the dependency churn in the
binary package repository.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
18 months agoopkg: update to latest Git head
Jo-Philipp Wich [Fri, 18 Jan 2019 17:43:18 +0000 (18:43 +0100)]
opkg: update to latest Git head

This update fixes some cosmetical issues and a number of segmentation
faults when parsing lists having Conflicts or Replaces tags.

d217daf libopkg: fix replacelist parsing and writing
9dd9a07 libopkg: fix segmentation fault when traversing conflicts
34571ba libopkg: consider provided packages in pkg_vec_mark_if_matches()
18740e6 opkg_download: print error when fork() fails
e3d7330 libopkg: don't print unresolved dependencies twice

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
18 months agoramips: fix firmware splitter for edimax based boards
Mathias Kresin [Sat, 19 Jan 2019 09:23:21 +0000 (10:23 +0100)]
ramips: fix firmware splitter for edimax based boards

Use the correct splitter for board with the edimax header.

Signed-off-by: Mathias Kresin <dev@kresin.me>
18 months agokernel: add DT binding support to the Edimax uImage parser
Mathias Kresin [Sat, 19 Jan 2019 09:12:53 +0000 (10:12 +0100)]
kernel: add DT binding support to the Edimax uImage parser

It allows specifying those parsers directly in the DT.

Signed-off-by: Mathias Kresin <dev@kresin.me>
18 months agodnsmasq: allow building without tftp server support
Rosy Song [Mon, 7 Jan 2019 01:52:43 +0000 (09:52 +0800)]
dnsmasq: allow building without tftp server support

It saves 2871 bytes on package size while 4 bytes on memory size.

Signed-off-by: Rosy Song <rosysong@rosinson.com>
18 months agokernel: remove upstreamed patch from 4.19
Stijn Tintel [Thu, 17 Jan 2019 08:39:34 +0000 (10:39 +0200)]
kernel: remove upstreamed patch from 4.19

This patch applies cleanly, so it doesn't cause errors while rebasing
patches. It results in redifinition of inode_still_linked, causing build
to fail when ubifs is enabled. Drop the patch.

Fixes: a37098a2d013 ("kernel: bump 4.19 to 4.19.16")
Reported-by: Deng Qingfang <dengqf6@mail2.sysu.edu.cn>
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>