Commit Graph

758 Commits (d3c0a944059bb0d45c3b56278249100258378b0c)

Author SHA1 Message Date
Koen Vandeputte e115fa478f kernel: bump 4.19 to 4.19.90
Refreshed all patches.

Remove upstreamed:
- 010-dmaengine-dw-dmac-implement-dma-prot.patch
- 950-0148-Increase-firmware-call-buffer-size-to-48-bytes.patch
- 950-0206-Mailbox-firmware-calls-now-use-kmalloc-2749.patch
- 402-leds-trigger-netdev-fix-handling-on-interface-rename.patch

Fixes:
- CVE-2019-19332

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
[Add 010-dt-bindings-dmaengine-dw-dmac-add-protection-control.patch]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years ago
John Sommerville 6041eb9547 build: build proper VMDK formats for ESXI 6.5
VMWare ESXI 6.5 and above is not compatible with
subformat=monolithicSparse (The default qemu-img convert -O VMDK option).
Monolithic Sparse vmdk can be imported, but issues occur when running
sysupgrade with new images and other tasks that modify the file system
(issues like Kernel panics, reboot loops, sometimes crashing the Host ESXI
box).

This change creates an additional VMDK output file for ESXI that sets the
subformat to monlithicFlat, and the adapter_type to the SCSI lsilogic
controller.

This change existed back on:
25e36d379e

But it looks like the change was removed when refactoring occurred with:
5f6a2732f892b6229473576d89cc963ae9c97d5d

Signed-off-by: John Sommerville <jsommerville@untangle.com>
4 years ago
Koen Vandeputte 7533087565 kernel: bump 4.19 to 4.19.84
Refreshed all patches.

Altered patches:
- 950-0748-net-bcmgenet-Workaround-for-Pi-4B-network-issue.patch
- 950-0754-Revert-net-bcmgenet-Workaround-for-Pi-4B-network-iss.patch
- 902-debloat_proc.patch

Remove upstreamed:
- 150-MIPS-bmips-mark-exception-vectors-as-char-arrays.patch

New symbols:
X86_INTEL_MPX
X86_INTEL_MEMORY_PROTECTION_KEYS
X86_INTEL_TSX_MODE_OFF
X86_INTEL_TSX_MODE_ON
X86_INTEL_TSX_MODE_AUTO

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte d6aea46a50 kernel: bump 4.14 to 4.14.154
Refreshed all patches.

Altered patches:
- 902-debloat_proc.patch
- 040-dmaengine-qcom-bam-Process-multiple-pending-descript.patch
- 807-usb-support-layerscape.patch
- 809-flexcan-support-layerscape.patch
- 816-pcie-support-layerscape.patch

Remove upstreamed:
- 150-MIPS-bmips-mark-exception-vectors-as-char-arrays.patch
- 303-spi-nor-enable-4B-opcodes-for-mx66l51235l.patch

New symbols:
X86_INTEL_MPX
X86_INTEL_MEMORY_PROTECTION_KEYS
X86_INTEL_TSX_MODE_OFF
X86_INTEL_TSX_MODE_ON
X86_INTEL_TSX_MODE_AUTO
SGL_ALLOC

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Paul Spooren e97113d5e1 x86,tegra,mvebu: image: use common reproducible IMG_PART_SIGNATURE
These targets are currently using more or less same SIGNATURE variable
which provides unique partition ID/signature, so it makes sense to
refactor it out into common IMG_PART_SIGNATURE variable which could be
reused by all targets.

This is another step in the direction of reproducible OpenWrt images.

Signed-off-by: Paul Spooren <mail@aparcar.org>
[split into separate commit, renamed to IMG_PART_SIGNATURE]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Adrian Schmutzler a5428d8c9b x86: delete empty Makefile introduced by accident
When changing profile titles for this target, an empty Makefile
has been added by accident.

Fixes: 14d17306bc ("x86: make profile titles more verbose")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Paul Spooren 14d17306bc x86: make profile titles more verbose
So far (nearly) all x86 profiles are called "Generic" which makes
it hard to distinguish them in special cases, like searching for a
specific profile (without pre-selecting target/subtarget).

To make this change locally working, remove the tmp/ folder to
force reload of menuconfig.

As these files are infrequently touched, the Copyright was updated
as well.

Signed-off-by: Paul Spooren <mail@aparcar.org>
[changed commit title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Rafał Miłecki 641f6b6c26 treewide: use new procd sysupgrade $UPGRADE_BACKUP variable
It's a variable set by procd that should replace hardcoded
/tmp/sysupgrade.tgz.

This change requires the most recent procd with the commit 0f3c136
("sysupgrade: set UPGRADE_BACKUP env variable").

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years ago
Rafał Miłecki 62dbe361a1 treewide: when copying a backup file always specify dest name
$CONF_TAR shouldn't be assumed to always point to the sysupgrade.tgz.
This change makes code more generic and allows refactoring $CONF_TAR.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years ago
Rafał Miłecki bf39047872 treewide: don't hardcode "sysupgrade.tgz" file name
1) Add BACKUP_FILE and use it when copying an archive to be restored
   after sysupgrade (on the next preinit).
2) Use CONF_TAR for copying backup prepared by the /sbin/sysupgrade

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years ago
Koen Vandeputte 491eaa898b kernel: bump 4.19 to 4.19.67
Refreshed all patches.

Also add a missing symbol for x86 which got used now in this bump.
- ISCSI_IBFT

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 5f013de786 kernel: bump 4.14 to 4.14.139
Refreshed all patches.

Also add a missing symbol for x86 which got used now in this bump.
- ISCSI_IBFT

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Rafał Miłecki b6f4cd57e1 treewide: sysupgrade: pass "save_partitions" option to the "sysupgrade" method
This explicitly lets stage2 know if partitions should be preserved. No
more "touch /tmp/sysupgrade.always.overwrite.bootdisk.partmap" hack.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years ago
Florian Eckert 33411ee919 target/x86/image: use qemu-img from STAGING_DIR_HOST
The host tool package qemu is build for the target x86. The installed tool
qemu-img is needed to build vdi or vmdk images. In the image Makefile we
use however the host installed qemu-img command and not the tool from the
buildsystem. This commit force to use the already build qemu-img command
from the openwrt toolchain.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
5 years ago
Alberto Bursi bb27cde257 x86: add modern network modules to Generic target
Many Atom-based embedded/industrial x86 boards can't run 64bit operating
systems due to either processor or board firmware limitations, but they
have modern interfaces (PCIe) or have modern Intel gigabit controllers
onboard.  With the current default package selection for x86 Generic
target their network won't work.

Add the modern gigabit network modules needed or most likely going to be
used as add-in cards, similar to what is the list on x86_64 target.

Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
[fixed whitespace issue]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Lucian Cristian 483b9a92b3 kernel: x86: enable NVME support for 64 bit target
Newer motherboards support NVMe U.2 connectors but also NVMe storage can
be used on add-on pcie adapters.
Enable kernel driver on x86 for now so the NVMe flash storage can be used

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
5 years ago
Petr Štetiar 5816caad26 x86: fix missing led variable warning during boot
Fixes following warning during the boot:

 WARNING: Variable 'led' does not exist or is not an array/object

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Petr Štetiar a17d9482f5 x86: image: fix small disk space in squashfs overlay
Current squashfs snapshot images are improperly padded by just 128k,
which doesn't correspond with TARGET_ROOTFS_PARTSIZE=128 default config
option, leading to following:

 Filesystem                Size      Used Available Use% Mounted on
 /dev/root                 2.5M      2.5M         0 100% /rom
 /dev/loop0               85.0K      9.0K     71.0K  11% /overlay
 overlayfs:/overlay       85.0K      9.0K     71.0K  11% /

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Petr Štetiar 438a2c5f4a rb532,x86: image: use new IMG_COMBINED and IMG_ROOTFS vars
In `build: image: Add IMG_ROOTFS and IMG_COMBINED variables` we've added
this new variables so switch to them now.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Petr Štetiar 2109156b79 x86: image: remove TARGET_IMAGES_PAD option and force padding
Currently we're producing unusable x86 combined squashfs images
(18.06.1, 18.06.2 and snapshots) as we don't enable TARGET_IMAGES_PAD,
thus providing very small space for the overlay filesystem, leading to
the following with OpenWrt 18.06.1 r7258-5eb055306f images on x86 QEMU:

 root@(none):/# mount | egrep 'root|overlay'
  /dev/root on /rom type squashfs
  /dev/loop0 on /overlay type ext4
  overlayfs:/overlay on / type overlay

 root@(none):/# df -h | egrep 'root|overlay|Size'
  Filesystem                Size      Used Available Use% Mounted on
  /dev/root                 2.5M      2.5M         0 100% /rom
  /dev/loop0              113.0K      8.0K     97.0K   8% /overlay
  overlayfs:/overlay      113.0K      8.0K     97.0K   8% /

We should rather ensure proper image padding in image generation code
and we shouldn't rely on config options in order to generate usable
images.

So this patch removes TARGET_IMAGES_PAD config option and enforces
padding on combined images.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Petko Bordjukov 1e2e5c66ed kernel: package Broadcom BNX2X driver
bnx2x driver support for the x86 architecture. Includes module and
firmware for Broadcom QLogic 5771x/578xx 10/20-Gigabit ethernet
adapters.

Signed-off-by: Petko Bordjukov <bordjukov@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
[added +kmod-lib-zlib-inflate as well]
5 years ago
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>
5 years ago
Alexander Couzens c4abaa345c
Revert "base-files: add console to inittab"
This reverts commit cde52cb486.
When using OpenWrt in qemu, the shell is unsuable

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
5 years ago
Paul Spooren cde52cb486
base-files: add console to inittab
When running OpenWrt inside an LXC container no shell is opend as LXC
defaults to a virtual /dev/console.

This patch allows to enter a shell after starting the container via
`lxc-start`, without it is only posible to access a shell on tty1 via
`lxc-console`.

Signed-off-by: Paul Spooren <mail@aparcar.org>
5 years ago
Koen Vandeputte 8eb7cf0cd7 kernel: bump 4.19 to 4.19.44
Refreshed all patches.

Remove upstreamed:
- 103-MIPS-perf-ath79-Fix-perfcount-IRQ-assignment.patch

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte f442b306f9 kernel: bump 4.14 to 4.14.120
Refreshed all patches.

Remove upstreamed:
- 103-MIPS-perf-ath79-Fix-perfcount-IRQ-assignment.patch
- 060-fix-oxnas-rps-dt-match.patch

Altered patches:
- 0067-generic-Mangle-bootloader-s-kernel-arguments.patch
- 006-mvebu-Mangle-bootloader-s-kernel-arguments.patch
- 996-generic-Mangle-bootloader-s-kernel-arguments.patch

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Hauke Mehrtens 2164a7bf15 x86: Activate CONFIG_X86_SMAP
This activates "Supervisor Mode Access Prevention". modern CPUs will
prevent the kernel code from accessing any data from the userspace
without the usage of copy_to_user() or copy_from_user()

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens 75eb8a146d kernel: Deactivate CONFIG_BINFMT_MISC
CONFIG_BINFMT_MISC allows it to add support for new executable formats
to the kernel from user space, the kernel will then detect for example a
java binary and call the java execution program automatically. I am not
aware that this feature is used in OpenWrt and this could be used to
exploit something. Deactivate it for all targets for now.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Felix Fietkau 85017c40f4 build: add a config option for enabling a testing version of the target kernel
If the target supports a newer kernel version that is not used by default
yet, it can be enabled with this option

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years ago
Lucian Cristian e711fd48be x86: video: disable buildtin amdgpu DRM driver
Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
5 years ago
Lucian Cristian cb3798cf3f x86: DRM: add x64 subtarget support
copy settings from generic subtarget

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
5 years ago
Lucian Cristian edb21ee3d2 x86: video: disable builtin radeon DRM driver
builtin driver can't access the /lib/firmware while booting,
module driver will be able to read and load the firmware files

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
5 years ago
Tomasz Maciej Nowak 55b808e0c4 x86: image: add test module to bootloader
It was previously added in 546fced, which was part of "intel-microcode:
load as early as possible" series.
Unfortunately the conditionals added to GRUB config caused error on boot,
because on sysupgrade, bootloader is not updated and is left with old
features/modules. Since this module is needed for early microcode load
and transition to this needs to be done step by step, enable the test
module now, so that every newly created image has it already embedded.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
5 years ago
Tomasz Maciej Nowak bb0e4f9fb0 build: remove leftovers from previous x86 commits
VBoxManage is not used and the image is created with proper permisions:
0f5d0f6  image: use internal qemu-img for vmdk and vdi images drop host
         dependencies on qemu-utils and VirtualBox

Unreachable config symbols:
9e0759e  x86: merge all geode based subtargets into one

No need to define those symbols since x86_64 is subtarget of x86:
196fb76  x86: make x86_64 a subtarget instead of a standalone target

Unreachable config symbols, so remove GRUB_ROOT:
371b382  x86: remove the xen_domu subtarget

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
5 years ago
Hauke Mehrtens 75fdf3ba01 x86: Add support for kernel 4.19
This adds initial support for kernel 4.19 to the x86 target.
The patches and the kernel configurations were copied from kernel 4.14
and then refreshed.

The legacy and the genode target will not support PAE any more because
they use a CPU type which does not support PAE, the generic sub target
still supports PAE.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens f6e0ecdceb x86: Refresh kernel 4.14 configuration
This refreshes the kernel configuration for kernel 4.14.
First this was run for the legacy target:
	make kernel_oldconfig
Then for all targets including the legacy target this was run:
	make kernel_oldconfig CONFIG_TARGET=subtarget
The option CONFIG_104_QUAD_8 was added to the generic configuration
because it would have been automatically removed.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens 0ea7160abe x86: Use kernel specific subtarget configurations
This makes it possible to use different sub target configurations for
kernel 4.19 for example.
To support kernel 4.9 and kernel 4.14 with the same configuration file
already needed some extra work this will not be needed for kernel 4.19
any more.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Alberto Bursi 9c4f903999 x86: enable kmod-bnx2 on 64-bit by default
Gigabit ethernet adapters using BCM5706/5708/5709/5716 chipset are
common on servers and as easy/cheap to get as Intel based ones.

Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
5 years ago
Tomasz Maciej Nowak c288ad9c2b x86: make sysupgrade.tgz reachable again
Moving binding mount before check for saved sysupgrade configuration
made it unreachable. Fix it by moving binding mount after the check.

Fixes: f78b2616 (x86: mount writable bootfs)
Reported-by: Lucian Cristian <luci@powerneth.ro>
Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
6 years ago
John Crispin c6aa4f53e8 Revert "x86: add intel microcode entries to grub config"
This reverts commit 546fced2a2.

Signed-off-by: John Crispin <john@phrozen.org>
6 years ago
John Crispin 8ead5a735d Revert "x86: add amd microcode entries to grub config"
This reverts commit a822283c7e.

Signed-off-by: John Crispin <john@phrozen.org>
6 years ago
Tomasz Maciej Nowak a822283c7e x86: add amd microcode entries to grub config
Create initrd enries for x86 images, that'll load amd microcode as early
as possible. Also remove the preinit script responsible for late load of
microcode.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
6 years ago
Tomasz Maciej Nowak 546fced2a2 x86: add intel microcode entries to grub config
Create initrd enries for x86 images, that'll load intel microcode as
early as possible. To achieve that the test module for grub is enabled
which provides shell-like conditionals. Also restrict the late load of
microcode to AMD processors.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
6 years ago
Tomasz Maciej Nowak 51e199fbe8 x86: add packages files to image bootfs
Add files to bootfs image from selected as built-in packages, which want
to install files to targets boot file system.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
6 years ago
Tomasz Maciej Nowak f78b261637 x86: mount writable bootfs
Mount boot file system with rw option to allow installation of packages
which install files to /boot directory.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
6 years ago
Mathias Kresin 80c61c161a treewide: use wpad-basic for not small flash targets
Add out of the box support for 802.11r and 802.11w to all targets not
suffering from small flash.

Signed-off-by: Mathias Kresin <dev@kresin.me>

Mathias did all the heavy lifting on this, but I'm the one who should
get shouted at for committing.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
6 years ago
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>
6 years ago
Felix Fietkau 1e8882585c kernel: support gcc-optimized inlining on all architectures
Optimized inlining was disabled by default when gcc 4 was still
relatively new. By now, all gcc versions handle this well and there
seems to be no real reason to keep it x86-only.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau 911cacfc35 x86: remove linux 4.9 support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Hauke Mehrtens 0f2787b9ff x86: geode: Add missing config options
This adds a configuration options which is needed now.
Without this patch the geode build will fail.

Fixes: 4eda2fddf2 ("x86/geode: enable X86_INTEL_LPSS to select PINCTRL")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 years ago