openwrt/staging/jow.git
5 years agoar71xx: cr5000: use correct company name
Daniel F. Dickinson [Wed, 25 Jul 2018 23:07:21 +0000 (19:07 -0400)]
ar71xx: cr5000: use correct company name

It's 'PowerCloud Systems' not just 'PowerCloud'

Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
(backported from fedc826c320d27759ac551c8427eddf582f7b343)

5 years agoar71xx: cr5000: Drop support for defunct cloud
Daniel F. Dickinson [Sat, 21 Jul 2018 01:04:56 +0000 (21:04 -0400)]
ar71xx: cr5000: Drop support for defunct cloud

The Skydog cloud service no longer exists hence supporting going back
to stock firmware with cloud support is no longer applicable.

Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
(backported from 50caf9d452b8ee48f937703a366738346d48a9e4)

5 years agoar71xx: cr5000: Tweak switch LED settings
Daniel F. Dickinson [Sat, 21 Jul 2018 01:03:27 +0000 (21:03 -0400)]
ar71xx: cr5000: Tweak switch LED settings

This is basically cosmetic and sets the Port 1-4 LEDs to blink on
10/100/1000M.

Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
(backported from c666851ce7250cdb027770938d86c7ac9e3195db)

5 years agoar71xx: cr5000: Fix the reset button as KEY_RESTART
Daniel F. Dickinson [Sat, 21 Jul 2018 01:01:23 +0000 (21:01 -0400)]
ar71xx: cr5000: Fix the reset button as KEY_RESTART

The reset button was incorrectly returning KEY_WPS_BUTTON as the key
code.  We want KEY_RESTART., so make that fix.

Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
(backported from ffc71cd2d07148e5fa4257b31402e7756aaab238)

5 years agoar71xx: cr5000: board data: Use better macro name
Daniel F. Dickinson [Sat, 21 Jul 2018 00:59:40 +0000 (20:59 -0400)]
ar71xx: cr5000: board data: Use better macro name

The PCIe wireless MAC address address is better labelled as WMAC
than MAC to emphasize that it is for a wireless interface.

Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
(backported from a208e0779084e17e981a93927ca44ac36ff07db7)

5 years agogrub2: fix packed-not-aligned error on GCC 8
Edi Turn [Mon, 23 Jul 2018 14:08:18 +0000 (22:08 +0800)]
grub2: fix packed-not-aligned error on GCC 8

Fix the compile error "packed-not-aligned" when using GCC 8.

Signed-off-by: Edi Turn <yyxstter@gmail.com>
(backported from e9dee194876ffda0bf610ea9382d586c1e619caf)
(rebased patches)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agotoolchain/binutils: Add binutils 2.31.1
Daniel Engberg [Fri, 20 Jul 2018 18:29:47 +0000 (20:29 +0200)]
toolchain/binutils: Add binutils 2.31.1

Add binutils 2.31.1 to repo

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
(backported from a93b6edfec1482b58be4623d999ca69458d432ea)

5 years agoar71xx: improve MikroTik wAP R support
Thibaut VARÈNE [Sun, 29 Jul 2018 10:15:00 +0000 (12:15 +0200)]
ar71xx: improve MikroTik wAP R support

81d446b045176e3e25bb0ef74e3d060b51a0a353 introduced incomplete
support for this device.

This patch attempts to correct the situation based on OEM source
code.

LED1-3 are GSM mode on OFW (2G/3G/4G) hence unassigned here.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
Tested-by: David Ehrmann <ehrmann@gmail.com>
(backported from 091e915d994ff77a2677266e9e8cc831a7091deb)

5 years agoar71xx: rbspi: mark rb911L user led as active low
Thibaut VARÈNE [Sun, 29 Jul 2018 10:14:58 +0000 (12:14 +0200)]
ar71xx: rbspi: mark rb911L user led as active low

The active_low flag was missing for the user LED. This LED is open drain
(confirmed in OEM source) and open drain only makes sense for active low
GPIOs.

The two wireless LEDs mentioned in the comments are also #defined for
future reference.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
Tested-by: Ryan Mounce <ryan@mounce.com.au>
(backported from e76c048d344097b48dae90f447398549b391e4e9)

5 years agoar71xx: rbspi: clarify USB power gpios action
Thibaut VARÈNE [Sun, 29 Jul 2018 10:14:56 +0000 (12:14 +0200)]
ar71xx: rbspi: clarify USB power gpios action

The gpios that control power toggle for USB on the RouterBOARD devices
are active low _off_ switches.

When they are active (low), power is off. When they are inactive
(high), power is on.

Rename GPIO defines, set gpios to GPIOF_ACTIVE_LOW for consistency and
reflect their true action in the display name. This brings openwrt code
in line with OEM.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
Tested-by: Ryan Mounce <ryan@mounce.com.au>
(backported from 03562bfcdb1acc4be33e72a7adf138c135720eab)

5 years agoadmswconfig: Remove dead URL + HTTPS
Rosen Penev [Sun, 29 Jul 2018 17:02:08 +0000 (10:02 -0700)]
admswconfig: Remove dead URL + HTTPS

Found using uscan.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(backported from 0394ca26c37dead9b676c4e03845bba5f3a6765d)

5 years agokernel: add DT binding support to the mtd redboot parser
Rafał Miłecki [Mon, 30 Jul 2018 06:38:30 +0000 (08:38 +0200)]
kernel: add DT binding support to the mtd redboot parser

It allows using that parser with the "compatible" set in DT.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(backported from 5e8b4be531778aa8b6783fa431e6dd3f2865c926)

5 years agoapm821xx: clean up gpio-hogs
Christian Lamparter [Sun, 29 Jul 2018 09:55:17 +0000 (11:55 +0200)]
apm821xx: clean up gpio-hogs

convert the usb and both sata port power related gpio-hogs to
what they really are: fixed-regulators.

The ethernet phy-reset gpio-hog is replaced by a proper
upstream (4.15+) reset-gpios property in the mdio-node.
So this will work eventually.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(backported from b70d3557e050484081f59291a81e5180f8b4fea5)

5 years agoapm821xx: split MBL's rootfs.img.gz into a sysupgrade and factory image
Christian Lamparter [Sun, 29 Jul 2018 09:55:16 +0000 (11:55 +0200)]
apm821xx: split MBL's rootfs.img.gz into a sysupgrade and factory image

@vahid-dan reported a issue with extracting the rpi images with
Gnome's Archive Manager:
"Ubuntu Archive Manager cannot extract the file and it just
throws a general error message: "An error occurred while
extracting files".
<https://forum.lede-project.org/t/corrupted-pre-built-v18-06-0-rc2-image-for-rpi>

The MBL's rootfs.img.gz image is generated in much the same way.
Hence this patch preemptively splits the rootfs.img.gz image into
a sysupgrade and a factory image.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(backported from cff6548948f76b8d0c922ef5e5d456a88a78ab2e)

5 years agoapm821xx: build squashfs-rootfs images for the MBL
Christian Lamparter [Sun, 29 Jul 2018 09:55:15 +0000 (11:55 +0200)]
apm821xx: build squashfs-rootfs images for the MBL

This patch adds support for squashfs as the root filesystem.

advantages:
 - migrate from a existing -ext4 installation and back
   with the sysupgrade utility
 - existing partition layout will not be lost during switch
 - slightly smaller image size as compared to the -ext4 image.

disadvantages:
 - needs f2fs + tools. This is because fstools rootdisk.c decides based
   on the partition size (currently root partitions > 100 MiB) f2fs is
   used as the rootfs_data filesystem.
 - rootfs_data is placed into the rootfs partition after the squashfs.
   This makes it difficult for tools that expect a /dev/sda${X} device.
   It also makes it difficult for data recovery tools as they might not
   expect to find a embedded partition or will be slightly confused.
   ... or will not support f2fs.

For people with existing build configurations: make sure to include mkf2fs
and f2fsck packages into the image. Otherwise the new -squashfs image will
only boot from the ram-overlay.

Note:
All overlay data (configurations/all installed packages/...) will be
placed in inside the rootfs partition (i.e. /dev/sda2) just after the
squashfs image.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(backported from aed4799d6d05d89dbca1bd5f14cc3d09ac563f3b)

5 years agoipq-wifi: add a note / reminder about upstreaming new board files
Christian Lamparter [Sun, 29 Jul 2018 09:55:13 +0000 (11:55 +0200)]
ipq-wifi: add a note / reminder about upstreaming new board files

|Please send a mail with your device-specific board files upstream.
|You can find instructions and examples on the linux-wireless wiki:
|<https://wireless.wiki.kernel.org/en/users/drivers/ath10k/boardfiles>

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(backported from df495305f36216c972255f62d0d0b6f8d4567b87)

5 years agobrcm63xx: drop linux,part-probe usage where possible
Jonas Gorski [Sun, 29 Jul 2018 11:09:22 +0000 (13:09 +0200)]
brcm63xx: drop linux,part-probe usage where possible

It was present as 4.4 compatibility, but since we now use 4.9 or later
with the new upstream solution, we don't need it anymore.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
(backported from 7880a6f7fee89efe9e5e4c707b59ba45f02e21cf)

5 years agobrcm63xx: drop own implementation of DT partitions in favour of upstream
Jonas Gorski [Sun, 29 Jul 2018 10:53:49 +0000 (12:53 +0200)]
brcm63xx: drop own implementation of DT partitions in favour of upstream

The binding works the same, so we can just drop the revert and the patch.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
(backported from abb28bec251a0b243dff87f87d09763792128349)

5 years agothc-ipv6: Update URLs
Rosen Penev [Sun, 29 Jul 2018 07:35:58 +0000 (00:35 -0700)]
thc-ipv6: Update URLs

Development has moved to GitHub. Found using UScan.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(backported from fc89831ae8f5c0313a1f9e80afd4e129c6a2303e)

5 years agotools/cmake: Update to 3.12.0
Daniel Engberg [Sun, 22 Jul 2018 16:31:38 +0000 (18:31 +0200)]
tools/cmake: Update to 3.12.0

Update cmake to 3.12.0
Remove 140-curl-fix-libressl.patch as fix is in upstream

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
(backported from b078229412e37ccf9ca8d9a437af6b8861bd2dbb)

5 years agoutil-linux: package blockdev executable
Daniel Golle [Fri, 27 Jul 2018 10:50:35 +0000 (12:50 +0200)]
util-linux: package blockdev executable

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(backported from af4b23dde2886ffea7374cbb22807d0be8a21b76)

5 years agoead: use new protocol setting API since libpcap 1.9.0
Syrone Wong [Thu, 26 Jul 2018 14:46:39 +0000 (22:46 +0800)]
ead: use new protocol setting API since libpcap 1.9.0

Dropped the protocol API specific symbol: HAS_PROTO_EXTENSION and
switch to the official API

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
(backported from 7dfd72dffff914b8d9cc941c62019004532c566f)

5 years agolibpcap: update to 1.9.0
Syrone Wong [Thu, 26 Jul 2018 14:46:38 +0000 (22:46 +0800)]
libpcap: update to 1.9.0

001-Fix-compiler_state_t.ai-usage-when-INET6-is-not-defi.patch dropped due to upstream
002-Add-missing-compiler_state_t-parameter.patch dropped due to upstream

202-protocol_api.patch dropped due to implemented upstream by another way
upstream commit: https://github.com/the-tcpdump-group/libpcap/commit/55c690f6f834b4762697d7a134de439c9096c921
and renamed via: https://github.com/the-tcpdump-group/libpcap/commit/697b1f7e9b1d6f5a5be04f821d7c5dc62458bb3b

ead is the only user who use the protocol api, we have to use the new api since libpcap 1.9.0

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
(backported from 4d57c696b1504bc672416b9ba27eab4e1729b622)

5 years agoipq40xx: move essedma patches into same range
John Crispin [Tue, 24 Jul 2018 14:04:44 +0000 (16:04 +0200)]
ipq40xx: move essedma patches into same range

Signed-off-by: John Crispin <john@phrozen.org>
(backported from ffc40d2eae90e8cf526d0f7f28992066da5d7477)

5 years agoipq40xx: sync kernel config
John Crispin [Tue, 24 Jul 2018 12:34:34 +0000 (14:34 +0200)]
ipq40xx: sync kernel config

Signed-off-by: John Crispin <john@phrozen.org>
(backported from e725d3080c81f413c4a650c7531dc649ddfd4ccf)

5 years agoipq40xx: move dts file patches to end of series
John Crispin [Tue, 24 Jul 2018 14:02:20 +0000 (16:02 +0200)]
ipq40xx: move dts file patches to end of series

Signed-off-by: John Crispin <john@phrozen.org>
(backported from e8c58e7ddd29df41a26b20e0930292d911f5f788)

5 years agoipq40xx: drop no-op cpu_idle symbol patch
John Crispin [Tue, 24 Jul 2018 12:41:02 +0000 (14:41 +0200)]
ipq40xx: drop no-op cpu_idle symbol patch

Signed-off-by: John Crispin <john@phrozen.org>
(backported from 3d456a50f47f4b48e294b0e4ca3df836729bf39c)

5 years agoramips: remove stale get_status_led call
Mathias Kresin [Mon, 23 Jul 2018 05:57:45 +0000 (07:57 +0200)]
ramips: remove stale get_status_led call

The get_status_led() function was removed due to the convertion to dts
alias based status led.

Since we don't need the boardname any longer, the functions.sh include
isn't required any more.

Fixes: c9c4b2116c09 ("ramips: Use dts alias based status led")
Signed-off-by: Mathias Kresin <dev@kresin.me>
(backported from 4cbf5601f9621d0f8973237f3133b821f472845c)

5 years agoelfutils: Copy missing libraries to staging and packages
Ted Hess [Tue, 24 Jul 2018 18:32:20 +0000 (14:32 -0400)]
elfutils: Copy missing libraries to staging and packages

Newer shared libraries seem to have the package version as part of their name.
E.g.: libelf-0.173.so

Signed-off-by: Ted Hess <thess@kitschensync.net>
(backported from 354de22bad37ef8f91f9a8f65b65f402713629ec)

5 years agoutils/curl: Disable libpsl
Daniel Engberg [Tue, 24 Jul 2018 11:59:30 +0000 (13:59 +0200)]
utils/curl: Disable libpsl

Disabled libpsl to fix build issue reported by buildbots

Package libcurl is missing dependencies for the following libraries:
libpsl.so.5

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>(backported from f486f81c649fe897f7070cbf14df504aea104029)
(backported from f486f81c649fe897f7070cbf14df504aea104029)

5 years agoipq40xx: drop bus driver, its a no-op and only does lots of alloc/free
John Crispin [Tue, 24 Jul 2018 07:35:16 +0000 (09:35 +0200)]
ipq40xx: drop bus driver, its a no-op and only does lots of alloc/free

Signed-off-by: John Crispin <john@phrozen.org>
(backported from 1e48e56c50c9423049ec41fda0c7f435c0bba6c9)

5 years agomac80211: backport and update patches for ath10k
Ansuel Smith [Sun, 8 Jul 2018 14:04:15 +0000 (16:04 +0200)]
mac80211: backport and update patches for ath10k

This commit refreshes and updates the VHT160 ath10k support fix patches
and adds a number of backports from ath-next:

 * 8ed05ed06fca ath10k: handle tdls peer events
 * 229329ff345f ath10k: wmi: modify svc bitmap parsing for wcn3990
 * 14d65775687c ath10k: advertise TDLS wider bandwidth support for 5GHz
 * bc64d05220f3 ath10k: debugfs support to get final TPC stats for 10.4 variants
 * 8b2d93dd2261 ath10k: Fix kernel panic while using worker (ath10k_sta_rc_update_wk)
 * 4b190675ad06 ath10k: fix kernel panic while reading tpc_stats
 * be8cce96f14d ath10k: add support to configure channel dwell time
 * f40105e67478 ath: add support to get the detected radar specifications
 * 6f6eb1bcbeff ath10k: DFS Host Confirmation
 * 260e629bbf44 ath10k: fix memory leak of tpc_stats
 * 38441fb6fcbb ath10k: support use of channel 173
 * 2e9bcd0d7324 ath10k: fix spectral scan for QCA9984 and QCA9888 chipsets

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[move backported patches in the 3xx number space, bring in upstream order,
 replace incomplete patch files with git format-patch ones, rewrite commit
 message, fix subject]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from 2dcd955aea1ab715d048910322b05d1af0b69748)

5 years agorules.mk: replace iremap when using GCC 8
Syrone Wong [Thu, 21 Jun 2018 15:08:11 +0000 (23:08 +0800)]
rules.mk: replace iremap when using GCC 8

The original -iremap is replaced by -fmacro-prefix-map in GCC 8

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
(backported from da9d760ea1c0450e9e6b1c0cdd5331e633c75887)

5 years agotoolchain/gcc: add GCC 8.1.0
Syrone Wong [Thu, 21 Jun 2018 15:08:10 +0000 (23:08 +0800)]
toolchain/gcc: add GCC 8.1.0

Changes compared to GCC 7.x

001-revert_register_mode_search.patch dropped

The underlying issue is described at the end of
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58139

It is fixed by the upstream commit:
https://github.com/gcc-mirror/gcc/commit/3fa2798aa887d141d86985240f03e2f3809e7e62

020-PR-libstdc-81797-Add-.NOTPARALLEL-to-include-Makefil.patch dropped due to already upstream

100-PR-rtl-optimization-83496.patch dropped due to already upstream

910-mbsd_multi.patch
modified to fix ambiguous overloaded inform() call error

gcc/input.h
header: define UNKNOWN_LOCATION ((source_location) 0)

-        inform (0, "someone does not honour COPTS correctly, passed %d times",
-         honour_copts);
+        inform (UNKNOWN_LOCATION, "someone does not honour COPTS correctly, passed %d times",
+         honour_copts);

940-no-clobber-stamp-bits.patch dropped due to fixed upstream by another way
upstream commit: https://github.com/gcc-mirror/gcc/commit/87b2d547f8ac9778d66909b8726fe967d1efbc74

950-cpp_file_path_translation.patch dropped, Both -fmacro-prefix-map and -ffile-prefix-map are added
to gcc 8.1.0, if I understand it correctly, we should use -fmacro-prefix-map
usage: -fmacro-prefix-map=@var{old}=@var{new}
upstream commit: https://github.com/gcc-mirror/gcc/commit/859b51f83662d01e4f158ea9327db9ca37fe70b3

-iremap exists as a flag for a long time, for backward compatibility, I think we should keep the
variable name unchanged but change its value in rules.mk for gcc 8.x and higher.

Compile and run tested on x86_64

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
(backported from 139f99c05880508b19308eed366d8fbf5804fbf9)

5 years agokernel: backport fixes for GCC 8 errors in syscall definitions
Felix Fietkau [Sun, 22 Jul 2018 14:52:44 +0000 (16:52 +0200)]
kernel: backport fixes for GCC 8 errors in syscall definitions

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(backported from c527d0ec189bc3493c15dee15fcfd635b8fa54ff)
(rebased patches)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agoipq806x: dts: Remove device_type = "ethernet-phy"
Rosen Penev [Mon, 16 Jul 2018 18:17:08 +0000 (11:17 -0700)]
ipq806x: dts: Remove device_type = "ethernet-phy"

device_type is deprecated. Upstream doesn't seem to like it either.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(backported from e22cc57593127bc888c6b04587a3a2e8e43abe66)

5 years agoapm821xx: unify My Book Live Single + Duo images
Christian Lamparter [Mon, 16 Jul 2018 20:56:36 +0000 (22:56 +0200)]
apm821xx: unify My Book Live Single + Duo images

By takimata:
"Come to think of it, an MBL Single board boots up just fine on an
MBL Duo image, and the MBL Single board identifies completely
identical to the MBL Duo
(Board: Apollo-3G - APM82181 Board, 2*SATA, 1*USB).
I wonder if there is any downside to just using the MBL Duo firmware
on a MBL Single. I wonder if the two firmwares could even be unified."

<https://forum.lede-project.org/t/wd-mybook-live-duo-two-disks/16195/9>

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(backported from 9b47aa93c76ba87b7d84dacd2c881cef6334e3f5)

5 years agoramips: define common MikroTik RouterBOARD image recipe
Thibaut VARÈNE [Thu, 19 Jul 2018 16:06:21 +0000 (18:06 +0200)]
ramips: define common MikroTik RouterBOARD image recipe

All these devices share the exact same image format.

The usb3 kmod is added for the rbm11g, as the rbm11g has a mini-pcie
slot like its bigger sibling. The usb kmod is necessary for
usb-over-pcie support, which is mandatory for a lot of LTE modules.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
(backported from c4f09fc9f8e97b11519e52d2f1e6a7bc02e4d2be)

5 years agolantiq: add support for FritzBox 7312
Johann Neuhauser [Thu, 17 May 2018 17:12:35 +0000 (19:12 +0200)]
lantiq: add support for FritzBox 7312

The FritzBox 7312 is also known as 1&1 WLAN-MODEM. The device is almost
the same as FB7330, but only one ETH-Port and no USB.

Hardware
SoC: Lantiq Xway ARX188 PSB 50812 EL
RAM: 64MB DDR1 (Zentel A4S12D40FTP-G5)
Ethernet: Atheros 8030
Wireless: Atheros AR9227 b/g/n 2x2
DSL: Lantiq ADSL2+
DECT: Dialog SC14441
Buttons: WiFi, DECT
LEDs: Power/DSL, Fon, DECT, WLAN, Info

LEDs
Power: GPIO#44 (active low)
Internet: GPIO#47 (active low)
DECT: GPIO#38 (active low)
WLAN: GPIO#37 (active low)
Info: GPIO#35 (active low)

The Fon LED is labeled as internet in avm gpl sources.

Buttons
WLAN: GPIO#1 (active low)
DECT: GPIO#2 (active low)

Phy
GPIO#03: 25 MHz
GPIO#34: Reset (active low)
GPIO#39: Int
GPIO#42: MII MDIO
GPIO#43: MII MDC

PCIe
GPIO#21: reset (active low)

Installation:

To install OpenWrt via Eva bootloader, within the first seconds after
power on a ftp connection need to be established to the FRITZ!Box at
192.168.178.1 and the the following ftp commands need to be run:

  ftp> quote USER adam2
  ftp> quote PASS adam2
  ftp> binary
  ftp> debug
  ftp> passive
  ftp> quote MEDIA FLSH
  ftp> put /path/to/openwrt-lantiq-xway-avm_fritz7312-squashfs-sysupgrade.bin mtd1
  ftp> quote REBOOT

Signed-off-by: Johann Neuhauser <johann@it-neuhauser.de>
(backported from 02d53e6a2113f80ae429664e7990d167fbf44604)

5 years agolantiq: etop: pass devicetree node to phy driver
Johann Neuhauser [Thu, 17 May 2018 17:12:35 +0000 (19:12 +0200)]
lantiq: etop: pass devicetree node to phy driver

Use of_mdiobus_register() to pass the ethernet phy node to the phy
drivers. This is needed for the at8030 phy driver which needs to know
the GPIO which is connected to the ar8030 reset pin.

This driver expects a child in gsw/etop node named "mdio-bus", which has
the ethernet phys defined:

&gsw {
phy-mode = "rmii";
phy-handle = <&phy0>;
mtd-mac-address = <&ath9k_cal 0xa91>;
mtd-mac-address-increment = <(-2)>;

mdio-bus {
#address-cells = <1>;
#size-cells = <0>;
reg = <0>;

phy0: ethernet-phy@0 {
reg = <0>;
reset-gpios = <&gpio 34 GPIO_ACTIVE_LOW>;
};
};
};

Fallback to mdiobus_register() if no mdio-bus child node exists. This
way we don't need to touch all xway dts files, for which we don't know
the actual address on the mdio bus.

Signed-off-by: Johann Neuhauser <johann@it-neuhauser.de>
(backported from f2f7802148f3d070b27f65b169efebfc6bf8286d)

5 years agoppp: fix building pptp plugin
Jo-Philipp Wich [Tue, 17 Jul 2018 18:21:39 +0000 (20:21 +0200)]
ppp: fix building pptp plugin

The pptp.so plugin needs to be built with -fPIC as well in order to be
linkable again.

Fixes 888a15ff83 ("ppp: add missing -fPIC to rp-pppoe.so CFLAGS")
Fixes e7397eef69 ("ppp: compile with LTO enabled")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from 9019323ec1109d636b6e2ca9fe991dce45635f96)

5 years agoscripts/dl_github_archive.py: stringify exception
Yousong Zhou [Tue, 17 Jul 2018 17:05:53 +0000 (17:05 +0000)]
scripts/dl_github_archive.py: stringify exception

Closes openwrt/openwrt#1163

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
(backported from ac10975cd704af465f8200f504032bc0d7b0d1ba)

5 years agoar71xx: Move F9K1115v2 under ar71xx tiny target
Kin Chan [Mon, 5 Mar 2018 07:30:56 +0000 (07:30 +0000)]
ar71xx: Move F9K1115v2 under ar71xx tiny target

F9K1115v2 has a kernel partition size of 1408 kB.

Since kernel 4.9.x+ the kernel image for this device compiled had exceeded
the kernel partition size limit and thus failing size check.

The kernel image generated for this device
under ar71xx tiny target is 1329.67 kB < 1408 kB.

Signed-off-by: Kin Chan <kcchan1@outlook.com>
(backported from 18b87b10a99bc445b3beae737ddce38d228c5d24)

5 years agoramips: Use dts alias based status led
Chuanhong Guo [Mon, 16 Jul 2018 08:27:22 +0000 (16:27 +0800)]
ramips: Use dts alias based status led

Also fix several typos in led node name.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
(backported from c9c4b2116c0984eb8baeff03e806030ee9c6175f)

5 years agokernel: insmod phy-broadcom module during preinit
Steffen Förster [Sun, 8 Jul 2018 20:18:07 +0000 (22:18 +0200)]
kernel: insmod phy-broadcom module during preinit

Some HP Thin clients use the broadcom nextreme chip as integrated NIC.
It is connected via PCI express and will only be found automatically if
phy-broadcom is loaded before tg3. This small change makes the thin
client usable for Freifunk with gluon out of the box.

Signed-off-by: Steffen Förster <steffen@chemnitz.freifunk.net>
(backported from 1ef65ceeafa9f1d5f4c0e0fe851907a4c8afa483)

5 years agopopt: Replace dead upstream site with mirror
Daniel Engberg [Sat, 14 Jul 2018 21:05:29 +0000 (23:05 +0200)]
popt: Replace dead upstream site with mirror

We can safely assume by now that rpm5.org is dead and isn't coming back
so just add another mirror instead.

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
(backported from 09d794ab928bb8a02e1d296e32cc8fbac7085049)

5 years agopackage/utils/f2fs-tools: Update to 1.11.0
Daniel Engberg [Sat, 14 Jul 2018 20:52:35 +0000 (22:52 +0200)]
package/utils/f2fs-tools: Update to 1.11.0

Update f2fs-tools to 1.11.0

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
(backported from 0a4cd1a6828f61acdc12348c69ca5c97fcb54c1d)

5 years agopackage/utils/e2fsprogs: Update to 1.44.3
Daniel Engberg [Sat, 14 Jul 2018 20:35:34 +0000 (22:35 +0200)]
package/utils/e2fsprogs: Update to 1.44.3

Update e2fsprogs to 1.44.3
Enable threads
Enable LTO

Numbers on mips_24kc (a few packages):

Old --> New --> LTO and threads
e2fsprogs_*_mips_24kc.ipk: 173 --> 174 --> 154kbyte
libblkid_*_mips_24kc.ipk:  114 --> 114 --> 114kbyte
libext2fs_*_mips_24kc.ipk: 138 --> 139 --> 139kbyte

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
(backported from 804c51e1e661819c5a7532e66fb8a12166eef9a9)

5 years agoar71xx: add support for MikroTik RB931-2nD
Thibaut VARÈNE [Thu, 12 Jul 2018 11:43:36 +0000 (13:43 +0200)]
ar71xx: add support for MikroTik RB931-2nD

This patch adds support for the MikroTik RB931-2nD (hAP mini):
https://mikrotik.com/product/RB931-2nD

Specifications:
  * SoC: Qualcomm QCA9533 (650MHz)
  * RAM: 32MiB
  * Storage: 16MiB SPI NOR flash
  * Ethernet: 3x100M
  * Wireless: QCA9533 built-in, dual-chain 802.11b/g/n

Installation:

1. Setup a DHCP/BOOTP Server with the following parameters:
   * DHCP-Option 66 (TFTP server name): pointing to a local TFTP
     server within the same subnet of the DHCP range
   * DHCP-Option 67 (Bootfile-Name): matching the initramfs filename
     of the to be booted image. The usable intramfs files are:
       - openwrt-ar71xx-mikrotik-vmlinux-initramfs.elf
       - openwrt-ar71xx-mikrotik-vmlinux-initramfs-lzma.elf
       - openwrt-ar71xx-mikrotik-rb-nor-flash-16M-initramfs-kernel.bin

2. Press the reset button on the board and keep that pressed.

3. Connect the board to your local network via its Internet port.

4. Release the button after the LEDs on the board are turned off.
   Now the board should load and start the initramfs image from
   the TFTP server.

5. Now connect the board via either of its LAN ports (2 or 3).

6. Upload the sysupgrade image to the board with scp:
     $ scp openwrt-ar71xx-mikrotik-rb-nor-flash-16M-squashfs-sysupgrade.bin root@192.168.1.1:/tmp/fw.bin

7. Log in to the running system listening on 192.168.1.1 via ssh
   as root (without password):
     $ ssh root@192.168.1.1

8. Flash the uploaded firmware file from the ssh session via the
   sysupgrade command:
     root@OpenWrt:~# sysupgrade /tmp/fw.bin

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
(backported from c2d2647c099679d64c8d5ef5260ba0f9d4c8f2ba)

5 years agobrcm63xx: initial support for Sky SR102 router
Andrius Štikonas [Sat, 14 Jul 2018 21:53:47 +0000 (21:53 +0000)]
brcm63xx: initial support for Sky SR102 router

The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
SOC:      BCM63168 (BMIPS4350 V8.0 @400MHz)
Flash size: 16 MiB
RAM size:   128 MiB

Heavily based on patch for OpenWRT Chaos Chalmer.
Original patch and more info can be found at:
https://openwrt.org/toh/sky/sr102

Known issues:
 - Wireless and ADSL modem are not working.

Signed-off-by: Andrius Štikonas <andrius@stikonas.eu>
(backported from d591260407015d2c451ad8c9e114fe04cf3639bc)

5 years agotools/e2fsprogs: Update to 1.44.3
Daniel Engberg [Sat, 14 Jul 2018 20:31:37 +0000 (22:31 +0200)]
tools/e2fsprogs: Update to 1.44.3

Update e2fsprogs to 1.44.3

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
(backported from df5f914b83cf88722ab6b8c051051a7b1fe49f64)

5 years agocurl: Update to 7.61.0
Daniel Engberg [Sat, 14 Jul 2018 20:26:42 +0000 (22:26 +0200)]
curl: Update to 7.61.0

Update curl to 7.61.0

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
(backported from 49bdd43da236af54b6b82d995b81532e7becf08f)

5 years agoppp: add missing -fPIC to rp-pppoe.so CFLAGS
Felix Fietkau [Sat, 14 Jul 2018 08:59:52 +0000 (10:59 +0200)]
ppp: add missing -fPIC to rp-pppoe.so CFLAGS

Fixes build error with LTO

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(backported from 888a15ff8312cd157bc968b67c33d2f738883b79)

5 years agoramips: ethernet: disable fraglist support
Felix Fietkau [Sat, 14 Jul 2018 06:32:36 +0000 (08:32 +0200)]
ramips: ethernet: disable fraglist support

The code has some remaining issues that cause ethernet hangs, so
disable it for now until we can get it fixed

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(backported from 2601e34fad9e523b87c310386ba9b7bace4025e2)

5 years agoubus: compile with LTO enabled
Felix Fietkau [Wed, 11 Jul 2018 17:42:40 +0000 (19:42 +0200)]
ubus: compile with LTO enabled

Reduces total .ipk size by about 1k

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(backported from 154c0c4006daf41e2cbb6c8b7ad5557f83dfea3e)

5 years agoprocd: compile with LTO enabled
Felix Fietkau [Wed, 11 Jul 2018 17:35:40 +0000 (19:35 +0200)]
procd: compile with LTO enabled

Reduces .ipk size on MIPS from 42k to 39k

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(backported from 73fc67b61480a3430d31de33478a1c0c2c364b9c)

5 years agodropbear: compile with LTO enabled
Felix Fietkau [Wed, 11 Jul 2018 17:28:54 +0000 (19:28 +0200)]
dropbear: compile with LTO enabled

Reduces size of the .ipk on MIPS from 87k to 84k

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(backported from 47b42137ce1e931ae5871952b1f98438396f5e07)
(rebased patches)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agoiw: compile with LTO enabled
Felix Fietkau [Wed, 11 Jul 2018 17:21:08 +0000 (19:21 +0200)]
iw: compile with LTO enabled

Reduces .ipk size on MIPS from 34k to 33k

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(backported from ef16a394d2b24a363b50b5b4720cb23fe156c9da)

5 years agoppp: compile with LTO enabled
Felix Fietkau [Wed, 11 Jul 2018 17:17:34 +0000 (19:17 +0200)]
ppp: compile with LTO enabled

Reduces .ipk size on MIPS from 98.5k to 98k

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(backported from e7397eef69a20fc630148d0e597523e139d21c0c)

5 years agoppp: fix linker flags for the radius plugin
Felix Fietkau [Wed, 11 Jul 2018 17:14:53 +0000 (19:14 +0200)]
ppp: fix linker flags for the radius plugin

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(backported from dfbd49bd223c408f6072ba4971eb7bce5cb81971)

5 years agonetifd: compile with LTO enabled
Felix Fietkau [Wed, 11 Jul 2018 16:55:02 +0000 (18:55 +0200)]
netifd: compile with LTO enabled

Reduces .ipk size from 65k to 63k on MIPS

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(backported from 07940acc341ee9bb2887359f193625e48f36207e)

5 years agobusybox: compile with LTO enabled
Felix Fietkau [Wed, 11 Jul 2018 16:30:03 +0000 (18:30 +0200)]
busybox: compile with LTO enabled

In the default configuration on MIPS, it reduces the .ipk size
from 214k to 207k

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(backported from 8c11133c9de632dca69c8464f911d8e2716effe2)

5 years agotools: kernel2minor: update to latest version
Mathias Kresin [Mon, 9 Jul 2018 19:53:43 +0000 (21:53 +0200)]
tools: kernel2minor: update to latest version

9fa9190 create reproducible images

Signed-off-by: Mathias Kresin <dev@kresin.me>
(backported from a07e1126bc4cd98c31f661d1aa4791bc34801ebd)

5 years agoconfig: extend small_flash feature
Alex Maclean [Mon, 9 Jul 2018 17:09:05 +0000 (18:09 +0100)]
config: extend small_flash feature

Extend the small_flash feature to disable swap, core dumps, and
kernel debug info, and change the squashfs block size to 1024KiB.

Also change squashfs fragment cache to 2 for small_flash to ease memory
usage.

Signed-off-by: Alex Maclean <monkeh@monkeh.net>
(backported from 11d6547455e848efb4fac0b983a07b11be5caf25)

5 years agokernel: only optimized for size if small_flash
Mathias Kresin [Mon, 9 Jul 2018 18:48:56 +0000 (20:48 +0200)]
kernel: only optimized for size if small_flash

Add a new config option to allow to select the default compile
optimization level for the kernel.

Select the optimization for size by default if the small_flash feature is
set. Otherwise "Optimize for performance" is set.

Add the small_flash feature flag to all (sub)targets which had the
optimization for size in their default kernel config.

Remove CC_OPTIMIZE_FOR_* symbols from all kernel configs to apply the new
setting.

Exceptions to the above are:

  - lantiq, where the optimization for size is only required for the
    xway_legacy subtarget but was set for the whole target
  - mediatek, ramips/mt7620 & ramips/mt76x8 where boards should have
    plenty of space and an optimization for size doesn't make much sense
  - rb532, which has 128MByte flash

Signed-off-by: Mathias Kresin <dev@kresin.me>
(backported from cf7154db07c0b8746be290c9e11dcab3c91d237e)

5 years agoar71xx: move boards to tiny subtarget
Mathias Kresin [Thu, 12 Jul 2018 04:29:43 +0000 (06:29 +0200)]
ar71xx: move boards to tiny subtarget

Move boards to the tiny subtarget which break the build if the kernel is
set to "Optimize for performance".

Signed-off-by: Mathias Kresin <dev@kresin.me>
(backported from 621fa91a8295b50dfdfac22290200064afaeec4e)

5 years agoarc: Update variables substitutions in u-boot env files
Evgeniy Didin [Mon, 9 Jul 2018 09:31:30 +0000 (12:31 +0300)]
arc: Update variables substitutions in u-boot env files

In the latest version of u-boot (2018.05) there was a swith to
Hush shell for ARC AXS10x boards(arc770/archs38):
commit 9249d74781e1 ("ARC: AXS10x: Enable hush shell").
In Hush shell using "$()" to declare envitonment variables is forbidden,
instead of this "${}" need to be used.

Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: John Crispin <john@phrozen.org>
(backported from 12915b105a0f9bd773f9b710972e5184f5413d91)

5 years agoprocd: update to the latest version, fixes gcc 8 build error
Felix Fietkau [Thu, 5 Jul 2018 09:16:13 +0000 (11:16 +0200)]
procd: update to the latest version, fixes gcc 8 build error

a0372ac procd: increase watchdog fd_buf storage size to fix gcc8 build error

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(backported from e07ad61aec86f271f407e80601e0d759e024b0df)

5 years agoqos-scripts: fix indentation
Moritz Warning [Tue, 10 Jul 2018 16:50:30 +0000 (18:50 +0200)]
qos-scripts: fix indentation

Signed-off-by: Moritz Warning <moritzwarning@web.de>
(backported from 954faac7bc1dd34047bc4132cd28a96089fcce4e)

5 years agoiproute2: update to 4.17.0
Hans Dedecker [Tue, 10 Jul 2018 10:19:40 +0000 (12:19 +0200)]
iproute2: update to 4.17.0

Update to the latest version of iproute2; see https://lwn.net/Articles/756991/
for a full overview of the changes in 4.17.
Remove upstream patch 002-json_print-fix-hidden-64-bit-type-promotion.
Backport upstream patch 001-rdma-sync-some-IP-headers-with-glibc fixing
rdma compile issue.
At the same time re-organize patch numbering so the OpenWRT specific
patches start at 100.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
(backported from 7e824183726649a32a998930f3f0a6ab360d5d2d)
(rebased patches)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agohostapd: build with LTO enabled (using jobserver for parallel build)
Felix Fietkau [Tue, 10 Jul 2018 11:48:17 +0000 (13:48 +0200)]
hostapd: build with LTO enabled (using jobserver for parallel build)

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(backported from 6dac92a42e052f89971762173daabb7fd84742ef)

5 years agobinutils: remove version 2.27
Felix Fietkau [Tue, 10 Jul 2018 12:21:13 +0000 (14:21 +0200)]
binutils: remove version 2.27

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(backported from 9b965d3b71e526ae8aeb345510bc1389e567e463)

5 years agobinutils: update to version 2.30, resolves issues with LTO
Felix Fietkau [Tue, 10 Jul 2018 12:20:25 +0000 (14:20 +0200)]
binutils: update to version 2.30, resolves issues with LTO

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(backported from 7c3e3eb0982d09fa3daebffb5bb1555d2cf5c861)

5 years agobinutils: backport an upstream fix for a linker bug that triggers with LTO
Felix Fietkau [Tue, 10 Jul 2018 12:19:36 +0000 (14:19 +0200)]
binutils: backport an upstream fix for a linker bug that triggers with LTO

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(backported from 55055aee50f7837a50a623b00c98a84e68080f91)

5 years agonasm: disable LTO, remove host specific workarounds
Felix Fietkau [Tue, 10 Jul 2018 11:08:30 +0000 (13:08 +0200)]
nasm: disable LTO, remove host specific workarounds

The recent build failures on various platforms were apparently caused by
the fact that LTO build support in the configure script does not check
if it has a suitable version of gcc and simply assumes that gcc-ar is
available and can be used for intermediate files.

Since we really don't need to build nasm with LTO, simply disable it and
keep the whole build more portable

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(backported from a5188eb2584c244246f2be638a54bc458ecfc497)

5 years agotoolchain/nasm: force ar and ranlib only on macOSX
Hauke Mehrtens [Sun, 8 Jul 2018 10:48:13 +0000 (12:48 +0200)]
toolchain/nasm: force ar and ranlib only on macOSX

On Debian 9 nasm does not build when we force it to use ranlib, for
macOSX this is needed. Only force this on macOSX and not on any other
OS, this should fix the build of nasm on Linux systems. On my Debian
system the nasm configure script selects  gcc-ranlib and gcc-ar instead.

Fixes: d3a7587eb95 ("toolchain/nasm: fix missing AR/RANLIB variables")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(backported from e204717ef2445fc848b0a70374b03b1c8484d176)

5 years agokernel: move CONFIG_USB_MTU3 to generic config
Hauke Mehrtens [Sat, 7 Jul 2018 21:49:37 +0000 (23:49 +0200)]
kernel: move CONFIG_USB_MTU3 to generic config

CONFIG_USB_MTU3 is not visible for the mediatek target by default, but
only when CONFIG_USB_GADGET is set. This will config option will be
remove with when running "make kernel_oldconfig", move this option to
the generic config to prevent this.

This fixes the build of the mt7623 subtarget of the mediatek target.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(backported from da6c09eff4d353f3c64e815fb3a556261111f0ca)

5 years agokernel: disable some DRM_PANEL config options
Hauke Mehrtens [Sat, 7 Jul 2018 21:22:10 +0000 (23:22 +0200)]
kernel: disable some DRM_PANEL config options

The modules should not be build by default.
This fixes the build of the zynq target.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(backported from 29fa9ac559ef9f181523a068119c842c72ae5770)

5 years agotoolchain/nasm: Backport GCC8 compatibility fix from upstream repo
Ted Hess [Sat, 7 Jul 2018 20:11:48 +0000 (16:11 -0400)]
toolchain/nasm: Backport GCC8 compatibility fix from upstream repo

Signed-off-by: Ted Hess <thess@kitschensync.net>
(backported from 328ddcf628119733c511ec6cda06f2f0cc8d19ae)

5 years agoramips: add support for Blueendless Kimax U35WF
Ademar Arvati Filho [Wed, 4 Jul 2018 01:29:36 +0000 (01:29 +0000)]
ramips: add support for Blueendless Kimax U35WF

Blueendless Kimax U35WF is a 3,5" HDD Enclosure with Wi-Fi and Ethernet

Patch rewritten from: https://forum.openwrt.org/viewtopic.php?id=66908
Based on: https://github.com/lede-project/source/pull/965

Specification:
- SoC: MediaTek MT7620N
- CPU/Speed: 580 MHz
- Flash-Chip: KH25L12835F Spi Flash
- Flash size: 16 MiB
- RAM: 64 MiB
- LAN: 1x 100 Mbps Ethernet
- WiFi SoC-integrated: 802.11bgn
- 1x USB 2.0
- UART: for serial console

Installation:
1. Download sysupgrade.bin
2. Open vendor web interface
3. Choose to upgrade firmware
3. After reboot connect via ethernet at 192.168.1.1

Signed-off-by: Ademar Arvati Filho <arvati@hotmail.com>
(backported from 16d6a63f857a4e9eeb1f173e964264d8a06e65eb)

5 years agoar71xx: drop unnecessary LOADER_TYPE variables
Mathias Kresin [Thu, 5 Jul 2018 20:53:16 +0000 (22:53 +0200)]
ar71xx: drop unnecessary LOADER_TYPE variables

Drop the LOADER_TYPE variables in case no loader is used at all or move
the variable to devices which are using a loader.

Signed-off-by: Mathias Kresin <dev@kresin.me>
(backported from b908c82f49c5049274f36345cfedbd21c0e5c938)

5 years agoar71xx: get rid of copy-file
Mathias Kresin [Thu, 5 Jul 2018 20:48:54 +0000 (22:48 +0200)]
ar71xx: get rid of copy-file

Use the provided image build variables to point the kernel-bin build
command to the kernel we are interested in.

Signed-off-by: Mathias Kresin <dev@kresin.me>
(backported from a0ec632f8d17cf75e2eca44ac3b3ede6d297f7fa)

5 years agoar71xx: mikrotik: cleanup nand image build code
Mathias Kresin [Wed, 4 Jul 2018 04:39:05 +0000 (06:39 +0200)]
ar71xx: mikrotik: cleanup nand image build code

Use the LOADER_TYPE variable to specify that we need the elf preloader
and append the loader via the corresponding build recipe. It allows to
enable initramfs images again for mikrotik NAND images, which caused a
build error before.

Add the minor header only to the kernel of the sysupgrade images, as it
is only required for the bootloader to find the kernel on flash.

Signed-off-by: Mathias Kresin <dev@kresin.me>
(backported from 5260c1003cee20b004f4628c72ef3985885ca901)

5 years agoramips: add support for I-O DATA WN-AX1167GR
INAGAKI Hiroshi [Wed, 27 Jun 2018 13:47:13 +0000 (22:47 +0900)]
ramips: add support for I-O DATA WN-AX1167GR

I-O DATA WN-AX1167GR is a 2.4/5 GHz band 11ac router, based on
MediaTek MT7621A.

Specification:

- MT7621A (2-Cores, 4-Threads)
- 64 MB of RAM (DDR2)
- 16 MB of Flash (SPI)
- 2T2R 2.4/5 GHz
- 5x 10/100/1000 Mbps Ethernet
- 2x LEDs, 4x keys (2x buttons, 1x slide switch)
- UART header on PCB
  - Vcc, GND, TX, RX from ethernet port side
  - baudrate: 115200 bps (U-Boot, OpenWrt)

Stock firmware:

In the stock firmware, WN-AX1167GR has two os images each composed of
Linux kernel and rootfs.
These images are stored in "Kernel" and "app" partition of the
following partitions, respectively.

(excerpt from dmesg):

MX25L12805D(c2 2018c220) (16384 Kbytes)
mtd .name = raspi, .size = 0x01000000 (16M) .erasesize = 0x00010000 (64K) .numeraseregions = 0
Creating 10 MTD partitions on "raspi":
0x000000000000-0x000001000000 : "ALL"
0x000000000000-0x000000030000 : "Bootloader"
0x000000030000-0x000000040000 : "Config "
0x000000040000-0x000000050000 : "Factory"
0x000000050000-0x000000060000 : "iNIC_rf"
0x000000060000-0x0000007e0000 : "Kernel"
0x000000800000-0x000000f80000 : "app"
0x000000f90000-0x000000fa0000 : "Key"
0x000000fa0000-0x000000fb0000 : "backup"
0x000000fb0000-0x000001000000 : "storage"

The flag for boot partition is stored in "Key" partition, and U-Boot
reads this and determines the partition to boot.

If the image that U-Boot first reads according to the flag is
"Bad Magic Number", U-Boot then tries to boot from the other image.
If the second image is correct, change the flag to the number
corresponding to that image and boot from that image.

(example):

## Booting image at bc800000 ...
Bad Magic Number,FFFFFFFF
Boot from KERNEL 1  !!
## Booting image at bc060000 ...
   Image Name:   MIPS OpenWrt Linux-4.14.50
   Image Type:   MIPS Linux kernel Image (lzma compressed)
   Data Size:    1865917 Bytes = 1.8 MB
   Load Address: 80001000
   Entry Point:  80001000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
raspi_erase_write: offs:f90000, count:34
.
.
Done!

Starting kernel ...

Flash instruction using factory image:

1. Connect the computer to the LAN port of WN-AX1167GR
2. Connect power cable to WN-AX1167GR and turn on it
3. Access to "192.168.0.1" on the web browser and open firmware
update page ("ファームウェア")
4. Select the OpenWrt factory image and perform firmware update
5. On the initramfs image, execute "mtd erase firmware" to erase stock
firmware and execute sysupgrade with sysupgrade image for WN-AX1167GR
6. Wait ~180 seconds to complete flasing

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
(backported from 0b83a235602dace3de116a10de9515cda5b76be4)

5 years agolibnl: bump to 3.4.0
Konstantin Demin [Thu, 28 Jun 2018 06:21:42 +0000 (09:21 +0300)]
libnl: bump to 3.4.0

refresh patches

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
(backported from f715d816b754b74c24dc2dc9f62385fbc90f07b5)

5 years agouboot-imx: bump to 2018.03 which fixes the build issues with fdt64_t redefinitions
Vladimir Vid [Thu, 26 Apr 2018 15:52:14 +0000 (17:52 +0200)]
uboot-imx: bump to 2018.03 which fixes the build issues with fdt64_t redefinitions

* change mx6qsabresd to mx6qsabres to match defconfig name
* merge wanboard profiles since there is only one defconfig for the target device
* move wanboard options from wandboard.h to defconfig
* remove legacy patches

Signed-off-by: Vladimir Vid <vladimir.vid@sartura.hr>
(backported from 856cc6d9998ea717ee25d80bef52635dceeae71a)

5 years agoconfig: add config option for KERNEL_TASKSTATS
Jeremiah McConnell [Wed, 20 Jun 2018 05:35:08 +0000 (23:35 -0600)]
config: add config option for KERNEL_TASKSTATS

In order for monitoring tools such as atop and htop to track and report
i/o data, kernel support for task statistics and io accounting is
required.

Add a config option to enable building this support in the kernel.

Signed-off-by: Jeremiah McConnell <miah@miah.com>
(backported from 206fbbfec2d0cc40266674e93e7e01e307847a6d)

5 years agombedtls: Activate deterministic ECDSA
Hauke Mehrtens [Sun, 24 Jun 2018 19:27:41 +0000 (21:27 +0200)]
mbedtls: Activate deterministic ECDSA

With deterministic ECDSA the value k needed for the ECDSA signature is
not randomly generated any more, but generated from a hash over the
private key and the message to sign. If the value k used in a ECDSA
signature or the relationship between the two values k used in two
different ECDSA signatures over the same content is know to an attacker
he can derive the private key pretty easily. Using deterministic ECDSA
as defined in the RFC6979 removes this problem by deriving the value k
deterministically from the private key and the content which gets
signed.

The resulting signature is still compatible to signatures generated not
deterministic.

This increases the size of the ipk on mips 24Kc by about 2 KByte.
old:
166.240 libmbedtls_2.11.0-1_mips_24kc.ipk
new:
167.811 libmbedtls_2.11.0-1_mips_24kc.ipk

This does not change the ECDSA performance in a measurable way.

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(backported from b19622044d492e9eff9d880d6bc1fc9486774886)
(rebased patches)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agombedtls: Disable MBEDTLS_SHA256_SMALLER implementation
Daniel Engberg [Sun, 24 Jun 2018 19:19:18 +0000 (21:19 +0200)]
mbedtls: Disable MBEDTLS_SHA256_SMALLER implementation

Disable MBEDTLS_SHA256_SMALLER implementation, not enabled by default in
upstream and reduces performance by quite a bit.

Source: include/mbedtls/config.h

Enable an implementation of SHA-256 that has lower ROM footprint but also
lower performance.

The default implementation is meant to be a reasonnable compromise between
performance and size. This version optimizes more aggressively for size at
the expense of performance. Eg on Cortex-M4 it reduces the size of
mbedtls_sha256_process() from ~2KB to ~0.5KB for a performance hit of
about 30%.

The size of mbedtls increased a little bit:
ipkg for mips_24kc before:
164.382 Bytes
ipkg for mips_24kc after:
166.240 Bytes

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
(backported from 5a078180d08db8d4261119cd396a38b0261bfc5b)
(rebased patches)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agosunxi: Enable SD block devices
Daniel Engberg [Fri, 22 Jun 2018 18:55:15 +0000 (20:55 +0200)]
sunxi: Enable SD block devices

USB storage support is however SCSI Disk block device support isn't
meaning that connected devices wont enumerate.
Enable CONFIG_BLK_DEV_SD by default to fix it.

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
(backported from 3accbc6aacae62c83ddf010f9b095fb7a3d69f05)

5 years agobrcm2708: platform.sh: fix tar directory directive
Alexandru Ardelean [Mon, 25 Jun 2018 12:03:04 +0000 (15:03 +0300)]
brcm2708: platform.sh: fix tar directory directive

BusyBox's `tar` command does not support the `--directory` directive, which
is essentially `-C` in short-form option.
BusyBox's `tar` command supports `-C`.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
(backported from 7de50d19171b94642025dd55dd96b2c09c1e9762)

5 years agolibconfig: update to version 1.7.2
Enrico Mioso [Sun, 1 Jul 2018 20:46:05 +0000 (22:46 +0200)]
libconfig: update to version 1.7.2

The previous link did not work here.

Compile-tested on: bcm47xx
Runtime-tested on: bcm47xx

Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com>
(backported from 231b0177fb235767e49cdee067b7db0ed2691548)

5 years agokernel: remove DEVMEM and DEVKMEM from target's config
Luis Araneda [Tue, 3 Jul 2018 02:54:11 +0000 (22:54 -0400)]
kernel: remove DEVMEM and DEVKMEM from target's config

These options are handled by generic configuration

Targets that need these options should select KERNEL_DEVMEM
and/or KERNEL_DEVKMEM options on OpenWRT's config

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
(backported from 8f60c3d57149a2bb04fde9798edc45d659ed7c17)

5 years agotoolchain/nasm: fix missing AR/RANLIB variables
Felix Fietkau [Sat, 7 Jul 2018 12:50:51 +0000 (14:50 +0200)]
toolchain/nasm: fix missing AR/RANLIB variables

Fixes build on macOS

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(backported from d3a7587eb95e6e8c85ff0e57504bc31d1e1b8523)

5 years agoperf: remove linux 4.4 workarounds
Felix Fietkau [Thu, 5 Jul 2018 13:11:07 +0000 (15:11 +0200)]
perf: remove linux 4.4 workarounds

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(backported from bf136c637c02c154c14bbf48ac2c07467d948ac7)

5 years agotoolchain: Replace YASM with NASM
Ted Hess [Thu, 28 Jun 2018 23:28:02 +0000 (19:28 -0400)]
toolchain: Replace YASM with NASM

Packages libx264 and ffmpeg are built with ASM options on x86 platforms.
The current libx264 version no longer builds with YASM and requires NASM.
ffmpeg 3.x can be built with either YASM or NASM however, furture 4.x versions
will require NASM.

Signed-off-by: Ted Hess <thess@kitschensync.net>
Acked-by: Rosen Penev <rosenp@gmail.com>
(backported from 0f543883cd0505a98fdc680ce2f08cbfca6d52a7)

5 years agodownload.mk: enable DownloadMethod/github_archive
Yousong Zhou [Fri, 29 Jun 2018 06:40:46 +0000 (14:40 +0800)]
download.mk: enable DownloadMethod/github_archive

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
(backported from 9009efa18b45b4b573111fafa777f7b642486e3e)

5 years agoscripts/dl_github_archive.py: rename from download.py
Yousong Zhou [Thu, 28 Jun 2018 10:27:27 +0000 (18:27 +0800)]
scripts/dl_github_archive.py: rename from download.py

 - Make the code more GitHub-specific
 - Requires mirror hash to work with .gitattributes
 - Use different API depending on whether PKG_SOURCE_VERSION is a
   complete commit id or other ref types like tags
 - Fix removing symbolic link
 - pre-clean dir_untar for possible leftovers from previous run

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
(backported from 04b9f8587370f96366c6e53fb411473279ba7c02)

5 years agodownload.mk: add more comments
Yousong Zhou [Tue, 3 Jul 2018 08:15:35 +0000 (16:15 +0800)]
download.mk: add more comments

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
(backported from e48ea13b3bac5393d6400156ddb066ec5de2ea4e)

5 years agoelfutils: bump to 0.173
Luiz Angelo Daros de Luca [Sun, 17 Jun 2018 09:08:51 +0000 (06:08 -0300)]
elfutils: bump to 0.173

- Removed hacks to use standalone argp as upstream now detects it nicely.
- As we are already installing files, use files from PKG_INSTALL_DIR and
  not PKG_BUILD_DIR
- Only changes Makefile.am as PKG_FIXUP:=autoreconf is in use

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
(backported from b724443f9f4c8d691fc0e7355e1388920cdb9b96)