Commit Graph

57689 Commits

Author SHA1 Message Date
Anton Antonov
3efb3b801b
armvirt: 64: Add NXP i.MX 8M Mini/Nano/Quad/Plus EVK support
Also includes Advantech RSB-3720 (iMX8 Plus) support.

Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Mathew McBride <matt@traverse.com.au>
[Re-sort into kernel config, move network into modules]
2023-06-02 11:36:27 +02:00
Mathew McBride
c3151b6f04
armvirt: 64: add support for other SystemReady-compatible vendors
These changes are to support other vendors that have SystemReady/EFI
support, including:
* Marvell Armada
** (This is speculative as I don't have a machine of my own to test)
* Amazon Graviton (tested bare-metal and virtualized instances)
* VMware (Fusion for ARM Mac preview)
* NXP/Freescale (Layerscape series not already selected)
* HiSilicon
* Allwinner/sunxi
* Rockchip (untested, options taken from arm64 defconfig)

To give an idea of the hardware certified for SystemReady,
see
https://www.arm.com/architecture/system-architectures/systemready-certification-program/ir
and
https://www.arm.com/architecture/system-architectures/systemready-certification-program/es

Other vendors that _should_ work include Marvell Octeon 10
and Ampere. I understand these systems should work
"out of the box" in ACPI mode but may require other drivers
(e.g PCIe NICs and storage controllers).

Signed-off-by: Mathew McBride <matt@traverse.com.au>
2023-06-02 11:36:26 +02:00
Mathew McBride
61ec9a8154
armvirt: add SFP support patches for NXP Layerscape DPAA2 platforms
This series resolves a long term issue with Phylink and SFPs on
DPAA2 hardware (LS1088,LS2088,LX2160) where a locking problem
prevented the system from rebooting. Patches solving this
issue existed prior to 6.2 but were not accepted upstream.

See the original series on patchwork:
https://patchwork.kernel.org/project/netdevbpf/cover/20221129141221.872653-1-vladimir.oltean@nxp.com/

And this thread on the Traverse forum:
https://forum.traverse.com.au/t/reboot-command-regression-from-5-10-to-5-15-kernel/133/12

Signed-off-by: Mathew McBride <matt@traverse.com.au>
2023-06-02 11:36:23 +02:00
Mathew McBride
54bb95f879
armvirt: add options and driver modules for NXP Layerscape DPAA2 platform
Tested with a Traverse Technologies Ten64 (LS1088A) board.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
2023-06-02 11:36:22 +02:00
Mathew McBride
cb3bbbf00c
armvirt: add ACPI support
ACPI support is required for Arm 'SystemReady' server and workstation
systems (and as an option on embedded platforms).

These config changes allow OpenWrt to boot in a QEMU virtual machine
with a UEFI/EDKII 'BIOS', but with no other hardware enabled yet.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
2023-06-02 11:36:21 +02:00
Mathew McBride
f899e0e024
build: enable vmdk/vmware images for arm64 target
This is useful for VMware's ARM64 products, e.g Fusion for M1/ARM Macs.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
2023-06-02 11:36:19 +02:00
Mathew McBride
71e56b2ff1
build: use 128MiB as the boot/kernel partition size on armvirt target
The nominal partition type for EFI boot partitions is FAT32,
which has a minimum size of 32MiB on a 512-byte-sector block device.

To ensure that the boot partition is created as FAT32 set a size
well above this minimum.

A useful discussion about EFI partition sizes can be found here:
https://superuser.com/questions/1310927/what-is-the-absolute-minimum-size-a-uefi-system-partition-can-be

I have found 128MiB works pretty consistently across both
tools (mkfs.fat) and firmwares (EDKII)

Signed-off-by: Mathew McBride <matt@traverse.com.au>
2023-06-02 11:36:18 +02:00
Mathew McBride
3d99314569
armvirt: remove model name override
Now that armvirt has been expanded to boot on more generic
ARM machines, remove the board and model name override.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
2023-06-02 11:36:16 +02:00
Mathew McBride
9a76b99c1b
armvirt: set kernel partition as the EFI system partition
U-Boot with EFI boot manager functionality will store
EFI boot order data on the ESP in the ubootefi.var file.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
2023-06-02 11:36:15 +02:00
Mathew McBride
701d774f54
scripts: gen_image_generic: allow the partition types to be set
The use case for this is to set the kernel partition as the
EFI system partition. Versions of U-Boot with the
EFI boot manager (eficonfig and efidebug commands) will
store their boot order data on the ESP.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
2023-06-02 11:36:13 +02:00
Mathew McBride
8f29b1573d
grub2: enable EFI for armvirt
This adds a separate package for EFI on Arm SystemReady
compatible machines. 32-bit Arm UEFI is supported as well.

It is very similar to x86-64 EFI setup, without the
need for BIOS backward compatibility and slightly
different default modules.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
2023-06-02 11:36:12 +02:00
Mathew McBride
97c5d317f5
armvirt: update README with new image names
The introduction of EFI support has changed how armvirt
images are generated. The kernel and filesystem binaries
can still be used as before with QEMU directly.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
2023-06-02 11:36:09 +02:00
Mathew McBride
eb0e61285d
armvirt: disable LD dead code elimination on ARM32
This interferes with the generation of the EFI stub section for
ARM32. As this target is not size constrained, disable the dead code
data elimination hack.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
2023-06-02 11:36:08 +02:00
Mathew McBride
e0f06ddc23
armvirt: add EFI support
EFI booting is used on newer machines compatible with the
Arm SystemReady specifications.

This commit restructures armvirt into a more 'generic'
target similar to x86.

See https://github.com/openwrt/openwrt/pull/4956
for a history of this port.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
2023-06-02 11:36:05 +02:00
Hauke Mehrtens
16a20512d8
kernel: Set CONFIG_FRAME_WARN depending on target
This set the CONFIG_FRAME_WARN option depending on some target settings.
It will use the default from the upstream kernel and not the hard coded
value of 1024 now.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-06-02 11:19:32 +02:00
Yanase Yuki
edb3a4162c ipq40xx: convert Buffalo WTR-M2133HP to DSA
This commit convert WTR-M2133HP to DSA setup.

Signed-off-by: Yanase Yuki <dev@zpc.sakura.ne.jp>
2023-06-01 23:54:20 +02:00
Tianling Shen
6f607ba043 firmware-utils: add missing build dependencies
Fixes the following build error:

```
CMake Error at CMakeLists.txt:9 (MESSAGE):
  Unable to find zlib library.
CMake Error at CMakeLists.txt:13 (MESSAGE):
  Unable to find OpenSSL librry.
```

Fixes: 24d6abe2d7 ("firmware-utils: new package replacing otrx")
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-06-01 23:54:20 +02:00
Klaus Kudielka
9f7fdd0017 mvebu: remove hack for Turris Omnia legacy U-Boot
The omnia-medkit (only useful for installation with U-Boot
2015.10-rc2) is not being built anymore.

Now we can be reasonably sure, that there won't be first-time OpenWrt
boots with that U-Boot version, and can get rid of a rather ugly hack.

Signed-off-by: Klaus Kudielka <klaus.kudielka@gmail.com>
2023-06-01 23:54:20 +02:00
Klaus Kudielka
75a3760862 mvebu: stop building omnia-medkit
Since August 2022, users of very old Turris Omnias have been
encouraged to update U-Boot before OpenWrt installation [1].
The omnia-medkit (only useful for installation with
U-Boot 2015.10-rc2) is not needed anymore.

[1] https://openwrt.org/toh/turris/turris_omnia#installation

Signed-off-by: Klaus Kudielka <klaus.kudielka@gmail.com>
2023-06-01 23:54:20 +02:00
Linus Walleij
997bf7084c gemini: Bump to kernel v6.1
This bumps the Gemini kernel to use v6.1. While there is no
reason to stay with v5.15, I personally use newer upstream
kernels constantly and they are tested and work well. OpenWrt's
6.1 needs more time until it can be switched.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-06-01 23:54:20 +02:00
Linus Walleij
0fe2aae0e1 gemini: Create a config for kernel v6.1
This creates a config for the v6.1 kernel for Gemini.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2023-06-01 23:54:20 +02:00
Linus Walleij
58acb1dd2c gemini: Add kernel v6.1 patches
This adds a bunch of patches for the v6.1 Gemini kernel.

For v5.15 this was down to a single upstream patch, but for
kernel v6.2 I reworked the USB code for FOTG210, so instead of
carrying over the half-baked and incomplete patch from v5.15
I just backported all the v6.2 patches, 31 in total, as it
creates full device USB mode for e.g. D-Link DNS-313.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-06-01 23:54:20 +02:00
Linus Walleij
33abdc07fb kernel: Package the new FOTG210 module properly
When using the Gemini, we apply patches that create a single
module that support both host and device mode these days.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(move module to gemini target, keep both 6.1+2-ish + 5.15 module
CONFIG and files around until 5.15 is dropped)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-06-01 23:54:20 +02:00
Christian Lamparter
9c1b396615 apm821xx: put crypto4xx into crypto subsection
module is only useful for apm821xx targets, so
limit visability to just this target.

Fixes: 55fbcad20a ("apm821xx: make crypto4xx as a standalone module")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-06-01 23:54:17 +02:00
Yanase Yuki
9314744350
ipq806x: use new package name for NEC WG2600HP3
commit 0c45ad41e1 changes ipq806x usb kmod name
from usb-phy-qcom-dwc3 to phy-qcom-ipq806x-usb, so
use new name.

Signed-off-by: Yanase Yuki <dev@zpc.sakura.ne.jp>
2023-06-01 19:44:10 +02:00
Christian Marangi
218deba503
CI: label-kernel: support compile testing kernel version and all target
Add support to label-kernel for compiling testing kernel version and
check patches. To trigger this special build appent :testing to the
normal label.
Example:

- ci:kernel:ipq806x:generic:testing

Test will fail if the requested target doesn't have a defined kernel
testing version.

Also add support for testing all target and subtarget. To trigger this
some special pattern are added:
- ci:kernel:all:all
  Trigger test for all target and subtarget

- ci:kernel:all:first
  Trigger test for all target and the first subtarget in alphabetical
  order for the target.

With these special case :testing can also be used and every target and
subtarget that supports kernel testing version will be selected:
- ci:kernel:all:all:testing
  Trigger test for all target and subtarget that have a kernel testing
  version defined.

- ci:kernel:all:first:testing
  Trigger test for all target and the first subtarget in alphabetical
  order for the target that, if they have a kernel testing version
  defined.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-06-01 19:42:21 +02:00
Robert Marko
10be819a16
ipq807x: 6.1: fix I/O WRITE_ZEROES errors on some eMMC devices
Linux 5.19 added a feature where if there is TRIM support being advertised
on eMMC kernel will use TRIM to offload erasing to zero.

However, like always there are eMMC IC-s that advertise TRIM and kind of
work but trying to use TRIM for offloading will cause I/O errors like:
[   18.085950] I/O error, dev loop0, sector 596 op 0x9:(WRITE_ZEROES) flags 0x800 phys_seg 0 prio class 2

So, lets utilize the kernel MMC quirks DB to disable TRIM for eMMC models
that are known to cause this.

This will fix the WRITE_ZEROES error on:
Qnap 301W which uses Micron MTFC4GACAJCN-1M
Zyxel NBG7815 which uses Kingston EMMC04G-M627

Tested-By: Enrico Mioso <mrkiko.rs@gmail.com> # NBG7815
Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-06-01 19:23:25 +02:00
Linhui Liu
4c5a9da869 selinux-policy: update to 1.2.5
30d503a uci jsonfilter: pipe and leak
e13cb64 rpcd leds
144781f jsonfilter, luci, ubus
1210762 rpcd and all agents get fd's leaked
ab9227c rpcd
2f99e0e luci rpcd
b43aaf3 rpcd (enable/disable services) luci peeraddr
f20f03e rpcd
7bc74f6 rpcd reads all subj state and luci-bwc leaks
9634b17 adds inotify perms to anon_inode
3d3c17c adds bare anon_inode (linux 5.15)
7104b20 dnsmasq and luci
0de2c66 luci,rpcd, ucode, wpad
14f5cf9 luci and ucode
e3ce84c rpcd, ucode and cgiio loose ends
96a2401 misc updates
9fe0490 initscript: remove redundant rules
71bd77e allow all init scripts to log to logd
f697331 sandbox: make ttydev handling more robust
a471877 simplify pty tty console access
f738984 sandbox: also remove TIOSCTI from all ttydevs

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
2023-05-31 22:00:48 +02:00
Aleksander Jan Bajkowski
5d51079fd0 lantiq: add patches headers
This commit adds headers to the patches, so they can be applied with the
git am command.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
2023-05-31 21:58:05 +02:00
Tianling Shen
32d5921b8b rockchip: add Orange Pi R1 Plus LTS support
The OrangePi R1 Plus LTS is a minor variant of OrangePi R1 Plus with
the on-board NIC chip changed from rtl8211e to yt8531c, and otherwise
identical to OrangePi R1 Plus.

Tested-by: Volkan Yetik <no3iverson@gmail.com>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-05-31 21:41:46 +02:00
Tianling Shen
37fed89166 uboot-rockchip: add Orange Pi R1 Plus LTS support
Add support for the Xunlong Orange Pi R1 Plus LTS.
Manually generated of-platdata files to avoid swig dependency.

Tested-by: Volkan Yetik <no3iverson@gmail.com>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-05-31 21:41:46 +02:00
Tianling Shen
ab641efe69 rockchip: add Orange Pi R1 Plus support
Orange Pi R1 Plus is a Rockchip RK3328 based SBC by Xunlong.

This device is similar to the NanoPi R2S, and has a 16MB
SPI NOR (mx25l12805d). The reset button is changed to
directly reset the power supply, another detail is that
both network ports have independent MAC addresses.

Note: booting from SPI is currently unsupported, you have to install
the image on a SD card.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-05-31 21:41:46 +02:00
Tianling Shen
043f8a4f5e uboot-rockchip: add Orange Pi R1 Plus support
Add support for the Xunlong Orange Pi R1 Plus.
Manually generated of-platdata files to avoid swig dependency.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-05-31 21:41:46 +02:00
Hauke Mehrtens
2d5f3b3c4c airoha: spi-en7523: Fix compile warning
The set_spi_clock_speed() function is not used, this causes a compile
warning which results in a build error with -WError.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-05-31 21:30:49 +02:00
Hauke Mehrtens
0f6b8e6516 kernel: Make kmod-usb-net-smsc95xx depend on kmod-net-selftests
The smsc95xx driver got selftest support with kernel 5.18, add the new
dependency fixing the all kernel modules build on MIPS malta with kernel
6.1.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-05-31 21:29:36 +02:00
Hauke Mehrtens
3c55d8698a kernel: Make kmod-phylink depend on kmod-libphy
The CONFIG_PHYLINK Kconfig option in the kernel selects CONFIG_LIBPHY.
Add this dependency to fix the all kernel modules build on MIPS malta
and armvirt with kernel 6.1.

With kernel 5.15 mod-phylink and kmod-sfp are empty packages because
no OpenWrt kmod is selecting a module which needs sfp or phylink
support.

Fixes: #12758
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-05-31 21:28:37 +02:00
Tony Ambardar
fd572feef8 kernel: 6.1: add missing CONFIG_TEST_DYNAMIC_DEBUG option
This new option (default N) will generate prompts building with OpenWrt
configs that set CONFIG_KERNEL_DYNAMIC_DEBUG=y. Fix this by adding the
disabled option to the generic config.

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2023-05-31 21:06:18 +02:00
Christian Marangi
595608eb3f
kernel: fix wrong detection of Linux-Testing-Version in makefile DUMP
When the split was done, the case for testing kernel version wasn't
handled and only the to-be-compiled kernel version details files was
included. This cause the kernel Linux-Testing-Version output from
makefile target DUMP to report only the kernel version without the minor
version (example 6.1 instead of 6.1.29).

This value is expected with the full kernel version and this cause the
dump-target-info.pl script to not correctly identify if a target have a
testing kernel for the kernels calls.

Fix this regression by correctly including the kernel details files if
the target declare support for a testing kernel version.

Fixes: 0765466a42 ("kernel: split kernel version to dedicated files")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-31 20:28:40 +02:00
Jeffery To
f597f34f3a
build: export GIT_CEILING_DIRECTORIES for package builds
A package may run git as part of its build process, and if the package
source code is not from a git checkout, then git may traverse up the
directory tree to find buildroot's repository directory (.git).

For instance, Poetry Core, a Python build backend, will read the
contents of .gitignore for paths to exclude when creating a Python
package. If it finds buildroot's .gitignore file, then Poetry Core will
exclude all of the package's files[1].

This exports GIT_CEILING_DIRECTORIES for both package and host builds so
that git will not traverse beyond $(BUILD_DIR)/$(BUILD_DIR_HOST).

[1]: https://github.com/python-poetry/poetry/issues/5547

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2023-05-31 19:33:00 +02:00
Petr Štetiar
95dde52329
ci: build: verify downloaded toolchain tarball
CDNs are known to ship outdated or corrupted files, if it unpacks
correctly, it necessarily doesn't mean, that we're using the desired
content. So lets fix it by checking the tarball as well.

I'm adding GPG checking explicitly, its not needed, but just double
checking, that everything is working as expected on build
infrastructure.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2023-05-31 19:32:58 +02:00
Petr Štetiar
567784127e
ci: bump buildworker container to version v6
Its being used by buildbot workers, adds g++-multilib to fix node
cross-compilation from a 64-bit build machine to 32-bit host.

References: https://github.com/openwrt/buildbot/pull/7
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2023-05-31 19:13:42 +02:00
Linus Walleij
8d4a2bb8f9
kernel: disable new v6.1 DRM option
Not many platforms use the DRM configs but Gemini use it
so make sure to disable all new kernel v6.1 features that
we do not want to get prompted about.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Petr Štetiar <ynezz@true.cz> [rebased]
2023-05-31 19:13:41 +02:00
Petr Štetiar
d2ecaaca34
netifd: update to version 2023-05-31
Contains following changes:

 * bridge: bridge_dump_info: add dumping of bridge attributes
 * bridge: make it more clear why the config was applied
 * cmake: fix build by reordering the cflags definitions
 * treewide: fix multiple compiler warnings

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2023-05-31 19:13:38 +02:00
Christian Marangi
5bafc4352f
CI: kernel: test each subtarget on push events
Test each subtarget on push events to improve testing and to refresh
ccache of each subtarget.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-31 13:22:05 +02:00
Christian Marangi
ebbc806d30
CI: add support for getting ccache cache from S3
Add support for getting ccache cache from S3.
ccache is archieved in a tar and downloaded from S3 Cloud Storage.

For push events, ccache is then uplodaed back to S3 to refresh and have
a ccache cache always fresh.

An additional workflow is added to upload files to an S3 Cloud Storage
from artifacts uplodaed to github. The minio tool is used to upload
files to S3.

If the ccache can't be downloaded from s3, we fallback to github cache
system.

Also limit s3 upload to the openwrt repository since external fork won't
have (obviously) the required secrtes to upload data to the S3 Cloud
Storage.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-31 13:22:05 +02:00
Christian Marangi
ff66a7c1c0
CI: build: limit cache save/delete only on push events
Limit ccache cache save/delete only on push events. Saving ccache
cache for pull request will result in bloat and refreshing ccache is not
possible due to security measure on enforcing read permission on
pull_request events.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-31 13:22:05 +02:00
Christian Marangi
2129ee1879
CI: coverity: disable ccache usage
Disable ccache usage for coverity workflow as it may cause side effect
in the produced bins.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-31 13:22:04 +02:00
Christian Marangi
ae7b05328c
CI: build: fix ccache cache usage
CCache cache is currently broken due to a funny bug in ccache compiler
type detection. It seems ccache compiler type detection is very fragile
and with the use of external toolchain doesn't correctly detect the
type.
The type detected is set to other instead of gcc resulting in ccache
complaining for unsupported compiler options.

To handle this problem, force the compiler type to gcc to make ccache
correctly work and speedup compilation.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-31 13:22:04 +02:00
Christian Marangi
07b52a8a25
CI: build: add option to define custom ccache cache type
Add new input to define custom ccache cache type. This is useful to use
a different ccache cache for some special workflow that may do more test
than simple kernel compilation.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-31 13:22:04 +02:00
Christian Marangi
b9a41c1e84
CI: build: add option to disable use of ccache
Add option to disable use of ccache. This can be useful for some
sensible test that should not use ccache as they can cause side effects
of any sort. (example Coverity Scan)

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-31 13:22:04 +02:00