aboutsummaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* firmware-utils: bcm4908img: convert into a packageRafał Miłecki2021-04-082-998/+0
| | | | | | | | | | | 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> (cherry picked from commit 9b4fc4cae9fa0cd0cd9060e1c9d33320c3249ced)
* firmware-utils: bcm4908img: fix uninitialized var usageRafał Miłecki2021-04-081-3/+7
| | | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 5a2086d230063b2f83a436ed37b0f6a92706bcb9)
* firmware-utils: bcm4908img: extract bootfs without paddingRafał Miłecki2021-04-081-6/+27
| | | | | | | | | 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> (cherry picked from commit ed7edf88e20c9dd0026e5c5629d8a6500d3e3f80)
* firmware-utils: bcm4908img: fix extracting cferomRafał Miłecki2021-04-081-1/+1
| | | | | | | Fix offset to extract proper data when image contains vendor header. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit dcbde11af181055f2d1c77ebc19f50c29bbab96e)
* firmware-utils: bcm4908img: support extracting bootfs & rootfsRafał Miłecki2021-04-081-0/+35
| | | | | | | | 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> (cherry picked from commit e33957c241abf8f0dbf5f3713058d126fb4599b4)
* firmware-utils: bcm4908img: replace size with offsetRafał Miłecki2021-04-081-20/+35
| | | | | | | | 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> (cherry picked from commit 5314cab729b743d3b8b08db4e01c3095017f4e68)
* firmware-utils: bcm4908img: add bootfs supportRafał Miłecki2021-04-081-3/+337
| | | | | | | | | | | | | 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> (cherry picked from commit ed847ef5f340dcae1556cbc6dfaa6657a5179be6)
* firmware-utils: bcm4908img: support extracting image dataRafał Miłecki2021-04-081-0/+87
| | | | | | | It's useful for upgrading cferom, firmware, etc. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 9c039d56a154bb416492bf5657093576d50cc220)
* firmware-utils: bcm4908img: find cferom sizeRafał Miłecki2021-04-081-0/+31
| | | | | | | | 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> (cherry picked from commit 6af45b842bd22633fa3ccd57edaf073a759525bb)
* firmware-utils: bcm4908img: use "info" command displaying file infoRafał Miłecki2021-04-081-11/+20
| | | | | | | | BCM4908 image format contains some info that may be useful for info / debugging purposes. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 9b9184f1782489163eb204f3b238de778ae1214b)
* firmware-utils: bcm4908img: support reading from stdinRafał Miłecki2021-04-081-8/+38
| | | | | | | | 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> (cherry picked from commit d533b27bc09eb5323a05ed44589235a86edcda0d)
* firmware-utils: bcm4908img: detect Netgear vendor firmwareRafał Miłecki2021-04-081-25/+33
| | | | | | | | | 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> (cherry picked from commit a39f85d8b66125f07c4bcbea46b296946de60dc7)
* firmware-utils: bcm4908img: extract parsing codeRafał Miłecki2021-04-081-37/+67
| | | | | | | | | 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> (cherry picked from commit 7d5f7439428d2b4c6952af47b36acc010b846372)
* firmware-utils: bcm4908kernel: name struct fieldsRafał Miłecki2021-04-081-8/+8
| | | | | | | Less magic names / values. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit a3611432a6c3490fb2b6fdbc1ce664cf70900668)
* firmware-utils: bcm4908img: name fields & valuesRafał Miłecki2021-04-081-8/+22
| | | | | | | Less magic numbers Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 1ff7569387f69550e8a9356a109a875e4fdb4412)
* ramips: mt7621: add TP-Link EAP235-Wall supportSander Vanheule2021-02-191-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The TP-Link EAP235-Wall is a wall-mounted, PoE-powered AC1200 access point with four gigabit ethernet ports. When connecting to the device's serial port, it is strongly advised to use an isolated UART adapter. This prevents linking different power domains created by the PoE power supply, which may damage your devices. The device's U-Boot supports saving modified environments with `saveenv`. However, there is no u-boot-env partition, and saving modifications will cause the partition table to be overwritten. This is not an issue for running OpenWrt, but will prevent the vendor FW from functioning properly. Device specifications: * SoC: MT7621DAT * RAM: 128MiB * Flash: 16MiB SPI-NOR * Wireless 2.4GHz (MT7603EN): b/g/n, 2x2 * Wireless 5GHz (MT7613BEN): a/n/ac, 2x2 * Ethernet: 4× GbE * Back side: ETH0, PoE PD port * Bottom side: ETH1, ETH2, ETH3 * Single white device LED * LED button, reset button (available for failsafe) * PoE pass-through on port ETH3 (enabled with GPIO) Datasheet of the flash chip specifies a maximum frequency of 33MHz, but that didn't work. 20MHz gives no errors with reading (flash dump) or writing (sysupgrade). Device mac addresses: Stock firmware uses the same MAC address for ethernet (on device label) and 2.4GHz wireless. The 5GHz wireless address is incremented by one. This address is stored in the 'info' ('default-mac') partition at an offset of 8 bytes. From OEM ifconfig: eth a4:2b:b0:...:88 ra0 a4:2b:b0:...:88 rai0 a4:2b:b0:...:89 Flashing instructions: * Enable SSH in the web interface, and SSH into the target device * run `cliclientd stopcs`, this should return "success" * upload the factory image via the web interface Debricking: U-boot can be interrupted during boot, serial console is 57600 baud, 8n1 This allows installing a sysupgrade image, or fixing the device in another way. * Access serial header from the side of the board, close to ETH3, pin-out is (1:TX, 2:RX, 3:GND, 4:3.3V), with pin 1 closest to ETH3. * Interrupt bootloader by holding '4' during boot, which drops the bootloader into its shell * Change default 'serverip' and 'ipaddr' variables (optional) * Download initramfs with `tftpboot`, and boot image with `bootm` # tftpboot 84000000 openwrt-initramfs.bin # bootm Revert to stock: Using the tplink-safeloader utility from the firmware-utils package, TP-Link's firmware image can be converted to an OpenWrt-compatible sysupgrade image: $ ./staging_dir/host/bin/tplink-safeloader -B EAP235-WALL-V1 \ -z EAP235-WALLv1_XXX_up_signed.bin -o eap235-sysupgrade.bin This can then be flashed using the OpenWrt sysupgrade interface. The image will appear to be incompatible and must be force flashed, without keeping the current configuration. Known issues: - DFS support is incomplete (known issue with MT7613) - MT7613 radio may stop responding when idling, reboot required. This was an issue with the ddc75ff704 version of mt76, but appears to have improved/disappeared with bc3963764d. Error notice example: [ 7099.554067] mt7615e 0000:02:00.0: Message 73 (seq 1) timeout Hardware was kindly provided for porting by Stijn Segers. Tested-by: Stijn Segers <foss@volatilesystems.org> Signed-off-by: Sander Vanheule <sander@svanheule.net> (cherry picked from commit 1e75909a35a2b361cdfdfcf18a26ad61271b174e)
* tools/fakeroot: fix build regression on macOSFelix Fietkau2021-02-151-0/+42
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* fakeroot: fix to work with glibc 2.33Ilya Lipnitskiy2021-02-151-0/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following commit removed _STAT_VER definitions from glibc: https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=8ed005daf0ab03e142500324a34087ce179ae78e That subsequently broke fakeroot: https://bugs.archlinux.org/task/69572 https://bugzilla.redhat.com/show_bug.cgi?id=1889862#c13 https://forum.openwrt.org/t/unable-to-build-toolchain-fakeroot-fails-perhaps-others-after-it/87966 Make the patch based on Jan Pazdziora's suggestion from here: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/SMQ3RYXEYTVZH6PLQMKNB3NM4XLPMNZO/ Add wrappers for newly exported symbols in glibc. Apply patch from Debian to fix warnings in fts_read and fts_children: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=676428 https://sources.debian.org/patches/fakeroot/1.25.3-1.1/eglibc-fts-without-LFS/ Fix __xmknod{,at} dev pointer argument. Switch default to assume * and not the absence of *. On glibc 2.33+, there is no definition for these functions in header files, so the compile test doesn't work. But, we can default to using the pointer (as is the case with newer glibc), and use the header file on older platforms to fail the test and use no pointer. Tested on my x86_64 Arch Linux machine, fakeroot unit tests pass. Also tested by building various .ipks and examining the tar contents, to ensure that the owner uid/gid was 0/0. Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
* tools/patchelf: bump to use latest masterIlya Lipnitskiy2021-02-151-4/+5
| | | | | | | | | | | | | | | | | | | Recent ABI_VERSION commits make use of patchelf. It was discovered that with patchelf 0.10(and even 0.12) various big endian targets fail to link against libubox SO that was processed through patchelf. Using latest master patchelf fixes those link errors. Potential commits affecting big-endian processing https://github.com/NixOS/patchelf/commit/884eccc4f061a3dbdbe63a4c73f1cc9bbf77fa7d https://github.com/NixOS/patchelf/commit/d148bae6c1291b93d660a156a1756670069cd8cc Recent builds with failures: http://buildbot.openwrt.org/master/images/builders/lantiq%2Fxrx200/builds/682 http://buildbot.openwrt.org/master/images/builders/ath79%2Fmikrotik/builds/449 Cc: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
* tools: mkimage: Update U-Boot to version 2021.01Hauke Mehrtens2021-02-086-60/+13
| | | | | | | | | | | | * The fit image is now created with 0666 permission in upstream U-Boot remove our patch switch creates it with 0744 * The generated/autoconf.h file is created now as an empty file, it is not needed to remove this include any more. * Upstream lib/rsa/rsa-sign.c now includes stdlib.h instead of malloc.h * ALIGN_MASK was moved to imagetool.h, own patch should not be needed any more. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* treewide: unify OpenWrt hosted source via @OPENWRTPaul Spooren2021-02-052-2/+2
| | | | | | | | | | | Multiple sources are hosted on OpenWrts source server only. The source URLs to point to the server vary based on different epochs in OpenWrts history. Replace all by @OPENWRT which is an "empty" mirror, therefore using the fallback servers sources.cdn.openwrt.org and sources.openwrt.org. Signed-off-by: Paul Spooren <mail@aparcar.org>
* tplink-safeloader: add support for TP-Link Archer A7 v5 (RU)Alexey Kunitskiy2021-02-051-1/+2
| | | | | | | | | | | | | | | | | | | Although provided in separate zip archives, the firmwares for EU and RU version are byte-identical. This adds the missing ID compared to the support-list in the vendor firmware. Note (since I checked it anyway): Partitions and support list are unchanged for all three existing firmware versions: * 20200721-rel40773 * 20201029-rel43238 * 20201120-rel50399 Signed-off-by: Alexey Kunitskiy <alexey.kv@gmail.com> [rewrite commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* tools/zstd: compile with cmakeRosen Penev2021-01-302-3/+9
| | | | | | | | It's faster and more reliable. Removed ccache cmake build dependency as it's now implicit. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* tools/zstd: update to 1.4.8Rosen Penev2021-01-302-65/+3
| | | | | | | Switch to the normal tarball instead of the codeload generated one. The latter has the potential to change hashes based on changes in the repo. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* firmware-utils: bcm4908asus: tool inserting Asus tail into BCM4908 imageRafał Miłecki2021-01-222-0/+445
| | | | | | | | | | | Asus looks for an extra data at the end of BCM4908 image, right before the BCM4908 tail. It needs to be properly filled to make Asus accept firmware image. This tool constructs such a tail, writes it and updates CRC32 in BCM4908 tail accordingly. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* firmware-utils: bcm4908img: tool adding BCM4908 image tailRafał Miłecki2021-01-182-0/+380
| | | | | | | | | | Flashing image with BCM4908 CFE bootloader requires specific firmware format. It needs 20 extra bytes with magic numbers and CRC32 appended. This tools allows appending such a tail to the specified image and also verifying CRC32 of existing BCM4908 image. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* firmware-utils: bcm4908kernel: tool adding BCM4908 kernel headerRafał Miłecki2021-01-152-0/+128
| | | | | | | BCM4908 CFE bootloader requires kernel to be prepended with a custom header. This simple tool implements support for such headers. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* tools/fakeroot: fix build regression on macOSFelix Fietkau2021-01-141-2/+18
| | | | | | AT_EMPTY_PATH and AT_NO_AUTOMOUNT does not exist there Signed-off-by: Felix Fietkau <nbd@nbd.name>
* zstd: fix package sourceDavid Bauer2021-01-141-1/+2
| | | | | | | | | | It looks like GitHub changed the URL path for release tarballs, thus the download for the zstd package was always falling back to the OpenWrt sources mirror. Fix the GitHub URL for one which works. The file hash remains unchanged. Signed-off-by: David Bauer <mail@david-bauer.net>
* tools/ccache: find libzstd using rpathThomas Nixon2021-01-101-1/+4
| | | | | | | Previously, ccache would end up using the system libzstd, which is not supposed to be a build requirement. Signed-off-by: Thomas Nixon <tom@tomn.co.uk>
* qemu: remove obsolete packagePaul Spooren2021-01-1014-2387/+0
| | | | | | | Instead of using an ancient qemu version in-tree the building machine should just have qemu-utils installed. Signed-off-by: Paul Spooren <mail@aparcar.org>
* tools/cmake: always use non-ccache CC and CXX variablesSven Wegener2021-01-061-14/+2
| | | | | | | | | | | | | | | cmake is a dependency of ccache, which means it is build before ccache is available and hence must be build with non-ccache CC and CXX. It currently works, because the cmake build system splits the compiler variable and treats them as multiple compilers to check. For "ccache gcc" it first tests for "ccache", which always fails, because ccache is not a compiler by itself, even if it is available, and then ends up calling "gcc" alone, effectively never using ccache. Let's make this explicit by forcing the use of non-ccache CC and CXX. Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
* tools/fakeroot: update to 1.25.3Syrone Wong2021-01-056-57/+27
| | | | | | | | use PKG_FIXUP:=autoreconf to generate configure 200-hide-dlsym-error.patch deleted due to fixed upstream in another way other patches refreshed to reflect latest changes Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
* ipq806x: add support for TP-Link Talon AD7200Gary Cooper2021-01-051-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Device hardware: https://deviwiki.com/wiki/TP-LINK_AD7200_(Talon) The Talon AD7200 is basically an Archer C2600 with a third PCIe lane and an 802.11ad radio. It looks like the Archers C2600/5400 but the housing is slightly larger. Specifications -------------- - IPQ8064 dual-core 1400MHz - QCA9988 2.4GHz WiFi - QCA9990 5GHz WiFi - QCA9500 60GHz WiFi - 32MB SPI Flash - 512MiB RAM - 5 GBit Ports (QCA8337) Installation ------------ Installation is possible from the OEM web interface. Sysupgrade is possible. TFTP recovery is possible. - Image: AD7200_1.0_tp_recovery.bin Notes - This will be the first 802.11ad device supported by mainline. Signed-off-by: Gary Cooper <gaco@bitmessage.de>
* tools/fakeroot: remove undefined symbol messagesSven Wegener2020-12-312-0/+33
| | | | | | | | | | | | | | | | glibc started to return errors from dlerror() for dlsym() lookup failures which results in a lot of messages from fakeroot like dlsym(acl_get_fd): staging_dir/host/lib/libfakeroot.so: undefined symbol: acl_get_fd dlsym(acl_get_file): staging_dir/host/lib/libfakeroot.so: undefined symbol: acl_get_file dlsym(acl_set_fd): staging_dir/host/lib/libfakeroot.so: undefined symbol: acl_set_fd when building OpenWrt using a recent glibc. Use the patch from the upstream Debian package to silence these messages. Link: https://bugs.debian.org/830912 Fixes: FS#3393 Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
* ccache: update to 4.1Rosen Penev2020-12-316-19/+25
| | | | | | | | | | | | | | | | Upstream switched to building with CMake. Adjust accordingly. Reapplied patch as upstream changed the file format. Added HOST_BUILD_PARALLEL for faster compilation. Added cmake tool dependency and removed circular dependencies as a result. Adjusted dependent tools to use NOCACHE as they are needed to build ccache. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* Revert "ccache: update to 4.1"Petr Štetiar2020-12-222-15/+18
| | | | | | | | | | | | This reverts commit b1952dc259ce3eb7ac6023c9e02d5adf2546efca as it's causing issues on the buildbot which uses some kind of ccache wrapper and so the breakage needs to be investigated further: bash: cmake: command not found time: tools/ccache/compile#0.05#0.03#0.15 ERROR: tools/ccache failed to build. Signed-off-by: Petr Štetiar <ynezz@true.cz>
* firmware: add tool for signing d-link ru router factory firmware imagesAndrew Pikler2020-12-222-0/+226
| | | | | | | | Some Russian d-link routers require that their firmware be signed with a salted md5 checksum followed by the bytes 0x00 0xc0 0xff 0xee. This tool signs factory images the OEM's firmware accepts them. Signed-off-by: Andrew Pikler <andrew.pikler@gmail.com>
* ath79: add support for Ubiquiti airCube ACRoman Kuzmitskii2020-12-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Ubiquiti Network airCube AC is a cube shaped device supporting 2.4 GHz and 5 GHz with internal 2x2 MIMO antennas. It can be powered with either one of: - 24v power supply with 3.0mm x 1.0mm barrel plug - 24v passive PoE on first LAN port There are four 10/100/1000 Mbps ports (1 * WAN + 3 * LAN). First LAN port have optional PoE passthrough to the WAN port. SoC: Qualcomm / Atheros AR9342 RAM: 64 MB DDR2 Flash: 16 MB SPI NOR Ethernet: 4x 10/100/1000 Mbps (1 WAN + 3 LAN) LEDS: 1x via a SPI controller (not yet supported) Buttons: 1x Reset Serial: 1x (only RX and TX); 115200 baud, 8N1 Missing features: - LED control is not supported Physical to internal switch port mapping: - physical port #1 (poe in) = switchport 2 - physical port #2 = switchport 3 - physical port #3 = switchport 5 - physical port #4 (wan/poe out) = switchport 4 Factory update is tested and is the same as for Ubiquiti AirCube ISP hence the shared configuration between that devices. Signed-off-by: Roman Kuzmitskii <damex.pp@icloud.com>
* tools/pkgconf: update to 1.7.3Rosen Penev2020-12-222-38/+2
| | | | | | Remove upstreamed patch. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* ccache: update to 4.1Rosen Penev2020-12-222-18/+15
| | | | | | | | | | Upstream switched to building with CMake. Adjust accordingly. Reapplied patch as upstream changed the file format. Added HOST_BUILD_PARALLEL for faster compilation. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* tools/libressl: update to 3.3.1Rosen Penev2020-12-181-2/+2
| | | | Signed-off-by: Rosen Penev <rosenp@gmail.com>
* tools/cmake: update to 3.19.1Hannu Nyman2020-12-153-5/+5
| | | | | | | | Update cmake to version 3.19.1 Release notes: https://cmake.org/cmake/help/v3.19/release/3.19.html Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
* tplink-safeloader: add support for TP-Link CPE510 v3.20Gioacchino Mazzurco2020-12-141-1/+4
| | | | | | | | | | | | | This adds new strings for the v3.20 to the support list of the already supported TP-Link CPE510 v3. The underlying hardware appears to be the same, similar to the situation with CPE210 v3.20 in 4a2380a1e778 ("tplink-safeloader: expand support list for TP-Link CPE210 v3") Signed-off-by: Gioacchino Mazzurco <gio@altermundi.net> [extended commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* firmware-utils: tplink-safeloader: refactor meta-partition paddingSander Vanheule2020-12-072-68/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because some padding values in the TP-Link safeloader image generation were hardcoded, different values were sometimes used throughout a factory image. TP-Link's upgrade images use the same value everywhere, so let's do the same here. Although a lot of TP-Link's safeloader images have padded partition payloads, images for the EAP-series of AC devices don't. This padding is therefore also made optional. By replacing the type of the padding value byte with a wider datatype, new values outside of the previously valid range become available. Use these new values to denote that padding should not be performed. Because char might be signed, also replace the char literals by a numeric literal. Otherwise '\xff' might be sign extended to 0xffff. This results in factory images differing by 1 byte for: * C2600 * ARCHER-C5-V2 * ARCHERC9 * TLWA850REV2 * TLWA855REV1 * TL-WPA8630P-V2-EU * TL-WPA8630P-V2-INT * TL-WPA8630P-V2.1-EU * TLWR1043NDV4 * TL-WR902AC-V1 * TLWR942NV1 * RE200-V2 * RE200-V3 * RE220-V2 * RE305-V1 * RE350-V1 * RE350K-V1 * RE355 * RE450 * RE450-V2 * RE450-V3 * RE500-V1 * RE650-V1 The following factory images no longer have padding, shrinking the factory images by a few bytes for: * EAP225-OUTDOOR-V1 * EAP225-V3 * EAP225-WALL-V2 * EAP245-V1 * EAP245-V3 Signed-off-by: Sander Vanheule <sander@svanheule.net>
* firmware-utils: tplink-safeloader: refactor meta-partition generationSander Vanheule2020-12-072-84/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link safeloader firmware images contain a number of (small) partitions with information about the device. These consist of: * The data length as a 32-bit integer * A 32-bit zero padding * The partition data, with its length set in the first field The OpenWrt factory image partitions that follow this structure are soft-version, support-list, and extra-para. Refactor the code to put all common logic into one allocation call, and let the rest of the data be filled in by the original functions. Due to the extra-para changes, this patch results in factory images that change by 2 bytes (not counting the checksum) for three devices: * ARCHER-A7-V5 * ARCHER-C7-V4 * ARCHER-C7-V5 These were the devices where the extra-para blob didn't match the common format. The hardcoded data also didn't correspond to TP-Link's (recent) upgrade images, which actually matches the meta-partition format. A padding byte is also added to the extra-para partition for EAP245-V3. Signed-off-by: Sander Vanheule <sander@svanheule.net>
* tools: always create $STAGING_DIR/usr/{include,lib}Andre Heider2020-11-271-1/+1
| | | | | | | | | | | rules.mk always passes these as -I/-L to the toolchain. Fixes rare errors like: cc1: error: staging_dir/target-aarch64_cortex-a53_musl/usr/include: No such file or directory [-Werror=missing-include-dirs] Signed-off-by: Andre Heider <a.heider@gmail.com> Acked-by: Paul Spooren <mail@aparcar.org> Acked-by: Rosen Penev <rosenp@gmail.com>
* tools/sstrip: update to latest versionRui Salvaterra2020-11-263-472/+36
| | | | | | | | | | | | | | | | Drop our local sstrip copy and use the current ELFKickers upstream version. Patch the original makefile in order to avoid building elftoc, since it fails with musl's elf.h. This is fine, since we only need sstrip anyway. Finally, add the possibility to pass additional arguments to sstrip and pass -z (remove trailing zeros) by default, which matches the behaviour of the previous version. Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com> [shorten long commit msg lines] Signed-off-by: Paul Spooren <mail@aparcar.org>
* treewide: update email address of Tomasz Maciej NowakTomasz Maciej Nowak2020-11-242-2/+2
| | | | | | | | | | Replace my o2.pl email address. I'm still available at the old address. Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl> [rephrase commit title/message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: support for TP-Link EAP225 v3Sander Vanheule2020-11-231-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link EAP225 v3 is an AC1350 (802.11ac Wave-2) ceiling mount access point. Serial port access for debricking requires fine soldering. Device specifications: * SoC: QCA9563 @ 775MHz * RAM: 128MiB DDR2 * Flash: 16MiB SPI-NOR * Wireless 2.4GHz (SoC): b/g/n, 3x3 * Wireless 5Ghz (QCA9886): a/n/ac, 2x2 MU-MINO * Ethernet (AR8033): 1× 1GbE, 802.3at PoE Flashing instructions: * ssh into target device and run `cliclientd stopcs` * Upgrade with factory image via web interface Debricking: * Serial port can be soldered on PCB J3 (1: TXD, 2: RXD, 3: GND, 4: VCC) * Bridge unpopulated resistors R225 (TXD) and R237 (RXD). Do NOT bridge R230. * Use 3.3V, 115200 baud, 8n1 * Interrupt bootloader by holding CTRL+B during boot * tftp initramfs to flash via LuCI web interface setenv ipaddr 192.168.1.1 # default, change as required setenv serverip 192.168.1.10 # default, change as required tftp 0x80800000 initramfs.bin bootelf $fileaddr MAC addresses: MAC address (as on device label) is stored in device info partition at an offset of 8 bytes. ath9k device has same address as ethernet, ath10k uses address incremented by 1. From OEM boot log: Using interface ath0 with hwaddr b0:...:3e and ssid "..." Using interface ath10 with hwaddr b0:...:3f and ssid "..." Tested by forum user blinkstar88 Signed-off-by: Sander Vanheule <sander@svanheule.net>