project/firmware-utils.git
3 months agotplink-safeloader: bump EAP225-V3 compat_level openwrt-23.05
Sander Vanheule [Wed, 31 Jan 2024 07:58:26 +0000 (08:58 +0100)]
tplink-safeloader: bump EAP225-V3 compat_level

Since firmware revision 5.1.0, the firmware compatibility level
increased to 2 for the following devices:
- EAP225 v3,
- EAP225 v4,
- EAP225-Outdoor v1, and
- EAP225-Outdoor v3.

This means that this and later revisions will refuse (OpenWrt) images
with compatibility level 1, so increase our level to get them accepted
again.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit c1e06daf4622b2d60bb39e35704c62b2bd634be3)

3 months agotplink-safeloader: bump EAP225-Outdoor v1 compat
Sander Vanheule [Tue, 16 Jan 2024 19:31:33 +0000 (20:31 +0100)]
tplink-safeloader: bump EAP225-Outdoor v1 compat

Since firmware revision 5.1.0, the firmware compatibility version
increased to 2.  This means that this and later revisions will refuse
(OpenWrt) images with compatibility version 1, so increase our level to
get them accepted again.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit 335d063cff23631050e6629f1dc692101f6df99d)

4 months agofirmware-utils: ptgen: add SiFive GPT partition support
Zoltan HERPAI [Thu, 2 Jun 2022 10:29:57 +0000 (12:29 +0200)]
firmware-utils: ptgen: add SiFive GPT partition support

The SiFive RISC-V SoCs use two special partition types in the boot process.
As a first step, the ZSBL (zero-stage bootloader) in the CPU looks for a
partition with a GUID of 5B193300-FC78-40CD-8002-E86C45580B47 to load the
first-stage bootloader - which in OpenWrt's case is an SPL image. The FSBL
(SPL) then looks for a partition with a GUID of
2E54B353-1271-4842-806F-E436D6AF6985 to load the SSBL which is usually an
u-boot.

With ptgen already supporting GPT partition creation, add the required GUID
types and name them accordingly to be invoked with the '-T <GPT partition
type>' parameter.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
(cherry picked from commit 635466123429ba8682b575245bbf52e3b33b7163)

4 months agotplink-safeloader: bump EAP615-Wall compat_level
Stijn Segers [Sat, 6 Jan 2024 19:14:40 +0000 (20:14 +0100)]
tplink-safeloader: bump EAP615-Wall compat_level

Newer EAP615-Walls come with more recent firmware that requires a
higher soft_ver_compat_level. Bump ours from 1 to 2 to keep in step.
Tested on a newer EA615-Wall by grauheier - see forum topic:
https://forum.openwrt.org/t/173424/13.

Tested-by: Danny Scherer <graureiher@kaputtmachen.jetzt>
Signed-off-by: Stijn Segers <foss@volatilesystems.org>
(cherry picked from commit d87b6c4b6423201e595459840f51d0dced04a4eb)

4 months agoadd dlink-sge-image for D-Link devices by SGE
Sebastian Schaper [Thu, 2 Nov 2023 19:16:06 +0000 (20:16 +0100)]
add dlink-sge-image for D-Link devices by SGE

This tool will encrypt/decrypt factory images requiring the "SHRS" header
e.g. COVR-C1200, COVR-P2500, COVR-X1860, DIR-878, DIR-882, ...

Encryption is loosely based on a series of blogposts by ricksanchez [1]
and the provided code [2], as well as patches to qca-uboot found in the
GPL tarball released for D-Link COVR-P2500 Rev. A1 [3].

Further scripts (e.g. /lib/upgrade/) and keys were found in the GPL tarball
and/or rootfs of COVR-C1200 (the devices are based on OpenWrt Chaos Calmer
and failsafe can be entered by pressing 'f' on the serial console during
boot, allowing to access the file system of the running device).

For newer devices like COVR-X1860 and DIR-X3260, an updated method of
vendor key derivation is implemented based on enk.txt from the GPL release.

[1] https://0x00sec.org/t/breaking-the-d-link-dir3060-firmware-encryption-recon-part-1/21943
[2] https://github.com/0xricksanchez/dlink-decrypt
[3] https://tsd.dlink.com.tw/GPL.asp

Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
Tested-By: Alan Luck <luckyhome2008@gmail.com>
Tested-By: Paul Spooren <mail@aparcar.org>
(cherry picked from commit ba5bc4e1ae9d3e7b41d3bed39ce505670dc95078)
Signed-off-by: Florian Maurer <f.maurer@outlook.de>
10 months agotplink-safeloader: add EAP610 v3 and EAP613 v1
Sander Vanheule [Sun, 25 Jun 2023 18:55:00 +0000 (20:55 +0200)]
tplink-safeloader: add EAP610 v3 and EAP613 v1

The TP-Link EAP610 v3 is a MT7621 version of the EAP610 v1/v2, which use
a QCA chipset. The TP-Link EAP613 v1 appears to be rebrand of the
former.

The original 'os-image' and 'file-system' partition are merged into a
single 'firmware' partition.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
10 months agotplink-safeloader: Add support for TP-Link Deco M5
Tan Li Boon [Tue, 21 Mar 2023 07:55:33 +0000 (16:55 +0900)]
tplink-safeloader: Add support for TP-Link Deco M5
The special_id values are the same for EU and Asian models,
and they apply to all models: v1, v2, and v3.
They are not sorted as they are currently in the same order
as extracted from the official firmware image.

Note that the partition names need to be overridden with '@1' suffix,
as observed in the original firmware.

Signed-off-by: Tan Li Boon <undisputed.seraphim@gmail.com>
10 months agotplink-safeloader: add RU support-list entry for Archer C6U v1
Ivan Mironov [Wed, 3 May 2023 15:41:40 +0000 (17:41 +0200)]
tplink-safeloader: add RU support-list entry for Archer C6U v1

Tested on actual hardware.

Signed-off-by: Ivan Mironov <mironov.ivan@gmail.com>
10 months agobcmclm: new tool for reading Broadcom's CLM data
Rafał Miłecki [Wed, 21 Jun 2023 07:29:00 +0000 (09:29 +0200)]
bcmclm: new tool for reading Broadcom's CLM data

Broadcom developed CLM format for devices vendors to provide regulatory
configuration independently of executable firmware. They contain info
about countries, channels and rates.

CLM data can be packaged with chipset info as CLM BLOB and uploaded to
FullMAC firmware for complete channel support and maximum transmission
power.

CLM binary format is a bit tricky. It consists of a lot of binary
structs with all kind of numbers and flags. In-file addresses of those
structs and then stored in parent structs.

This tool provides initial support for reading CLM data content. It
parses the root struct and follows info lower level structs.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
10 months agofirmware-utils: fix typo in error message when no OpenSSL library found
Míguel Ángel Mulero Martínez [Thu, 1 Jun 2023 13:30:29 +0000 (15:30 +0200)]
firmware-utils: fix typo in error message when no OpenSSL library found

Simply fix a typo in the error message: librry -> library

Signed-off-by: Míguel Ángel Mulero Martínez <migmul@gmail.com>
10 months agobcmblob: new tool for reading Broadcom's BLOBs
Rafał Miłecki [Mon, 12 Jun 2023 21:11:46 +0000 (23:11 +0200)]
bcmblob: new tool for reading Broadcom's BLOBs

Broadcom designed its BLOB binary format for storing multiple binary
entries in a single file. It's mostly know from CLM BLOB files that are
used for storing regulatory data and chip model.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
11 months agotplink-safeloader: add TL-WPA8631P v4
Joe Mullally [Mon, 5 Jun 2023 18:47:42 +0000 (19:47 +0100)]
tplink-safeloader: add TL-WPA8631P v4

The only available v4 firmware
wpa8631pv4_eu-up-ver4-0-0-P1-20220510-rel56203-APPLC.bin matches the v3
partition scheme.

User testing confirms the existing WPA8631P v3 image works on this
device.

Link: https://forum.openwrt.org/t/162122
Tested-by: Harald Mayer <harald_mayer@yahoo.com>
Signed-off-by: Joe Mullally <jwmullally@gmail.com>
11 months agotplink-safeloader: add TL-WPA8635P v3
Joe Mullally [Sat, 27 May 2023 19:54:23 +0000 (20:54 +0100)]
tplink-safeloader: add TL-WPA8635P v3

Inspecting the only available firmware
wpa8635pv3_fr-up-ver3-0-0-P1-20210625-rel39993-APPLC.bin shows the
WPA8631Pv3 EU is also supported by that firmware and the partition
layout is identical to the currently supported WPA8631P v3 layout.

Expand size of support-list partition into unused space in soft-version
(which is also supplied by tplink-safeloader) to fit the new entry.

Link: https://forum.openwrt.org/t/137404/5
Tested-by: William Lallemand <wlallemand@irq6.net>
Signed-off-by: Joe Mullally <jwmullally@gmail.com>
11 months agotplink-safeloader: Add TP-Link Archer A6 V3.20
Andrea Maria Farina [Mon, 29 May 2023 14:51:52 +0000 (16:51 +0200)]
tplink-safeloader: Add TP-Link Archer A6 V3.20

TP-Link firmwares for Archer A6 V3 also lists EU and RU variants for
V3.20. Add these to the support list.

Signed-off-by: Andrea Maria Farina <farina.andreamaria@mailbox.org>
[update title and commit message]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
11 months agotplink-safeloader: add Archer AX23 v1.2 (RU)
Sergey G. Shishkin [Thu, 18 May 2023 08:00:09 +0000 (10:00 +0200)]
tplink-safeloader: add Archer AX23 v1.2 (RU)

Link: https://forum.openwrt.org/t/add-support-for-tp-link-ax23-v1/130746/83
Signed-off-by: Sergey G. Shishkin <sergey.shishkin@gmail.com>
Signed-off-by: David Bauer <mail@david-bauer.net>
11 months agotplink-safeloader: add AX23 support-list entry
Aleksandar Tanev [Thu, 18 May 2023 07:58:10 +0000 (09:58 +0200)]
tplink-safeloader: add AX23 support-list entry

Signed-off-by: Aleksandar Tanev <33719472+atanev@users.noreply.github.com>
Signed-off-by: David Bauer <mail@david-bauer.net>
11 months agotplink-safeloader: order AX23 support-list
David Bauer [Thu, 18 May 2023 07:53:51 +0000 (09:53 +0200)]
tplink-safeloader: order AX23 support-list

Signed-off-by: David Bauer <mail@david-bauer.net>
12 months agotplink-safeloader: add Archer C59 / C60 CA ragion code
Eric Mockler [Mon, 20 Feb 2023 03:04:45 +0000 (19:04 -0800)]
tplink-safeloader: add Archer C59 / C60 CA ragion code

Add region codes specific to the CA regional model. his allows
installation of OpenWrt on these models.

Link: https://forum.openwrt.org/t/support-for-tp-link-archer-c59-v1-ca/140839
Link: https://forum.openwrt.org/t/adding-support-for-canadian-tp-link-archer-c60-v2-0/75273
Signed-off-by: Eric Mockler <mock7ee@gmail.com>
[rework commit message]
Signed-off-by: David Bauer <mail@david-bauer.net>
12 months agotplink-safeloader: increase support-list size for AX23 v1
David Bauer [Mon, 17 Apr 2023 04:16:38 +0000 (06:16 +0200)]
tplink-safeloader: increase support-list size for AX23 v1

Increase the size of the support-list partition in order to
accommodate the added support-list entries for CA/US/TW versions.

Fixes: f98095ffd7cf ("tplink-safeloader: increase support-list size for AX23 v1")
Signed-off-by: David Bauer <mail@david-bauer.net>
13 months agotplink-safeloader: add US-CA-TW support-list entries for Archer AX23v1
David Bauer [Sat, 8 Apr 2023 23:02:01 +0000 (01:02 +0200)]
tplink-safeloader: add US-CA-TW support-list entries for Archer AX23v1

13 months agotplink-safeloader: add Archer AX23
David Bauer [Tue, 14 Mar 2023 03:04:18 +0000 (04:04 +0100)]
tplink-safeloader: add Archer AX23

Original partition alignment
----------------------------

partition fs-uboot base 0x00000 size 0x40000
partition os-image base 0x40000 size 0x400000
partition file-system base 0x440000 size 0xb60000
partition default-mac base 0xfa0000 size 0x00200
partition pin base 0xfa0200 size 0x00100
partition device-id base 0xfa0300 size 0x00100
partition product-info base 0xfa0400 size 0x0fc00
partition default-config base 0xfb0000 size 0x08000
partition ap-def-config base 0xfb8000 size 0x08000
partition user-config base 0xfc0000 size 0x0a000
partition ag-config base 0xfca000 size 0x04000
partition certificate base 0xfce000 size 0x02000
partition ap-config base 0xfd0000 size 0x06000
partition router-config base 0xfd6000 size 0x06000
partition favicon base 0xfdc000 size 0x02000
partition logo base 0xfde000 size 0x02000
partition partition-table base 0xfe0000 size 0x00800
partition soft-version base 0xfe0800 size 0x00100
partition support-list base 0xfe0900 size 0x00200
partition profile base 0xfe0b00 size 0x03000
partition extra-para base 0xfe3b00 size 0x00100
partition radio base 0xff0000 size 0x10000

Vendor image partition-table
----------------------------

partition fs-uboot base 0x00000 size 0x40000
partition os-image base 0x40000 size 0x400000
partition file-system base 0x440000 size 0xb60000
partition default-mac base 0xfa0000 size 0x00200
partition pin base 0xfa0200 size 0x00100
partition device-id base 0xfa0300 size 0x00100
partition product-info base 0xfa0400 size 0x0fc00
partition default-config base 0xfb0000 size 0x08000
partition ap-def-config base 0xfb8000 size 0x08000
partition user-config base 0xfc0000 size 0x0a000
partition ag-config base 0xfca000 size 0x04000
partition certificate base 0xfce000 size 0x02000
partition ap-config base 0xfd0000 size 0x06000
partition router-config base 0xfd6000 size 0x06000
partition favicon base 0xfdc000 size 0x02000
partition logo base 0xfde000 size 0x02000
partition partition-table base 0xfe0000 size 0x00800
partition soft-version base 0xfe0800 size 0x00100
partition support-list base 0xfe0900 size 0x00200
partition profile base 0xfe0b00 size 0x03000
partition extra-para base 0xfe3b00 size 0x00100
partition radio base 0xff0000 size 0x10000

Signed-off-by: David Bauer <mail@david-bauer.net>
14 months agotplink-safeloader: add Cloud image detection
Sander Vanheule [Fri, 3 Feb 2023 22:03:24 +0000 (23:03 +0100)]
tplink-safeloader: add Cloud image detection

The vendor info in the safeloader header for some images (e.g. Archer
C60 v3) starts with "fw-type:Cloud" instead of a big endian data length.

Only detection is implemented at this moment, as the full header format
is not yet understood.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
14 months agotplink-safeloader: add QNEW image detection
Sander Vanheule [Fri, 3 Feb 2023 22:03:23 +0000 (23:03 +0100)]
tplink-safeloader: add QNEW image detection

An incompatible image type is now used, e.g. for the TL-WPA8631P v4,
which has a header containing 0x3C extra bytes. This image type can be
identified by the first four bytes of the image header being "?NEW".

Only detection is implemented at this moment, as the full header format
is not yet understood, and the preamble checksum can no longer be
verified using the current md5sum salt. Devices still appear to accept
images in the "old" format, so image generation is not required at this
moment.

Cc: Andreas Böhler <dev@aboehler.at>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
14 months agotplink-safeloader: add vendor info support
Sander Vanheule [Fri, 3 Feb 2023 22:03:22 +0000 (23:03 +0100)]
tplink-safeloader: add vendor info support

Some images may contain ASCII vendor info at the start of the image
header. Detect this image type, and display the info when requested.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
14 months agotplink-safeloader: refactor image ingestion
Sander Vanheule [Fri, 3 Feb 2023 22:03:21 +0000 (23:03 +0100)]
tplink-safeloader: refactor image ingestion

The tool supports three modes that ingest an existing safeloader image:
-i (image info), -x (extract payloads), and -z (convert to sysupgrade).
These modes all re-implement image parsing, so refactor the code to make
sure there is only one place this is performed.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
14 months agotplink-safeloader: ignore NULLs in version info
Sander Vanheule [Fri, 3 Feb 2023 22:03:20 +0000 (23:03 +0100)]
tplink-safeloader: ignore NULLs in version info

When the soft-version partition contents are checked for a text-format
version string, isascii() is used to check the contained bytes. This
also returns true on control characters, which includes terminating
NULL characters.

After checking if the data is a string, use the actual string length for
printing the contained data to avoid outputting NULLs to stdout.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
14 months agotplink-safeloader: don't end-pad sysupgrade file
Sander Vanheule [Fri, 3 Feb 2023 22:03:19 +0000 (23:03 +0100)]
tplink-safeloader: don't end-pad sysupgrade file

To ensure the stock rootfs ends up at the correct offset, the preceding
kernel partition is padded with 0xff, corresponding to erased flash.
Since on sysupgrade all the required flash space is anyway rased before
writing the new image, it is not necessary to also pad after the second
and last part of the generated image. This can reduce the generated
image size by several MiB.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
14 months agotplink-safeloader: stop at nameless partition
Sander Vanheule [Fri, 3 Feb 2023 22:03:18 +0000 (23:03 +0100)]
tplink-safeloader: stop at nameless partition

Current code only skips all-zero partition table entries, but nameless
partitions with zero size don't make much sense either. Assume that any
entry without a partition name is invalid, and stop processing entry
lists at that point.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
14 months agotplink-safeloader: replace hardcoded offsets
Sander Vanheule [Fri, 3 Feb 2023 22:03:17 +0000 (23:03 +0100)]
tplink-safeloader: replace hardcoded offsets

A number of data offsets are used as plain numbers throughout the code.
This is a bit fragile, and the magic numbers make the code harder to
read. Use a set of macros instead.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
14 months agotplink-safeloader: use enum for table types
Sander Vanheule [Fri, 3 Feb 2023 22:03:16 +0000 (23:03 +0100)]
tplink-safeloader: use enum for table types

The partition table parser supports two table types, which only differ
in the starting ID of a table entry. Selection of which type to parse is
performed with a plain integer, but this makes code harder to read.
Replace the integer by an enum to make type selection more obvious.

While touching the code, also fix the switch-case indentation.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
14 months agotplink-safeloader: stricter free_image_partition()
Sander Vanheule [Fri, 3 Feb 2023 22:03:15 +0000 (23:03 +0100)]
tplink-safeloader: stricter free_image_partition()

Instead of only free()-ing the allocated data block, also clear the name
and size of a payload entry to indicate that it's become invalid.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
15 months agotplink-safeloader: Add support for Deco M4R V4
Mark Ceeha [Sun, 29 Jan 2023 14:28:42 +0000 (15:28 +0100)]
tplink-safeloader: Add support for Deco M4R V4

Software version:
  soft_ver:1.0.0 Build 20211202 Rel. 69482

Partition table:
  00000000 00040000 fs-uboot
  00040000 00400000 os-image
  00440000 00b60000 file-system
  00fa0000 00000300 default-mac
  00fa0300 00000100 device-id
  00fa0400 0000fc00 product-info
  00fb0000 00004000 group-info
  00fb4000 0000c000 user-config
  00fc0000 00010000 device-config
  00fd0000 00010000 default-config
  00fe0000 00000800 partition-table
  00fe0800 00000100 soft-version
  00fe0900 00000200 support-list
  00fe0b00 00003000 profile
  00fe3b00 00000100 extra-para
  00ff0000 00010000 radio

`os-image` and `file-system` have been merged into `firmware`.

Signed-off-by: Mark Ceeha <hi@shiz.me>
16 months agotplink-safeloader: add TP-Link CPE605 v1 Support
Andrew Cameron [Wed, 9 Nov 2022 13:23:01 +0000 (13:23 +0000)]
tplink-safeloader: add TP-Link CPE605 v1 Support

Enable creating images compatible with the TP-Link CPE605 v1 Router

Original partitions from stock firmware are:
    partition fs-uboot base 0x00000 size 0x20000
    partition partition-table base 0x20000 size 0x02000
    partition default-mac base 0x30000 size 0x00020
    partition serial-number base 0x30100 size 0x00020
    partition product-info base 0x31100 size 0x00100
    partition device-info base 0x31400 size 0x00400
    partition signature base 0x32000 size 0x00400
    partition device-id base 0x33000 size 0x00100
    partition os-image base 0x40000 size 0x170000
    partition soft-version base 0x1b0000 size 0x00100
    partition support-list base 0x1b1000 size 0x01000
    partition file-system base 0x1c0000 size 0x600000
    partition user-config base 0x7c0000 size 0x10000
    partition default-config base 0x7d0000 size 0x10000
    partition log base 0x7e0000 size 0x10000
    partition radio base 0x7f0000 size 0x10000

The 'soft-version' and 'support-list' partitions are relocated afther the
'file-system' partition. This creates ones contiguous firmware area,
allowing for dynamic partition splitting.

Tested by forum user ruildias

Signed-off-by: Andrew Cameron <apcameron@softhome.net>
[add original partition overview and note on relocation commit message,
update support_list and part_trail properties to match vendor FW]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
20 months agoiptime-crc32: add support for A6004MX
Yoonji Park [Sat, 4 Jun 2022 09:08:07 +0000 (09:08 +0000)]
iptime-crc32: add support for A6004MX

Add support for A6004MX image creation.

Signed-off-by: Yoonji Park <koreapyj@dcmys.kr>
20 months agotplink-safeloader: add TP-Link Deco S4 v2 support
Nick French [Sat, 13 Aug 2022 18:51:52 +0000 (13:51 -0500)]
tplink-safeloader: add TP-Link Deco S4 v2 support

Support creating images for TP-Link Deco S4R v2.

Original partition layout from OEM image:
 partition fs-uboot base 0x00000 size 0x80000
 partition product-info base 0x80000 size 0x05000
 partition default-mac base 0x85000 size 0x01000
 partition device-id base 0x86000 size 0x01000
 partition support-list base 0x87000 size 0x10000
 partition user-config base 0xa7000 size 0x10000
 partition device-config base 0xb7000 size 0x10000
 partition group-info base 0xc7000 size 0x10000
 partition partition-table base 0xd7000 size 0x02000
 partition soft-version base 0xd9000 size 0x10000
 partition profile base 0xe9000 size 0x10000
 partition default-config base 0xf9000 size 0x10000
 partition url-sig base 0x1e0000 size 0x10000
 partition radio base 0x1f0000 size 0x10000
 partition os-image base 0x200000 size 0x200000
 partition file-system base 0x400000 size 0xc00000

The 'os-image' and 'file-system' partitions were merged into 'firmware'
to make use of the automatic mtd split.

Signed-off-by: Nick French <nickfrench@gmail.com>
21 months agomkh3cvfs: add filesystem tool for H3C devices
Jan Hoffmann [Wed, 27 Jul 2022 19:31:44 +0000 (21:31 +0200)]
mkh3cvfs: add filesystem tool for H3C devices

The bootloader can only boot images from a custom filesystem which
normally spans most of the flash on the device. This tool creates a
filesystem image containing a single file (which should be a firmware
image created using mkh3cimg).

The size of the filesystem is hardcoded in the bootloader. However, an
image that is only slightly larger than its content is sufficient, as
long as no write operations are performed in the bootloader menu. This
allows to append further data (i.e. rootfs) after the end of the
filesystem image.

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
21 months agomkh3cimg: add image tool for H3C devices
Jan Hoffmann [Wed, 27 Jul 2022 19:31:43 +0000 (21:31 +0200)]
mkh3cimg: add image tool for H3C devices

Firmware images for these devices can contain multiple files, such as
application files or bootloader images. This tool only creates images
with a single application file. In the case of OpenWrt, this is going
to contain the kernel image.

Compressed files are supported by the image format, in this case the
supplied input file needs to be a 7z archive with LZMA compression.

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
22 months agofirmware-utils: Add support for ZyXEL LTE3301-Plus
André Valentin [Fri, 17 Jun 2022 18:26:27 +0000 (20:26 +0200)]
firmware-utils: Add support for ZyXEL LTE3301-Plus

Add header mapping for ZyXEL LTE3301-Plus to zytrx.

Signed-off-by: André Valentin <avalentin@marcant.net>
22 months agotplink-safeloader: drop unqualified EAP225-V3 IDs
Sander Vanheule [Mon, 27 Jun 2022 16:31:24 +0000 (18:31 +0200)]
tplink-safeloader: drop unqualified EAP225-V3 IDs

After adding the regionless identifiers in commit 9563fe8e78cb
("tplink-safeloader: add regionless EAP225-V3 IDs"), the generated
support-list partition exceeded the allocated space of 256 bytes. This
resulted in the tool failing to generate factory images with the
following warning:
    support-list partition too big (more than 256 bytes): Success

Although this message reports "Success", the tool actually fails with a
return code of 1.

This essentialy reverts commit 9563fe8e78cb, since the region-qualified
IDs are also compatible with the non region-qualified devices. The
change makes the generated support-list partition fit within the
allocated space again.

Tested-by: Andre Klärner <kandre@ak-online.be>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
22 months agotplink-safeloader: fix EAP225-Outdoor model IDs
Sander Vanheule [Sun, 26 Jun 2022 14:43:07 +0000 (16:43 +0200)]
tplink-safeloader: fix EAP225-Outdoor model IDs

The model IDs for EAP225-Outdoor v1 and EAP225-Outdoor v3 contain
"AC1200". The corresponding identifiers grouped under EAP225-V3 contain
"AC1350" however, which is a copy-paste error from the EAP225 v3/v3.2/v4
IDs. Modify the strings in SupportList to actually match the ones on devices.

Fixes: 9563fe8e78cb ("tplink-safeloader: add regionless EAP225-V3 IDs")
Fixes: 365458e00ed7 ("tplink-safeloader: join EAP225-V3 compatible devices")
Signed-off-by: Sander Vanheule <sander@svanheule.net>
22 months agotplink-safeloader: add regionless EAP225-V3 IDs
Sander Vanheule [Sun, 26 Jun 2022 14:30:34 +0000 (16:30 +0200)]
tplink-safeloader: add regionless EAP225-V3 IDs

Devices whose model ID does not contain a region identifier will not
match the "CA" and "CA,JP" qualified model IDs in the current EAP225-V3
SupportList. This results in the stock firmware giving the following
error when trying to flash a factory image:
    Upgrade failed because the firmware is incompatible

Add the IDs without region qualifiers to also support these devices.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
23 months agotplink-safeloader: Add support for Mercusys MR70X
Yoonji Park [Sat, 4 Jun 2022 10:50:57 +0000 (10:50 +0000)]
tplink-safeloader: Add support for Mercusys MR70X

Add support for Mercusys MR70X image creation.

Software version:
soft_ver:1.0.3 Build 20201222 Rel. 50381

Partition table:
00000000 00040000 fs-uboot
00040000 00400000 os-image
00440000 00b60000 file-system
00fa0000 00000200 default-mac
00fa0200 00000100 pin
00fa0300 00000100 device-id
00fa0400 0000fc00 product-info
00fb0000 00008000 default-config
00fb8000 00008000 ap-def-config
00fc0000 0000c000 user-config
00fcc000 00004000 certificate
00fd0000 00008000 ap-config
00fd8000 00008000 router-config
00fe0000 00000800 partition-table
00fe0800 00000100 soft-version
00fe0900 00000200 support-list
00fe0b00 00003000 profile
00fe3b00 00000100 extra-para
00ff0000 00010000 radio

os-image and file-system is merged for dynamic split.

Signed-off-by: Yoonji Park <koreapyj@dcmys.kr>
23 months agotplink-safeloader: join EAP225-V3 compatible devices
Sander Vanheule [Thu, 26 May 2022 07:11:29 +0000 (09:11 +0200)]
tplink-safeloader: join EAP225-V3 compatible devices

Since FW v5.0.0, TP-Link has provided unified firmware images for
EAP225-v3 and EAP225-Outdoor-v1 devices. Although there may be hardware
differences, the relevant details for image generation are identical.

More recently, the following devices have also been added to the support
list:
  - EAP225-v3.20
  - EAP225-Outdoor-v3
  - EAP225-v4

The country codes appended the device descriptors were introduced with
FW v5.0.7: "Combined firmware versions for different countries/regions."
The release notes provide no further upgrade instructions, so these
firmware images should be backwards compatible.

Add the new compatible devices, with region codes, to the support list
of the EAP225-V3 board ID. The now redundant EAP225-OUTDOOR-V1 ID will
be dropped later.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
23 months agotplink-safeloader: fix chunked support-list prints
Sander Vanheule [Thu, 26 May 2022 07:00:08 +0000 (09:00 +0200)]
tplink-safeloader: fix chunked support-list prints

When reading long support-list partitions, to print out as image info,
the string is read in chunks of 128 bytes. However, in cases where there
is more than one chunk, they are not properly terminated. This leads to
an out-of-bounds access by puts() printing the buffer chunks.

Ensure the read partial string is always NULL terminated, and print
chunk by chunk without extra line terminations. Terminate still with a
newline to maintain current behaviour.

Fixes: e1d76f4e8721 ("firmware-utils: tplink-safeloader: support displaying fw info")
Signed-off-by: Sander Vanheule <sander@svanheule.net>
23 months agotplink-safeloader: Patch to handle partitions with alternate names.
Ole Kristian Lona [Mon, 16 May 2022 13:50:06 +0000 (15:50 +0200)]
tplink-safeloader: Patch to handle partitions with alternate names.

Some devices, specifically Deco M4R-v3 / M5 have partition names that
deviate from the scheme other devices use. They have an added "@0"
and "@1" for some partition names.

The devices have fallback partitions which will be used in case the
device determines that the primary partition set is unbootable.

This patch introduces an option to set these alternate partition names
in the device definition of tplink-safeloader.

Signed-off-by: Ole Kristian Lona <oklo@oklona.net>
Reviewed-by: Sander Vanheule <sander@svanheule.net>
2 years agofirmware-utils: tplink-safeloader: add support for Archer A6 v2 (EU)
Stijn Segers [Sun, 8 May 2022 11:31:12 +0000 (13:31 +0200)]
firmware-utils: tplink-safeloader: add support for Archer A6 v2 (EU)

The Archer A6 v2 (EU) matches the C6 v2 (EU) and uses the same firmware ID.
See also https://forum.openwrt.org/t/tp-link-archer-a6-v2-0-cannot-install/119403/34.

Tested-by: Kamil Jońca <kjonca@poczta.onet.pl>
Signed-off-by: Stijn Segers <foss@volatilesystems.org>
2 years agotplink-safeloader: fix alphabetical order
Sander Vanheule [Fri, 29 Apr 2022 18:19:36 +0000 (20:19 +0200)]
tplink-safeloader: fix alphabetical order

DECO-M4R-V1 was added after EAP615-WALL, but that's not how the alphabet
is sorted. Move it in between 'ARCHER' and 'EAP'.

Reported-by: Ole Kristian Lona <ole.kristian@lona.name>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2 years agotplink-safeloader: add TP-Link EAP265 HD support
Sander Vanheule [Sun, 20 Mar 2022 11:55:14 +0000 (12:55 +0100)]
tplink-safeloader: add TP-Link EAP265 HD support

The FCC ID request for this device indicates that the hardware is
identical to the EAP245v3. Since FW 5.0.0, TP-Link provides unified
images for both devices.

Partial output of 'tplink-safeloader -i':
    [Software version]
    Version: 5.0.4
    Date: 2021-10-21
    Revision: 57494

    [Support list]
    SupportList:
    EAP245(TP-Link|UN|AC1750-D):3.0
    EAP265 HD(TP-Link|UN|AC1750-D):1.0

Link: https://fccid.io/TE7EAP265HD/Letter/6-Request-for-FCC-Change-ID-4823578.pdf
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2 years agotplink-safeloader: add TP-Link Deco M4R v1 and v2 support
Foica David [Sun, 24 Apr 2022 16:09:51 +0000 (19:09 +0300)]
tplink-safeloader: add TP-Link Deco M4R v1 and v2 support

Support creating images for TP-Link Deco M4R v1 and v2.

Original partition layout from OEM image:
 partition fs-uboot base 0x00000 size 0x80000
 partition os-image base 0x80000 size 0x200000
 partition file-system base 0x280000 size 0xc00000
 partition product-info base 0xe80000 size 0x05000
 partition default-mac base 0xe85000 size 0x01000
 partition device-id base 0xe86000 size 0x01000
 partition support-list base 0xe87000 size 0x10000
 partition user-config base 0xea7000 size 0x10000
 partition device-config base 0xeb7000 size 0x10000
 partition group-info base 0xec7000 size 0x10000
 partition partition-table base 0xed7000 size 0x02000
 partition soft-version base 0xed9000 size 0x10000
 partition profile base 0xee9000 size 0x10000
 partition default-config base 0xef9000 size 0x10000
 partition url-sig base 0xfe0000 size 0x10000
 partition radio base 0xff0000 size 0x10000

The 'os-image' and 'file-system' partitions were merged into 'firmware'
to make use of the automatic mtd split.

The first 2 versions of the device use the same firmware image,
v3 and v4 are different.

Signed-off-by: Foica David <superh552@gmail.com>
2 years agotplink-safeloader: TP-Link RE650 v2 support
Marcin Gordziejewski [Thu, 7 Apr 2022 18:43:25 +0000 (20:43 +0200)]
tplink-safeloader: TP-Link RE650 v2 support

Support creating images for TP-Link RE650 v2.

Partition table pulled from OEM firmware on the device:
  partition fs-uboot base 0x00000 size 0x20000
  partition os-image base 0x20000 size 0x330000
  partition file-system base 0x350000 size 0x470000
  partition partition-table base 0x7c0000 size 0x02000
  partition default-mac base 0x7c2000 size 0x00020
  partition pin base 0x7c2100 size 0x00020
  partition product-info base 0x7c3100 size 0x01000
  partition soft-version base 0x7c4200 size 0x01000
  partition support-list base 0x7c5200 size 0x01000
  partition profile base 0x7c6200 size 0x08000
  partition config-info base 0x7ce200 size 0x00400
  partition user-config base 0x7d0000 size 0x10000
  partition default-config base 0x7e0000 size 0x10000
  partition radio base 0x7f0000 size 0x10000

One notable difference from v1 in terms of safeloader, is that it requires
soft_ver to be defined for device to accept the firmware, otherwise it
otherwise it denies the firmware file. Version v1 has also 16MB of Flash
instead of 8MB that v2 has, so the paritions had to be shrinked
accordingly.

In OpenWRT "firmware" partition is merged into one, it's made out of
os-image and file-system partitions.

Signed-off-by: Marcin Gordziejewski <openwrt@flicksfix.com>
2 years agofirmware-utils: fix compilation with macOS
Rosen Penev [Mon, 28 Feb 2022 07:34:26 +0000 (23:34 -0800)]
firmware-utils: fix compilation with macOS

__bswap_32 is a GNU extension.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Acked-by: Paul Spooren <mail@aparcar.org>
2 years agotplink-safeloader: add TP-Link Archer A9 v6 support
Piotr Dymacz [Sat, 26 Feb 2022 22:54:03 +0000 (23:54 +0100)]
tplink-safeloader: add TP-Link Archer A9 v6 support

Support creating images compatible with TP-Link Archer A9 v6.

Original partition layout:
  partition factory-boot base 0x00000 size 0x20000
  partition fs-uboot base 0x20000 size 0x20000
  partition partition-table base 0x40000 size 0x10000
  partition radio base 0x50000 size 0x10000
  partition default-mac base 0x60000 size 0x00200
  partition pin base 0x60200 size 0x00200
  partition device-id base 0x60400 size 0x00100
  partition product-info base 0x60500 size 0x0fb00
  partition soft-version base 0x70000 size 0x01000
  partition extra-para base 0x71000 size 0x01000
  partition support-list base 0x72000 size 0x0a000
  partition profile base 0x7c000 size 0x04000
  partition user-config base 0x80000 size 0x10000
  partition ap-config base 0x90000 size 0x10000
  partition apdef-config base 0xa0000 size 0x10000
  partition router-config base 0xb0000 size 0x10000
  partition os-image base 0xc0000 size 0x120000
  partition file-system base 0x1e0000 size 0xde0000
  partition log base 0xfc0000 size 0x20000
  partition certificate base 0xfe0000 size 0x10000
  partition default-config base 0xff0000 size 0x10000

To make use of automatic mtd split, the 'os-image' and 'file-system'
partitions were merged into 'firmware' for OpenWrt.

There are only 3 official vendor's firmware releases for this device,
all were successfully tested for migration to OpenWrt:
  1.1.1 Build 20210315 rel.40637
  1.0.6 Build 20200114 rel.73164
  1.0.3 Build 20190226 rel.62939

According to the 'SupportList' from vendor's latest firmware release,
this hardware might be also available under name 'Archer C90 v6',
probably dedicated for US market:
  SupportList:
  {product_name:Archer A9,product_ver:6.0,special_id:55530000}
  {product_name:Archer A9,product_ver:6.0,special_id:45550000}
  {product_name:Archer A9,product_ver:6.0,special_id:52550000}
  {product_name:Archer A9,product_ver:6.0,special_id:4A500000}
  {product_name:Archer C90,product_ver:6.0,special_id:55530000}

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2 years agotplink-safeloader: add TL-WPA8631P v3 support
Joe Mullally [Tue, 22 Feb 2022 23:59:51 +0000 (23:59 +0000)]
tplink-safeloader: add TL-WPA8631P v3 support

Enable creating images compatible with TP-Link's TL-WPA8631P powerline router.

This matches all current firmwares for all revisions and regions.

Users with older EU "Build 20200314 Rel.3608" & EU "Build 20200508 Rel.41814"
should first upgrade to EU "Build 20200927 Rel.61199" or later before flashing.

The original partition layout is as follows:
    partition fs-uboot base 0x00000 size 0x20000
    partition os-image base 0x20000 size 0x330000
    partition file-system base 0x350000 size 0x3e0000
    partition partition-table base 0x730000 size 0x02000
    partition default-mac base 0x732000 size 0x00020
    partition pin base 0x732100 size 0x00020
    partition device-id base 0x732200 size 0x00030
    partition default-region base 0x732300 size 0x00010
    partition product-info base 0x732400 size 0x00200
    partition extra-para base 0x732600 size 0x00200
    partition soft-version base 0x732800 size 0x00200
    partition support-list base 0x732a00 size 0x00100
    partition profile base 0x732b00 size 0x00100
    partition default-config base 0x732c00 size 0x00800
    partition plc-type base 0x733400 size 0x00020
    partition default-pib base 0x733500 size 0x06000
    partition user-config base 0x740000 size 0x10000
    partition plc-pib base 0x750000 size 0x10000
    partition plc-nvm base 0x760000 size 0x90000
    partition radio base 0x7f0000 size 0x10000

For OpenWrt, the os-image and file-system partition are merged into one
firmware partition, to enable dynamic rootfs partition splits.

Review of partitions in all known firmwares. This patch supports
layout md5sum 0771948573fffa726b8927ca6259ea16.

    filename
    grep -ao "partition .*$" filename | md5sum
    support_list

    wpa8631pv3_eu-up-ver3-0-0-P1-20200314-rel3608.bin
    33df2a8474670e785fb487dc9392dadf
    {product_name:TL-WPA8631P,product_ver:3.0.0,special_id:45550000}

    wpa8631pv3_eu-up-ver3-0-0-P1-20200508-rel41814-APPLC.bin
    68f3408ac2310e81fead071be4238aa9
    {product_name:TL-WPA8631P,product_ver:3.0.0,special_id:45550000}

    wpa8631pv3_us-up-ver3-0-0-P1-20200820-rel39000-APPLC.bin
    0771948573fffa726b8927ca6259ea16
    {product_name:TL-WPA8631P,product_ver:3.0.0,special_id:55530000}

    wpa8631pv3_eu-up-ver3-0-0-P1-20200927-rel61199-APPLC.bin
    0771948573fffa726b8927ca6259ea16
    {product_name:TL-WPA8631P,product_ver:3.0.0,special_id:45550000}

    wpa8631pv3_eu-up-ver3-0-0-P1-20210514-rel45003-APPLC.bin
    0771948573fffa726b8927ca6259ea16
    {product_name:TL-WPA8631P,product_ver:3.0.0,special_id:45550000}

    wpa8631pv3_us-up-ver3-0-0-P1-20210625-rel35759-APPLC.bin
    0771948573fffa726b8927ca6259ea16
    {product_name:TL-WPA8631P,product_ver:3.0.0,special_id:55530000}

    wpa8631pv3_au-up-ver3-0-0-P1-20210625-rel42417-APPLC.bin
    0771948573fffa726b8927ca6259ea16
    {product_name:TL-WPA8631P,product_ver:3.0.0,special_id:41550000}

Signed-off-by: Joe Mullally <jwmullally@gmail.com>
[pepe2k@gmail.com: added 'TL-' prefix in model name, in commit desc]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2 years agotplink-safeloader: TP-Link EAP615-Wall v1 support
Stijn Tintel [Thu, 27 Jan 2022 09:35:54 +0000 (11:35 +0200)]
tplink-safeloader: TP-Link EAP615-Wall v1 support

Support creating images for the TP-Link EAP615-Wall v1.

Original partition layout:
  partition fs-uboot base 0x00000 size 0x80000
  partition partition-table base 0x80000 size 0x02000
  partition default-mac base 0x90000 size 0x01000
  partition support-list base 0x91000 size 0x00100
  partition product-info base 0x91100 size 0x00400
  partition soft-version base 0x92000 size 0x00100
  partition os-image base 0xa0000 size 0x380000
  partition file-system base 0x420000 size 0x970000
  partition user-config base 0xd90000 size 0x60000
  partition mutil-log base 0xf30000 size 0x80000
  partition oops base 0xfb0000 size 0x40000
  partition radio base 0xff0000 size 0x10000

In OpenWrt, the os-image and file-system partitions are merged into a
single firmware partition.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Reviewed-by: Sander Vanheule <sander@svanheule.net>
2 years agoiptime-crc32: add support for AX8004M
Kim Namu [Wed, 9 Feb 2022 14:43:28 +0000 (23:43 +0900)]
iptime-crc32: add support for AX8004M

This commit is preparations for adding support for device AX8004M
similar to AX2004M.

Signed-off-by: Kim Namu <namu@theseed.io>
2 years agofirmware-utils: support checksum for AVM fritzbox wasp SOCs
Daniel Kestrel [Mon, 17 Jan 2022 08:36:29 +0000 (09:36 +0100)]
firmware-utils: support checksum for AVM fritzbox wasp SOCs

This patch adds creating the checksum to be able to create an
image and boot the secondary ath79 based wireless assist (WASP)
SoC with a second instance of OpenWrt for some AVM Fritzbox
devices (3390, 3490, 5490, 7490).
The utility is called avm-wasp-checksum and was originally
created by Andreas Boehler.

Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
2 years agotplink-safeloader: support for Archer A6 v3 JP
João Orui [Thu, 3 Feb 2022 15:30:28 +0000 (00:30 +0900)]
tplink-safeloader: support for Archer A6 v3 JP

Add the missing tp-link firmware ID for the TP-Link Archer A6 v3 (JP)

Signed-off-by: João Orui <joao@joao.jp>
2 years agoiptime-crc32: add image header tool for new ipTIME models
Sungbo Eo [Tue, 4 Jan 2022 14:47:27 +0000 (23:47 +0900)]
iptime-crc32: add image header tool for new ipTIME models

Some ipTIME models (e.g. A8004T-XR) started to use a new 56-byte header
format which uses accumulated CRC-32 for its checksum algorithm. This tool
helps to pass through the factory image verification process on the
applicable models.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2 years agoiptime-naspkg: add image header tool for ipTIME NAS series
Sungbo Eo [Sat, 1 Jan 2022 08:03:35 +0000 (17:03 +0900)]
iptime-naspkg: add image header tool for ipTIME NAS series

The purpose of this tool is to pass the factory image verification process,
and it does not provide a full image with kernel and rootfs. The tool prepends
a factory header to kernel image, and rootfs should be appended separately.

This tool has been developed and tested on NAS1 and NAS1dual, but it can
also be used on other similar models with additional tweaking.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2 years agocros-vbutil: add Chrome OS vboot kernel-signing utility
Brian Norris [Sun, 16 Jan 2022 05:48:31 +0000 (21:48 -0800)]
cros-vbutil: add Chrome OS vboot kernel-signing utility

Chrom{ium,e} OS based devices use a Coreboot+Depthcharge-based firmware,
which verifies and loads a kernel packed in a verified-boot payload. The
verification tooling (both for creating and verifying payloads) is
implemented here:

https://chromium.googlesource.com/chromiumos/platform/vboot_reference

Devices running such bootloaders also tend to support a "developer
mode," where a device can be unlocked to run arbitrary kernel payloads,
using the same verified-boot format plus well-known developer keys. More
information can be found here:

https://chromium.googlesource.com/chromiumos/docs/+/master/developer_mode.md

Rather than build and package the vboot_reference utilities as part of
the base OpenWRT tools, I chose to reimplement just the portion that's
required for signing payloads. I also embed the developer key directly
in the source for convenience, though it's certainly possible to
provide other keys too, if one were to build their own firmware that
accepts it.

This tool is essentially the same as running something like this, using
the Chromium OS tooling:

  vbutil_kernel --pack kernel_partition.bin \
   --keyblock /usr/share/vboot/devkeys/kernel.keyblock \
   --signprivate /usr/share/vboot/devkeys/kernel_data_key.vbprivk \
   --version 1 \
   --vmlinuz kernel.bin \
   --bootloader zero.txt \
   --config commnad_line.txt \
   --arch ${ARCH}

I have also packaged the Chromium OS vboot_reference tooling for the
packages feed, as it can be useful beyond simply creating a bootable
image (e.g., manipulating Chromium OS specific GPT attributes, handling
other NVRAM attributes, vboot packing/unpacking/verifying):
https://github.com/openwrt/packages/pull/12829

The vboot_reference tools are released by Google under a BSD 3-clause
license. I've provided the original license text as well as a GPL-2
notice for my modifications (essentially just borrowing the data
structures and rewriting everything else).

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
2 years agoptgen: add Chromium OS kernel partition support
Brian Norris [Sun, 16 Jan 2022 05:48:30 +0000 (21:48 -0800)]
ptgen: add Chromium OS kernel partition support

Chrom{ium,e} OS (shortened as "CrOS") bootloaders use a custom GPT
partition type to locate their kernel(s), with custom attributes for
noting properties around which partition(s) should be active and how
many times they've been tried as part of their A/B in-place upgrade
system.

OpenWRT doesn't use A/B updates for upgrades (instead, just shutting
things down far enough to reprogram the necessary partitions), so all we
need to do is tell the bootloader which one is the kernel partition, and
how to use it (i.e., set the "successful" and "priority" attributes).

ptgen already supports some basic GPT partition creation, so just
add support for a '-T <GPT partition type>' argument. Currently, this
only supports '-T cros_kernel', but it could be extended if there are
other GPT partition types needed.

For GPT attribute and GUID definitions, see the CrOS verified boot
sources:

https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/refs/heads/master/firmware/lib/cgptlib/include/cgptlib_internal.h
https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/refs/heads/master/firmware/include/gpt.h

Wikipedia (!!) even notes the GUIDs:
https://en.wikipedia.org/wiki/GUID_Partition_Table#Partition_type_GUIDs

The GUID is also recognized in fdisk, and likely other utilities, but
creation/manipulation is typically done via the 'cgpt' utility, provided
as part of the Chromium vboot_reference project.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
2 years agotplink-safeloader: support Archer C6v3.0 (BR)
Henrique de Moraes Holschuh [Wed, 8 Dec 2021 13:14:57 +0000 (10:14 -0300)]
tplink-safeloader: support Archer C6v3.0 (BR)

Add the missing tp-link firmware ID for the TP-Link Archer C6v3.0 (BR),
which is currently sold in Brazil.  It uses exactly the same vendor
firmware as the A6v3 and C6v3.20.

Signed-off-by: Henrique de Moraes Holschuh <henrique@nic.br>
2 years agotplink-safeloader: fix Archer A7v5 factory flashing from vendor fw > v1.1.x
Matthias Schiffer [Fri, 14 Jan 2022 22:08:49 +0000 (23:08 +0100)]
tplink-safeloader: fix Archer A7v5 factory flashing from vendor fw > v1.1.x

Apply the same fix that was previously done for the Archer C7v5 to the
A7v5 as well to make the web UI accept our images again.

Tested-by: Luflosi <luflosi@luflosi.de>
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2 years agootrx: support TRX from stdin when extracting
Rafał Miłecki [Sat, 27 Nov 2021 15:31:04 +0000 (16:31 +0100)]
otrx: support TRX from stdin when extracting

It allows e.g.
dd if=firmware.chk skip=1 bs=58 | otrx extract - -1 kernel.bin

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2 years agootrx: support unsorted partitions offsets
Rafał Miłecki [Sat, 27 Nov 2021 15:31:03 +0000 (16:31 +0100)]
otrx: support unsorted partitions offsets

TRX format doesn't guarantee that it contains partitions offsets in a
sorted order. Store partitions info in context struct and make sure it's
sorted.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2 years agootrx: extract shared code opening & parsing TRX format
Rafał Miłecki [Sat, 27 Nov 2021 15:31:02 +0000 (16:31 +0100)]
otrx: extract shared code opening & parsing TRX format

This avoids some code duplication.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2 years agooseama: support extracting entity to stdout
Rafał Miłecki [Fri, 26 Nov 2021 16:17:08 +0000 (17:17 +0100)]
oseama: support extracting entity to stdout

This allows using oseama in a pipe. It's very useful for writing data to
flash using e.g.
oseama extract firmware.bin -e 0 | mtd write - firmware

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2 years agooseama: allow reading from stdin
Rafał Miłecki [Fri, 26 Nov 2021 16:17:07 +0000 (17:17 +0100)]
oseama: allow reading from stdin

This adds support for reading Seama seal from stdin when using "info" or
"extract" command. It allows e.g.

cat firmware.bin | oseama info -

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2 years agootrx: allow validating TRX from stdin
Rafał Miłecki [Fri, 26 Nov 2021 06:41:17 +0000 (07:41 +0100)]
otrx: allow validating TRX from stdin

This makes "otrx check" work with stdin to allow e.g.
dd if=firmware.chk skip=1 bs=58 | otrx check -

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2 years agootrx: avoid unneeded fseek() when calculating CRC32
Rafał Miłecki [Fri, 26 Nov 2021 06:23:10 +0000 (07:23 +0100)]
otrx: avoid unneeded fseek() when calculating CRC32

Just use already read data.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2 years agotplink-safeloader: add EAP225 v1 support
Sander Vanheule [Sat, 20 Nov 2021 13:06:56 +0000 (14:06 +0100)]
tplink-safeloader: add EAP225 v1 support

Allow creating images compatible with TP-Link's EAP225v1 access point.

The original partition layout is as follows:
    partition fs-uboot base 0x00000 size 0x20000
    partition partition-table base 0x20000 size 0x02000
    partition default-mac base 0x30000 size 0x01000
    partition support-list base 0x31000 size 0x00100
    partition product-info base 0x31100 size 0x00400
    partition soft-version base 0x32000 size 0x00100
    partition os-image base 0x40000 size 0x180000
    partition file-system base 0x1c0000 size 0xc00000
    partition user-config base 0xdc0000 size 0x30000
    partition radio base 0xff0000 size 0x10000

For OpenWrt, the os-image and file-system partition are merged into one
firmware partition, to enable dynamic rootfs partition splits.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2 years agobuild, cmake: switch OPENSSL_CRYPTO_LIBRARY -> OPENSSL_CRYPTO_LIBRARIES
Alexandru Ardelean [Fri, 29 Oct 2021 08:54:44 +0000 (11:54 +0300)]
build, cmake: switch OPENSSL_CRYPTO_LIBRARY -> OPENSSL_CRYPTO_LIBRARIES

OPENSSL_CRYPTO_LIBRARY returns just the full path to libcrypto.a
OPENSSL_CRYPTO_LIBRARIES returns also any other libraries required to fully
link an executable with libcrypto.a. This can be -lpthread, or -ldl, or
something else.

The FindOpenSSL.cmake module does a good job of identifying these dependent
libs, but the OPENSSL_CRYPTO_LIBRARIES variable must be used (same as using
ZLIB_LIBRARIES).

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Reviewed-by: Petr Štetiar <ynezz@true.cz>
2 years agobuild, cmake: add quotes for FW_UTIL variable arguments
Alexandru Ardelean [Fri, 29 Oct 2021 08:54:43 +0000 (11:54 +0300)]
build, cmake: add quotes for FW_UTIL variable arguments

CMake macro arguments are special, so when passing ${ZLIB_LIBRARIES} as
an argument, this can actually be a list of strings.
In this case, the first library (for zlib) will be added to
TARGET_LINK_LIBRARIES() and the others will be discarded. This is likely
due to some expansion from the FW_UTIL macro.

So, if FindZLIB returns more libraries for linking, they will not be
considered.

This is the case when trying to change OPENSSL_CRYPTO_LIBRARY ->
OPENSSL_CRYPTO_LIBRARIES.
OPENSSL_CRYPTO_LIBRARY is just libcrypto.a
OPENSSL_CRYPTO_LIBRARIES can also include -ldl

There's a few points made here about macros:
  https://cmake.org/cmake/help/latest/command/macro.html#argument-caveats

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Reviewed-by: Petr Štetiar <ynezz@true.cz>
2 years agoramips: add support for TP-Link RE305 v3
Adrian Schmutzler [Sat, 30 Oct 2021 16:53:13 +0000 (18:53 +0200)]
ramips: add support for TP-Link RE305 v3

Signed-off-by: Michal Kozuch <servitkar@gmail.com>
[prepare for separate submission to firmware-utils repo,
 update soft_ver]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2 years agoAdd more missing include for byte swap operations
Fabrice Fontaine [Sun, 17 Oct 2021 08:10:30 +0000 (10:10 +0200)]
Add more missing include for byte swap operations

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2 years agoAdd more missing includes for byte swap operations
Kevin Darbyshire-Bryant [Tue, 5 Oct 2021 19:45:24 +0000 (20:45 +0100)]
Add more missing includes for byte swap operations

And fix a couple of spelling errors while we're here

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2 years agoxiaomifw: new tool for managing Xiaomi firmwares
Rafał Miłecki [Fri, 6 Aug 2021 12:58:39 +0000 (14:58 +0200)]
xiaomifw: new tool for managing Xiaomi firmwares

This has been tested with Xiaomi routers images (r1cl, r1cm, r2100, r3,
r3d, r3g, r4cm, ra70) but it should also be compatible with other
devices as Xiaomi seems to share the same format across most of their
products.

The biggest & probably unresolvable problem is RSA 256 B signature.
Without the key it's impossible to create an image that official UI
would accept.

This tool may be still useful for flashing original Xiaomi firmwares
(e.g. when reverting to official image) and for development purposes.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2 years agoath79: add support for TP-Link CPE710-v1
Andrew Cameron [Mon, 12 Apr 2021 18:24:33 +0000 (13:24 -0500)]
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>
2 years agoramips: add missing information to dlink headers
Alan Luck [Tue, 20 Apr 2021 09:44:01 +0000 (19:44 +1000)]
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>
2 years agofirmware-utils: tplink-safeloader: set EAP235-Wall v1 soft-version
Sander Vanheule [Fri, 10 Sep 2021 08:57:19 +0000 (10:57 +0200)]
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>
2 years agofirmware-utils: tplink-safeloader: improve soft-version customisation
Sander Vanheule [Fri, 10 Sep 2021 08:57:18 +0000 (10:57 +0200)]
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>
2 years agofirmware-utils: tplink-safeloader: use revision field
Sander Vanheule [Wed, 1 Sep 2021 19:15:57 +0000 (21:15 +0200)]
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: 1a211af2cb3b ("firmware-utils: tplink-safeloader: refactor meta-partition generation")
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2 years agofirmware-utils: seama.h: replace LGPL-2.1-or-later boilerplate with SPDX
Rafał Miłecki [Fri, 6 Aug 2021 10:59:56 +0000 (12:59 +0200)]
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>
2 years agoath79: add support for TP-Link TL-WA1201 v2
Robert Balas [Thu, 2 Sep 2021 15:07:14 +0000 (17:07 +0200)]
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>
2 years agofirmware-utils: mkmerakifw-old: Add le32 support
Matthew Hagan [Thu, 5 Aug 2021 22:24:40 +0000 (22:24 +0000)]
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>
2 years agofirmware-utils: fix build on not Linux
Kevin Darbyshire-Bryant [Sat, 21 Aug 2021 19:08:07 +0000 (20:08 +0100)]
firmware-utils: fix build on not Linux

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2 years agofirmware-utils: add support for ZyXEL ZLD firmware
Vincent Wiemann [Mon, 2 Aug 2021 22:21:46 +0000 (00:21 +0200)]
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>
2 years agofirmware-utils: nand_ecc: replace GPL boilerplate with SPDX
Rafał Miłecki [Fri, 6 Aug 2021 10:59:23 +0000 (12:59 +0200)]
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>
2 years agofirmware-utils: trx: replace GPL-2.0-or-later boilerplate with SPDX
Rafał Miłecki [Fri, 6 Aug 2021 10:59:22 +0000 (12:59 +0200)]
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>
2 years agofirmware-utils: osbridge-crc: replace GPL-2.0-only boilerplate with SPDX
Rafał Miłecki [Fri, 6 Aug 2021 10:59:21 +0000 (12:59 +0200)]
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>
2 years agofirmware-utils: mkmylofw: replace GPL-2.0-or-later boilerplate with SPDX
Rafał Miłecki [Fri, 6 Aug 2021 10:59:20 +0000 (12:59 +0200)]
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>
2 years agofirmware-utils: mkmerakifw-old: replace GPL-2.0-only boilerplate with SPDX
Rafał Miłecki [Fri, 6 Aug 2021 10:59:19 +0000 (12:59 +0200)]
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>
2 years agofirmware-utils: add GPL 2.0 SPDX to files with no license info
Rafał Miłecki [Wed, 4 Aug 2021 13:58:47 +0000 (15:58 +0200)]
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>
2 years agofirmware-utils: tplink-safeloader: replace BSD-2-Clause boilerplate with SPDX
Rafał Miłecki [Wed, 4 Aug 2021 12:32:14 +0000 (14:32 +0200)]
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>
2 years agofirmware-utils: seama: replace BSD-3-Clause boilerplate with SPDX
Rafał Miłecki [Wed, 4 Aug 2021 12:26:35 +0000 (14:26 +0200)]
firmware-utils: seama: replace BSD-3-Clause boilerplate with SPDX

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2 years agofirmware-utils: replace GPL 2.0+ boilerplate/reference with SPDX
Rafał Miłecki [Wed, 4 Aug 2021 11:06:24 +0000 (13:06 +0200)]
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>
2 years agofirmware-utils: replace GPL 2.0 boilerplate/reference with SPDX
Rafał Miłecki [Wed, 4 Aug 2021 10:30:38 +0000 (12:30 +0200)]
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>
2 years agoath79: add support for TP-Link RE455 v1
Roberto Valentini [Thu, 1 Jul 2021 09:56:30 +0000 (11:56 +0200)]
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>
2 years agoath79: add support for TP-Link TL-WR941HP v1
Diogenes Rengo [Fri, 25 Jun 2021 14:44:40 +0000 (11:44 -0300)]
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>
2 years agocmake: fix missing install target
Petr Štetiar [Mon, 5 Jul 2021 09:51:01 +0000 (11:51 +0200)]
cmake: fix missing install target

Add a missing install target so the binaries could be installed.

Signed-off-by: Petr Štetiar <ynezz@true.cz>