aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm47xx/base-files/lib/upgrade
Commit message (Collapse)AuthorAgeFilesLines
* brcm47xx: rename target to bcm47xxAdrian Schmutzler2020-02-141-247/+0
| | | | | | | | | | This change makes the names of Broadcom targets consistent by using the common notation based on SoC/CPU ID (which is used internally anyway), bcmXXXX instead of brcmXXXX. This is even used for target TITLE in make menuconfig already, only the short target name used brcm so far. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* brcm47xx: sysupgrade: fix device model detectionRafał Miłecki2019-09-261-2/+2
| | | | | | | | | $(board_name) was providing content on "boardtype" (and optionally "boardnum") NVRAM values. That function requires & expects more specific and detailed model name extracted from the /proc/cpuinfo. Fixes: f12a32630ff5 ("treewide: use the generic board_name function") Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* brcm47xx: sysupgrade: support Luxul firmware formatDan Haab2019-09-161-0/+82
| | | | | | Allow flashing Luxul devices using vendor firmware format. Signed-off-by: Dan Haab <dan.haab@legrand.com>
* brcm47xx: extend firmware validationRafał Miłecki2019-09-041-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | This provides TRX validation result, so final JSON may look like: { "tests": { "fwtool_signature": true, "fwtool_device_match": true, "trx_valid": true }, "valid": true, "forceable": true } It also prevents users from installing broken firmware files, e.g.: root@OpenWrt:/# sysupgrade -F -n /tmp/TZ Image metadata not found Invalid image type. Please use firmware specific for this device. Image check failed but --force given - will update anyway! Commencing upgrade. Closing all shell sessions. Firmware image is broken and cannot be installed Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* Revert "brcm47xx: Fix sysupgrade with E1200v1"Hauke Mehrtens2017-09-251-1/+0
| | | | | | | | | | This reverts commit 31e9445b7e614f54daa0caf3148e223d088311ab. "Linksys E1200 V1" is not a valid board name, as the brcm47xx arch code can not detect this device. Stefan Lippers-Hollmann also found a typo in this patch "cybetran" instead of "cybertan". Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* brcm47xx: Fix sysupgrade with E1200v1Rosen Penev2017-09-241-0/+1
| | | | | | Entry was missing for some reason. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* treewide: use the generic board_name functionMathias Kresin2017-07-151-5/+1
| | | | | | Use the generic function instead ot the target specific ones. Signed-off-by: Mathias Kresin <dev@kresin.me>
* brcm47xx: add Netgear WN2500RP supportRafał Miłecki2015-12-021-0/+2
| | | | | | | | We generate V1 image only for now. We lack buttons support for V2. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 47682
* brcm47xx: sysupgrade: drop useless shift in platform.shRafał Miłecki2015-06-061-1/+0
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45913
* brcm47xx: extract TRX from image on the flyJohn Crispin2015-06-051-7/+8
| | | | | | | | | | Extracting TRX to separated file in /tmp/ requires extra RAM which may not be available on some chepaer devices. Instead of that lets pass a proper extracting command to the default_do_upgrade. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45901
* brcm47xx: fix handling absolute paths in sysupgrade (for vendor formats)Rafał Miłecki2015-04-171-2/+2
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45472
* brcm47xx: rework vendor fw handling to don't duplicate upgrade callsRafał Miłecki2015-04-161-14/+10
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45470
* otrx: change command line API to start with a modeRafał Miłecki2015-04-141-3/+3
| | | | | | | | This will allow adding more modes without options conflict. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45443
* brcm47xx: verify also standard TRX images during sysupgradeRafał Miłecki2015-04-091-0/+4
| | | | | | | | It allows detecting data corruption for plain TRX as well. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45318
* brcm47xx: fix WRT300N devices magics for sysupgrade checkRafał Miłecki2015-04-091-1/+2
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45317
* brcm47xx: switch to the otrx for verifying TRX imagesRafał Miłecki2015-04-091-16/+2
| | | | | | | | This adds checking CRC32 of provided firmware image. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45316
* brcm47xx: image: share function checking TRX in provided firmwareRafał Miłecki2015-03-311-6/+18
| | | | | | | | This will allow us to calculate crc32 in a shared code. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45202
* brcm47xx: fix checking cross-vendors firmware imagesRafał Miłecki2015-03-311-48/+41
| | | | | | | | | This change won't allow installing e.g. Netgear firmware on Linksys device. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45174
* brcm47xx: display all errors (not just the 1st one) when checking imageRafał Miłecki2015-03-311-10/+8
| | | | | | | | This way people forcing upgrade will know what may go wrong. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45172
* brcm47xx: recognize more device specific firmwaresRafał Miłecki2015-03-311-0/+34
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45171
* brcm47xx: compare provided firmware magic with device magicRafał Miłecki2015-03-301-2/+34
| | | | | | | | | This makes sysupgrade reject firmware images for different devices. Right now only support for 2 sample devices is implemented. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45170
* brcm47xx: support for flashing CHK and CyberTAN imagesRafał Miłecki2014-12-301-5/+28
| | | | | | | | | This will allow simple sysupgrade-s including simpler reverting to the original firmware. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 43799
* brcm47xx: verify if CHK/CyberTAN contains valid TRXRafał Miłecki2014-12-301-1/+16
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 43798
* brcm47xx: extract magics from specific upgrade images (and still reject them)Rafał Miłecki2014-12-151-1/+17
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 43718
* brcm47xx: detect (and still reject for now) CyberTAN fw formatRafał Miłecki2014-12-151-0/+12
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 43714
* brcm47xx: use separated function in upgrade to detect file typeRafał Miłecki2014-12-151-3/+22
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 43708
* target/linux/*/base-files/lib/upgrade/platform.sh - wrong check for ARGCJohn Crispin2014-06-021-1/+1
| | | | | | | | | | | | | | | | | | | ARGC is a 'C-ism', but not known/valid in shell-syntax - insert the correct var $# (=number of args) here. under normal conditions this had no impact, but we should at least correct it. the error was observable like this: root@box:~ [ -e "/etc/functions.sh" ] && . /etc/functions.sh root@box:~ [ -e "/lib/functions.sh" ] && . /lib/functions.sh root@box:~ . /lib/upgrade/platform.sh root@box:~ . /lib/upgrade/common.sh root@box:~ platform_check_image /tmp/myfirmware.bin ash: bad number root@box:~ echo $? 0 Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com> SVN-Revision: 40915
* brcm47xx: use "firmware" partition nameHauke Mehrtens2013-12-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some time ago, after switching to the mainline bcm47xxpart driver following patch has been applied: commit 03cef8725d2062335ffc3de50fc037b294fd458c Author: hauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73> Date: Sat Apr 6 22:22:26 2013 +0000 brcm47xx: use old partition names again for kernel 3.8 This fixes sysupgrade. The partition names are used all over the Internet in various howtos. Thank you russell for spotting this problem. I propose to revert this change and make sysupgrade use "firmware" instead. This makes brcm47xx compatible with widely used ar71xx and after all "firmware" sounds like a much better name for... the firmware. This change doesn't affect "sysupgrade" usage, because it never takes a partition name as a parameter. This change only affects users using mtd tool directly. Hopefully there are not many howtos using "mtd" command. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 38973
* add back the base-files/image code from brcm-2.4 to brcm47xxFelix Fietkau2010-06-261-0/+16
SVN-Revision: 21945