Commit Graph

56307 Commits

Author SHA1 Message Date
Jo Deisenhofer
ab402f3d23 ramips: Move LED definition out of included dtsi into dts
Prepare for a new target with different led definitions that wants to
include this dtsi. The resulting dtb are unchanged, verified with dtdiff

Signed-off-by: Jo Deisenhofer <jo.deisenhofer@gmail.com>
2023-01-14 19:02:20 +01:00
Mikhail Zhilkin
1a35edfbdb ramips: add basic support for TP-Link EC330-G5u v1
This adds basic support for TP-Link EC330-G5u Ver:1.0 router (also known
as TP-Link Archer C9ERT).

Device specification
--------------------
SoC Type: MediaTek MT7621AT
RAM: 128 MiB, Nanya NT5CC64M16GP-DI
Flash: 128 MiB NAND, ESMT F59L1G81MA-25T
Wireless 2.4 GHz (MediaTek MT7615N): b/g/n, 4x4
Wireless 5 GHz (MediaTek MT7615N): a/n/ac, 4x4
Ethernet: 5xGbE (WAN, LAN1, LAN2, LAN3, LAN4)
USB ports: 1xUSB3.0
Button: 4 (Led, WiFi On/Off, Reset, WPS)
LEDs: 7 blue LEDs, 1 orange(amber) LED, 1 white(non-gpio) LED
Power: 12 VDC, 2 A
Connector type: Barrel
Bootloader: First U-Boot (1.1.3), Main U-Boot (1.1.3). Additionally,
original TP-Link firmware contains Image U-Boot (1.1.3).

Serial console (UART)
---------------------
                            V
+-------+-------+-------+-------+
| +3.3V |  GND  |  TX   |  RX   |
+---+---+-------+-------+-------+
    |              J2
    |
    +--- Don't connect

Installation
------------
1. Rename OpenWrt initramfs image to test.bin and place it on tftp server
   with IP 192.168.0.5
2. Attach UART, switch on the router and interrupt the boot process by
   pressing 't'
3. Load and run OpenWrt initramfs image:
      tftpboot
      bootm
4. Once inside OpenWrt, switch to the first boot image:
      fw_setenv BootImage 0
5. Run 'sysupgrade -n' with the sysupgrade OpenWrt image

Back to Stock
-------------
1. Run in the OpenWrt shell:
      fw_setenv BootImage 1
      reboot

Recovery
--------
1. Press Reset button and power on the router
2. Navigate to U-Boot recovery web server (http://192.168.0.1/) and upload
   the OEM firmware

MAC addresses
-------------
+---------+-------------------+-------------------+-------------+
|         | MAC example 1     | MAC example 2     | Algorithm   |
+---------+-------------------+-------------------+-------------+
| label   | 68:ff:7b:xx:xx:f4 | 50:d4:f7:xx:xx:da | label       |
| LAN     | 68:ff:7b:xx:xx:f4 | 50:d4:f7:xx:xx:da | label       |
| WAN     | 72:ff:7b:xx:xx:f5 | 54:d4:f7:xx:xx:db | label+1 [1] |
| WLAN 2g | 68:ff:7b:xx:xx:f4 | 50:d4:f7:xx:xx:da | label       |
| WLAN 5g | 68:ff:7b:xx:xx:f6 | 50:d4:f7:xx:xx:dc | label+2     |
+---------+-------------------+-------------------+-------------+
label MAC address was found in factory at 0x165 (text format
xx:xx:xx:xx:xx:xx).

Notes
-----
[1] WAN MAC address:
   a. First octet of WAN MAC is differ than others and OUI is not related
      to TP-Link company. This probably should be fixed.
   b. Flipping bits in first octet and hex delta are different for the
      different MAC examples:
      +-----------------+----------------+----------------+
      |                 | Example 1      | Example 2      |
      +-----------------+----------------+----------------+
      | LAN             | 68 = 0110 1000 | 50 = 0101 0000 |
      | MAC (1st octet) |         ^ ^ ^  |                |
      +-----------------+----------------+----------------+
      | WAN             | 72 = 0111 0010 | 54 = 0101 0100 |
      | MAC (1st octet) |         ^ ^ ^  |            ^   |
      +-----------------+----------------+----------------+
      | HEX delta       | 0xa            | 0x4            |
      +-----------------+----------------+----------------+
      | DEC delta       | 4              | 4              |
      +-----------------+----------------+----------------+
   c. DEC delta is a constant (4). This looks like a mistake in OEM
      firmware and probably should be fixed.
   Based on the above, I decided to keep correct OUI and make WAN MAC =
   label + 1.

[2] Bootloaders
   The device contains 3 bootloaders:
   - First U-Boot: U-Boot 1.1.3 (Mar 18 2019 - 12:50:24). The First U-Boot
     located on NAND Flash to load next full-feature Uboot.
   - Main U-Boot + its backup: U-Boot 1.1.3 (Mar 18 2019 - 12:50:29). This
     bootloader includes recovery webserver. Requires special uImages to
     continue the boot process:
        0x00 (os0, os1) - firmware uImage
        0x40 (os0, os1) - standalone uImage (OpenWrt kernel is here)
   - Additionally, both slots of the original TP-Link firmware contains
     Image U-Boot: U-Boot 1.1.3 (Oct 16 2019 - 08:14:45). It checks image
     magics and CRCs. We don't use this U-Boot with OpenWrt.

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
2023-01-14 18:36:33 +01:00
INAGAKI Hiroshi
1f5f2e588a ramips: add support for ELECOM WRC-2533GHBK2-T
ELECOM WRC-2533GHBK2-T is a 2.4/5 GHz band 11ac (Wi-Fi 5) router, based
on MT7621A.

Specification:

- SoC      : MediaTek MT7621A
- RAM      : DDR3 128 MiB
- Flash    : SPI-NOR 16 MiB (Macronix MX25L12835FM2I-10G)
- WLAN     : 2.4/5 GHz 4T4R (2x MediaTek MT7615)
- Ethernet : 10/100/1000 Mbps x5
  - Switch : MediaTek MT7530 (SoC)
- LED/keys : 4x/3x (2x buttons, 1x slide-switch)
- UART     : through-hole on PCB
  - J4: 3.3V, RX, GND, TX from SoC side
  - 57600n8
- Power    : 12 VDC, 1.5 A

Flash instruction using factory image:

1. Boot WRC-2533GHBK2-T normally
2. Access to "http://192.168.2.1/" and open firmware update page
   ("ファームウェア更新")
3. Select the OpenWrt factory image and click apply ("適用") button
4. Wait ~150 seconds to complete flashing

MAC addresses:

LAN    : BC:5C:4C:xx:xx:FD (Config,  "ethaddr" (text))
WAN    : BC:5C:4C:xx:xx:FC (Config,  "wanaddr" (text), Label)
2.4 GHz: BC:5C:4C:xx:xx:FE (Factory, 0x4       (hex))
5 GHz  : BC:5C:4C:xx:xx:FF (Factory, 0x8004    (hex))

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2023-01-14 15:41:00 +01:00
INAGAKI Hiroshi
9fe648166e ramips: separate and update dtsi of ELECOM WRC-2533GHBK-I/GHBK2-T
ELECOM WRC-2533GHBK2-T has the almost same hardware as WRC-2533GHBK-I,
so separate the common parts from dts to dtsi.
Additionaly, add color/function properties to LED nodes and change the
trigger of wlan2g/wlan5g LED to "phy*tpt" trigger.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2023-01-14 15:41:00 +01:00
Linhui Liu
7a5d37ef61 tools/b43-tools: update to latest git HEAD
2fe10ea b43-fwdump: Fix forwarding of arguments to disassembler

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
2023-01-14 09:36:02 +08:00
Markus Stockhausen
c03e458c86 realtek: Follow kernel comment style recommendation
While Linus is fine with longer code lines, comments should still be
within the 80 char limit.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2023-01-13 22:34:16 +01:00
Davide Fioravanti
ea42a04161 realtek: add support for Netgear GS750E
This is an RTL8393-based switch with 48 RJ-45 and 2 SFP ports.

Hardware
--------
SoC:	Realtek RTL8393M
RAM:	128MB DDR3 (Nanya NT5CC64M16GP-DI)
FLASH:	8MB NOR (Macronix MX25L6433F)
ETH:	48x 10/100/1000 Mbps RJ-45 Ethernet
SFP:	2x SFP
BTN:
  - 1x	Reset button
LEDS:
  - 50x	Green-Amber leds: lan/sfp status
  - 1x	Green led: power (Always on)
UART:
  - 115200-8-N-1 (CN3, pin-out on PCB)

Everything works correctly except for the 2 SFP ports that are not
working unless you enable it every boot in U-Boot with the command:
	rtk network on

Installation
------------
You can install Openwrt using one of the following methods.

Warning: flashing OpenWrt will delete your current configuration.
Warning 2: if the -factory.bix file is not available anymore, you must
follow Method 2.

Method 1:
Check the firmware version currently running on your switch. If you are
running FW V1.0.1.10 or greater, you have to download the firmware
V1.0.1.8 from Netgear website and then flash this version. When the
switch restarts, it should be on version V1.0.1.8. Now you can get the
OpenWrt -factory.bix file and then flash it using the OEM web interface.

Method 2 (requires the UART connection):
Boot the -initramfs-kernel.bin image from U-Boot with these commands:
	rtk network on;
	tftpboot 0x8f000000 openwrt-realtek-rtl839x-netgear_gs750e-initramfs-kernel.bin;
	bootm;
And then flash the -sysupgrade.bin file from OpenWrt.

Revert to stock
---------------
Get the stock firmware from the Netgear website and flash it using the
OpenWrt web interface. Remember to not keep the current configuration
and check the "Force upgrade" checkbox

Once reverted to stock the firmware could complain in the UART console
about mtdblock3 and/or mtdblock4 not being mounted correctly but it
seems to work anyway without any problems. Sample error:
	mount: Mounting /dev/mtdblock4 on /mntlog failed: Input/output error

If you want to get rid of these error messages you can boot the
-initramfs-kernel.bin image from U-Boot with these commands:
	rtk network on;
	tftpboot 0x8f000000 openwrt-realtek-rtl839x-netgear_gs750e-initramfs-kernel.bin;
	bootm;

And then erase the corresponding partitions using the command:
	For mtdblock3:
		mtd erase jffs2_cfg
	For mtdblock4:
		mtd erase jffs2_log

Now you can reboot the switch and the errors should be gone

Note
----
To get the SFP ports fully working, all the right GPIOs must be found.
In the GPL sources I found these:
 - GPIO_14: SFP_TX_DIS1;
 - GPIO_19: SFP_TX_DIS0;

Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com>
2023-01-13 22:28:36 +01:00
Davide Fioravanti
79e0b503a4 realtek: rtl839x: enable driver for virtual mtd_concat devices in config
Enable the driver for the rtl839x target. It's required at least for
Netgear GS750E

Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com>
2023-01-13 22:22:38 +01:00
Sander Vanheule
e5fe401908 image: add FACTORY_SIZE to DEFAULT_DEVICE_VARS
FACTORY_SIZE is used as a device recipe variable on both the D-Link
DIR-825-B1 and Trendnet TEW-673GRU, but is not listed as a device
variable, neither globally, nor for ath79. Being assigned the same
value, this probably hasn't caused any issues.

Add FACTORY_SIZE to the global list DEFAULT_DEVICE_VARS, to ensure the
variable is reset for every device, and to allow it to be used outside
of the ath79 target.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2023-01-13 22:22:38 +01:00
Linhui Liu
753efd45b2 tools/xz: update to 5.4.1
Release notes:
    https://git.tukaani.org/?p=xz.git;a=blob;f=NEWS;hb=HEAD

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
2023-01-13 22:09:12 +01:00
Linhui Liu
9db52b6785 tools/patchelf: update to 0.17.2
Changes from version 0.17.1 to version 0.17.2:
- fix incorrect version in 0.17.1

Changes from version 0.17.0 to version 0.17.1:
- Also pass STRIP to the tests
- Fix Out-of-bounds read in the function modifySoname
- Split segment size fix

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
2023-01-13 22:08:17 +01:00
Linhui Liu
ace44e5b57 tools/llvm: update to 15.0.7
Release Notes:
    https://discourse.llvm.org/t/llvm-15-0-7-release/67638

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
2023-01-13 22:07:13 +01:00
John Audia
843e3dace7 kernel: bump 5.15 to 5.15.87
Removed upstreamed:
  generic/hack-5.15/290-net-dsa-mv88e6xxx-depend-on-PTP-conditionally.patch[1]

Build system: x86_64
Build-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.87&id=945e58bdaf6faf6e3f957d182244fa830acddab4

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-01-13 22:04:22 +01:00
Nick Hainke
c051693ef4 trace-cmd: update to v3.1.6
Update to latest release.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2023-01-13 22:02:20 +01:00
Nick Hainke
d649c32989 libtracefs: update to 1.6.4
Update to latest release.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2023-01-13 22:02:20 +01:00
Nick Hainke
d1bdf5a9d9 libtraceevent: update to 1.7.1
Update to latest release.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2023-01-13 22:02:20 +01:00
Nick Hainke
feeec1e14f archs38: enable 5.15 testing kernel
Add 5.15 as testing kernel.

Tested-by: Evgeniy Didin <didin@synopsys.com>
Signed-off-by: Nick Hainke <vincent@systemli.org>
2023-01-13 21:55:58 +01:00
Nick Hainke
f43dc6fd74 archs38: 5.15: copy config from 5.10
Copy config from 5.10 to 5.15.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2023-01-13 21:55:57 +01:00
Daniel Golle
3d5c5427e1 uboot-mediatek: update to U-Boot 2023.01
Support for MT7981 and MT7986 has been merged, remove patches.
Tested on a couple of MT7986, MT7622 and MT7623 boards.
MIPS builds are untested.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-01-13 14:49:52 +00:00
Linhui Liu
5b605f4b51 uboot-envtools: update to 2023.01
Update to latest version.

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
2023-01-13 14:49:52 +00:00
Linhui Liu
1909a3d69b tools/mkimage: update to 2023.01
Remove upstreamed patches:
- 020-tools-mtk_image-split-gfh-header-verification-into-a.patch
- 021-tools-mtk_image-split-the-code-of-generating-NAND-he.patch
- 022-tools-mtk_image-add-support-for-nand-headers-used-by.patch

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
2023-01-13 14:49:52 +00:00
Robert Marko
c83dbcdf8f
mac80211: ath11k: fix monitor bringup
Currently, ath11k will crash the crash if we try to bringup the monitor
mode interface.
Luckily, it has already been fixed upstream, so backport the patches
fixing it.

Fixes: 93ae4353cd ("mac80211: add ath11k PCI support")
Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-01-12 15:17:18 +01:00
Christian Marangi
5f1758ef14
scripts/dl_github_archieve.py: fix generating unreproducible tar
Allign dl_github_archieve.py to 8252511dc0
change. On supported system the sigid bit is applied to files and tar
archieve that on tar creation. This cause unreproducible tar for these
system and these bit should be dropped to produce reproducible tar.

Add the missing option following the command options used in other
scripts.

Fixes: 75ab064d2b ("build: download code from github using archive API")
Suggested-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Tested-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-01-12 14:59:07 +01:00
Christian Marangi
d9aa41dcda
lldpd: use release tar instead of codeload
There is currently a problem with making reproducible version of lldpd.
The tool version is generated based on 3 source:
1. .dist-version file in release tar
2. git hash with presence of .git directory
3. current date

Using the codeload tar from github results in getting the repo without
the .git directory and since they are not release tar, we don't have
.dist-version. This results in having lldpd bin with a version set to
the current build time.

Switch to release tar so that we correctly have a .dist-version file and
the version is not based on the build time.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Reviewed-by: Robert Marko <robimarko@gmail.com>
2023-01-12 14:55:07 +01:00
Rosen Penev
0a35d3f992
CI: remove pcre from macOS
ff02e1561f added a host version of pcre
for packages that need it.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-11 22:55:43 +01:00
Rosen Penev
dd357409f6
CI: remove already installed packages
The GitHub image already includes these.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-11 22:55:42 +01:00
Rosen Penev
11627f3ac1
CI: remove various tools from macOS
zstd, openssl, and quilt are already built in tools/. No need to install
them.

The rest are unused.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-11 22:55:42 +01:00
Hauke Mehrtens
76c67fcc66 ksmbd: Fix ZDI-CAN-18259
This fixes a security problem in ksmbd. It currently has the
ZDI-CAN-18259 ID assigned, but no CVE yet.

Backported from:
8824b7af40
cc4f3b5a6a

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-01-11 22:07:51 +01:00
Florian Maurer
2e3d1edf59 lantiq: xrx200: Fix wifi LED on o2 box 6431
Wifi LED did not work using phy0radio, which somehow slipped through in
the previous testing

Signed-off-by: Florian Maurer <f.maurer@outlook.de>
2023-01-11 22:01:56 +01:00
Michal Hrusecky
f6b46c9269 mvebu: backport upstream patch to fix COMPHY reset
Upstream commit [1] included in the Linux kernel version 6.2 was
backported to Linux kernels 6.1.4, 6.0.18. It should be possible that it
is going to be backported even to the 5.15 series, but before it happens,
let's include it here.

It was discovered that on SOC Marvell Armada 3720, which is using e.g.
Turris MOX, and if you are also using it with older ARM Trusted Firmware
v1.5, it is not possible to detect connected USB 3.0 devices, but they
are working just fine when connected with USB 2.0 cable. This patch
fixes it.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/phy/marvell/phy-mvebu-a3700-comphy.c?id=b01d622d76134e9401970ffd3fbbb9a7051f976a

Reviewed-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Michal Hrusecky <michal.hrusecky@turris.com>
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
[improve commit description, added tag to the patch]
2023-01-11 21:56:36 +01:00
Christian Marangi
57a02cbbff
CI: kernel: test each target with additional changes than target/linux
Test each target if there are additional changes than target/linux.
This is needed to do wide test with changes to kmods, include/kernel and
changes to the workflow files.

While at it also cleanup and rework the code to drop duplication.
Also drop since_last_remote_commit to better track changes.

Fixes: 04ada8bc41 ("CI: kernel: build only changed targets")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-01-11 17:46:53 +01:00
Petr Štetiar
3b669bc3f3 at91: sam9x,sama5: fix racy SD card image generation
We've few low spec (make -j3) build workers attached to the 22.03
buildbot instance which from time to time exhibit following build
failure during image generation (shortened for brewity):

 + dd bs=512 if=root.ext4 of=openwrt-22.03...sdcard.img.gz.img
 dd: failed to open 'root.ext4': No such file or directory

Thats happening likely due to the fact, that on buildbots we've
`TARGET_PER_DEVICE_ROOTFS=y` which produces differently named filesystem
image in the SD card image target dependency chain:

 make_ext4fs -L rootfs ... root.ext4+pkg=68b329da

and that hardcoded `root.ext4` image filename becomes available from
other Make targets in the later stages. So lets fix this issue by using
IMAGE_ROOTFS Make variable which should contain proper path to the root
filesystem image.

Fixing remaining subtargets ommited in commit 5c3679e39b ("at91:
sama7: fix racy SD card image generation").

Fixes: 5c3679e39b ("at91: sama7: fix racy SD card image generation")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2023-01-11 15:23:18 +01:00
Philip Prindeville
26595eac05 x86: Add APU6 board support for startup detection
The APU6 is similar to the APU4 except for eth0 having
an SFP cage instead of RJ45.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2023-01-11 15:16:53 +01:00
Philip Prindeville
5ffa8d06c8 x86: Add definitions for APU6 platform
The board is similar to an APU4 except it has an SFP cage for eth0.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz> [patch refresh]
2023-01-11 15:16:52 +01:00
Petr Štetiar
5c3679e39b at91: sama7: fix racy SD card image generation
We've few low spec (make -j3) build workers attached to the 22.03
buildbot instance which from time to time exhibit following build
failure during image generation:

 + dd bs=512 if=root.ext4 of=openwrt-22.03-snapshot-r20028-43d71ad93e-at91-sama7-microchip_sama7g5-ek-ext4-sdcard.img.gz.img seek=135168 conv=notrunc
 dd: failed to open 'root.ext4': No such file or directory

Thats likely due to the fact, that on buildbots we've
`TARGET_PER_DEVICE_ROOTFS=y` which produces differently named filesystem
image in the SD card image target dependency chain:

 make_ext4fs -L rootfs ... root.ext4+pkg=68b329da

and that hardcoded root.ext4 becomes available from other target in the
later stages. So lets fix this issue by using IMAGE_ROOTFS Make variable
which should contain proper path to the root filesystem image.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2023-01-11 15:16:52 +01:00
Christian Marangi
cb679adf18
CI: add concurrency limits for pr test
Add concurrency limits for pull request test so that on pull request
refresh old jobs are cancelled.

The group is created based on the github ref + workflow name and the
workflow is cancelled only it it comes from a pull_request event.
Push events are not affected by this limit.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-01-11 14:31:57 +01:00
Christian Marangi
dca1b92ecd
Revert "TODROP: test for ipq4019 target"
This reverts commit 4eb587f7e0.

Pushed by mistake while merging a pr using script.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-01-11 14:29:44 +01:00
Christian Marangi
4eb587f7e0
TODROP: test for ipq4019 target
COMMIT TO DROP

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-01-11 14:28:41 +01:00
Christian Marangi
04ada8bc41
CI: kernel: build only changed targets
Detect changes in commit and build only changed targets.
If a change is related to the generic target, build test each target.

The matrix json is split. For target check patch only the first
subtarget is selected, for build test each target subtarget is built.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-01-11 14:28:41 +01:00
Christian Marangi
895f38ca1e
CI: build: fallback to compile toolchain if external toolchain fail
If for whatever reason external toolchain can't be found or downloaded,
fallback to internal toolchain build.

This can be useful when new target are introduced and external toolchain
are not present in openwrt fileserver.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-01-11 00:05:18 +01:00
Christian Marangi
55c32a6ce3
ipq806x: refresh upstreamed patch with kernel version tag
Refresh upstreamed patch with kernel version tag and replace them with
the upstream version.

For krait-cc patch rework them with the upstream changes.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-01-10 20:59:21 +01:00
Christian Marangi
7af1713a29
prereq-build: limit argp/fts/obstack/libintl.h to Linux OS
BSD based OS have different fixup and doesn't require these header.
Limit these Header to Linux based OS.

Fixes: 36bc306ae6 ("prereq-build: add extra check for elfutils required header")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-01-10 13:07:14 +01:00
Christian Marangi
ee397759b6
iwinfo: update to latest Git HEAD
c7b420a devices: add Qualcomm Atheros QCN6024/9024/9074 cards
5914d71 iwinfo: devices: add Qualcomm Atheros IPQ8074 WiSoC

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-01-10 00:54:31 +01:00
Christian Marangi
2a3283643c
treewide: derive host and hostpkg path from STAGING_DIR
STAGING_DIR may be provided from command line. We currently hardcoded
STAGING_DIR_HOST and STAGING_DIR_HOSTPKG to the default location but we
currently have some relocatable patch that derive the path from
STAGING_DIR.

Fix this and correctly derive STAGING_DIR_HOST and STAGING_DIR_HOSTPKG
from STAGING_DIR.

The intention is to fix inconsistency from the relocatable patch and the
use of STAGING_DIR_HOST that is always hardcoded.
This with a wrong configuration may end up in broken state with some
host tools expecing a PATH from STAGING_DIR and others using library
from the default staging_dir/host path.

To save downstream project the original implementation is saved while
fixing the inconsistency between patch and .mk.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-01-09 21:33:20 +01:00
Christian Marangi
d10e6591d1
toolchain/gdb: use STAGING_DIR_HOST instead of hardcoding default
Use STAGING_DIR_HOST to reference staging host directory instead of
hardcoding it to default path.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-01-09 21:33:19 +01:00
Christian Marangi
9590e1155d
toolchain/gcc: use STAGING_DIR_HOST instead of hardcoding default
Use STAGING_DIR_HOST to reference staging host directory instead of
hardcoding it to default path.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-01-09 21:33:19 +01:00
Christian Marangi
e854dcaef3
tools/mpc: use STAGING_DIR_HOST instead of hardcoding default
Use STAGING_DIR_HOST to reference the staging dir for host tools instead
of hardcoding it to the default location.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-01-09 21:33:19 +01:00
Christian Marangi
7b56ca399a
libtool: use STAGING_DIR_HOST in relocatable patch
Instead of using STAGING_DIR and then go up one dir with '../' use
directly STAGING_DIR_HOST env variable. This should produce cleaner
symbolic links.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-01-09 21:33:18 +01:00
Christian Marangi
b344da7640
autoconf: use STAGING_DIR_HOST in relocatable patch
Instead of using STAGING_DIR and then go up one dir with '../' use
directly STAGING_DIR_HOST env variable. This should produce cleaner
symbolic links.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-01-09 21:33:18 +01:00
Christian Marangi
3606fcce0b
automake: use STAGING_DIR_HOST in relocatable patch
Instead of using STAGING_DIR and then go up one dir with '../' use
directly STAGING_DIR_HOST env variable. This should produce cleaner
symbolic links.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-01-09 21:33:18 +01:00