aboutsummaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* tools: update patch to v2.7.6Russell Senior2018-02-122-27/+2
| | | | | | | Removes a redundant patch with a fix already upstream. Build tested on apm821xx (PPC). Signed-off-by: Russell Senior <russell@personaltelco.net>
* tools/ccache: update to 3.3.6Hannu Nyman2018-02-072-3/+3
| | | | | | | | | Update ccache to 3.3.6 Release notes: https://ccache.samba.org/releasenotes.html#_ccache_3_3_6 Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
* tools/tar: update to 1.30Hannu Nyman2018-01-204-36/+16
| | | | | | update GNU tar to 1.30 Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
* ramips: tl-wr840n-v5: increase firmware partition for 4Mmtk layotSerg Studzinskii2018-01-181-1/+1
| | | | | | | | | | | According to console log during TP-Link TL-WR840N v5 OEM firmware update procedure 0x3e0000-0x3f0000 64kB "config" partition, which is used to store router's configuration settings, is erased and recreated again during every OEM firmware update procedure, thus does not contain any valuable factory data. So it is conviniant to use this extra 64kB erase block for jffs overlay due limited flash size on this device like it used on TP-Link's ar71xx boards. Signed-off-by: Serg Studzinskii <serguzhg@gmail.com>
* tools/mpfr: update to 4.0.0Hannu Nyman2018-01-183-10/+10
| | | | | | Update mpfr to 4.0.0 Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
* tools/mpc: Update to 1.1.0Hannu Nyman2018-01-181-2/+2
| | | | | | | | Update mpc to 1.1.0 (note: adds compatibility with mpfr 4.0.0) Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
* tools/cmake: update to 3.10.1Hannu Nyman2018-01-177-40/+16
| | | | | | | Update cmake to 3.10.1 Refresh patches Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
* tools/scons: update to 3.0.1Hannu Nyman2018-01-172-3/+3
| | | | | | Update scons to 3.0.1 Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
* tools/libressl: update to 2.6.4Hannu Nyman2018-01-171-2/+2
| | | | Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
* tools: make-ext4fs: remove LEDE_GIT referencesJo-Philipp Wich2018-01-151-1/+1
| | | | | | | Change the make-ext4fs Makefile to use the common PROJECT_GIT variable instead. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* firmware-tools/ptgen: use portable exit codesMichael Heimpold2018-01-021-3/+3
| | | | Signed-off-by: Michael Heimpold <mhei@heimpold.de>
* firmware-tools/ptgen: fix minor coding style issuesMichael Heimpold2018-01-021-26/+34
| | | | Signed-off-by: Michael Heimpold <mhei@heimpold.de>
* tools/expat: Update to 2.2.5Daniel Engberg2017-12-161-2/+2
| | | | | | Update (lib)expat to 2.2.5 Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
* firmware-utils: mktplinkfw: add support for BR region codeHenryk Heisig2017-12-141-0/+1
| | | | Signed-off-by: Henryk Heisig <hyniu@o2.pl>
* firmware-utils: mktplinkfw: fix JFFS2 EOF markersSergey Ryazanov2017-12-141-1/+1
| | | | | | | | | | | | | | | | | | | | | mktplinkfw/mktplinkfw2 utilities put JFFS2 EOF market only at 64KB boundary, this could lead to current device configuration lost during the sysupgrade on a device, which is equpped with flash with the 4KB erase block size (e.g. TP-Link Archer C20). This happens when 64KB and 4KB alignments do not match, so the JFFS2 data is written not exactly at the partition beginnig and startup scripts can not find the JFFS2 during the first boot just after the sysupgrade. Fix this by placing additional JFFS2 EOF marker at a 4KB boundary. Also keep the marker at 64KB intact, so the utilities will produce images suitable for devices with both 4KB and 64KB erase blocks. Fixes: 29a2c2ea80441895a2ffe100d854d2b26d5fa606 (add ability to put jffs2 eof marker into the image) Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
* tools/sstrip: Fix compile under standard linux.Rosen Penev2017-12-081-4/+5
| | | | | | bswap32 undefined is the issue. Added the proper header. Also fixed a few format/conversion warnings that clang complained about without -Wall or -Wextra. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* tools/e2fsprogs: Update to 1.43.7Rosen Penev2017-11-221-2/+2
| | | | | | Compile tested on Fedora 27. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* firmware-utils: add otrx tool for handling TRX imagesRafał Miłecki2017-11-172-0/+593
| | | | | | | | | It can be a replacement for the trx tool. The advantage is that otrx doesn't alloc buffer for the whole TRX which can be a nice optimization when creating big images. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
* add PKG_CPE_ID ids to package and toolsAlexander Couzens2017-11-1715-0/+15
| | | | | | | | | | | CPE ids helps to tracks CVE in packages. https://cpe.mitre.org/specification/ Thanks to swalker for CPE to package mapping and keep tracking CVEs. Acked-by: Jo-Philipp Wich <jo@mein.io> Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
* ar71xx: add support for TP-Link TL-WR1043N v5Tim Thorpe2017-11-141-1/+39
| | | | | | | | | | | | | | | | | | | | | TP-Link TL-WR1043N v5 appears to be identical to the TL-WR1043ND v4, except that the USB port has been removed and there is no longer a removable antenna option. The software is more in line with the Archer series in that it uses a nested bootloader scheme. Specifications: - QCA9563 at 775 MHz - 64 MB RAM - 16 MB flash - 3 (non-detachable) Antennas / 450 Mbit - 1x/4x WAN/LAN Gbps Ethernet (QCA8337) - reset and Wi-Fi buttons Signed-off-by: Tim Thorpe <tim@tfthorpe.net> Signed-off-by: Ludwig Thomeczek <ledesrc@wxorx.net>
* firmware-utils: tplink-safeloader: add more country codes for Archer C7 v4Dmitry Tunin2017-11-141-0/+7
| | | | | | | If codes do not match, it is impossible to flash from the stock firmware. Signed-off-by: Dmitry Tunin <hanipouspilot@gmail.com>
* ar71xx: increase kernel partition size for TP-Link RE450 v1Piotr Dymacz2017-11-141-2/+2
| | | | | | | | | | | This increases kernel partition size and fixes rootfs (file-system) partition size on TP-Link RE450 v1. Also, while we are at it, switch from statically defined kernel and rootfs partitions in kernel cmdline to "tplink-fw" mtd splitter. Fixes: FS#1072. Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* ar71xx: increase kernel partition size for some TP-Link boardsHenryk Heisig2017-11-141-8/+8
| | | | | | | | | | | | | | This patch increases kernel partition size and re-enables image generation for below TP-Link boards: - archer-c58-v1 - archer-c60-v1 - tl-wr902ac-v1 - tl-wr942n-v1 Signed-off-by: Henryk Heisig <hyniu@o2.pl> [commit message and title reworded] Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* tools/coreutils: install readlinkFelix Fietkau2017-11-091-2/+2
| | | | | | Parts of the build system use non-portable invocation of readlink Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ramips: add support for TP-Link TL-WR840N v5Robert Marko2017-11-081-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link TL-WR840N v5 is simple N300 router with 5-port FE switch and non-detachable antennas, based on MediaTek MT7628NN (aka MT7628N) WiSoC. Specification: - MT7628N/N (580 MHz) - 64 MB of RAM (DDR2) - 4 MB of FLASH - 2T2R 2.4 GHz - 5x 10/100 Mbps Ethernet - 2x external, non-detachable antennas - UART (J1) header on PCB (115200 8n1) - 1x LED (GPIO-controlled), 1x button * LED in TL-WR840N v5 is a dual-color, dual-leads type which isn't (fully) supported by gpio-leds driver. This type of LED requires both GPIOs state change at the same time to select color or turn it off. For now, we support/use only the green part of the LED. Orange LED is registered so you can later use it for your own purposes. Flash instruction: Unlike TL-WR840N v4 flashing through WEB UI works in v5. 1. Download lede-ramips-mt76x8-tl-wr840n-v5-squashfs-sysupgrade.bin image. 2. Go to 192.168.0.1 3. Flash the sysupgrade image through Firmware upgrade section of WEB UI. 4. Wait until green LED stops flashing and use the router. Notes: TFTP recovery is broken since TP-Link reused bootloader code for v4 and that does not take into account only 4 MB of flash and bricks the device. So do not use TFTP Recovery or you will have to rewrite SPI flash. They fixed it in later GPL code,but it is unknown which version of bootloader you have. After manually compiling and flashing bootloader from GPL sources TFTP recovery works properly. Signed-off-by: Robert Marko <robimarko@gmail.com>
* tools/firmware-utils: mktplinkfw* fix rootfs offsetThibaut VARÈNE2017-11-083-12/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With '-a' specified on the command line, the current code: - computes an aligned _kernel length_ instead of an aligned _rootfs offset_. - does not update the rootfs offset after computing the new kernel length, and instead retains the layout default. When the kernel length exceeds the available space left with this fixed offset, the resulting image header contains invalid data, with the recorded rootfs offset overlapping the kernel area. This patch ensures that rootfs offset is correctly computed and reflected in the final image. Furthermore, the build_fw() function special cases the rootfs_align option because of the above invalid logic. This is also fixed and the computed (or command-line provided, or layout-provided) rootfs_ofs value is used in all cases. There seems to be no valid reason to extend the kernel length beyond the actual length of the kernel itself (OFW images don't do it) so this part of the existing behavior is dropped. Example image before the patch: Kernel data offset : 0x00000200 / 512 bytes Kernel data length : 0x00158438 / 1410104 bytes Kernel load address : 0x00000080 Kernel entry point : 0x00000080 Rootfs data offset : 0x00140000 / 1310720 bytes Rootfs data length : 0x001e4f7e / 1986430 bytes Example image after the patch: Kernel data offset : 0x00000200 / 512 bytes Kernel data length : 0x001583fe / 1410046 bytes Kernel load address : 0x00000080 Kernel entry point : 0x00000080 Rootfs data offset : 0x00158600 / 1410560 bytes Rootfs data length : 0x001e4e22 / 1986082 bytes Tested-by: Mathias Kresin <dev@kresin.me> Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> Tested-by: Daniel Engberg <daniel.engberg.lists@pyret.net> Tested-by: Henryk Heisig <hyniu@o2.pl> Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* tools/squashfs4: include sysmacros.h explicitlyAlex Maclean2017-10-275-16/+36
| | | | | | | | | | | | glibc is moving to remove the include of sys/sysmacros.h from sys/types.h, and some distros have done this early. Other libcs may already lack this include. Include sysmacros.h explicitly. Fixes: FS#1017 Signed-off-by: Alex Maclean <monkeh@monkeh.net> [refresh patches] Signed-off-by: Mathias Kresin <dev@kresin.me>
* tools/squashfs: include sysmacros.h explicitlyAlex Maclean2017-10-271-0/+20
| | | | | | | | | | glibc is moving to remove the include of sys/sysmacros.h from sys/types.h, and some distros have done this early. Other libcs may already lack this include. Include sysmacros.h explicitly. Fixes: FS#1018 Signed-off-by: Alex Maclean <monkeh@monkeh.net>
* tools/mtd-utils: include sysmacros.h explicitlyAlex Maclean2017-10-272-4/+27
| | | | | | | | | | | | glibc is moving to remove the include of sys/sysmacros.h from sys/types.h, and some distros have done this early. Other libcs may already lack this include. Include sysmacros.h explicitly. Fixes: FS#1015 Signed-off-by: Alex Maclean <monkeh@monkeh.net> [refresh patches] Signed-off-by: Mathias Kresin <dev@kresin.me>
* tools/findutils: include sysmacros.h explicitlyAlex Maclean2017-10-271-0/+13
| | | | | | | | | | glibc is moving to remove the include of sys/sysmacros.h from sys/types.h, and some distros have done this early. Other libcs may already lack this include. Include sysmacros.h explicitly. Fixes: FS#1016 Signed-off-by: Alex Maclean <monkeh@monkeh.net>
* tools/squashfs: use host cflagsFelix Fietkau2017-10-241-0/+1
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ar71xx: add support for TP-LINK Archer C7 v4Felix Fietkau2017-10-191-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link Archer C7 v4 is a dual-band AC1750 router, based on Qualcomm/Atheros QCA9561+QCA9888. Specification: - 775/650/258 MHz (CPU/DDR/AHB) - 128 MB of RAM (DDR2) - 16 MB of FLASH (SPI NOR) - 3T3R 2.4 GHz - 3T3R 5 GHz - 5x 10/100/1000 Mbps Ethernet - 7x LED, 2x button - UART header on PCB Flash instruction: 1. Upload lede-ar71xx-generic-archer-c7-v4-squashfs-factory.bin via Web interface Flash instruction using TFTP recovery: 1. Set PC to fixed ip address 192.168.0.66 2. Download lede-ar71xx-generic-archer-c7-v4-squashfs-factory.bin and rename it to ArcherC7v4_tp_recovery.bin 3. Start a tftp server with the file tp_recovery.bin in its root directory 4. Turn off the router 5. Press and hold Reset button 6. Turn on router with the reset button pressed and wait ~15 seconds 7. Release the reset button and after a short time the firmware should be transferred from the tftp server 8. Wait ~30 second to complete recovery. Flash instruction under U-Boot, using UART: 1. tftp 0x81000000 lede-ar71xx-...-sysupgrade.bin 2. erase 0x9f040000 +$filesize 3. cp.b $fileaddr 0x9f040000 $filesize 4. reset Signed-off-by: Felix Fietkau <nbd@nbd.name>
* tools/firmware-utils: mktplinkfw move build_fw() to libThibaut VARÈNE2017-10-064-148/+102
| | | | | | | | | | | | | | This patch moves build_fw() to mktplinkfw-lib.c The versions of mktplinkfw.c and mktplinkfw2.c had slight differences in code flow, the version from mktplinkfw.c has been preferred. While it's expected that this change will not affect mktplinkfw2, all use cases could not be tested and so this particular change is committed separately. Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* tools/firmware-utils: mktplinkfw regroup duplicate codeThibaut VARÈNE2017-10-065-454/+276
| | | | | | | | | | | | | This patch carves out the duplicated code of mktplinfw.c and mktplinkfw2.c and moves it to mktplinkfw-lib.c This change is a semantic NOP (the code is unchanged). To ensure compatibility with gcc-5.x and newer without changing the code, -fgnu89-inline is added to the build flags for these two binaries. Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* tools/firmware-utils: remove hardcoded values from mktplinkfw2.cThibaut VARÈNE2017-10-061-161/+24
| | | | | | | | | | | | This patch removes all the hardcoded board-specific values from mktplinkfw2.c, and as well as the corresponding support code. By design, this change also deletes all of the broken matching logic that was embedded in mktplinkfw2 and aligns the "inspect" behavior with that of mktplinkfw (i.e. print the parsed header content as they are without further processing). Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* cmake: fix build error with Xcode 9 on macOS 12Felix Fietkau2017-10-051-0/+15
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* tools: cmake: fix librt linking (FS#1032)Jo-Philipp Wich2017-10-021-7/+7
| | | | | | | | | Commit 839129b864 "tools/cmake: Update to 3.9.3" improperly rebased the librt linking patch, causing FS#381 to resurface. Fixes FS#1032. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* tools/mm-macros: Update to 0.9.11Daniel Engberg2017-09-301-2/+2
| | | | | | Update mm-macros to 0.9.11 Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
* tools/mpfr: Update to 3.1.6Daniel Engberg2017-09-301-2/+2
| | | | | | Update mpfr to 3.1.6 Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
* tools/cmake: Update to 3.9.3Daniel Engberg2017-09-307-56/+18
| | | | | | | | Update CMake to 3.9.3 Remove FreeBSD patch (not needed) Rearrage and update patches Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
* tools: flex: fix segfault with glibc 2.26+Marko Ratkaj2017-09-241-0/+27
| | | | | | | | | Fix segmentation fault caused by implicit declaration of function 'reallocarray'. Added patch will enable reallocarray() prototype in glibc 2.26+ on Linux systems. This fix will be included in flex 2.6.5. Fixes LEDE issue: FS#1003 (Flex does not build with GCC 7.2) Signed-off-by: Marko Ratkaj <marko.ratkaj@sartura.hr>
* tools/e2fsprogs: Update to 1.43.6Daniel Engberg2017-09-164-39/+2
| | | | | | | | | | Update e2fsprogs to 1.43.6 * Remove FreeBSD patch as it's not needed, FreeBSD 9.1 is EoL and this is compiling on FreeBSD 11.1. * Remove libmagic patch, RHEL 5 is EoL (End of Production Phase) since March 31, 2017. Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
* tools/expat: Update to 2.2.4Daniel Engberg2017-09-161-2/+2
| | | | | | Update (lib)expat to 2.2.4 Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
* ramips: add support for TP-Link Archer C20 v1Maxim Anisimov2017-09-131-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link Archer C20 v1 is a router with 5-port FE switch and non-detachable antennas. It's very similiar to TP-Link Archer C50. Also it's based on MediaTek MT7620A+MT7610EN. Specification: - MediaTek MT7620A (580 Mhz) - 64 MB of RAM - 8 MB of FLASH - 2T2R 2.4 GHz and 1T1R 5 GHz - 5x 10/100 Mbps Ethernet - 2x external, non-detachable antennas - UART (J1) header on PCB (115200 8n1) - 8x LED (GPIO-controlled*), 2x button, power input switch - 1 x USB 2.0 port * WAN LED in this devices is a dual-color, dual-leads type which isn't (fully) supported by gpio-leds driver. This type of LED requires both GPIOs state change at the same time to select color or turn it off. For now, we support/use only the blue part of the LED. * MT7610EN ac chip isn't not supported by LEDE. Therefore 5Ghz won't work. Factory image notes: These devices use version 3 of TP-Link header, fortunately without RSA signature (at least in case of devices sold in Europe). The difference lays in the requirement for a non-zero value in "Additional Hardware Version" field. Ideally, it should match the value stored in vendor firmware header on device. We are able to prepare factory firwmare file which is accepted and (almost) correctly flashed from the vendor GUI. As it turned out, it accepts files without U-Boot image with second header at the beginning but due to some kind of bug in upgrade routine, flashed image gets corrupted before it's written to flash. So, to flash this device we must to prepare image using original firmware from tp-link site with uboot. Flash instruction: Until (if at all) TP-Link fixes described problem, the only way to flash LEDE image in these devices is to use tftp recovery mode in U-Boot. There are two ways to flash the device to LEDE: 1) Using tftp mode with UART connection and original LEDE image - Place lede-ramips-mt7620-ArcherC20-squashfs-factory.bin in tftp server directory - Configure PC with static IP 192.168.0.66/24 and tftp server. - Connect PC with one of LAN ports, power up the router and press key "4" to access U-Boot CLI. - Use the following commands to update the device to LEDE: setenv serverip 192.168.0.66 tftp 0x80060000 lede-ramips-mt7620-ArcherC20-squashfs-factory.bin erase tplink 0x20000 0x7a0000 cp.b 0x80060000 0x20000 0x7a0000 reset - After that the device will reboot and boot to LEDE 2) Using tftp mode without UART connection but require some manipulations with target image - Download and unpack TP-Link Archer C20 v1 firmware from original web site - Split uboot.bin from original firmware by this command (example): dd if=Archer_C20v1_0.9.1_4.0_up_boot(160427)_2016-04-27_13.53.59.bin of=uboot.bin bs=512 count=256 skip=1 - Create ArcherC20V1_tp_recovery.bin using this command: cat uboot.bin lede-ramips-mt7620-ArcherC20-squashfs-factory.bin > ArcherC20V1_tp_recovery.bin - Place ArcherC20V1_tp_recovery.bin in tftp server directory. - Configure PC with static IP 192.168.0.66/24 and tftp server. - Connect PC with one of LAN ports, press the reset button, power up the router and keep button pressed for around 6-7 seconds, until device starts downloading the file. - Router will download file from server, write it to flash and reboot. Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
* tools/firmware-utils: mktplinkfw2: allow parameter overrideThibaut VARENE2017-09-091-9/+7
| | | | | | This patch enables commandline override of board hw_ver and hw_ver_add Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
* tools: patch various gnu tools for macOS 10.13Ryan Mounce2017-08-235-0/+125
| | | | | | | | | | | These host tools compile but may crash at runtime when building on macOS 10.13 (High Sierra). Backport upstream gnulib patch until new releases of affected tools. https://lists.gnu.org/archive/html/bug-gnulib/2017-07/msg00056.html https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=c41f233c4c38e84023a16339782ee306f03e7f59 Signed-off-by: Ryan Mounce <ryan@mounce.com.au>
* tools/mkimage: fix musl buildMarty Plummer2017-08-231-0/+67
| | | | | | Taken from: http://git.denx.de/?p=u-boot.git;a=commit;h=26e355d131a6b56ea78a156c1cee4f6ba0500b37 Signed-off-by: Marty Plummer <ntzrmtthihu777@gmail.com>
* tools/pkg-config: Update to 0.29.2Daniel Engberg2017-08-092-20/+2
| | | | | | | * Update pkg-config to 0.29.2 * Remove patch as it's upstreamed Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
* tools/expat: Update to 2.2.3Daniel Engberg2017-08-091-5/+2
| | | | | | | Update (lib)expat to 2.2.3 Remove poor entropy hack, 2.2.3 uses /dev/urandom in worst case Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
* tools/e2fsprogs: Update to 1.43.5Daniel Engberg2017-08-091-2/+2
| | | | | | Update e2fsprogs to 1.43.5 Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>