Commit Graph

234 Commits (fbd4214bb0727268aa535af5b600d38939ec8dbc)

Author SHA1 Message Date
Felix Fietkau b0f7ea2853 kernel: unify CONFIG_GPIO_SYSFS in kernel configs
Enable it for all platforms

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 years ago
Adrian Schmutzler 0f3c3a5fb2 layerscape: harmonize device strings
OpenWrt lately has harmonized device (definition) names to the
pattern vendor_model to improve overall consistency, also with
other values like the DTS compatible.

This patch applies that scheme to the layerscape target.

Since this (intentionally) creates a bigger overlap between DTS names,
compatible, and device definition name, it also moves DEVICE_DTS and
SUPPORTED_DEVICES definitions to the Device/Default blocks.

Apart from that, it also modifies several packages to use consistent
naming in order to keep the $(1) file references working.

While at it, remove one layer of complexity for the setup in
tfa-layerscape package.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 683193cfb7 layerscape: fix indent
Fix indent to be consistent with the rest of the file.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
John Audia b6443367d8 kernel: bump 5.4 to 5.4.52
update_kernel.sh refreshed all patches, no human interaction was needed

Build system: x86_64
Run-tested: Netgear R7800 (ipq806x)

Signed-off-by: John Audia <graysky@archlinux.us>
4 years ago
Yangbo Lu 2a5460b11b layerscape: define IMAGE_SIZE and LS_SYSUPGRADE_IMAGE_SIZE
Define 64m IMAGE_SIZE for flash firmware.bin since the flash size
is 64MB. Define 48m LS_SYSUPGRADE_IMAGE_SIZE for flash sysupgrade.bin
which contains maximum 16MB kernel and 32MB rootfs according to
memory map.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years ago
Yangbo Lu 0841b68c91 layerscape: support sysupgrade for SD card ext4 rootfs
Support sysupgrade for SD card ext4 rootfs.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years ago
Yangbo Lu c4d0e57e16 layerscape: support sysupgrade for squashfs rootfs
Support sysupgrade for all Layerscape boards with squashfs
rootfs.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years ago
Yangbo Lu 3a99b624d8 layerscape: fix board name for SD card boot
Many Layerscape boards support both flash boot and SD card boot.
And different firmware and sysupgrade.bin are built for the two
boot methods. To identify them, a fix could be done on board name
by adding a postfix "-sdboot" for SD card boot.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years ago
Yangbo Lu 3a3b9ded50 layerscape: add compatible for board ls1043ardb
Backport a dts patch which added compatible for ls1043ardb.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years ago
Yangbo Lu 5ca8903631 layerscape: convert to squashfs rootfs for QSPI NOR boot
There had been an issue in Layerscape QSPI driver for very long
time, which made squashfs,jffs2 rootfs not work on QSPI NOR.
And the ubifs had been used as a workaround.
Now the issue has been fixed. So convert to use squashfs,jffs2
rootfs on QSPI NOR for Layerscape boards (LS1012ARDB/LS1046ARDB/
LS1088ARDB), and update u-boot bootargs for booting.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years ago
Hauke Mehrtens 68d9cb8214 kernel: Update kernel 5.4 to version 5.4.50
Run tested: ath79, ipq40xx
Build tested: ath79, ipq40xx

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years ago
Petr Štetiar e44e60b290 kernel: bump 5.4 to 5.4.48
Resolved merge conflict in the following patches:

 layerscape: 701-net-0213-dpaa2-eth-Add-CEETM-qdisc-support.patch
 ramips: 0013-owrt-hack-fix-mt7688-cache-issue.patch

Refreshed patches, removed upstreamed patch:

 bcm63xx: 020-v5.8-mtd-rawnand-brcmnand-fix-hamming-oob-layout.patch

Run tested: qemu-x86-64
Build tested: x86/64

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Petr Štetiar 90f930e0c2 kernel: bump 5.4 to 5.4.46
Refreshed patches.

Run tested: qemu-x86-64, wrt3200acm
Build tested: x86/64, imx6, mvebu/cortexa9, sunxi/a53

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Adrian Schmutzler 48c1fdd046 treewide: drop shebang from non-executable target files
This drops the shebang from all target files for /lib and
/etc/uci-defaults folders, as these are sourced and the shebang
is useless.

While at it, fix the executable flag on a few of these files.

This does not touch ar71xx, as this target is just used for
backporting now and applying cosmetic changes would just complicate
things.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler bb39fea11a treewide: simplify inclusion of subtarget image files
Many target use a repetitive if-include scheme for their subtarget
image files, though their names are consistent with the subtarget
names.

This patch removes these redundant conditions and just uses the
variable for the include where the target setup allows it.

For sunxi, this includes a trivial rename of the subtarget image
Makefiles.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Petr Štetiar e5aa498acb kernel: bump 5.4 to 5.4.45
Fixes CVE-2020-10757 via upstream commit df4988aa1c96 ("mm: Fix mremap
not considering huge pmd devmap").

Resolved merge conflict in the following patches:

 bcm27xx: 950-0128-gpiolib-Don-t-prevent-IRQ-usage-of-output-GPIOs.patch

Refreshed patches, removed upstreamed patch:

 generic: 751-v5.8-net-dsa-mt7530-set-CPU-port-to-fallback-mode.patch
 generic: 754-v5.7-net-dsa-mt7530-fix-roaming-from-DSA-user-ports.patch

Run tested: qemu-x86-64
Build tested: x86/64, imx6, sunxi/a53

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Yangbo Lu 4bbc0e7357 layerscape: remove support for kernel 4.14
Remove support for kernel 4.14, and NXP Layerscape SDK
had not supported kernel 4.14 since LSDK-20.04 either.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years ago
Petr Štetiar 1b2fefb244 kernel: bump 5.4 to 5.4.42
Refreshed patches, removed upstreamed patch:

 generic/pending: 001-v5.4-pinctrl-qcom-fix-wrong-write-in-update_dual_edge.patch.patch

Run tested: qemu-x86-64
Build tested: x86/64, ath79/nand, imx6, sunxi/a53

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Koen Vandeputte 0fed36dd48 kernel: bump 5.4 to 5.4.40
Refreshed all patches.

Compile-tested on: imx6
Runtime-tested on: imx6

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

Fixes:
- CVE-2020-12114
- CVE-2020-11669

Compile-tested on: pistachio
Runtime-tested on: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years ago
Yangbo Lu 70a6a98149 layerscape: define only one package for ls-dpl
We do not have to define package for each board, and
consider variant's installing.
It is easier to maintain ls-dpl with only one package
installing all 4 files as intermediate files.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years ago
Yangbo Lu 2e61c4ac1f layerscape: define only one package for ls-mc
We do not have to define package for each board, and
consider variant's installing.
It is easier to maintain ls-mc with only one package
installing all two images as intermediate files.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years ago
Yangbo Lu 6c9d8990a4 layerscape: define only one package for fman-ucode
We do not have to define package for each board, and
consider variant's installing.
It is easier to maintain fman-ucode with only one package
installing all two binaries as intermediate files.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years ago
Yangbo Lu 084c82c5b0 layerscape: define only one package for ls-rcw
We do not have to define package for each board, and
consider variant's building/installing.
It is easier to maintain ls-rcw with only one package
installing all boards RCW binaries as intermediate
files, each of which is just about hundreds of bytes.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years ago
Yangbo Lu e12ec82e44 layerscape: switch to kernel 5.4
Switch to kernel 5.4 in Makefile.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years ago
Yangbo Lu 670684d9d4 layerscape: disable UEFI runtime support in config-5.4
Disable CONFIG_EFI (UEFI runtime support) in config-5.4,
while is not required.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years ago
Yangbo Lu 7a08169dc1 layerscape: re-enable IFC NAND/NOR controllers in config-5.4
The Freescale IFC NAND/NOR controllers options were disabled
in default in previous running make kernel_oldconfig.
So re-enable them.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years ago
Yangbo Lu f3476e5be6 layerscape: refresh kernel 5.4 config
By running make kernel_oldconfig and selecting relevant options.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years ago
Yangbo Lu a812ebafa1 layerscape: copy kernel config from 4.14 to 5.4
Just copy kernel config from 4.14 to 5.4.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years ago
Yangbo Lu cddd459140 layerscape: add patches-5.4
Add patches for linux-5.4. The patches are from NXP LSDK-20.04 release
which was tagged LSDK-20.04-V5.4.
https://source.codeaurora.org/external/qoriq/qoriq-components/linux/

For boards LS1021A-IOT, and Traverse-LS1043 which are not involved in
LSDK, port the dts patches from 4.14.

The patches are sorted into the following categories:
  301-arch-xxxx
  302-dts-xxxx
  303-core-xxxx
  701-net-xxxx
  801-audio-xxxx
  802-can-xxxx
  803-clock-xxxx
  804-crypto-xxxx
  805-display-xxxx
  806-dma-xxxx
  807-gpio-xxxx
  808-i2c-xxxx
  809-jailhouse-xxxx
  810-keys-xxxx
  811-kvm-xxxx
  812-pcie-xxxx
  813-pm-xxxx
  814-qe-xxxx
  815-sata-xxxx
  816-sdhc-xxxx
  817-spi-xxxx
  818-thermal-xxxx
  819-uart-xxxx
  820-usb-xxxx
  821-vfio-xxxx

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years ago
Koen Vandeputte e31d158c4d kernel: bump 4.14 to 4.14.176
Refreshed all patches.

Remove upstreamed:
- 0001-net-thunderx-workaround-BGX-TX-Underflow-issue.patch
- 600-ipv6-addrconf-call-ipv6_mc_up-for-non-Ethernet-inter.patch
- 184-USB-serial-option-add-Wistron-Neweb-D19Q1.patch

Fixes:
- CVE-2020-8648 (potentially)
- CVE-2020-8647
- CVE-2020-8649

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years ago
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>
4 years ago
Sungbo Eo 6508766d24 kernel: make kmod-i2c-mux selected by dependent modules
Currently kmod-i2c-mux-* will not get into images unless kmod-i2c-mux is added
to DEVICE_PACKAGES as well. By changing the dependencies from "depends on" to
"select", we do not have the issue anymore.

Furthermore, we can remove most occurrences of the package from DEVICE_PACKAGES
and similar variables, as it is now pulled by dependent modules such as:
- kmod-i2c-mux-pca954x

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years ago
Sungbo Eo 4caaa778f7 kernel: make kmod-i2c-core selected by dependent modules
Currently kmod-i2c-* will not get into images unless kmod-i2c-core is added to
DEVICE_PACKAGES as well. By changing the dependencies from "depends on" to
"select", we do not have the issue anymore.

Furthermore, we can remove most occurrences of the package from DEVICE_PACKAGES
and similar variables, as it is now pulled by dependent modules such as:
- kmod-hwmon-lm75
- kmod-i2c-gpio
- kmod-i2c-gpio-custom
- kmod-i2c-mux
- kmod-i2c-ralink

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
[do not touch ar71xx]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Sungbo Eo dffbe668ab layerscape: add kmod-i2c-mux to DEVICE_PACKAGES for traverse-ls1043
kmod-i2c-mux-pca954x will not get into images unless kmod-i2c-mux is added to
DEVICE_PACKAGES as well.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years ago
Tomasz Maciej Nowak 382b157275 layerscape: sysupgrade: require metadata
Require the image metadata check so no invalid image could be fed to
sysupgrade without force option.

Cc: Mathew McBride <matt@traverse.com.au>
Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
4 years ago
Tomasz Maciej Nowak 295e110f87 layerscape: ls10121frdm: add sysupgrade
Instead of dangerous rewriting full chip with firmware.bin image to
update OpenWrt, add sysupgrade image. This image will be used to update
kernel and rootfs, leaving bootloader intact and making recovery
possible, without resorting to external hardware tools.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
4 years ago
Tomasz Maciej Nowak 5031fbfd22 layerscape: ls1012afrdm: introduce dynamic partitioning
Combine fixed sizes of "kernel" and "rootfs" partitions into one
partition managed by OpenWrt splitter, it will allow better management
of chip capacity and less maintenance burden when compiled kernel image
will outgrow allocated size for kernel partition. This also changes kernel
image format, since splitter only manages kernel and rootfs partitions,
the dtb needs to be updated with the kernel, so for convenience, kernel is
packed to FIT image.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
4 years ago
Tomasz Maciej Nowak 63f5268c7f layerscape: ls1012afrdm: convert image to squashfs
This commit replaces UBIFS root partition with squashfs+overlay. It's
preparation for introducing dynamic partitioning.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
4 years ago
Tomasz Maciej Nowak fef2114b31 layerscape: ls1012afrdm: add uncompressed initramfs
Uncompressing of initramfs image fails on board with U-Boot from "QorIQ
SDK (FSL Reference Distro) 2.0".

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
4 years ago
Tomasz Maciej Nowak 3a3d998c12 layerscape: resurrect support for FRDM-LS1012A
Re-add support for NXP FRDM-LS1012A, which mimics the flash layout of the
rest boards supported by LSDK.

0x000000000000-0x000000100000 : "bl2"
0x000000100000-0x000000500000 : "fip"
0x000000500000-0x000000600000 : "u-boot-env"
0x000000600000-0x000000a00000 : "reserved-1"
0x000000a00000-0x000000d00000 : "pfe"
0x000000d00000-0x000000f00000 : "reserved-2"
0x000000f00000-0x000001000000 : "dtb"
0x000001000000-0x000002000000 : "kernel"
0x000002000000-0x000004000000 : "ubifs"

Specification
SoC: LS1012A single core 800MHz
RAM: 512 MB DDR3
Flash: 64 MB QSPI NOR
Ethernet: 2x 10/100/1000 Mbps
Connectors: µUSB 3.0 OTG
            µUSB 2.0 (debugging & power input)
            2x 3.5mm jack for microphone & headphone (SGTL5000)
            Arduino Shield expansion with I2C, SPI, UART, and GPIO
            JTAG
LEDS: 3x (non-configurable)
Buttons: 1x (reset, non-configurable)

Be advised that erasing or writing 64MB flash takes some time to finish.
Do not reset the board until all operations end with success, otherwise
You'll need external tools to re-program the flash chip.

Installation
Follow the QSPI programing procedure for LS1012AFRWY board in
target/linux/layerscape/README, point 3.3.
Don't forget about updating U-Boot environment with MAC addresses of
ethernet interfaces, variable 'ethaddr' for eth0 and 'eth1addr' for eth1.

As the LSDK images do not support sysupgrade, nor do changes in this
commit, it's planed in upcoming submissions.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
4 years ago
Koen Vandeputte f4bea1b6a3 kernel: bump 4.14 to 4.14.171
Refreshed all patches.

Fixes:
- CVE-2013-1798

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years ago
Koen Vandeputte 1b310cff0f kernel: bump 4.14 to 4.14.169
Refreshed all patches.

Fixes:
- CVE-2019-14896
- CVE-2019-14897

Remove upstreamed:
- 023-0007-crypto-crypto4xx-Fix-wrong-ppc4xx_trng_probe-ppc4xx_.patch
- 001-4.22-01-MIPS-BCM63XX-drop-unused-and-broken-DSP-platform-dev.patch

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

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

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

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

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years ago
Hauke Mehrtens 1bb90a28e4 kernel: bump 4.14 to 4.14.162
Refreshed all patches.

Compile-tested on: ramips
Runtime-tested on: ramips

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years ago
Hauke Mehrtens 9a417fbd0d kernel: bump 4.14 to 4.14.161
Refreshed all patches.

Compile-tested on: ipq40xx, ramips
Runtime-tested on: ipq40xx

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years ago
Rosen Penev 2b2985fe6b layerscape: gen_sdcard_head_img.sh: switch to /bin/sh
Nothing here needs bash.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
[add prefix to commit title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Hauke Mehrtens 25b422a041 kernel: bump 4.14 to 4.14.160
Refreshed all patches.

Compile-tested on: ipq40xx, apm821xx
Runtime-tested on: ipq40xx

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years ago
Koen Vandeputte 7604e53d5f kernel: bump 4.14 to 4.14.159
Refreshed all patches.

Remove upstreamed:
- 302-0002-dmaengine-dw-implement-per-channel-protection-contro.patch

Fixes:
- CVE-2019-19332

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years ago