1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-06-20 23:58:27 +02:00
Commit Graph

9 Commits

Author SHA1 Message Date
Jeff Kletsky
b3770eaca3 mtd: base-files: Unify dual-firmware devices (Linksys)
Consistently handle boot-count reset and upgrade across
ipq40xx, ipq806x, kirkwood, mvebu

Dual-firmware devices often utilize a specific MTD partition
to record the number of times the boot loader has initiated boot.

Most of these devices are NAND, typically with a 2k erase size.
When this code was ported to the ipq40xx platform, the device in hand
used NOR for this partition, with a 16-byte "record" size. As the
implementation of `mtd resetbc` is by-platform, the hard-coded nature
of this change prevented proper operation of a NAND-based device.

* Unified the "NOR" variant with the rest of the Linksys variants

* Added logging to indicate success and failure

* Provided a meaningful return value for scripting

* "Protected" the use of `mtd resetbc` in start-up scripts so that
   failure does not end the boot sequence

* Moved Linksys-specific actions into common `/etc/init.d/bootcount`

For upgrade, these devices need to determine which partition to flash,
as well as set certain U-Boot envirnment variables to change the next
boot to the newly flashed version.

* Moved upgrade-related environment changes out of bootcount

* Combined multiple flashes of environment into single one

* Current-partition detection now handles absence of `boot_part`

Runtime-tested: Linksys EA8300

Signed-off-by: Jeff Kletsky <git-commits@allycomm.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
[checkpatch.pl fixes, traded split strings for 80+ chars per line]
2019-05-18 13:43:51 +02:00
Michael Gray
bfbdeeb3de mvebu: add support for WRT32X (venom)
Linksys WRT32X (Venom) is identical in hardware to the WRT3200ACM
with a different flash layout and boots zImage rather than uImage.

Specification:
- Marvell Armada 385 88F6820 (2x 1.8GHz)
- 256MB of Flash
- 512MB of RAM
- 2.4GHz (bgn) and 5GHz (an+ac wave 2)
- 4x 1Gbps LAN + 1x 1Gbps WAN
- 1x USB 3.0 and 1x USB 2.0/eSATA (combo port)

Flash instruction:
Apply factory image via web-gui.

Signed-off-by: Michael Gray <michael.gray@lantisproject.com>
2018-05-14 17:20:10 +02:00
Matthias Schiffer
5654a03768
mvebu: fix sysupgrade
mvebu was modifying RAMFS_COPY_BIN and RAMFS_COPY_DATA from a
sysupgrade_pre_upgrade hook. As the ramfs is created from stage2, this
did not have an effect anymore after the staged sysupgrade changes.

As it doesn't really hurt to copy fw_printenv and fw_setenv
unconditionally, simply add them in /lib/upgrade/platform.sh, so stage2
will see them.

Config copying is moved to a function called by platform_copy_config, where
it belongs.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Fixes: FS#821
Fixes: 30f61a34b4 "base-files: always use staged sysupgrade"
2017-06-01 20:41:19 +02:00
Vignesh Balasubramaniam
62e4c915ee mvebu: fix sysupgrade for Linksys WRT3200ACM
sysupgrade command fails due to missing U-Boot environment-processing
binaries on sysupgrade ramdisk. The missing binaries result in the
following output:

Switching to ramdisk...
	Performing system upgrade...
	ash: /usr/sbin/fw_printenv: not found
	ash: fw_setenv: not found
	ash: touch: not found
	cannot find target partition

Signed-off-by: Vignesh Balasubramaniam <vigneshb.hp@gmail.com>
2016-12-04 07:03:17 +01:00
Aaron Curley
15cb19f02a mvebu: fix sysupgrade
sysupgrade command fails due to missing U-Boot environment-processing binaries on sysupgrade ramdisk. The missing binaries result in the following output:
	Switching to ramdisk...
	Performing system upgrade...
	ash: /usr/sbin/fw_printenv: not found
	ash: fw_setenv: not found
	ash: touch: not found
	cannot find target partition

Fixes FS#197.

Signed-off-by: Aaron Curley <accwebs@gmail.com>
2016-10-04 11:50:48 +02:00
Jonas Gorski
6859098d97 mvebu: add sysupgrade support for clearfog
Add and enable sysupgrade support for clearfog boards, based on how the
brcm2708 target does it.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Acked-by: Felix Fietkau <nbd@nbd.name>
2016-09-26 13:04:53 +02:00
Imre Kaloz
9fb062cf93 mvebu: make flashing more safe
Turn on the auto recovery feature when flashing
and turn it off on successful bootup.

Signed-off-by: Imre Kaloz <kaloz@openwrt.org>

SVN-Revision: 45792
2015-05-27 19:03:22 +00:00
Imre Kaloz
6f5a9debed handle sysupgrade tar files on the WRT1900AC
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>

SVN-Revision: 41647
2014-07-14 15:00:36 +00:00
Imre Kaloz
81d85a717a add sysupgrade support
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>

SVN-Revision: 41630
2014-07-13 22:12:56 +00:00