aboutsummaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* tools/libtool: update to 2.4.2Ivan Pavlov2021-09-079-48/+26
| | | | | | | Refresh patches. Remove upstreamed: 001-fix-func_append.patch Signed-off-by: Ivan Pavlov <AuthorReflex@gmail.com>
* firmware-utils: seama.h: replace LGPL-2.1-or-later boilerplate with SPDXRafał Miłecki2021-09-071-15/+1
| | | | | | | | | | | | | | | This was missed because scancode license scanner was confused by a slightly different than expected license text (96,75% license score). License text included "file" instead of "library" in the main part of the licensing info. It also used "The GNU C Library" instead of the standard "This library" in 2nd and 3rd paragraphs. The first paragraph clearly mentions LGPL-2.1-or-later and the use of "file" instead of "library" should not affect licensing. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* tools/findutils: fix build on macosKevin Darbyshire-Bryant2021-09-061-0/+4
| | | | | | | | Use same fix as homebrew: https://github.com/Homebrew/homebrew-core/pull/69761 Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
* ath79: add support for TP-Link TL-WA1201 v2Robert Balas2021-09-051-1/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This device is a wireless access point working on the 2.4 GHz and 5 GHz band, based on Qualcomm/Atheros QCA9563 + QCA9886. Specification - 775 MHz CPU - 128 MB of RAM (DDR2) - 16 MB of FLASH (SPI NOR) - QCA9563: 2.4 GHz 3x3 - QCA9886: 5 GHz - AR8033: 1x 1 Gbs Ethernet - 4x LED, WPS factory reset and power button - bare UART on PCB (accessible through testpoints) Methods for Flashing: - Apply factory image in OEM firmware web-gui. Wait a minute after the progress bar completes and restart the device. - Sysupgrade on top of existing OpenWRT image - Solder wires onto UART testpoints and attach a terminal. Boot the device and press enter to enter u-boot's menu. Then issue the following commands 1. setenv serverip your-server-ip setenv ipaddr your-device-ip 2. tftp 0x80060000 openwrt-squashfs.bin (Rembember output of size in hex, henceforth "sizeinhex") 3. erase 0x9f030000 +"sizeinhex" 4. cp.b 0x80060000 0x9f030000 0x"sizeinhex" 5. reboot Recover: - U-boot serial console Signed-off-by: Robert Balas <balasr@iis.ee.ethz.ch> [convert to nvmem] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* tools/libressl: update to 3.3.4Rosen Penev2021-09-051-2/+2
| | | | Signed-off-by: Rosen Penev <rosenp@gmail.com>
* tools/cmake: update to 3.21.2Rosen Penev2021-09-053-4/+4
| | | | | | Refreshed patches. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* tools/bison: update to 3.7.6Rosen Penev2021-09-051-2/+2
| | | | Signed-off-by: Rosen Penev <rosenp@gmail.com>
* tools/dosfstools: update to 4.2Rosen Penev2021-09-052-29/+2
| | | | | | Remove upstream backport. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* tools/findutils: update to 4.8.0Rosen Penev2021-09-051-2/+2
| | | | Signed-off-by: Rosen Penev <rosenp@gmail.com>
* tools/tar: update to 1.34Rosen Penev2021-09-052-3/+3
| | | | | | Refresh patch. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* tools/zstd: update to 1.5.0Rosen Penev2021-09-051-2/+2
| | | | Signed-off-by: Rosen Penev <rosenp@gmail.com>
* firmware-utils: mkmerakifw-old: Add le32 supportMatthew Hagan2021-08-311-22/+41
| | | | | | | | | | | | | mkmerakifw-old was created for the z1 which uses the AR9344 SoC with be32 addressing. The MX64/MX65 devices use the same header style, however these boards use a BCM NSP SoC with le32 addressing. Since we may be booting initramfs images with this header, which may be of any size, within reason, board->imagelen is set to 0. The kernel image shoule be limited in the image Makefile. Signed-off-by: Matthew Hagan <mnhagan88@gmail.com> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* firmware-utils: fix build on not LinuxKevin Darbyshire-Bryant2021-08-212-2/+2
| | | | Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
* firmware-utils: add support for ZyXEL ZLD firmwareVincent Wiemann2021-08-212-1/+832
| | | | | | | | | | | | | | | | This commit adds a tool for extracting and creating firmware archives for: - ZyXEL NWA5121-N - ZyXEL NWA5121-NI - ZyXEL NWA5123-NI - ZyXEL NWA5123-AC - ZyXEL NWA5301 - ZyXEL NWA3560N v2 - ZyXEL WAC6100 - ZyXEL WAC6500 And maybe others... Signed-off-by: Vincent Wiemann <vincent.wiemann@ironai.com>
* firmware-utils: nand_ecc: replace GPL boilerplate with SPDXRafał Miłecki2021-08-091-15/+1
| | | | | | Cc: yajin <yajin@vm-kernel.org> Cc: Felix Fietkau <nbd@nbd.name> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* firmware-utils: trx: replace GPL-2.0-or-later boilerplate with SPDXRafał Miłecki2021-08-091-14/+1
| | | | | | | This was missed because scancode license scanner was confused by comments about crc32buf(). Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* firmware-utils: osbridge-crc: replace GPL-2.0-only boilerplate with SPDXRafał Miłecki2021-08-091-5/+1
| | | | | | | | | This was missed because scancode license scanner was confused by comments about crc32buf(). Cc: Gabor Juhos <juhosg@openwrt.org> Cc: Gabor Juhos <juhosg@freemail.hu> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* firmware-utils: mkmylofw: replace GPL-2.0-or-later boilerplate with SPDXRafał Miłecki2021-08-091-16/+1
| | | | | | | | | This was missed because scancode license scanner was confused by a comment about (no) copyrights in the init_crc_table(). Cc: Gabor Juhos <juhosg@openwrt.org> Cc: Gabor Juhos <juhosg@freemail.hu> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* firmware-utils: mkmerakifw-old: replace GPL-2.0-only boilerplate with SPDXRafał Miłecki2021-08-091-5/+1
| | | | | | | | | This was missed because scancode license scanner was confused by a comment about Cisco's GPL code github repository. Cc: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Acked-by: Christian Lamparter <chunkeey@gmail.com>
* firmware-utils: add GPL 2.0 SPDX to files with no license infoRafał Miłecki2021-08-0613-0/+13
| | | | | | These files fall under the project license: GPL-2.0-only. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* firmware-utils: tplink-safeloader: replace BSD-2-Clause boilerplate with SPDXRafał Miłecki2021-08-061-20/+1
| | | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Acked-by: Matthias Schiffer <mschiffer@universe-factory.net>
* firmware-utils: seama: replace BSD-3-Clause boilerplate with SPDXRafał Miłecki2021-08-061-31/+1
| | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* firmware-utils: replace GPL 2.0+ boilerplate/reference with SPDXRafał Miłecki2021-08-0627-314/+28
| | | | | | | This uses "GPL-2.0-or-later" header for files identified using scancode license scanner with 100% score as GPL 2.0 or later. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* firmware-utils: replace GPL 2.0 boilerplate/reference with SPDXRafał Miłecki2021-08-0637-218/+36
| | | | | | | | | This uses "GPL-2.0-only" header for files identified using scancode license scanner with 100% score as GPL 2.0. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Stijn Tintel <stijn@linux-ipv6.be>
* ath79: add support for TP-Link RE455 v1Roberto Valentini2021-07-111-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link RE455 v1 is a dual band router/range-extender based on Qualcomm/Atheros QCA9563 + QCA9880. This device is nearly identical to RE450 v3 Specification: - 775 MHz CPU - 64 MB of RAM (DDR2) - 8 MB of FLASH (SPI NOR) - 3T3R 2.4 GHz - 3T3R 5 GHz - 1x 10/100/1000 Mbps Ethernet (AR8033 PHY) - 7x LED, 4x button - UART header on PCB[1] Flash instruction: Apply factory image in OEM firmware web-gui. [1] Didn't work, probably need to short unpopulated resistor R64 and R69 as RE450v3 Signed-off-by: Roberto Valentini <valantin89@gmail.com>
* ath79: add support for TP-Link TL-WR941HP v1Diogenes Rengo2021-07-041-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifications: SOC: Qualcomm Atheros TP9343 (750 MHz) Flash: 8 Mb (GigaDevice GD25Q64CSIG) RAM: 64 Mb (Zentel A3R12E40DBF-8E) Serial: yes, 4-pin header Wlan: Qualcomm Atheros TP9343, antenna: MIM0 3x3:3 RP-SMA 3 x 2.4GHz power amp module Skyworks (SiGe) SE2576L Ethernet: Qualcomm Atheros TP9343 Lan speed: 100M ports: 4 Lan speed: 100M ports: 1 Other info: same case, ram and flash that TP-Link TL-WR841HP, different SOC https://forum.openwrt.org/t/adding-device-support-tp-link-wr941hp/ Label MAC addresses based on vendor firmware: LAN *:ee label WAN *:ef label +1 WLAN *:ee label The label MAC address found in "config" partition at 0x8 Flash instruction: Upload the generated factory firmware on web interface. Signed-off-by: Diogenes Rengo <rengocbx250@gmail.com> [remove various whitespace issues, squash commits, use short 0x0] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* tools/cmake: update to 3.20.3 + build with NinjaRosen Penev2021-06-201-3/+16
| | | | | | | | | | | | | | | | | | | Compile with Ninja. Ninja compiles faster and is more stable with parallel builds. Routines copied from cmake.mk. Speed improves from: Executed in 127.47 secs fish external usr time 17.02 mins 446.00 micros 17.02 mins sys time 1.18 mins 40.00 micros 1.18 mins to: Executed in 118.91 secs fish external usr time 17.28 mins 499.00 micros 17.28 mins sys time 1.13 mins 45.00 micros 1.13 mins Signed-off-by: Rosen Penev <rosenp@gmail.com>
* tools/squashfskit4: fix compilation under big endianRosen Penev2021-06-203-6/+18
| | | | | | | | | | The macro used is for the wrong struct. Just byte swap manually. Refreshed patches. Tested on sparc64. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* tools/e2fsprogs: update to 1.46.2Rosen Penev2021-06-201-3/+3
| | | | | | Fix wrong FPIC flag to fix compilation under sparc64 Signed-off-by: Rosen Penev <rosenp@gmail.com>
* tools/libressl: update to 3.3.3Rosen Penev2021-06-201-3/+3
| | | | | | Fix wrong FPIC variable usage. Fixes compilation under sparc64 host. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* treewide: remove BUILD_PARALLEL from CMake packagesRosen Penev2021-06-191-1/+0
| | | | | | | | | | | | | It's already default. The only exception is mt76 which has Ninja disabled. Found with: git grep BUILD_PARALLEL | cut -d ':' -f 1 | sort -u > par git grep cmake.mk | cut -d ':' -f 1 > cmake comm -1 -2 par cmake Signed-off-by: Rosen Penev <rosenp@gmail.com>
* firmware-utils: tplink-safeloader: support Archer A6 v3 CAStijn Segers2021-06-201-0/+1
| | | | | | | | | The Canadian edition of the TP-Link Archer A6 v3 uses a different header, but otherwise it's identical to the already supported EU/US editions. Signed-off-by: Stijn Segers <foss@volatilesystems.org> Tested-by: Brian Lee <dev@leebrian.me> Reviewed-by: Philip Prindeville <philipp@redfish-solutions.com>
* tools/ccache: update to 4.3Rosen Penev2021-06-191-4/+2
| | | | | | Remove BUILD_PARALLEL as it's default now. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* ramips: add support for TP-Link Archer C6 v3Amish Vishwakarma2021-06-131-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch adds support for the TP-Link Archer C6 v3 (FCC ID TE7A6V3) The patch adds identification changes to the existing TP-Link Archer A6, by Vinay Patil <post2vinay@gmail.com>, which has identical hardware. Specification ------------- MediaTek MT7621 SOC RAM: 128MB DDR3 SPI Flash: W25Q128 (16MB) Ethernet: MT7530 5x 1000Base-T WiFi 5GHz: Mediatek MT7613BE WiFi 2.4GHz: Mediatek MT7603E UART/Serial: 115200 8n1 Device Configuration & Serial Port Pins --------------------------------------- ETH Ports: LAN4 LAN3 LAN2 LAN1 WAN _______________________ | | Serial Pins: | VCC GND TXD RXD | |_____________________| LEDs: Power Wifi2G Wifi5G LAN WAN Build Output ------------ The build will generate following set of files [1] openwrt-ramips-mt7621-tplink_archer-c6-v3-initramfs-kernel.bin [2] openwrt-ramips-mt7621-tplink_archer-c6-v3-squashfs-factory.bin [3] openwrt-ramips-mt7621-tplink_archer-c6-v3-squashfs-sysupgrade.bin How to Use - Flashing from TP-Link Web Interface ------------------------------------------------ * Go to "Advanced/System Tools/Firmware Update". * Click "Browse" and upload the OpenWrt factory image: factory.bin[2] * Click the "Upgrade" button, and select "Yes" when prompted. TFTP Booting ------------ Setup a TFTP boot server with address 192.168.0.5. While starting U-boot press '4' key to stop autoboot. Copy the initramfs-kernel.bin[1] to TFTP server folder, rename as test.bin From u-boot command prompt run tftpboot followed by bootm. Recovery -------- Archer A6 V3 has recovery page activated if SPI booting from flash fails. Recovery page can be activated by powercycling the router four times before the boot process is complete. Note: TFTP boot can be activated only from u-boot serial console. Device recovery address: 192.168.0.1 Signed-off-by: Amish Vishwakarma <vishwakarma.amish@gmail.com> [fix indent] Signed-off-by: David Bauer <mail@david-bauer.net>
* tools: build ninja before ccache to fix the build orderFelix Fietkau2021-06-122-2/+2
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* tools: fix dependencies of cmake packagesFelix Fietkau2021-06-121-1/+1
| | | | | | Make cmake depend on ninja, so that other cmake based tools also depend on it Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: add ninja build tool and make it available for cmakeFelix Fietkau2021-06-123-1/+2319
| | | | | | | | | | | | ninja is faster at building cmake packages than make, and according to reports also more reliable at handling parallel builds This commit includes a patch that adds GNU make jobserver support, in order to allow more precise control over the number of parallel tasks Enable parallel build by default for packages using ninja Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Rosen Penev <rosenp@gmail.com>
* tools/isl: bump to 0.24Rui Salvaterra2021-06-061-2/+2
| | | | | | Tested with Graphite and -floop-nest-optimize, without issues. Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* ath79: use dynamic partitioning for TP-Link CPE seriesMichael Pratt2021-06-051-22/+11
| | | | | | | | | | | | | | | | | | | | | | | | | CPExxx and WBSxxx boards with AR9344 SOC use the OKLI lzma kernel loader with the offset of 3 blocks of length 4k (0x3000) in order to have a fake "kernel" that cannot grow larger than how it is defined in the now static OEM partition table. Before recent changes to the mtdsplit driver, the uImage parser for OKLI only supported images that started exactly on an eraseblock boundary. The mtdsplit parser for uImage now supports identifying images with any magic number value and at any offset from the eraseblock boundary using DTS properties to define those values. So, it is no longer necessary to use fixed sizes for kernel and rootfs Tested-by: Andrew Cameron <apcameron@softhome.net> [CPE510 v2] Tested-by: Bernhard Geier <freifunk@geierb.de> [WBS210 v2] Tested-by: Petrov <d7c48mWsPKx67w2@gmail.com> [CPE210 v1] Signed-off-by: Michael Pratt <mcpratt@pm.me>
* ramips: add support for TP-Link Archer C6U v1 (EU)Georgi Vlaev2021-05-261-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for TP-Link Archer C6U v1 (EU). The device is also known in some market as Archer C6 v3. This patch supports only Archer C6U v1 (EU). Specifications: -------------- * SoC: Mediatek MT7621AT 2C2T, 880MHz * RAM: 128MB DDR3 * Flash: 16MB SPI NOR flash (Winbond 25Q128) * WiFi 5GHz: Mediatek MT7613BEN (2x2:2) * WiFi 2.4GHz: Mediatek MT7603EN (2x2:2) * Ethernet: MT7630, 5x 1000Base-T. * LED: Power, WAN, LAN, WiFi 2GHz and 5GHz, USB * Buttons: Reset, WPS. * UART: Serial console (115200 8n1), J1(GND:3) * USB: One USB2 port. Installation: ------------ Install the OpenWrt factory image for C6U is from the TP-Link web interface. 1) Go to "Advanced/System Tools/Firmware Update". 2) Click "Browse" and upload the OpenWrt factory image: openwrt-ramips-mt7621-tplink_archer-c6u-v1-squashfs-factory.bin. 3) Click the "Upgrade" button, and select "Yes" when prompted. Recovery to stock firmware: -------------------------- The C6U bootloader has a failsafe mode that provides a web interface (running at 192.168.0.1) for reverting back to the stock TP-Link firmware. The failsafe interface is triggered from the serial console or on failed kernel boot. Unfortunately, there's no key combination that enables the failsafe mode. This gives us two options for recovery: 1) Recover using the serial console (J1 header). The recovery interface can be selected by hitting 'x' when prompted on boot. 2) Trigger the bootloader failsafe mode. A more dangerous option is force the bootloader into recovery mode by erasing the OpenWrt partition from the OpenWrt's shell - e.g "mtd erase firmware". Please be careful, since erasing the wrong partition can brick your device. MAC addresses: ------------- OEM firmware configuration: D8:07:B6:xx:xx:83 : 5G D8:07:B6:xx:xx:84 : LAN (label) D8:07:B6:xx:xx:84 : 2.4G D8:07:B6:xx:xx:85 : WAN Signed-off-by: Georgi Vlaev <georgi.vlaev@konsulko.com>
* ramips: add support for TP-Link Archer A6 v3Vinay Patil2021-05-261-1/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch adds support for the TP-Link Archer A6 v3 The router is sold in US and India with FCC ID TE7A6V3 Specification ------------- MediaTek MT7621 SOC RAM: 128MB DDR3 SPI Flash: W25Q128 (16MB) Ethernet: MT7530 5x 1000Base-T WiFi 5GHz: Mediatek MT7613BE WiFi 2.4GHz: Mediatek MT7603E UART/Serial: 115200 8n1 Device Configuration & Serial Port Pins --------------------------------------- ETH Ports: LAN4 LAN3 LAN2 LAN1 WAN _______________________ | | Serial Pins: | VCC GND TXD RXD | |_____________________| LEDs: Power Wifi2G Wifi5G LAN WAN Build Output ------------ The build will generate following set of files [1] openwrt-ramips-mt7621-tplink_archer-a6-v3-initramfs-kernel.bin [2] openwrt-ramips-mt7621-tplink_archer-a6-v3-squashfs-factory.bin [3] openwrt-ramips-mt7621-tplink_archer-a6-v3-squashfs-sysupgrade.bin How to Use - Flashing from TP-Link Web Interface ------------------------------------------------ * Go to "Advanced/System Tools/Firmware Update". * Click "Browse" and upload the OpenWrt factory image: factory.bin[2] * Click the "Upgrade" button, and select "Yes" when prompted. TFTP Booting ------------ Setup a TFTP boot server with address 192.168.0.5. While starting U-boot press '4' key to stop autoboot. Copy the initramfs-kernel.bin[1] to TFTP server folder, rename as test.bin From u-boot command prompt run tftpboot followed by bootm. Recovery -------- Archer A6 V3 has recovery page activated if SPI booting from flash fails. Recovery page can be activated from serial console only. Press 'x' while u-boot is starting Note: TFTP boot can be activated only from u-boot serial console. Device recovery address: 192.168.0.1 Thanks to: Frankis for Randmon MAC address fix. Signed-off-by: Vinay Patil <post2vinay@gmail.com> [remove superfluous factory image definition, whitespacing] Signed-off-by: David Bauer <mail@david-bauer.net>
* ccache: Build with ENABLE_DOCUMENTATION=OFFDavid Adair2021-05-231-0/+3
| | | | | | | | | | | | | This adjusts the Makefile to use the new option to turn off the doc builds. It will not cause any problems except a warning about unused options if combined with a ccache source missing the upstream patch. Since a config setting is required to re-enable the doc build this is equivalent to unconditionally disabling the docs if the config setting is not created. Signed-off-by: David Adair <djabhead@aol.com>
* fakeroot: Alpine linux libc.musl build error fixRuslan Isaev2021-05-231-0/+34
| | | | | | | | Prevent build error on Alpine Linux host: libfakeroot.c error: conflicting types for 'id_t' Error relocating openwrt/staging_dir/host/lib/libfakeroot.so: SEND_GET_XATTR: symbol not found Signed-off-by: Ruslan Isaev <legale.legale@gmail.com>
* firmware-utils: fix coverity zytrx.c resource leakKevin Darbyshire-Bryant2021-05-201-1/+3
| | | | | | | | | | | | | | | fix coverity resource leak warning: *len = stat.st_size; mapped = mmap(NULL, stat.st_size, PROT_READ, MAP_SHARED, fd, 0); if (close(fd) < 0) CID 1484880: Resource leaks (RESOURCE_LEAK) Variable "mapped" going out of scope leaks the storage it points to. return NULL; return mapped; } Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
* firmware-utils: zytrx: Add util for ZyXEL specific headerBjørn Mork2021-05-092-0/+227
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ZyXEL NR7101 prepend an additional header to U-Boot images. This header use the TRX magic 0x30524448 (HDR0), but is incompatible with TRX images. This code is reverse-engineered based on matching 32 bit numbers found in the header with lengths and different checksum calculations of the vendor images found on the device. The result was matched against the validation output produced by the bootloader to name the associated header fields. Example bootloader validation output: Zyxel TRX Image 1 --> Found! Header Checksum OK ============ZyXEL header information================== chipId : MT7621A boardId : NR7101 modelId : 07 01 00 01 kernel_len : (14177560) kernelChksum : (0x8DD31F69) swVersionInt : 1.00(ABUV.0)D1 swVersionExt : 1.00(ABUV.0)D1 Zyxel TRX Image 2 --> Found! Header Checksum OK ============ZyXEL header information================== chipId : MT7621A boardId : NR7101 modelId : 07 01 00 01 kernel_len : (14176660) kernelChksum : (0x951A7637) swVersionInt : 1.00(ABUV.0)D0 swVersionExt : 1.00(ABUV.0)D0 ================================================= Check image validation: Image1 Header Magic Number --> OK Image2 Header Magic Number --> OK Image1 Header Checksum --> OK Image2 Header Checksum --> OK Image1 Data Checksum --> OK Image2 Data Checksum --> OK Image1 Stable Flag --> Stable Image1 Try Counter --> 0 Image1: OK Image2: OK The coverage and algorithm for the kernelChksum field is unknown. This field is not validated by the bootloader or the OEM firmware upgrade tool. It is therefore set to a static value for now. The swVersion fields contain free form string values. The OEM firmware use ZyXEL structured version numbers as shown above. The strings are not interpreted or validated on boot, so they can be repurposed for anything we want the bootloader to display to the user. But the OEM web GUI fails to flash images with freeform strings. The purpose of the other strings in the header is not known. The values appear to be static. We assume they are fixed for now, until we have other examples. One of these strings is the platform name, which is taken as an input parameter for support other members of the device family. Signed-off-by: Bjørn Mork <bjorn@mork.no>
* tplink-safeloader: fix product_name of TP-Link AD7200Alex Henrie2021-05-061-1/+1
| | | | | | | | | | | | | | The stock firmware does not accept firmware with "Talon" in the name. Tested on firmware version 1.0.10 Build 20160902 rel. 57400 which came preinstalled, as well as latest firmware version 2.0.1 Build 20170103 rel.71053 flashed from AD7200v1-up-ver2-0-1-P1[20170103-rel71053]_2017-01-04_10.08.28.bin. Fixes: 1a775a4fd033 ("ipq806x: add support for TP-Link Talon AD7200") Signed-off-by: Alex Henrie <alexhenrie24@gmail.com> [added details about vendor firmware] Signed-off-by: Petr Štetiar <ynezz@true.cz>
* ccache: update to 4.2.1DENG Qingfang2021-04-232-3/+3
| | | | | | | Update ccache to 4.2.1 Signed-off-by: DENG Qingfang <dqfext@gmail.com> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [refresh patch]
* firmware-utils: tplink-safeloader: support displaying fw infoRafał Miłecki2021-04-141-4/+127
| | | | | | | | | | Add "-i" option for reading & displaying firmware info. First it lists in-firmware partitions ("fwup-ptn"). Then it checks for human understandable partitions and prints data found in each of them. This new feature is meant for development & debug purposes. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* firmware-utils: mkmylofw: fix blocks paddingRafał Miłecki2021-04-131-1/+1
| | | | | | | | | | | | | | | The old code didn't make sense as it was using "len" variable which was guaranteed to be always 0. Loop right above broken code is: while (len > 0) { } With this recent ALIGN macro fix this resulted in subtracting block size from 0 and calling write_out_padding() with a negative length. To calculate amount of bytes needed for padding & alignment it should be enough to use % 4. Fixes: a2f66229450d ("firmware-utils: fix few random warnings") Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* firmware-utils: zyimage: drop POSIX SOURCE definesRafał Miłecki2021-04-131-2/+0
| | | | | | | | | | This fixes: src/zyimage.c:10:0: warning: "_POSIX_SOURCE" redefined src/zyimage.c:11:0: warning: "_POSIX_C_SOURCE" redefined This change has been tested on Linux with -Wextra and on Mac OS. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>