Commit Graph

308 Commits (d3c0a944059bb0d45c3b56278249100258378b0c)

Author SHA1 Message Date
Hauke Mehrtens 729d7bc751 kernel: Deactivate CONFIG_SFP in generic config
Deactivate CONFIG_SFP for kernel 4.19 in the generic configuration.
The CONFIG_SFP configuration option was not set to anything in the
ath79 build for me, set it to deactivated by default.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years ago
Yousong Zhou c163604b7f imx6: install-dtb as separate IMAGE
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
5 years ago
Moritz Warning c546855188
imx6: split up DEVICE_TITLE
DEVICE_TITLE is split up into DEVICE_VENDOR, DEVICE_MODEL and DEVICE_VARIANT

Signed-off-by: Moritz Warning <moritzwarning@web.de>
5 years ago
Rafał Miłecki a858db3136 treewide: sysupgrade: use $UPGRADE_BACKUP to check for backup
Now that $UPGRADE_BACKUP is set conditionally there is no need to check
the $UPGRADE_OPT_SAVE_CONFIG anymore. All conditions can be simplified.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
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
Rafał Miłecki 5797fe84a3 treewide: replace remaining (not working now) $SAVE_CONFIG uses
This var has been replaced by the $UPGRADE_OPT_UPGRADE_OPT_SAVE_CONFIG

Fixes: b534ba9611 ("base-files: pass "save_config" option to the "sysupgrade" method")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years ago
Koen Vandeputte 27df621505 imx6: bump SDMA firmware to 3.5
- add uart rom script address in header of sdma firmware to support
  the uart driver of latest kernel working well while old firmware
  assume ram script used for uart driver as NXP internal legacy
  kernel.
- add multi-fifo SAI/PDM scripts.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Petr Štetiar 0711b515f6 imx6: apalis: add missing jffs2reset to ramfs during sysupgrade
jffs2reset is used to cleanup the rootfs_data overlay, but it's
currently missing in the ramfs during sysupgrade leading to the
following error:

 Switching to ramdisk...
 Performing system upgrade...
 /lib/upgrade/do_stage2: line 27: jffs2reset: not found

Fixes: 2f1a11d008 ("imx6: apalis: fix config survival after sysupgrade -n")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Petr Štetiar 5e9a6d08d2 imx6: apalis: fix sysupgrade paths
We can't use $board_name in sysupgrade paths for kernel and rootfs as we
currently generate one image which could be used on two different base
boards.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
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
Petr Štetiar 2f1a11d008 imx6: apalis: fix config survival after sysupgrade -n
This patch fixes `sysupgrade -n` when flashed with rootfs of the same
size as currently running, so the rootfs_data wouldn't get destroyed and
thus survive reboot. So let's fix it by always cleaning up the content
of the rootfs_data during sysupgrade.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Hauke Mehrtens 9ab4d74b5f kernel: Move some DSA config options to generic config
This moves some new configuration options to the generic kernel
configuration instead of configuring them for each target on our own.

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
Koen Vandeputte 022dfdc41c kernel: bump 4.19 to 4.19.35
Refreshed all patches.

Fixes:
- CVE-2019-3887

New symbol:
- CONFIG_LDISC_AUTOLOAD

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte fa8d5ad21b imx6: bump sdma firmware to 3.4
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Petr Štetiar d23222a96c imx6: Add support for Toradex Apalis family of CoMs
This patch adds support for the following computer on modules (CoM) from
Toradex[A]:

 Apalis iMX6 Quad 2GB IT - i.MX 6Quad 800MHz, 2GB DDR3, 4GB eMMC
                                             -40° to +85° C Temp
 Apalis iMX6 Quad 1GB    - i.MX 6Quad 1GHz,   1GB DDR3, 4GB eMMC
                                               0° to +70° C Temp
 Apalis iMX6 Dual 1GB IT - i.MX 6Dual 800MHz, 1GB DDR3, 4GB eMMC
                                             -40° to +85° C Temp
 Apalis iMX6 Dual 512MB  - i.MX 6Dual 1GHz, 512MB DDR3, 4GB eMMC
                                               0° to +70° C Temp

I've developed and tested it on Quad 2GB IT v1.1A and Dual 512MB v1.1A
CoMs, using Ixora[B] carrier board v1.0A, but it should hopefuly work on
Eval[C] board as well.

A. https://www.toradex.com/computer-on-modules/apalis-arm-family/nxp-freescale-imx-6
B. https://www.toradex.com/products/carrier-board/ixora-carrier-board
C. https://www.toradex.com/products/carrier-board/apalis-evaluation-board

Flashing/recovery instructions:

 1. Download and compile imx_loader for OpenWrt from
    https://github.com/ynezz/imx_loader

 2. Enter recovery mode as desribed in
    https://developer.toradex.com/knowledge-base/imx-recovery-mode

 3. Connect board via USB to the host computer, check that it's connected
    by lsusb:

    15a2:0054 Freescale Semiconductor, Inc. i.MX 6Dual/6Quad SystemOnChip
              in RecoveryMode

 4. Copy following OpenWrt images to imx_loader directory:
         SPL
         u-boot.img
         u-boot-with-spl.imx
         openwrt-imx6-apalis-recovery.scr
         openwrt-imx6-apalis-squashfs.combined.bin

 5. Run imx_usb in imx_loader directory

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Petr Štetiar dc1a73984e imx6: image: Split imx6-sdcard image for reusability
I'm going to reuse the imx6-sdcard image commands for building of Apalis
eMMC images.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Koen Vandeputte 9c63141025 imx6: fix legacy IRQ support (4.19)
The PCIe DWC host controller is now using MSI
(Message-signaled-interrupts) by default.

While ath9k itself does support MSI here, a lot of wlan adapters do not.
Avoid non-functioning cards by simply continue to disable MSI for now.

This can be done by appending "pci=nomsi" to the boot cmdline.

Also an extra fix needs to be backported which avoids MSI initialization
which prevented legacy IRQ's init from taking over.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte f7a057871b imx6: enable PCIe (4.19)
The DWC host controller symbols are now depending on a few others

Fixes: ca1b93f038 ("imx6: add support for kernel 4.19")
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 8877fdbf02 imx6: enable crypto acceleration (4.19)
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 74f3cc04cd imx6: enable crypto acceleration
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte d24bac0a95 imx6: refresh kernel configs
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Yangbo Lu 5d11672d07 kernel: disable CONFIG_USB_IMX21_HCD in default for kernel 4.14
CONFIG_USB_IMX21_HCD should be handled in generic config and
module package. So moved it into generic config.
This also fixed build issue (kernel config question) of layerscape
armv8_32b since it also used ARCH_MXC.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
[Deactivate CONFIG_USB_IMX21_HCD also for kernel 4.19]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Koen Vandeputte ca1b93f038 imx6: add support for kernel 4.19
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Petr Štetiar 82b34c1f60 imx6: image: ventana: Add missing BOOT_SCRIPT variable
This is probably theoretical problem as the Ventana is defined first in
the image Makefile, but once the position of the definition would change
in the future (alphabetical sorting?) it would get bootscript from the
previous board which would have BOOT_SCRIPT set.

Cc: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
6 years ago
Koen Vandeputte 74738c4b80 imx6: fix DMA transaction errors
Following errors were seen in the past on imx6 when using serial:

[ 22.617622] imx-uart 2020000.serial: DMA transaction error.
[ 22.623228] imx-uart 2020000.serial: DMA transaction error.
[ 22.628826] imx-uart 2020000.serial: DMA transaction error.
[ 22.648951] imx-uart 2020000.serial: DMA transaction error.
[ 22.654558] imx-uart 2020000.serial: DMA transaction error.
[ 22.660156] imx-uart 2020000.serial: DMA transaction error.

Which is the reason why DMA for the serial ports
got disabled in commits:

efb362cd93 ("imx6: disable dma on uart")
3b4241071d ("imx6: disable UART dma")

As indicated on mailinglist discussion, the cause seems to be
the usage of very old SDMA firmware which is present in the soc:

[    0.624302] imx-sdma 20ec000.sdma: Direct firmware load for imx/sdma/sdma-imx6q.bin failed with error -2
[    0.624318] imx-sdma 20ec000.sdma: Falling back to user helper
[   64.531607] imx-sdma 20ec000.sdma: external firmware not found, using ROM firmware

This patch adds the new firmware binary. (2196 bytes)

It is required to embed the binary into the kernel image, as it
gets loaded very early in the boot process where the rootfs is not
available yet:

[    0.622966] imx-sdma 20ec000.sdma: loaded firmware 3.3

Extended testing shows that the DMA errors are not seen anymore
when using this newer firmware version.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
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>
6 years ago
Felix Fietkau 36c6ba3735 imx6: use BUILD_DEVICES in uboot-imx6 for mx6cuboxi
Fixes build with the default profile

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau b9f926e151 imx6: rename Generic profile to Default, fixes u-boot image build issue
u-boot.mk checks for the Default profile to build images for all targets.
This brings the target default profile in sync with other targets

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau ded905ce43 imx6: extend cubox support to hummingboard, add support for building full images
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau 8c41f1f81c imx6: enable f2fs and loopback support in preparation for squashfs with overlay support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Vladimir Vid 6cda4f6861 imx6: Initial support for SolidRun CuBox-i devices based on i.MX6 processors (i1, i2, i2eX, and i4Pro).
- Specifications -

CuBox i1:
- SoC: i.MX6 Solo
- Cores: 1
- Memory Size: 512MB
- GPU: GC880
- Wifi/Bluetooth: Optional
- USB 2.0 ports: 2
- Ethernet: 10/100/1000 Mbps

CuBox i2 | i2eX:
- SoC: i.MX6 Dual Lite
- Cores: 2
- Memory Size: 1GB
- GPU: GC2000
- Wifi/Bluetooth: Optional
- USB 2.0 ports: 2
- Ethernet: 10/100/1000 Mbps

CuBox i4Pro | i4x4:
- SoC: i.MX6 Quad
- Cores: 4
- Memory Size: 2/4 GB
- GPU: GC2000
- Wifi/Bluetooth: Build In
- USB 2.0 ports: 2
- Ethernet: 10/100/1000 Mbps

Built-in u-boot requires SPL (secondary program loader) to be present on the SD-card regardless of the image type which will be loaded.
SPL is generated by the u-boot-mx6cuboxi package which is preselected by the target device and can be found in bin/u-boot-mx6cuboxi directory.

Flashing the SPL:
dd if=/dev/zero of=/dev/mmcblk0 bs=1M count=4
dd if=bin/targets/imx6/generic/u-boot-mx6cuboxi/SPL of=/dev/mmcblk0 bs=1K seek=1

Preparing the firmware on the SD-card:
(echo o; echo n; echo p; echo 1; echo ''; echo ''; echo w) | fdisk /dev/mmcblk0
mkfs.ext4 /dev/mmcblk0p1
mount /dev/mmcblk0p1 /mnt
tar -xzf bin/targets/imx6/generic/openwrt-imx6-device-cubox-i-rootfs.tar.gz -C /mnt/
mkdir -p /mnt/boot
cp bin/targets/imx6/generic/{*-uImage,*.dtb,*.scr} /mnt/boot/

Generated u-boot.img needs to be placed on the first partition:
cp bin/targets/imx6/generic/u-boot-mx6cuboxi/u-boot.img /mnt/

To boot from the SD card:

Boot script which sets mmc/dtb parameters and boots the board is automatically sourced.
If this does not work for any reason:
mmc dev 0; load mmc 0:1 $scriptaddr boot/boot.scr; source $scriptaddr

Currently imx6dl-cubox-i.dtb (Dual Lite) and imx6q-cubox-i.dtb (Quad) device trees are available.

Tested on i4Pro, MMC, USB (+ HiD), HDMI and ethernet ports are working.
Wireless and bluetooth are broken ATM. According to SolidRun forums, BCM4329/BCM4330 firmware is used which works fine on older kernels.

Signed-off-by: Vladimir Vid <vladimir.vid@sartura.hr>
6 years ago
Sergey Ryazanov 67a3cdcbb0 kernel: enable THIN_ARCHIVES by default
THIN_ARCHIVES option is enabled by default in the kernel configuration
and no one target config disables it. So enable it by default and remove
this symbol from target specific configs to keep them light.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
6 years ago
Sergey Ryazanov bdc2b58c4b kernel: enable FUTEX_PI by default
New FUTEX_PI configuration symbol enabled if FUTEX and RT_MUTEX symbols
are enabled. Both of these symbols are enabled by default in the
generic config, so enable FUTEX_PI by default too to keep platform
specific configs minimal.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
6 years ago
Sergey Ryazanov a08b0d0c31 kernel: enable EXPORTFS by default
OVERLAY_FS config symbol selects EXPORTFS since 4.12 kernel, we have
OVERLAY_FS enabled by default, so enable EXPORTFS in the generic config
of 4.14 and remove this option from platform specific configs.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
6 years ago
Sergey Ryazanov 978543a246 kernel: disable DRM_LIB_RANDOM by default
DRM_LIB_RANDOM config symbol selected only by DRM_DEBUG_MM_SELFTEST
which is disable by default, so disable DRM_LIB_RANDOM by default too.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
6 years ago
Sergey Ryazanov ead26e9db6 kernel: disable DMA_{NOOP|VIRT}_OPS by default
These options do not used by any supported arch, so disable them by
default to make arch configs a bit more clean.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
6 years ago
Sergey Ryazanov f928c338ad kernel: disable ARCH_WANTS_THP_SWAP by default
Only one arch (x86_64) enables this option. So disable
ARCH_WANTS_THP_SWAP by default and remove referencies to it from all
configs (except x86_64) to make them clean.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
6 years ago
Hauke Mehrtens 6734ffb851 kernel: generic: Move config option to generic
This is deactivated in all targets using the DSA switch driver with
kernel 4.14.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 years ago
Koen Vandeputte efb362cd93 imx6: disable dma on uart
When this target got updated to 4.14, this patch got removed to
re-evaluate if it was still needed.

Extensive testing now shows this issue is still present.
Let's re-add the patch to fix it for now.

As the uart bus is very low bandwidth .. performance impact is negligible.

Boot log:

[   22.513051] imx-uart 2020000.serial: DMA transaction error.
[   22.522721] imx-uart 2020000.serial: DMA transaction error.

As a sidenote:
The patch mentiones an issue with RS485, but the bootlog
errors above were recorded with the uart ports in standard RS232 mode.

Compile/Run-tested on imx6/GW5200

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Tim Harvey 1188f35a98 imx6: remove support for 4.9
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Tim Harvey 8f9668f46c imx6: switch to Linux 4.14
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Tim Harvey 3b2708f09c imx6: add support for Linux 4.14
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Mathias Kresin 188328111b treewide: move nand_do_upgrade call to platform_do_upgrade
Calling nand_do_upgrade() from platform_pre_upgrade() was deprecated
with 30f61a34b4 ("base-files: always use staged sysupgrade").

Update the platform upgrade code to use platform_do_upgrade() for NAND
images as well.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Adrià Llaudet 90ceb0aeb1 imx6: use DTS_DIR at image build code
Use "$(DTS_DIR)", defined at include/image.mk, instead of
"$(LINUX_DIR)/arch/$(LINUX_KARCH)/boot/dts" in order to generalize and
allow a better Device/* device-tree parameterization (i.e. DEVICE_DTS_DIR
and DTS_DIR).

Signed-off-by: Adrià Llaudet <adria.llaudet@gmail.com>
6 years ago
Koen Vandeputte 8954bc31ed imx6: add support for the intel gbit driver on GW5520
The Gateworks GW5520 board uses 2x intel gigabit mac's, instead of the
internal i.MX6 FEC.

Add support for these.

Signed-off-by: Scott V. Kamp <outbackdingo@gmail.com>
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Luis Araneda 575178e462 treewide: add only one device when appending to TARGET_DEVICES
This will avoid some conflicts when doing a git rebase or merge,
specially when adding support to a new device.

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
[drop brcm47xx changes which rename the images]
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Koen Vandeputte 0997185ffd imx6: add driver for temp/voltage monitoring
The Gateworks System Controller (GSC) mimics a standard AD7418 device on
I2C bus 0 at slave 0x29.

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