aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mvebu
Commit message (Collapse)AuthorAgeFilesLines
* kernel: backport 5.13 mtd partitioning changesRafał Miłecki2021-03-292-8/+8
| | | | | | | | 1. Use upstream accepted NVMEM patches 2. Minor fix for BCM4908 partitioning 3. Support for Linksys firmware partitions on Northstar Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* mvebu: Fix mac addresses for GL.iNet GL-MV1000Sven Eckelmann2021-03-271-0/+4
| | | | | | | | | | | | | The original GL.iNet firmware has two different mac addresses in the factory/art partition. The first one is for the WAN interface only and the second one is for both lan0 and lan1. But the original submission for OpenWrt didn't initialize the mac addresses of the LAN ports for the DSA device at all. The ethernet mac address was then used for all DSA ports. Fixes: 050c24f05c85 ("mvebu: add support for GL.iNet GL-MV1000") Signed-off-by: Sven Eckelmann <sven@narfation.org>
* mvebu: Add button support for GL.iNet GL-MV1000Sven Eckelmann2021-03-271-0/+17
| | | | | | | | | | | | | The original patch to support this device advertised support for the reset button and the "switch" in the commit message. But neither were actually integrated in the device tree or documented anywere. The button itself is now used to trigger a reset (as described in the official GL.iNet documentation). The switch itself is registered as BTN_0 like other devices from GL.iNet in ath79. Fixes: 050c24f05c85 ("mvebu: add support for GL.iNet GL-MV1000") Signed-off-by: Sven Eckelmann <sven@narfation.org>
* mvebu: enable WRT1900AC v1 and WRT32X for buildbotsTad Davanzo2021-03-191-2/+0
| | | | | | | Kernel size limits have been dealt with. Effective revert of a1eb2c46 and ac9730c4. Signed-off-by: Tad Davanzo <tad@spotco.us>
* mvebu: venom resize kernel to 6MBTad Davanzo2021-03-193-7/+8
| | | | | | | | | | | | | | | | | | | | | | | venom has a 3MB kernel partition as specified by the DTS. 3MB is not sufficient for building with many kernel modules or newer kernel versions. venom uboot however as set from factory will load up to 6MB. This can be observed by looking a uboot log: NAND read: device 0 offset 0x900000, size 0x600000 6291456 bytes read: OK and from uboot environment variables: $ fw_printenv | grep "priKernSize"; priKernSize=0x0600000 Resize the root partitions from 120MB to 117MB to let kernel expand into it another 3MB. And set kernel target size to 6MB. Lastly set the kernel-size-migration compatibility version on venom to prevent sysupgrading without first reinstalling from a factory image. Signed-off-by: Tad Davanzo <tad@spotco.us>
* mvebu: mamba resize kernel to 4MBTad Davanzo2021-03-194-2/+92
| | | | | | | | | | | | | | | | | | | | | | | | mamba has a 3MB kernel partition as specified by the DTS. 3MB is not sufficient for building with many kernel modules or newer kernel versions. mamba uboot however as set from factory will load up to 4MB. This can be observed by looking a uboot log: NAND read: device 0 offset 0xa00000, size 0x400000 4194304 bytes read: OK and from uboot environment variables: $ fw_printenv | grep "pri_kern_size"; pri_kern_size=0x400000 Resize the root partitions from 37MB to 36MB to let kernel expand into it another 1MB. And set kernel target size to 4MB. Lastly add a compatibility version message: kernel-size-migration. And set it on mamba to prevent sysupgrading without first reinstalling from a factory image. Signed-off-by: Tad Davanzo <tad@spotco.us>
* kernel: move some disabled symbols to genericAleksander Jan Bajkowski2021-03-196-14/+0
| | | | | | Move some disabled symbols found in armvirt target to generic. Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
* mvebu: LS421DE: make cosmetics changes in dts fileDaniel González Cabanelas2021-03-131-5/+11
| | | | | | | | | Make some cosmetic changes in the Buffalo LinkStation LS421DE NAS: - Delete pointless #xxx-cells - bootargs: replace earlyprintk with earlycon and remove unneeded args. - Separate pinmux nodes with empty lines. Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
* kernel: add pending mtd patches adding NVMEM supportRafał Miłecki2021-03-122-4/+4
| | | | | | | | It's meant to provide upstream support for mtd & NVMEM. It's required e.g. for reading MAC address from mtd partition content. It seems to be in a final shape so it's worth testing. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* treewide: remove execute bit and shebang from board.d filesAdrian Schmutzler2021-03-066-6/+0
| | | | | | | | | | | | | | | | 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>
* kernel: bump 5.10 to 5.10.20Rui Salvaterra2021-03-052-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Also add a new kconfig symbol (CONFIG_KCMP) to the generic config, disabling the SYS_kcmp syscall (it was split from CONFIG_CHECKPOINT_RESTORE, which is disabled by default, so the previous behaviour is kept). Removed (upstreamed) patches: 070-net-icmp-pass-zeroed-opts-from-icmp-v6-_ndo_send-bef.patch 081-wireguard-device-do-not-generate-ICMP-for-non-IP-pac.patch 082-wireguard-queueing-get-rid-of-per-peer-ring-buffers.patch 083-wireguard-kconfig-use-arm-chacha-even-with-no-neon.patch 830-v5.12-0002-usb-serial-option-update-interface-mapping-for-ZTE-P685M.patch Manually rebased patches: 313-helios4-dts-status-led-alias.patch 104-powerpc-mpc85xx-change-P2020RDB-dts-file-for-OpenWRT.patch Run tested: ath79 (TL-WDR3600) mvebu (Turris Omnia) Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* kernel-5.4: bump to 5.4.102 and refresh patchesJason A. Donenfeld2021-03-048-25/+22
| | | | | | | | | | | | | | 5.4.102 backported a lot of stuff that our WireGuard backport already did, in addition to other patches we had, so those patches were removed from that part of the series. In the process other patches were refreshed or reworked to account for upstream changes. This commit involved `update_kernel.sh -v -u 5.4`. Cc: John Audia <graysky@archlinux.us> Cc: David Bauer <mail@david-bauer.net> Cc: Petr Štetiar <ynezz@true.cz> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* kernel: add the latest mtd patch extending ofpart parserRafał Miłecki2021-03-012-12/+12
| | | | | | | | | | | | This adds the latest version of ofpart commit. It hopefully 1. Doesn't break compilation 2. Doesn't break partitioning (this time). It's required to implement fixed partitioning with some quirks. It's required by bcm53xx, bcm4908, kirkwood, lantiq and mvebu. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* mvebu/omnia: fix the device treeRui Salvaterra2021-03-013-0/+165
| | | | | | | | | | | Backport [1] and fix [2] hardware buffer management. Also fix the IRQ storm caused by a misconfiguration of the PCA9538 interrupt pin [3]. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/arch/arm/boot/dts/armada-385-turris-omnia.dts?id=018b88eee1a2efda26ed2f09aab33ccdc40ef18f [2] https://lore.kernel.org/linux-arm-kernel/20210217153038.1068170-1-rsalvaterra@gmail.com/ [3] https://lore.kernel.org/linux-arm-kernel/20210220231144.32325-1-kabel@kernel.org/ Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* mvebu: add LED support for GL.iNet GL-MV1000Jeff Collins2021-02-262-1/+46
| | | | | | | | This patch enables LED support for the GL.iNet GL-MV1000 Signed-off-by: Jeff Collins <jeffcollins9292@gmail.com> [add SPDX identifier on new file, add aliases, minor cosmetic issues] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* treewide: rename IMAGE_PREFIX/IMAGE_NAME to DEVICE_IMG_*Adrian Schmutzler2021-02-253-7/+7
| | | | | | | | | | | | | | We so far had two variables IMG_PREFIX and IMAGE_PREFIX with different content. Since these names are obviously quite confusing, this patch renames the latter to DEVICE_IMG_PREFIX, as it's a device-dependent variable, while IMG_PREFIX is only (sub)target-dependent. For consistency, also rename IMAGE_NAME to DEVICE_IMG_NAME, as that's a device-dependent variable as well. Cc: Paul Spooren <mail@aparcar.org> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* kernel: bump version 5.10 to 5.10.18Kabuli Chana2021-02-242-4/+4
| | | | | | | | update kernel version, refresh current patchset Signed-off-by: Kabuli Chana <newtownBuild@gmail.com> [rebase/refresh] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* kernel: add further missing symbolsAdrian Schmutzler2021-02-241-1/+0
| | | | | | | | | | | CONFIG_NET_DSA_MV88E6XXX_PTP was simply missing in generic config. CONFIG_I2C_PXA_SLAVE was previously enabled via i2c-pxa package, but got removed there without moving the symbol to generic config. Fixes: dd13add3ceed ("kernel: i2c-pxa: remove slave") Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* kernel: add symbol CONFIG_POWER_RESET_LINKSTATIONAdrian Schmutzler2021-02-232-2/+0
| | | | | | | | Add symbol to generic config (this was added between 5.4 and 5.10), and remove it from the targets where it was added by kernel_oldconfig in the meantime. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* mvebu: add 5.10 as a testing kernelRui Salvaterra2021-02-231-1/+1
| | | | | | | | | | | | | Keep 5.4 as stable until further validation. Tested on Turris Omnia (Rui Salvaterra) and ESPRESSObin v5 (Tomasz Maciej Nowak). Cortex-A{53,72} subtargets are only build-tested. Reviewed-by: Tomasz Maciej Nowak <tmn505@gmail.com> Tested-by: Tomasz Maciej Nowak <tmn505@gmail.com> Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com> [added comment about tests] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* mvebu: fix the Turris Omnia device treeRui Salvaterra2021-02-233-0/+165
| | | | | | | | | Enable and fix hardware buffer management. Also fix the IRQ storm caused by a misconfiguration of the PCA9538 interrupt pin. Reviewed-by: Tomasz Maciej Nowak <tmn505@gmail.com> Tested-by: Tomasz Maciej Nowak <tmn505@gmail.com> Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* mvebu: fix the patch numberingRui Salvaterra2021-02-233-0/+0
| | | | | | | | | | Make each logical patch group numbering contiguous. Reviewed-by: Tomasz Maciej Nowak <tmn505@gmail.com> Tested-by: Tomasz Maciej Nowak <tmn505@gmail.com> Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com> [add kernel version to backport] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* mvebu: refresh 5.10 kconfigs/patchesRui Salvaterra2021-02-2337-2967/+33
| | | | | | | | Also delete already upstreamed patches/changes. Reviewed-by: Tomasz Maciej Nowak <tmn505@gmail.com> Tested-by: Tomasz Maciej Nowak <tmn505@gmail.com> Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* mvebu: remove upstreamed DTS files in 5.10Adrian Schmutzler2021-02-233-0/+0
| | | | | | | Some armada-3720-espressobin-* files have been upstreamed, move these to files-5.4. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* mvebu: copy 5.4 patches/kconfigs to 5.10Rui Salvaterra2021-02-2353-0/+5216
| | | | | | | | | | Just a simple copy, no refresh yet. Reviewed-by: Tomasz Maciej Nowak <tmn505@gmail.com> Tested-by: Tomasz Maciej Nowak <tmn505@gmail.com> Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com> [do not duplicate files] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* mvebu: refresh the 5.4 kernel configsRui Salvaterra2021-02-233-283/+24
| | | | | | | | | Remove the implicit/inherited symbols. While not strictly necessary, this will make reviewing the diff between 5.4 and 5.10 easier. Reviewed-by: Tomasz Maciej Nowak <tmn505@gmail.com> Tested-by: Tomasz Maciej Nowak <tmn505@gmail.com> Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* mvebu: espressobin: drop COMPHY removement patchTomasz Maciej Nowak2021-02-142-53/+0
| | | | | | | | | | There are proper workarounds merged to 5.4 stable tree for ESPRESSObin boards with older bootloader: 4e1a23779bde ("ata: ahci: mvebu: Make SATA PHY optional for Armada 3720") 40af962eb1d4 ("usb: host: xhci: mvebu: make USB 3.0 PHY optional for Armada 3720") Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
* target: use SPDX license identifiers on scriptsAdrian Schmutzler2021-02-101-15/+1
| | | | | | Use SPDX license tags to allow machines to check licenses. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* target: use SPDX license identifiers on MakefilesAdrian Schmutzler2021-02-106-24/+7
| | | | | | Use SPDX license tags to allow machines to check licenses. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* kernel: bump 5.4 to 5.4.94John Audia2021-02-011-1/+1
| | | | | | | | | | | | All modification made by update_kernel.sh in a fresh clone without existing toolchains. Build-tested: bcm27xx/bcm2711, ipq806x/R7800, Run-tested: ipq806x/R7800 No dmesg regressions, everything functional Signed-off-by: John Audia <graysky@archlinux.us>
* mvebu: omnia: make initramfs image usable out of the boxPetr Štetiar2021-01-311-2/+2
| | | | | | | | | | | | | | | Currently it's not possible to boot the device with just initramfs image without additional effort as the initramfs image doesn't contain device tree. Fix it by producing FIT based image which could be booted with following commands: setenv bootargs earlyprintk console=ttyS0,115200 tftpboot ${kernel_addr_r} openwrt-mvebu-cortexa9-cznic_turris-omnia-initramfs-kernel.bin bootm ${kernel_addr_r} Acked-by: Klaus Kudielka <klaus.kudielka@gmail.com> Reviewed-by: Tomasz Maciej Nowak <tmn505@gmail.com> Signed-off-by: Petr Štetiar <ynezz@true.cz>
* mvebu: LS421DE: fix the thermal zonesDaniel González Cabanelas2021-01-301-13/+42
| | | | | | | | | | | | | | | | | | | | | | The thermal zones kernel documentation is misleading, we cannot use more than one sensor in a thermal zone node. Furthermore the drivetemp driver for some reason it only catches one sensor from the hard drives array (the first available). In the Buffalo Linkstation LS421DE board there is also a sensor at the ethernet phy chip that can also be monitored. Very useful to stop the fan when there are no hard drives in the bays. (It might be also possible to add the CPU sensor, but it requires kernel patching for registering the sensor via device tree, using the function: devm_thermal_zone_of_sensor_register) Fix the thermal zones to use only one sensor per node and add the ethernet phy sensor. Also adjust the hdd temperatures to be more conservative for a mechanical hard drive. Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
* treewide: provide global default for SUPPORTED_DEVICESAdrian Schmutzler2021-01-231-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The majority of our targets provide a default value for the variable SUPPORTED_DEVICES, which is used in images to check against the compatible on a running device: SUPPORTED_DEVICES := $(subst _,$(comma),$(1)) At the moment, this is implemented in the Device/Default block of the individual targets or even subtargets. However, since we standardized device names and compatible in the recent past, almost all targets are following the same scheme now: device/image name: vendor_model compatible: vendor,model The equal redundant definitions are a symptom of this process. Consequently, this patch moves the definition to image.mk making it a global default. For the few targets not using the scheme above, SUPPORTED_DEVICES will be defined to a different value in Device/Default anyway, overwriting the default. In other words: This change is supposed to be cosmetic. This can be used as a global measure to get the current compatible with: $(firstword $(SUPPORTED_DEVICES)) (Though this is not precisely an achievement of this commit.) Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* kernel: drop empty kmod-ledtrig-* packagesSungbo Eo2021-01-151-1/+1
| | | | | | | | | | | | | | The following four led triggers are enabled in generic config. * kmod-ledtrig-default-on * kmod-ledtrig-heartbeat * kmod-ledtrig-netdev * kmod-ledtrig-timer Drop the packages and remove them from DEVICE_PACKAGES. There's no other package depending on them in this repo. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* kernel: bump 5.4 to 5.4.86Adrian Schmutzler2021-01-011-3/+1
| | | | | | | | | | | | | | | | | Removed upstreamed patches: pending-5.4/499-mtd-parser-cmdline-Fix-parsing-of-part-names-with-co.patch Manually merged: pending-5.4/611-netfilter_match_bypass_default_table.patch layerscape/302-dts-0112-arm64-dts-fsl-ls1028a-prepare-dts-for-overlay.patch Build-tested: ipq806x/R7800, bcm27xx/bcm2711, ath79/{generic,tiny}, ipq40xx, octeon, ramips/mt7621, realtek, x86/64 Run-tested: ipq806x/R7800, realtek Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Tested-by: John Audia <graysky@archlinux.us> Tested-by: Stijn Segers <foss@volatilesystems.org>
* kernel: move some disabled symbols to genericAleksander Jan Bajkowski2020-12-221-3/+0
| | | | | | Move some disabled config options found in lantiq target to generic. Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
* Revert "mvebu: fix initramfs/kernel image for CZNIC Turris Omnia"Petr Štetiar2020-12-221-1/+2
| | | | | | | | | | | This reverts commit e401a2a42e6d7c892e1cf7d765fa5ec9b2db3fb3 as at least two users had reported breakage on their devices. References: https://lists.infradead.org/pipermail/openwrt-devel/2020-December/032837.html References: https://github.com/openwrt/openwrt/commit/e401a2a42e6d7c892e1cf7d765fa5ec9b2db3fb3#commitcomment-45189788 Cc: Karel Kočí <karel.koci@nic.cz> Reported-by: Magnus Kroken <mkroken@gmail.com> Signed-off-by: Petr Štetiar <ynezz@true.cz>
* mvebu: gpio-mvebu IRQ index error kernel backportDaniel González Cabanelas2020-12-221-0/+33
| | | | | | | | | Backport the upstream kernel fix 525b0858ff to get rid of the kernel messages: mvebu-gpio xxxxxx.gpio: IRQ index 3 not found Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
* mvebu: LS421DE: use the RTC as a wakeup sourceDaniel González Cabanelas2020-12-221-0/+1
| | | | | | | | | | | | | | | | | | | The Buffalo Linkstation LS421DE comes with a Ricoh RS5C372A real time clock. This RTC has the INTRA pin connected to the power management circuit, allowing to wake up the device from the power off state when an alarm is scheduled. Add the "wakeup-source" property in the RTC dts node to allow the use of the alarm. Example of use, the device is powered off and it comes to life after 5 minutes: echo $(expr $(date '+%s') + 60 * 5) > /sys/class/rtc/rtc0/wakealarm poweroff This feature isn't available in the stock firmware. Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
* mvebu: LS421DE: fix low performance issueDaniel González Cabanelas2020-12-221-0/+4
| | | | | | | | | | The Buffalo Linkstation LS421DE isn't able to enable the Level 2 cache (AKA Aurora cache). As of result of this, the throughput is about half of the expected, e.g when doing network data transfers. Fix it by adding the broken-idle property in the coherency fabric node. Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
* mvebu: macchiatobin-singleshot: enable heartbeat LEDTomasz Maciej Nowak2020-12-202-1/+66
| | | | | | | | | | | | | | | With board revision 1.3, SolidRun moved the power LED to the middle of the board. In old place of power LED a GPIO controllable heartbeat LED was added. This commit touches only Single Shot variant, because all have revision 1.3. Some boards could be placed in an enclosure, therefore the LED18 is enabled by default, since that'll be the only visible indicator that the board is operating. Ref: http://wiki.macchiatobin.net/tiki-index.php?page=Schematics#Revision1.3_Electrical_Design_Changes Ref: http://macchiatobin.net/wp-content/uploads/2017/11/MACCHIATOBin-rev-1_3.pdf Reported-by: Alexandra Alth <alexandra@alth.de> Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
* mvebu: fix initramfs/kernel image for CZNIC Turris OmniaKarel Kočí2020-12-111-2/+1
| | | | | | | | | | | | | | | | | This adds DTB to kernel and that way makes it possible to easily boot initramfs image and also kernel. The sequence to boot initramfs on Omnia is then just: env set bootargs earlyprintk console=ttyS0,115200 dhcp 0x1000000 192.168.1.1:openwrt-mvebu-cortexa9-cznic_turris-omnia-initramfs-kernel.bin bootz 0x1000000 Without this change kernel boot won't proceed and is stuck on "Starting kernel". Signed-off-by: Karel Kočí <karel.koci@nic.cz> [fixed From: to match with SoB:] Signed-off-by: Petr Štetiar <ynezz@true.cz>
* mvebu: sysupgrade: write additional information to log outputTomasz Maciej Nowak2020-12-011-4/+3
| | | | | | | | This will explain what is actually occuring on dd invocations. Additionally remove comments for steps which are described by printed statements anyway. Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
* mvebu: sysupgrade: use v function for writing logsTomasz Maciej Nowak2020-12-012-7/+7
| | | | | | Sync with x86 target changes. Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
* mvebu: fixup Turris Omnia U-Boot environmentKlaus Kudielka2020-11-271-0/+44
| | | | | | | | | | | | | | Fixup dfa357a3de "mvebu: base-files: Update Turris Omnia U-Boot environment" which should have included this file as well. By rebasing the initial patch this file somehow disappeared. Signed-off-by: Klaus Kudielka <klaus.kudielka@gmail.com> Reviewed-by: Tomasz Maciej Nowak <tomek_n@o2.pl> Tested-by: W. Michael Petullo <mike@flyn.org> (Turris Omnia "2020") Tested-by: Klaus Kudielka <klaus.kudielka@gmail.com> (Turris Omnia) [explain fixup in commit message] Signed-off-by: Paul Spooren <mail@aparcar.org>
* mvebu: base-files: Update Turris Omnia U-Boot environmentKlaus Kudielka2020-11-261-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the update procedure from sysupgrade to first boot, which is much more convenient in the sysupgrade case (otherwise the environment is always one generation behind). Check whether we have an old U-Boot release installed, and update the environment only if necessary. Some notes on the U-Boot environment: The first 9 lines are a copy of the default environment of the old U-Boot release - only modified, to run "distro_bootcmd", in case "mmcboot" fails to boot the factory OS. The remaining 16 lines are a backport of the default environment of the new U-Boot release (shipped with CZ11NIC23). The main entry point is "distro_bootcmd", which eventually sources boot.scr. This way, we have a unified boot protocol for all Turris Omnia revisions so far. This commit also fixes a shortcoming of previous Turris Omnia support: Users may install OpenWrt with the Turris Omnia in factory state (i.e. invalid environment store). In that case, neither fw_setenv, nor U-Boot itself, would import the default environment from the image - screwing up the rescue system, at least! Signed-off-by: Klaus Kudielka <klaus.kudielka@gmail.com> Reviewed-by: Tomasz Maciej Nowak <tomek_n@o2.pl> Tested-by: W. Michael Petullo <mike@flyn.org> (Turris Omnia "2020") Tested-by: Klaus Kudielka <klaus.kudielka@gmail.com> (Turris Omnia)
* mvebu: Add turris-omnia.bootscriptKlaus Kudielka2020-11-262-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | In contrast to the U-Boot version shipped with older versions of Turris Omnia (CZ11NIC13, CZ11NIC20), the version shipped with Turris Omnia 2019 (CZ11NIC23) relies on the existence of /boot.scr. Consequently, add a suitable boot script to the sysupgrade image. Flash instructions for Turris Omnia 2019: - Download openwrt-...-sysupgrade.img.gz, gunzip it, and copy the resulting .img file to the root of a USB flash drive (FAT32 or ext2/3/4). - Enter a rescue shell: Either via 5-LED reset and ssh root@192.168.1.1 on LAN port 4, or via 7-LED reset and the serial console. - Insert the USB drive and mount it: mkdir /mnt; mount /dev/sda1 /mnt - Flash the OpenWrt image to eMMC: dd if=/mnt/openwrt-...-sysupgrade.img of=/dev/mmcblk0 bs=4096 conv=fsync - Reboot. Flash instructions using a temporary "medkit" installation were written for the older versions of Turris Omnia, and will *not* work on the Turris Omnia 2019. Signed-off-by: Klaus Kudielka <klaus.kudielka@gmail.com> Reviewed-by: Tomasz Maciej Nowak <tomek_n@o2.pl> Tested-by: W. Michael Petullo <mike@flyn.org> (Turris Omnia "2020")
* mvebu: sysupgrade: use get_image_dd wrapperTomasz Maciej Nowak2020-11-251-6/+6
| | | | | | This function eliminates false-positive errors emitted by dd. Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
* mvebu: sysupgrade: remove redundant MBR checkTomasz Maciej Nowak2020-11-251-13/+1
| | | | | | | | This is already done by get_partitions. Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com> [add "redundant" to title, remove declaration of magic variable] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* mvebu: base-files: move additional files to subtargetsTomasz Maciej Nowak2020-11-252-0/+0
| | | | | | | Both of these scripts are only relevant to cortexa9, therefore move them there. Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>