Commit Graph

1763 Commits

Author SHA1 Message Date
Rosen Penev
977bf5e980 tools/ccache: update to 4.4.2
Refreshed patch.

Disable hiredis backend since it seems to default to it now.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-10-10 13:05:54 -10:00
Rosen Penev
7c0fb87443 tools/meson: fix usage with SDK
The python path cannot be embedded in the meson binary as it changes
with the SDK.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-10-10 19:39:32 +01:00
Rosen Penev
c2222f74c8 tools/meson: update to 0.59.2
Update install procedure based on upstream feedback. Normally, meson is
to be installed with pip. But as pip is not mandated by the build
system, it cannot be used. Upstream provides a nice script to pack meson
automatically.

Moved src/ to files/. No need to copy to BUILD_DIR.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-10-07 14:09:40 -10:00
Kevin Darbyshire-Bryant
81ba544f88 firmware-utils: bump to git HEAD
f9ad6b3 Add more missing includes for byte swap operations

Basically stop it exploding on MacOS

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2021-10-05 21:52:58 +01:00
Rosen Penev
297cb8c147 tools/cmake: update to 3.21.3
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-10-05 20:59:51 +02:00
Rosen Penev
5266a27359 tools/bison: update to 3.8.2
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-10-05 20:59:41 +02:00
Petr Štetiar
8cc9a74a3f firmware-utils: update to version 2021-10-05
Includes following changes:

 db65821f006c cmake: fix missing install target
 3a0cfc856991 Add initial GitLab CI support
 8f47adea6f87 Add missing includes for byte swap operations
 fbafae9f8037 Convert to CMake based project

Additionaly moves source code into separate Git project repository and
converts the package build to utilize CMake.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
[rmilecki: rebase, update to the latest repo git & rm -r src]
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-10-05 16:20:10 +02:00
Andrew Cameron
ac03e24635 ath79: add support for TP-Link CPE710-v1
TP-Link CPE710-v1 is an outdoor wireless CPE for 5 GHz with
one Ethernet port based on the AP152 reference board

Specifications:
- SoC: QCA9563-AL3A MIPS 74kc @ 775MHz, AHB @ 258MHz
- RAM: 128MiB DDR2 @ 650MHz
- Flash: 16MiB SPI NOR Based on the GD25Q128
- Wi-Fi 5Ghz: ath10k chip (802.11ac for up to 867Mbps on 5GHz wireless
  data rate) Based on the QCA9896
- Ethernet: one 1GbE port
- 23dBi high-gain directional 2×2 MIMO antenna and a dedicated metal
  reflector
- Power, LAN, WLAN5G Blue LEDs
- 3x Blue LEDs

Flashing instructions:
Flash factory image through stock firmware WEB UI or through TFTP
To get to TFTP recovery just hold reset button while powering on for
around 30-40 seconds and release.
Rename factory image to recovery.bin
Stock TFTP server IP:192.168.0.100
Stock device TFTP address:192.168.0.254

Signed-off-by: Andrew Cameron <apcameron@softhome.net>
[convert to nvmem, fix MAC assignment in 11-ath10k-caldata]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-09-25 19:28:54 +02:00
Felix Fietkau
ea44aebc27 tools/fakeroot: fix build error on macOS
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-09-25 09:38:46 +02:00
Alan Luck
2c9a07ed28 ramips: add missing information to dlink headers
Add additional header information required for newer
bootloaders found on DIR-2660-A1 & A2.

Also remove the MTD splitter compatible from the second firmware
partition, as OpenWrt only supports handling of the first one.

Signed-off-by: Alan Luck <luckyhome2008@gmail.com>
[rephrase commit message, remove removal of read-only flags]
Signed-off-by: David Bauer <mail@david-bauer.net>
2021-09-24 12:32:28 +02:00
Hauke Mehrtens
96e05e2e36 libtool: Revert "libtool: bump to 2.4.6"
This breaks the package builds using the SDK.
The targets all build fine, but the package builder fails on many
packages. The package builder uses the OpenWrt SDK.

This reverts commit c377d874be.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-09-23 13:39:11 +02:00
Eneas U de Queiroz
c377d874be libtool: bump to 2.4.6
This updates libtool to its current release, from 2015.  Current patches
were renumbered and given a description text.  The fix in
160-passthrough-ssp.patch is no longer needed.

A patch to speed up build was cherry-picked, and another openwrt
specific patch was needed to not use quotes in $(SHELL), to acommodate
our "SHELL=/usr/bin/env bash" usage.

The already present call to ./bootstrap ensures that generated files are
refreshed, so the patches are applied only to their sources.  Also, that
bootstrap call was adjusted to run at the appropriate time when QUILT=1.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2021-09-20 15:21:17 +02:00
Rosen Penev
8c863f604d tools/e2fsprogs: update to 1.46.4
Refresh patches.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-09-20 15:21:17 +02:00
Rosen Penev
0d983c2a68 tools/autoconf-archive: update to 2021.02.19
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-09-20 15:21:17 +02:00
Rosen Penev
d23c5ecb19 tools/sstrip: update to 3.2
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-09-20 15:21:17 +02:00
Rosen Penev
674bda09e2 tools/sparse: update to 0.6.4
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-09-20 15:21:17 +02:00
Rosen Penev
aae4bf7c62 tools/mtools: update to 4.0.35
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-09-20 15:21:17 +02:00
Rosen Penev
fc9682ed39 tools/m4: update to 1.4.19
Remove upstreamed patches.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-09-20 15:21:17 +02:00
Rosen Penev
22c30ed958 tools/fakeroot: update to 1.26
Remove upstreamed patches. Refresh other.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-09-20 15:21:17 +02:00
Rosen Penev
af1853af60 tools/bison: update to 3.8.1
Remove upstreamed patch.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-09-20 15:21:17 +02:00
Rosen Penev
aa344bcfa8 tools/pkgconf: update to 1.8.0
Switch to compiling with meson for faster and more reliable compilation.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-09-16 16:31:28 -10:00
Rosen Penev
c4dfdde2ea tools: add meson
meson is a next generation build system designed to have good defaults,
simpler build files, and fast compilation.

It is built upon python and uses ninja for compilation. The latter
provides fast by default (parallel) and problem free compilation.

There are over 40 packages already successfully using meson. The next
commit will convert pkgconf to use meson compilation.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-09-16 16:31:28 -10:00
Rosen Penev
4b898afdd2 tools/mm-macros: remove
ccaaab1c04 says that this is in the
codebase because of libsigc++, which is not in the codebase anymore.
Neither in base nor in packages. It doesn't seem to be needed by
anything else either. GNOME packages have transitioned to using meson,
which does not use m4 files.

Tested local compile with CONFIG_ALL. No problems seen.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-09-16 16:27:32 -10:00
Sander Vanheule
46dec9952b firmware-utils: tplink-safeloader: set EAP235-Wall v1 soft-version
Starting with v3 of the vendor firmware for the TP-Link EAP235-Wall v1,
downgrades to firmware versions below v3 as not allowed.  Since OpenWrt
uses version 0.0.0 as a default, this causes the factory install to fail
on devices with a recent firmware. This failure is associated by the
following message on the device's serial console:

    EAP235/230-Wall forbid fw reverted from 3.x.x to lower version!

Vendor firmware (v3) also uses build and release numbers to compare
images, so identical version numbers are very unlikely to cause issues.
Bump the firmware version to 3.0.0 to ensure users can install OpenWrt
on their devices.

Reported-by: Colton Conor <colton.conor@gmail.com>
Tested-by: Colton Conor <colton.conor@gmail.com>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2021-09-13 18:36:15 +02:00
Sander Vanheule
8dba4741b3 firmware-utils: tplink-safeloader: improve soft-version customisation
Some devices using the safeloader firmware format require a minimum or
specific version to be set in the soft-version metadata partition.
Currently only custom text values can be provided, but not all device
firmware support this format.

Modify the device info struct to allow for more well-defined types of
soft-version overwrites, and provide a few macros for easy value
initialisation. Requires all existing values to be updated to match the
new structure.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
[Adapt TL-WA1201-V2 entry too]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-09-13 18:36:15 +02:00
Sander Vanheule
df63619eea firmware-utils: tplink-safeloader: use revision field
The structured soft-version partition has a field which contains a
(source) revision number. Factory images used to include this, but
it was accidentaly removed during an earlier refactoring.

Include the source revision number again in the generated soft-version
partition. Additionaly, also show this revision number when printing
image info.

Fixes: 1a211af2cb ("firmware-utils: tplink-safeloader: refactor meta-partition generation")
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2021-09-09 23:36:13 +02:00
Ivan Pavlov
cdc646c032 tools/libtool: update to 2.4.2
Refresh patches.
Remove upstreamed: 001-fix-func_append.patch

Signed-off-by: Ivan Pavlov <AuthorReflex@gmail.com>
2021-09-07 21:10:53 +02:00
Rafał Miłecki
2f7a73329f firmware-utils: seama.h: replace LGPL-2.1-or-later boilerplate with SPDX
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>
2021-09-07 09:37:35 +02:00
Kevin Darbyshire-Bryant
96a7a4738c tools/findutils: fix build on macos
Use same fix as homebrew:

https://github.com/Homebrew/homebrew-core/pull/69761

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2021-09-06 09:24:23 +01:00
Robert Balas
baacdd53df ath79: add support for TP-Link TL-WA1201 v2
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>
2021-09-05 23:52:35 +02:00
Rosen Penev
f78ad901e1 tools/libressl: update to 3.3.4
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-09-05 21:28:55 +02:00
Rosen Penev
eef7f9ea37 tools/cmake: update to 3.21.2
Refreshed patches.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-09-05 21:28:43 +02:00
Rosen Penev
f431f2c4b6 tools/bison: update to 3.7.6
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-09-05 21:28:32 +02:00
Rosen Penev
fe1942a87d tools/dosfstools: update to 4.2
Remove upstream backport.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-09-05 21:28:20 +02:00
Rosen Penev
af8a5d240b tools/findutils: update to 4.8.0
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-09-05 21:28:08 +02:00
Rosen Penev
cb8e5ede19 tools/tar: update to 1.34
Refresh patch.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-09-05 21:26:48 +02:00
Rosen Penev
c5953d5f30 tools/zstd: update to 1.5.0
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-09-05 21:26:32 +02:00
Matthew Hagan
6f39649555 firmware-utils: mkmerakifw-old: Add le32 support
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>
2021-08-31 12:39:53 +02:00
Kevin Darbyshire-Bryant
c9faa84b31 firmware-utils: fix build on not Linux
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2021-08-21 20:16:39 +01:00
Vincent Wiemann
c4a426746f firmware-utils: add support for ZyXEL ZLD firmware
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>
2021-08-21 15:59:39 +02:00
Rafał Miłecki
5ecd99f7d2 firmware-utils: nand_ecc: replace GPL boilerplate with SPDX
Cc: yajin <yajin@vm-kernel.org>
Cc: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-08-09 16:08:59 +02:00
Rafał Miłecki
0e85dc0e91 firmware-utils: trx: replace GPL-2.0-or-later boilerplate with SPDX
This was missed because scancode license scanner was confused by
comments about crc32buf().

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-08-09 16:08:59 +02:00
Rafał Miłecki
cc8bc2168d firmware-utils: osbridge-crc: replace GPL-2.0-only boilerplate with SPDX
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>
2021-08-09 16:08:59 +02:00
Rafał Miłecki
f2e86d54c4 firmware-utils: mkmylofw: replace GPL-2.0-or-later boilerplate with SPDX
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>
2021-08-09 16:08:59 +02:00
Rafał Miłecki
fe54c3a0db firmware-utils: mkmerakifw-old: replace GPL-2.0-only boilerplate with SPDX
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>
2021-08-09 16:08:59 +02:00
Rafał Miłecki
2dc1e4b488 firmware-utils: add GPL 2.0 SPDX to files with no license info
These files fall under the project license: GPL-2.0-only.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-08-06 09:50:44 +02:00
Rafał Miłecki
e7ae32b8df firmware-utils: tplink-safeloader: replace BSD-2-Clause boilerplate with SPDX
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Matthias Schiffer <mschiffer@universe-factory.net>
2021-08-06 09:50:44 +02:00
Rafał Miłecki
63bf027cc1 firmware-utils: seama: replace BSD-3-Clause boilerplate with SPDX
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-08-06 09:50:44 +02:00
Rafał Miłecki
60aa12984a firmware-utils: replace GPL 2.0+ boilerplate/reference with SPDX
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>
2021-08-06 09:50:42 +02:00
Rafał Miłecki
f705008d7e firmware-utils: replace GPL 2.0 boilerplate/reference with SPDX
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>
2021-08-06 09:34:55 +02:00
Roberto Valentini
af56075a8f ath79: add support for TP-Link RE455 v1
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>
2021-07-11 16:58:12 +02:00
Diogenes Rengo
cce2e8db56 ath79: add support for TP-Link TL-WR941HP v1
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>
2021-07-04 18:07:35 +02:00
Rosen Penev
5cff6c1abb tools/cmake: update to 3.20.3 + build with Ninja
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>
2021-06-20 20:12:14 -10:00
Rosen Penev
3cbdc13bc1 tools/squashfskit4: fix compilation under big endian
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>
2021-06-20 18:59:36 -10:00
Rosen Penev
b154a2f8d3 tools/e2fsprogs: update to 1.46.2
Fix wrong FPIC flag to fix compilation under sparc64

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-06-20 18:10:15 -10:00
Rosen Penev
bf4dbbb55e tools/libressl: update to 3.3.3
Fix wrong FPIC variable usage. Fixes compilation under sparc64 host.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-06-20 15:20:54 -10:00
Rosen Penev
2e745e9be6 treewide: remove BUILD_PARALLEL from CMake packages
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>
2021-06-19 20:44:59 -10:00
Stijn Segers
b6245fbd58 firmware-utils: tplink-safeloader: support Archer A6 v3 CA
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>
2021-06-20 00:49:06 +02:00
Rosen Penev
90338370d1 tools/ccache: update to 4.3
Remove BUILD_PARALLEL as it's default now.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-06-19 08:42:50 -10:00
Amish Vishwakarma
d22fb7f4fd ramips: add support for TP-Link Archer C6 v3
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>
2021-06-13 11:32:31 +02:00
Felix Fietkau
fa0aea53b2 tools: build ninja before ccache to fix the build order
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-12 14:33:57 +02:00
Felix Fietkau
d45baa860f tools: fix dependencies of cmake packages
Make cmake depend on ninja, so that other cmake based tools also depend on it

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-12 12:40:27 +02:00
Felix Fietkau
97258f5363 build: add ninja build tool and make it available for cmake
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>
2021-06-12 10:46:39 +02:00
Rui Salvaterra
609aa39783 tools/isl: bump to 0.24
Tested with Graphite and -floop-nest-optimize, without issues.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-06-06 00:26:13 +02:00
Michael Pratt
7b9a0c264c ath79: use dynamic partitioning for TP-Link CPE series
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>
2021-06-05 23:39:14 +02:00
Georgi Vlaev
a46ad596a3 ramips: add support for TP-Link Archer C6U v1 (EU)
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>
2021-05-26 23:10:25 +02:00
Vinay Patil
f8f8935adb ramips: add support for TP-Link Archer A6 v3
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>
2021-05-26 23:10:14 +02:00
David Adair
2d15468323 ccache: Build with ENABLE_DOCUMENTATION=OFF
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>
2021-05-23 15:11:38 +02:00
Ruslan Isaev
7a70f78fb7 fakeroot: Alpine linux libc.musl build error fix
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>
2021-05-23 15:11:19 +02:00
Kevin Darbyshire-Bryant
baf2a50ef3 firmware-utils: fix coverity zytrx.c resource leak
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>
2021-05-20 11:56:38 +01:00
Bjørn Mork
48cad07a55 firmware-utils: zytrx: Add util for ZyXEL specific header
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>
2021-05-09 09:15:44 +02:00
Alex Henrie
dfef88b6ca tplink-safeloader: fix product_name of TP-Link AD7200
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: 1a775a4fd0 ("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>
2021-05-06 09:51:58 +02:00
DENG Qingfang
3ebfd0078d ccache: update to 4.2.1
Update ccache to 4.2.1

Signed-off-by: DENG Qingfang <dqfext@gmail.com>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [refresh patch]
2021-04-23 20:57:33 +02:00
Rafał Miłecki
5eb3508ad2 firmware-utils: tplink-safeloader: support displaying fw info
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>
2021-04-14 14:04:04 +02:00
Rafał Miłecki
d4f2c2914a firmware-utils: mkmylofw: fix blocks padding
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: a2f6622945 ("firmware-utils: fix few random warnings")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-04-13 14:00:49 +02:00
Rafał Miłecki
489aa752d7 firmware-utils: zyimage: drop POSIX SOURCE defines
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>
2021-04-13 13:18:17 +02:00
Petr Štetiar
e6d66375cb tplink-safeloader: fix C7v5 factory flashing from vendor fw > v1.1.x
Currently it's not possible to flash factory images on devices shipped
with vendor firmware versions 1.1.0 Build 20201120 rel. 50406 (published
2020-12-22):

 (curFw_ver, newFw_ver) == (1.1, 1.0) [NM_Error](nm_checkSoftVer) 00848: Firmwave not supports, check failed.
 [NM_Error](nm_checkUpdateContent) 01084: software version dismatched
 [NM_Error](nm_buildUpgradeStruct) 01188: checkUpdateContent failed.

They've even following note in release notes:

 Note: You will be unable to downgrade to the previous firmware version
       after updating this firmware.

This version check in vendor firmware is implemented in
/usr/bin/nvrammanager binary likely as following C code[1]:

 sscanf(buf, "%d.%d.%*s",&upd_fw_major, &upd_fw_minor);
 ...
 if (((int)upd_fw_major < (int)cur_fw_major) ||
     ((ret = 1, cur_fw_major == upd_fw_major && (upd_fw_minor < (int)cur_fw_minor)))) {
       ret = 0;
       printf("[NM_Error](%s) %05d: Firmwave not supports, check failed.\r\n\r\n","nm_checkSoftVer" ,0x350);
 }
 ...
 return ret;

So in order to fix this and make it future proof it should be enough to
ship our factory firmware images with major version 7 (lucky number).

Tested on latest firmware version 1.1.2 Build 20210125 rel.37999:

 Firmwave supports, check OK.
  (curFw_ver, newFw_ver) == (1.1, 7.0) check firmware ok!

Flashing back to vendor firmware
c7v5_us-up-ver1-1-2-P1[20210125-rel37999]_2021-01-25_10.33.55.bin works
as well:

 U-Boot 1.1.4-gbec22107-dirty (Nov 18 2020 - 18:19:12)
 ...
 Firmware downloaded... filesize = 0xeeae77 fileaddr = 0x80060000.
 Firmware Recovery file length : 15642231
 Firmware process id 2.
 handle_fw_cloud 146
 Image verify OK!
 Firmware file Verify ok!
 product-info:product_name:Archer C7
 product_ver:5.0.0
 special_id:55530000
 [Error]sysmgr_cfg_checkSupportList(): 1023 @ specialId 45550000 NOT Match.
 Firmware supports, check OK.
 Firmware Recovery check ok!

1. https://gist.github.com/ynezz/2e0583647d863386a66c3d231541b6d1

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2021-04-13 10:29:25 +02:00
Rafał Miłecki
1a55a2b112 firmware-utils: add -Wall to most tools
This helps spotting possible problems

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-04-09 11:05:57 +02:00
Rafał Miłecki
69e9138080 firmware-utils: fix -Wpointer-sign warnings
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-04-09 11:05:54 +02:00
Rafał Miłecki
052a30d65e firmware-utils: fix -Wmaybe-uninitialized warnings
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-04-09 10:46:15 +02:00
Rafał Miłecki
a2f6622945 firmware-utils: fix few random warnings
1. -Wunused-label
2. -Wparentheses
3. -Wmisleading-indentation
4. -Wformat-overflow

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-04-09 10:46:15 +02:00
Rafał Miłecki
7c01e2bac1 firmware-utils: fix unused variable warnings
This fixes warnings from the:
1. -Wunused-variable
2. -Wunused-but-set-variable

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-04-09 10:46:15 +02:00
Rafał Miłecki
e65b633a5b firmware-utils: fix all -Wformat warnings
1. Use %hhu for uint8_t
2. Use %z for size_t

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-04-09 10:46:15 +02:00
Rafał Miłecki
9b4fc4cae9 firmware-utils: bcm4908img: convert into a package
bcm4908img is a tool managing BCM4908 platform images. It's used for
creating them as well as checking, modifying and extracting data from.

It's required by both: host (for building firmware images) and target
(for sysupgrade purposes). Make it a host/target package.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-04-08 10:50:59 +02:00
Rafał Miłecki
5a2086d230 firmware-utils: bcm4908img: fix uninitialized var usage
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-04-08 10:50:59 +02:00
Rafał Miłecki
ed7edf88e2 firmware-utils: bcm4908img: extract bootfs without padding
JFFS2 bootfs partition in a BCM4908 image usually includes some padding.
For flashing it individually (writing to designed MTD partition) we want
just JFFS2 data.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-04-07 08:02:41 +02:00
Rafał Miłecki
dcbde11af1 firmware-utils: bcm4908img: fix extracting cferom
Fix offset to extract proper data when image contains vendor header.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-04-07 00:22:37 +02:00
Rafał Miłecki
e33957c241 firmware-utils: bcm4908img: support extracting bootfs & rootfs
It's required for upgrading firmware using single partitions instead of
just blindly writing whole image.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-04-07 00:21:40 +02:00
Rafał Miłecki
5314cab729 firmware-utils: bcm4908img: replace size with offset
It's much easier to operate on BCM4908 image data with absolute offset
of each section stored. It doesn't require summing sizes over and over.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-04-07 00:12:01 +02:00
Rafał Miłecki
ed847ef5f3 firmware-utils: bcm4908img: add bootfs support
This adds support for accessing bootfs JFFS2 partition in the BCM4908
image. Support includes:
1. Listing files
2. Renaming file (requires unchanged name length)

Above commands are useful for flashing BCM4908 images which by defualt
come with cferom.000 file and require renaming it.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-04-05 10:13:05 +02:00
Rafał Miłecki
9c039d56a1 firmware-utils: bcm4908img: support extracting image data
It's useful for upgrading cferom, firmware, etc.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-04-05 10:05:25 +02:00
Rafał Miłecki
6af45b842b firmware-utils: bcm4908img: find cferom size
It's important for modifying / extracting firmware content. cferom is
optional image content at the file beginning.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-04-05 10:05:09 +02:00
Rafał Miłecki
9b9184f178 firmware-utils: bcm4908img: use "info" command displaying file info
BCM4908 image format contains some info that may be useful for info /
debugging purposes.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-04-05 10:03:59 +02:00
Rafał Miłecki
d533b27bc0 firmware-utils: bcm4908img: support reading from stdin
1. Don't allow pipe stdin as we need to fseek()
2. Don't alow TTY as it doesn't make sense for binary input

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-04-05 09:54:10 +02:00
Rafał Miłecki
a39f85d8b6 firmware-utils: bcm4908img: detect Netgear vendor firmware
Netgear uses CHK header which needs to be skipped when validating
BCM4908 image. Detect it directly in the bcm4908img tool. Dealing with
binary structs and endianess is way simpler in C.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-04-05 09:54:10 +02:00
Rafał Miłecki
7d5f743942 firmware-utils: bcm4908img: extract parsing code
Move code parsing existing firmware file to separated function. This
cleans up existing code and allows reusing parsing code for other
commands.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-04-05 09:54:10 +02:00
Rafał Miłecki
a3611432a6 firmware-utils: bcm4908kernel: name struct fields
Less magic names / values.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-03-24 22:45:00 +01:00
Rafał Miłecki
1ff7569387 firmware-utils: bcm4908img: name fields & values
Less magic numbers

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-03-24 17:30:26 +01:00
Tony Ambardar
cbc37d60cb tools/sparse: update to version 0.6.3
Update to the latest stable release.

This fixes a segfault and build failure seen compiling the 5.10 kernel
for x86/64. With this update, builds complete and sparse generates the
usual large volume of warnings as on 5.4 kernels.

Reported-by: Javier Marcet <javier@marcet.info>
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2021-03-19 00:59:22 +01:00
Hauke Mehrtens
4d9f69322c tools: otrx: allow own magic
This allows to specify an own magic instead of using the default magic
value TRX_MAGIC. If no own magic is specified the default one will be
used.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-03-15 16:57:34 +01:00