Commit Graph

61 Commits

Author SHA1 Message Date
Paul Spooren 4056a40160 armvirt: enable MMIO_CMDLINE_DEVICES for firecracker support
This Kernel option allows to run OpenWrt witin a `firecracker` micro VM.

Firecracker is a KVM-based tool for superfast booting VMs on x86_64 and
aarch64. It makes rootfs available to the guest as a virtio-mmio device
and passes its address via the kernel cmdline. A kernel without
CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES will not recognize the rootfs
virtio-mmio device.

Suggested-by: Packet Please <pktpls@systemli.org>
Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-10-12 19:22:08 -10:00
Paul Spooren e439613f1f armvirt: remove obsolete Kernel 5.4
With the upgrade to Kernel 5.10 per default the old version is no longer
required to be in tree.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-10-02 18:13:46 +02:00
Paul Spooren 87623958b2 armvirt: switch to Kernel 5.10
Armvirt is a development and testing platform and should therefore use
the latest OpenWrt Kernel by default.

Tested via qemu.

Acked-by: Rosen Penev <rosenp@gmail.com>
Acked-by: Yousong Zhou <yszhou4tech@gmail.com>

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-10-01 10:46:28 -10:00
Rui Salvaterra 505b7a2d08 kernel: move two symbols to the generic kconfigs
CONFIG_RCU_{NEED_SEGCBLIST,STALL_COMMON} are set basically everywhere. Move them
to the generic kconfigs. And resort the generic kconfigs while at it.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-08-29 17:07:19 +02:00
Rui Salvaterra 3326b5e75c treewide: switch the timer frequency to 100 Hz
Some targets select HZ=100, others HZ=250. There's no reason to select a higher
timer frequency (and 100 Hz are available in every architecture), so change all
targets to 100 Hz.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-04-21 10:31:10 +01:00
Aleksander Jan Bajkowski f777884ac4 armvirt: add 5.10 testing kernel
Add 5.10 as testing kernel. Builds successfully with
CONFIG_ALL_KMODS=y enabled.

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
2021-04-03 18:56:02 +02:00
Aleksander Jan Bajkowski d9fa0daef1 armvirt: refresh 5.10 config
This was done by executing these commands:
$ make kernel_oldconfig CONFIG_TARGET=subtarget
$ make kernel_oldconfig CONFIG_TARGET=subtarget_platform

Some common symbols have been moved to target config.

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
2021-04-03 18:56:02 +02:00
Aleksander Jan Bajkowski 072af549fd armvirt: copy config files for 5.10
Copy config and patches for 5.10.

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
2021-04-03 18:56:02 +02:00
Aleksander Jan Bajkowski 1cadd8fb78 armvirt: refresh 5.4 config
This was done by executing these commands:
$ make kernel_oldconfig CONFIG_TARGET=subtarget
$ make kernel_oldconfig CONFIG_TARGET=subtarget_platform

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
2021-04-03 18:56:02 +02:00
Aleksander Jan Bajkowski 12e942b1fd kernel: move some disabled symbols to generic
Move some disabled symbols found in armvirt target to generic.

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
2021-03-19 00:59:22 +01:00
Adrian Schmutzler 85b1f4d8ca treewide: remove execute bit and shebang from board.d files
So far, board.d files were having execute bit set and contained a
shebang. However, they are just sourced in board_detect, with an
apparantly unnecessary check for execute permission beforehand.

Replace this check by one for existance and make the board.d files
"normal" files, as would be expected in /etc anyway.

Note:

This removes an apparantly unused '#!/bin/sh /etc/rc.common' in
target/linux/bcm47xx/base-files/etc/board.d/01_network

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-03-06 11:30:06 +01:00
Adrian Schmutzler 598b29585e target: use SPDX license identifiers on Makefiles
Use SPDX license tags to allow machines to check licenses.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-10 15:47:18 +01:00
Josef Schlehofer 0c866c8186 armvirt: README: rename it from LEDE to OpenWrt
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2020-12-14 21:38:10 +00:00
Josef Schlehofer 222dc0ad91 armvirt/64: change it to cortex-a53 instead of generic
Package architecture aarch64_generic [1] can be used just with three
devices. One is NanoPI R2S and then there are two development boards
from NXP. Let's change armvirt/64 to Cortex A53 (aarch64_cortex-a53)
[2]. It has wider support by multiple devices like NanoPI Neo Plus2/Core2,
ESPRESSObin, Pine64, and Raspberry Pi 2&3.

While looking at ARMvirt/32 it has set CPU_TYPE and CPU_SUBTYPE to be
arm_cortex-a15_neon-vfpv4 [3]. It has support to devices like
Linksys EA8500 v1, Linksys EA7500 v1, Netgear D7800, Netgear R7500 and so on.

Tested with:
qemu-system-aarch64 -m 1024 -smp 2 -cpu cortex-a57 -M virt -nographic \
-kernel openwrt-armvirt-64-Image-initramfs

Successfully compiled and booted.
Here goes the output:
root@OpenWrt:/# uname -a
Linux OpenWrt 5.4.82 #0 SMP Sun Dec 13 12:52:10 2020 aarch64 GNU/Linux
root@OpenWrt:/# cat /etc/openwrt_release
DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='SNAPSHOT'
DISTRIB_REVISION='r15207-96fca0f807'
DISTRIB_TARGET='armvirt/64'
DISTRIB_ARCH='aarch64_cortex-a53'
DISTRIB_DESCRIPTION='OpenWrt SNAPSHOT r15207-96fca0f807'
DISTRIB_TAINTS='no-all'

Also, change BOARDNAME to be the same as it is in armvirt/32.

[1] https://openwrt.org/docs/techref/instructionset/aarch64_generic
[2] https://openwrt.org/docs/techref/instructionset/aarch64_cortex-a53
[3] https://openwrt.org/docs/techref/instructionset/arm_cortex-a15_neon-vfpv4

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2020-12-14 21:38:10 +00:00
Adrian Schmutzler 2785126650 kernel: remove support for kernel 4.19
We use 5.4 on all targets by default, and 4.19 has never been released
in a stable version. There is no reason to keep it.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-10-30 19:29:59 +01:00
Hauke Mehrtens 722906d144 kernel: move CONFIG_F2FS_CHECK_FS to generic kernel config
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-10-11 16:38:16 +02:00
Hauke Mehrtens 6542615e41 kernel: Move CONFIG_F2FS_FS_SECURITY to generic kernel config
Move the CONFIG_F2FS_FS_SECURITY kernel configuration option to the
generic kernel configuration.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-10-11 16:38:16 +02:00
Daniel Golle 5423d9d27e kernel: move F2FS_FS_XATTR and F2FS_STAT_FS symbols to generic
Similar to how it was already done for other filesystems' *_FS_XATTR
kernel config symbols, also move CONFIG_F2FS_FS_XATTR=y and
CONFIG_F2FS_STAT_FS=y to target/linux/generic.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2020-10-09 23:20:19 +01:00
Paul Spooren 0f5b5cf730 kernel: clean up XATTR config symbols
Extended attributes are required for overlayfs and have hence been long
ago enabled for jffs2, but should be enabled unconditionally for all
other filesystems which may potentially serve as overlayfs' upper
directory. Previously it was inconsistently added in multiple targets.
Add symbols to generic kernel config and remove all *_XATTR symbols
from target configs.

Signed-off-by: Paul Spooren <mail@aparcar.org>
[keep things as they are for squashfs, improve commit message]
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2020-10-09 01:49:22 +01:00
Adrian Schmutzler cc501ab021 kernel: set WATCHDOG_CORE dependency in kmod-hwmon-sch5627
For many target we have added CONFIG_WATCHDOG_CORE=y to the target
config due to the following error:

 Package kmod-hwmon-sch5627 is missing dependencies for the following
 libraries:
 watchdog.ko

However, actually the proper way appears to be setting the
dependency for the kmod-hwmon-sch5627 package, as the error message
demands.

Do this in this patch and remove the target config entries added
due to this issue.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-24 14:09:11 +02:00
Hauke Mehrtens b35c54227b kernel: Move CONFIG_IONIC to generic kernel config
It is deactivated everywhere, just set this in the generic config.

Acked-by: Yousong Zhou <yszhou4tech@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-08-10 23:58:58 +02:00
Petr Štetiar 472b8fc91b armvirt,x86: fix build breakage of crypto ccp module
Upstream in commit f9f8f0c24203 ("crypto: ccp -- don't "select"
CONFIG_DMADEVICES") removed dependency on CONFIG_DMADEVICES symbol which
leads to build breakage of ccp crypto module, so fix this by adding that
symbol back in the kernel config.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-06-23 09:29:00 +02:00
Aleksander Jan Bajkowski b43023b7ba kernel: remove non-existant symbols
These symbols exist only in older kernels and can be removed.

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
2020-04-13 22:40:19 +02:00
Tomasz Maciej Nowak ddc0e87fae kernel: move TEO governor to generic config
This new symbol popped up in few places. Disable it in generic config.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
[fixed merge conflict in generic/config-5.4]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-03-17 00:51:48 +01:00
Petr Štetiar 9ba09653ad treewide: remove maintainer variable from targets
There is no such role as target maintainer anymore, one should always
send corresponding changes for the review and anyone from the commiters
is allowed to merge them or eventually use the hand break and NACK them.

Lets make it clear, that it is solely a community doing the maintenance
tasks.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Piotr Dymacz <pepe2k@gmail.com>
2020-03-16 22:21:45 +01:00
Hauke Mehrtens ee3b8c5b8b armvirt: Remove kernel 4.14 support
This target was switched to kernel 4.19 more than 6 months ago in commit
f342ffd300 ("treewide: kernel: bump some targets to 4.19") and now
with kernel 5.4 support being added it gets harder to support kernel
4.14 in addition to kernel 4.19 and 5.4.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Yousong Zhou <yszhou4tech@gmail.com>
2020-03-12 09:27:31 +01:00
Petr Štetiar f6cb82329b armvirt: fix missing watchdog core dependency for hwmon-sch5627
Fixes following error uncovered while building armvirt/64 on 5.4:

 Package kmod-hwmon-sch5627 is missing dependencies for the following libraries:
 watchdog.ko

That dependency was introduced in upstream via 2d8c7ff52c24
("hwmon/sch56xx: Depend on watchdog for watchdog core functions") in
v3.5.

The issue emerged in 5.4 because the kconfig symbol CONFIG_WATCHDOG_CORE
is now a tristate value.  Previously it was a bool.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-03-11 10:52:46 +01:00
Yousong Zhou 8057b621d4 armvirt: switch to kernel 5.4
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2020-03-10 18:17:35 +08:00
Yousong Zhou be23a88c1a armvirt: 5.4: kconfig sync
"make kernel_menuconfig CONFIG_TARGET=subtarget_platform" first, then
move common ones to platform level config

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2020-03-10 18:17:30 +08:00
Yousong Zhou 874a2caab4 armvirt: add config-5.4
Copied from config-4.19

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2020-03-10 18:11:45 +08:00
Aleksander Jan Bajkowski 84845123fe kernel: remove non-existant symbols from 4.19 config
These symbols only exist in kernel version <= 4.15

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
2020-02-22 16:38:41 +01:00
Florian Fainelli c715f71bce treewide: Remove self from MAINTAINER entries
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2019-12-23 13:18:04 -08:00
Petr Štetiar 53f4a686aa armvirt: fix overlay support by updating to f2fs/ext4 based overlays
Current snapshot images doesn't provide images with usable overlay
filesystems:

 mount_root: no usable overlay filesystem found, using tmpfs overlay

So this patch fixes this by updating support to current f2fs/ext4 based
overlays and providing squashfs with proper rootfs
TARGET_ROOTFS_PARTSIZE size.

While at it, I've also added support for optional gzipping of the
images, and renamed the output rootfs image filenames to match the more
common naming pattern $(IMG_PREFIX)-rootfs-$(FS-TYPE).img.

Cc: Yousong Zhou <yszhou4tech@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2019-06-25 14:12:22 +00:00
Petr Štetiar d9426d537b armvirt: configure kernel for f2fs and ext4 based overlays
jffs2/mtdblock overlays are long time gone, and as we switch to the new
f2fs/ext4 based overlays, we need to add missing support for loop block
device and f2fs to kernel.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2019-06-25 14:12:22 +00:00
Petr Štetiar f342ffd300 treewide: kernel: bump some targets to 4.19
Lets bump kernel to 4.19 on targets which were run tested or got ACKed
so we've enough time to make it ready for next release:

 armvirt/32 (runtested in qemu)
 armvirt/64 (runtested in qemu)
 ath79/generic (runtested on Carambola2)
 gemini/generic (runtested on DIR-685, DNS-313, SQ201, SL93512R)
 imx6/generic (runtested on Apalis)
 ipq40xx/generic (runtested on nbg6617)
 malta/be64 (runtested in qemu)
 malta/be (runtested in qemu)
 malta/le (runtested in qemu)
 malta/le64 (runtested in qemu)
 mpc85xx/generic (runtested on TL-WDR4900)
 mpc85xx/p2020 (runtested on P2020RDB)
 mvebu/cortexa53
 mvebu/cortexa72
 mvebu/cortexa10
 octeon/generic (runtested on EdgeRouter Lite)
 sunxi/cortexa53 (build tested only)
 sunxi/cortexa7 (runtested on Lime2-K)
 sunxi/cortexa8 (build tested only)
 tegra/generic
 x86/64 (runtested in qemu)

Acked-by: Zoltan HERPAI <wigyori@uid0.hu> [sunxi]
Tested-by: Linus Walleij <linus.walleij@linaro.org> [gemini]
Tested-by: Tomasz Maciej Nowak <tomek_n@o2.pl> [mvebu, tegra]
Tested-by: Daniel Engberg <daniel.engberg.lists@pyret.net> [octeon]
Tested-by: Pawel Dembicki <paweldembicki@gmail.com> [mpc85xx/generic mpc85xx/p2020]
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2019-06-18 16:08:55 +02:00
Petr Štetiar a459d2379a armvirt: refresh 4.19 kernel config
Refresh kernel configs with 4.19 bits, while at it, add common symbols
into the target config.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2019-06-18 16:08:55 +02:00
Petr Štetiar 68ddec2922 armvirt: add kernel configs for 4.19
It's just copy of 4.14 and will be refreshed in the upcoming commit,
renamed config-default to config-4.14 as well.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2019-06-18 16:08:55 +02:00
Hauke Mehrtens 46af22de16 kernel: Remove CONFIG_COMPAT
This removes support for executing old 32 bit applications on 64 bit ARM
and MIPS kernels.
On OpenWrt we normally compile all the user space applications on our
own and do not support third party binary only modules especial not 32
bit applications on 64 bit CPUs.

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

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-05-11 17:15:41 +02:00
Hauke Mehrtens 32eb66881c kernel: Activate CONFIG_ARM64_SW_TTBR0_PAN
This activates "Emulate Privileged Access Never using TTBR0_EL1
switching" on ARM64.

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

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-05-11 17:15:41 +02:00
Lucian Cristian ee38ffb4a9 armvirt64: enable qemu drm drivers
adds the qemu video drivers and also fixes the build failure
introduced with drm-kms-helper

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
2019-04-18 12:06:47 +02:00
Yousong Zhou afe00a79ee armvirt: 32: enable CONFIG_ARM_LPAE
This is required for running armvirt_32 on QEMU 3.0 [1], otherwise the
kernel will emit the following complaint and virtio-net-pci devices will
fail to be initialized

        [    1.124214] OF: PCI: host bridge /pcie@10000000 ranges:
        [    1.125093] OF: PCI:    IO 0x3eff0000..0x3effffff -> 0x00000000
        [    1.125942] OF: PCI:   MEM 0x10000000..0x3efeffff -> 0x10000000
        [    1.126403] OF: PCI:   MEM 0x8000000000..0xffffffffff -> 0x8000000000
        [    1.127748] pci-host-generic 4010000000.pcie: can't claim ECAM area [mem 0x10000000-0x1fffffff]: address conflict with /pcie@10000000 [mem 0x10000000-0x3efeffff]
        [    1.129752] pci-host-generic: probe of 4010000000.pcie failed with error -16

Running QEMU with "-M virt,highmem=off" is an option, but "highmem" was only
introduced as a default on flag since QEMU 2.5.0 and QEMU will fail and quit on
encounter of unknown flags

 [1] Armv7 guest fails to boot with qemu-3.0.0-1,
     https://bugzilla.redhat.com/show_bug.cgi?id=1633328#c5

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2019-02-19 13:13:49 +00:00
Yousong Zhou 0aedf5cfcb armvirt: 32: refresh kernel config
The diff was genereated by running the following command without
actually changing any kernel config options

	make kernel_menuconfig CONFIG_TARGET=subtarget

Here are some initial findings on the change

 - CONFIG_ARCH_OPTIONAL_KERNEL_RWX is now arch default
 - CONFIG_ARM_GIC_V3_ITS is selected by CONFIG_ARCH_VIRT
 - CONFIG_CPU_SPECTRE is select by CONFIG_CPU_V7
 - CONFIG_TIMER_OF is now a arch default
 - CONFIG_TIMER_PROBE is select by CONFIG_TIMER_OF

The following options should probably be moved to generic config

 - CONFIG_MIGRATION is a default on option
 - CONFIG_TREE_SRCU is a default on option for !PREEMPT && SMP system
 - CONFIG_RCU_NEED_SEGCBLIST

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2019-02-19 13:13:48 +00:00
Koen Vandeputte ca88f4153f kernel: bump 4.14 to 4.14.77
Refreshed all patches.

Altered patches:
- 666-Add-support-for-MAP-E-FMRs-mesh-mode.patch

New symbol for arm targets:
- HARDEN_BRANCH_PREDICTOR

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2018-10-19 10:01:57 +02:00
Felix Fietkau 212aa33226 kernel: enable memory compaction
Compaction is the only memory management component to form high order (larger
physically contiguous) memory blocks reliably. The page allocator relies on
compaction heavily and the lack of the feature can lead to unexpected OOM
killer invocations for high order memory requests. You shouldn't disable this
option unless there really is a strong reason for it.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Michal Hrusecky <michal.hrusecky@nic.cz>
2018-10-09 14:29:55 +02:00
Felix Fietkau b7dd438f66 armvirt: remove linux 4.9 support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2018-09-29 18:09:45 +02:00
Stijn Tintel 77e3e706ce kernel: add missing ARM64_SSBD symbol
In 4.14.57, a new symbol for Spectre v4 mitigation was introduced for
ARM64. Add this symbol to all ARM64 targets using kernel 4.14.

This mitigates CVE-2018-3639 on ARM64.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2018-07-31 12:22:11 +03:00
Mathias Kresin 3877550114 arm64: enable harden branch predictor
Enable the harden branch predictor for arm64 as it is recommend.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2018-04-27 21:34:18 +02:00
Florian Fainelli 0cf7c54023 armvirt: Resync kernel configuration
The 4.14 kernel configuration defaulted to a v4/v5 multiplatform while
4.9 was using a v6/v7 default configuration. Resync 4.14 against 4.9 so
they are nearly identical.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2018-01-12 15:14:27 -08:00
Jo-Philipp Wich 57157618d4 armvirt: re-enable VFP support
Enable CONFIG_VFP again which was disabled during the 4.9 -> 4.14 bump.

Boot tested both 32 and 64 bit subtargets using initramfs images with the
qemu-system-arm and qemu-system-aarch64 emulators.

Fixes: aa100b66f2 ("armvirt: bump to v4.14")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-01-10 00:44:08 +01:00
Jo-Philipp Wich 7226c7850b armvirt: 64: add missing kernel config symbols
Fixes: aa100b66f2 ("armvirt: bump to v4.14")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-01-10 00:44:08 +01:00