summaryrefslogtreecommitdiff
path: root/tools/firmware-utils/src
Commit message (Collapse)AuthorAgeFilesLines
...
* firmware-utils: tplink-safeloader: add support for Archer C5 v2 JP/USJean-Pierre St-Yves2017-06-291-3/+3
| | | | | | Add support for Japan and US versions of TP-Link Archer C5 v2 Signed-off-by: Jean-Pierre St-Yves <jpstyves@gmail.com>
* firmware-utils: tplink-safeloader: add support for Archer C59/C60 RUHenryk Heisig2017-06-291-0/+3
| | | | | | Add support for Russian version of TP-Link Archer C59/C60 v1 Signed-off-by: Henryk Heisig <hyniu@o2.pl>
* ar71xx: add support for TP-Link TL-WA855RE v1Federico Cappon2017-06-291-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link TL-WA855RE v1 is a wall-plug N300 Wi-Fi range extender, based on Qualcomm/Atheros QCA9533 v2. Short specification: - 550/397/198 MHz (CPU/DDR/AHB) - 1x 10/100 Mbps Ethernet - 32 MB of RAM (DDR1) - 4 MB of FLASH - 2T2R 2.4 GHz - 2x external antennas - 2x LED (green and orange in the same package), 2x button - UART: TP5(TX) and TP4(RX) test points on PCB Flash instruction: use "factory" image directly in vendor GUI. Warning: this device does not include any kind of recovery mechanism in the bootloader and disassembling process is not trivial. You can access vendor firmware over serial line using: - login: root - password: sohoadmin Image was tested only in EU version of the device, but should work also with the same device version sold in other countries. Signed-off-by: Federico Cappon <dududede371@gmail.com>
* firmware-utils: fix dgn3500sum compiler warningsMathias Kresin2017-06-261-3/+2
| | | | | | | | | | | The sum variable need to be initialised, otherwise it will points to random stack memory and a bogus image checksum might be calculated. While at it, fix the segfault in case the product region code isn't specified and enable compiler warnings which had revealed all the code issues. Signed-off-by: Mathias Kresin <dev@kresin.me>
* firmware-utils: honor env SOURCE_DATE_EPOCHAlexander Couzens2017-06-199-12/+86
| | | | | | | | Use the timestamp from the enviroment SOURCE_DATE_EPOCH if set instead of the build time. Fixes reproducible builds for certain firmware images. Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
* firmware-utils: tplink-safeloader: add TP-Link Archer C25 v1Ludwig Thomeczek2017-06-111-1/+58
| | | | | | | | | This adds the necessary firmware layout definitions for the Archer C25. It has an addtional partition containing some static data ("extra-para") without which no factory flash is possible, therefore put_data() has been added. Signed-off-by: Ludwig Thomeczek <ledesrc@wxorx.net>
* ar71xx: add support for TP-Link TL-WR942N v1Serg Studzinskii2017-06-111-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link TL-WR942N v1 is a 2.4 GHz single-band N450 router, based on Qualcomm/Atheros QCA9561. Specification: - 775/650/258 MHz (CPU/DDR/AHB) - 128 MB of RAM (DDR2) - 16 MB of FLASH (SPI NOR) - 3T3R 2.4 GHz - 5x 10/100 Mbps Ethernet - 2x USB 2.0 - 11x LED (most are controlled by 74HC595) - 2x button - UART header on PCB* * Serial console is disabled in OEM non-beta firmwares and corresponding GPIO pins 14 and 15 are assigned to control USB1 and USB2 LEDs by production (non-beta) U-Boot and firmware. Currently not working: 1. USB1 and USB2 LEDs if UART RX and TX pins are assigned to their GPIOs by some U-Boot versions. Flash instruction under vendor GUI: 1. Download "lede-ar71xx-generic-tl-wr942n-v1-squashfs-factory.bin". 2. Go to WEB interface and perform usual firmware upgrade. FLash instruction under U-Boot recovery mode (doesn't work in beta firmware): 1. Setup PC with static IP "192.168.0.66/24" and tftp server. 2. Change "*-factory" image filename to "WR942v1_recovery.bin" and make it available to download from your tftp server. 3. Press "reset" button and power up the router, wait till "WPS" LED turns on. Flash instruction under U-Boot, using UART (can be done only with preinstalled UART-enabled U-Boot version!): 1. Use "tpl" to stop autobooting and obtain U-Boot CLI access. 2. Setup ip addresses for U-Boot and your tftp server. 3. Issue below commands: tftp 0x81000000 lede-ar71xx-generic-tl-wr942n-v1-sysupgrade.bin erase 0x9f020000 +$filesize cp.b 0x81000000 0x9f020000 $filesize reset Signed-off-by: Serg Studzinskii <serguzhg@gmail.com> [minor code style fixes, extended commit message] Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* firmware-utils: tplink-safeloader: support strings as soft_versionJan Niehusmann2017-06-111-1/+36
| | | | | | | | | | | | | | | | | | | | | Some TP-Link routers (C25, C59, C60) contain a version string instead of a binary structure in the soft_version partition. Flashing LEDE from the original firmware's GUI, this version string taken from the soft_ver partition of the firmware image is written to the router's config partition. When using tftp recovery to go back to the original Archer C25 firmware, a version check compares that version to the version of the firmware to be flashed. Without proper contents in the config partition, reverting to the original firmware fails. Therefore, write the string "soft_ver:1.0.0\n" to that soft_ver partition. Signed-off-by: Jan Niehusmann <jan@gondor.com>
* firmware-utils: tplink-safeloader: add support for Archer C5 V2Rafał Miłecki2017-03-111-0/+34
| | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* ar71xx: add support for TP-Link TL-WA850RE v2Piotr Dymacz2017-02-141-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link TL-WA850RE v2 is a wall-plug N300 Wi-Fi range extender, based on Qualcomm/Atheros QCA9533 v2. Short specification: - 550/391/195 MHz (CPU/DDR/AHB) - 1x 10/100 Mbps Ethernet - 32 MB of RAM (DDR1) - 4 MB of FLASH - 2T2R 2.4 GHz - 2x internal antennas (embedded on PCB) - 9x LED (all can be turned off with GPIO15), 2x button - UART (J3) header on PCB Flash instruction: use "factory" image directly in vendor GUI. Warning: this device does not include any kind of recovery mechanism in the bootloader and disassembling process is not trivial. You can access vendor firmware over serial line using: - login: root - password: sohoadmin Image was tested only in US version of the device, but should work also with the same device version sold in other countries. Available FLASH space, with LEDE trunk, is only 240 KB. Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* firmware-utils: improve tools for Buffalo DHP seriesFUKAUMI Naoki2017-01-315-9/+181
| | | | | | | | | some of Buffalo DHP series use slightly different trx magic, buffalo-enc, buffalo-tag, and factory image begin with 'bgn'. this patch adds support for building those images. Signed-off-by: FUKAUMI Naoki <naobsd@gmail.com>
* ar71xx: add support to TP-Link Archer C59v1 and C60v1Henryk Heisig2017-01-261-0/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link Archer C59v1 is a dual-band AC1350 router, based on Qualcomm/Atheros QCA9561+QCA9886. Specification: - 775/650/258 MHz (CPU/DDR/AHB) - 128 MB of RAM (DDR2) - 16 MB of FLASH (SPI NOR) - 3T3R 2.4 GHz - 2T2R 5 GHz - 5x 10/100 Mbps Ethernet - USB 2.0 port - 8x LED (controled by 74HC595), 3x button - UART header on PCB TP-Link Archer C60v1 is a dual-band AC1350 router, based on Qualcomm/Atheros QCA9561+QCA9886. Specification: - 775/650/258 MHz (CPU/DDR/AHB) - 64 MB of RAM (DDR2) - 8 MB of FLASH (SPI NOR) - 3T3R 2.4 GHz - 2T2R 5 GHz - 5x 10/100 Mbps Ethernet - 7x LED, 2x button - UART header on PCB Currently not working: - Port LAN1 on C59, LAN4 on C60 - WiFi 5GHz (missing ath10k firmware for QCA9886 chip) - Update from oficial web interface ( tplink-saveloader not support "product-info") Flash instruction: 1. Set PC to fixed ip address 192.168.0.66 2. Download lede-ar71xx-generic-archer-cXX-v1-squashfs-factory.bin and rename it to 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 0x9f020000 +$filesize 3. cp.b $fileaddr 0x9f020000 $filesize 4. reset Signed-off-by: Henryk Heisig <hyniu@o2.pl> [Jo-Philipp Wich: remove duplicate ATH79_MACH_ARCHER_C59/C60_V1 entries] Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* Revert "tools: wrt400n: fix making factory images with kernel bigger than 1MB"John Crispin2017-01-201-197/+266
| | | | | | | | This reverts commit 5f9b20bc7d0bde6c100a3dec5f02b56f7ef7a61d. The builders were failing with a segfault when generating the image Signed-off-by: John Crispin <john@phrozen.org>
* tools: wrt400n: fix making factory images with kernel bigger than 1MBYousong Zhou2017-01-201-266/+197
| | | | Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
* firmware-utils: tplink-safeloader: add support for TP-Link WBS210/510 1.2Matthias Schiffer2017-01-051-0/+62
| | | | Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* ramips: Add support to TP-Link Archer MR200Henryk Heisig2016-12-221-0/+13
| | | | | | | | | | CPU: MT7620N 580MHz Flash: 8MB RAM: 64MB build-in modem 3G/4G four ethernet port 10/100Mbps Signed-off-by: Henryk Heisig <hyniu@o2.pl>
* firmware-utils/tplink-safeloader: add support for TP-Link RE450Radek Dostál2016-12-221-0/+42
| | | | | | Signed-off-by: Radek Dostál <rd@radekdostal.com> [Jo-Philipp Wich: use .support_trail member] Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* firmware-utils: kernel image generator for TP-Link RE450Tal Keren2016-12-221-0/+352
| | | | | | | | | | | | | | | | | The firmware image that is used in TP-Link RE450 (and some more devices from the RE series) is tplink-safeloader. In the kernel partition, the kernel is compressed in a regular tp-link firmware that is just used for booting. Since it is only used for compressing and booting, only four fields are filled in the header: Vendor, version, kernel load address and kernel entry point. mktplinkfw-kernel is a simpler version of mktpolinkfw that generate such images. It also specifies the hardware id (as it is in the product info section), so when doing a sysupgrade - the existing code will check for hardware compatibility. Signed-off-by: Tal Keren <kooolk@gmail.com> [rd@radekdostal.com: add build target to .../image/tp-link.mk] Signed-off-by: Radek Dostál <rd@radekdostal.com>
* firmware-utils: add support for TL-WR1043ND v4 to mktplinkfw and ↵Matthias Schiffer2016-12-202-0/+50
| | | | | | | | | tplink-safeloader The TL-WR1043ND v4 uses a kernel image with a mktplinkfw header inside the os-image partition of a tplink-safeloader image. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* firmware-utils/tplink-safeloader: refactor code for further board supportJo-Philipp Wich2016-12-201-301/+265
| | | | | | | | | In order to make it easier to add new boards in the future, refactor the code to describe the image layouts of supported boards in a struct array and alter the image generation routines to figure out the sysupgrade partitions automatically. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* firmware-utils/tplink-safeloader: make vendor data optionalJo-Philipp Wich2016-12-201-8/+6
| | | | | | | Restructure the code a bit to allow for omitting vendor data when generating factory images. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* firmware-utils: add E2100L support to addpattern.cJo-Philipp Wich2016-12-141-0/+7
| | | | | | Based on OpenWrt PR#250 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* firmware-utils: tplink-safeloader: update support lists for CPE210/510/...Matthias Schiffer2016-12-121-4/+14
| | | | | | | Adds support for new EU and US variants; removes a few strings that were never actually used and have been removed from the stock firmwares. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* firmware-utils: replace md5 code with Alexander Peslyak's implementationRafał Miłecki2016-11-282-337/+306
| | | | | | | | | | | | | | | | | | | Our current implementation is pretty old and uses some pre-standard/old ANSI C style that triggers warnings like: warning: call to function 'MD5_Init' without a real prototype [-Wunprototyped-calls] This is caused by declarations specified in a following way: src/md5.h:60:6: note: 'MD5_Init' was declared here void MD5_Init (); Having these warnings makes it harded to notice real problems. We could try hiding them but it makes more sense to just use a cleaner code. Another tiny gain from this switch is slightly reduced binary size, on x86_64 tplink-safeloader's size 48104 became 48003. The new code is public domain, uses "heavily cut-down BSD license". Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* firmware-utils: Fix build failure in mkmerakifw.c FS#298Florian Fainelli2016-11-261-9/+9
| | | | | | | | | Earlier compilers such as GCC 4 do not like anynomous unions, make it a named union "u", and update the code where relevant. Fixes FS#298 Fixes: a72e1692b8b3 ("firmware-utils: Add support for the Cisco Meraki MX60/MX60W") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
* firmware-utils: Add support for the Cisco Meraki MX60/MX60WChris Blake2016-11-211-11/+58
| | | | | | | | | | | | | | This patch adds header support for the Cisco Meraki MX60/MX60W, which are a part of the apm821xx target. Some structure changes were needed due to the fact this device uses U-Boot (unlike other devices in mkmerakifw.c) which uses a different header structure to define the load offsets for the image. A thanks to Christian for helping implement this properly. Cc: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
* firmware-utils: tplink-safeloader: keep per-device info on trailing charRafał Miłecki2016-11-201-5/+11
| | | | | | | | | | | | | | | | | Recent refactoring introduced a regression. It ignored second argument of make_support_list function which was originally true for C2600. The new generic build_image function always passes false. This patch allows specifying trailing char in a device specific info. It also switches Archer C9 to the \0 char to make it compliant with vendor images. I verified generated images to be binary identical to the ones that were created before whole refactoring. Reported-by: Jo-Philipp Wich <jo@mein.io> Fixes: fd924d2068f ("firmware-utils: tplink-safeloader: use one function for generating images") Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* firmware-utils: tplink-safeloader: add Archer C9 supportRafał Miłecki2016-11-191-0/+33
| | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* firmware-utils: tplink-safeloader: use one function for generating imagesRafał Miłecki2016-11-191-79/+29
| | | | | | Thanks to the struct device_info we can now use one unified function. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* firmware-utils: tplink-safeloader: add struct device_infoRafał Miłecki2016-11-191-6/+19
| | | | | | | This struct stores all device specific info which allows making do_eap function more generic. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* firmware-utils: add tool to create zyxel imagesVitaly Chekryzhev2016-11-171-0/+148
| | | | | | | Signed-off-by: Vitaly Chekryzhev <13hakta@gmail.com> [moved to firmware-utils package] [dropped the compiled binary] Signed-off-by: Mathias Kresin <dev@kresin.me>
* ar71xx: add support for Buffalo BHR-4GRV2FUKAUMI Naoki2016-11-161-0/+223
| | | | Signed-off-by: FUKAUMI Naoki <naobsd@gmail.com>
* firmware-utils: fix compilation on MacOS XAlexandru Ardelean2016-10-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Looking into /usr/include/stdlib.h, there's a `devname()` function defined under some #ifdef's which conflicts with the `static char *devname` definition in `src/mkwrggimg.c`. Defining `_ANSI_SOURCE` in the `src/mkwrggimg.c` file, omits that part of the header. Another more intrusive approach is to rename `devname` to something like `g_devname` in `src/mkwrggimg.c`. But I think the `_ANSI_SOURCE` define should be enough. Compilation error is: src/mkwrggimg.c:64:14: error: redefinition of 'devname' as different kind of symbol static char *devname; ^ /usr/include/stdlib.h:286:7: note: previous definition is here char *devname(dev_t, mode_t); ^ src/mkwrggimg.c:147:12: error: non-object type 'char *(dev_t, mode_t)' (aka 'char *(int, unsigned short)') is not assignable devname = optarg; ~~~~~~~ ^ src/mkwrggimg.c:192:6: warning: comparison of function 'devname' equal to a null pointer is always false [-Wtautological-pointer-compare] if (devname == NULL) { ^~~~~~~ ~~~~ src/mkwrggimg.c:192:6: note: prefix with the address-of operator to silence this warning if (devname == NULL) { ^ & src/mkwrggimg.c:251:27: warning: incompatible pointer types passing 'char *(dev_t, mode_t)' (aka 'char *(int, unsigned short)') to parameter of type 'const char *' [-Wincompatible-pointer-types] strncpy(header->devname, devname, sizeof(header->devname)); ^~~~~~~ /usr/include/secure/_string.h:119:34: note: expanded from macro 'strncpy' __builtin___strncpy_chk (dest, src, len, __darwin_obsz (dest)) Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com> [Jo-Philipp Wich: slightly reformat commit message] Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* firmware-utils: mkwrggimg: new tool for D-Link DAP-2695Stijn Tintel2016-10-271-0/+282
| | | | | | | Based on mkwrgimg.c. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> Acked-by: John Crispin <john@phrozen.org>
* ar71xx: Add support to TP-Link EAP120Henryk Heisig2016-10-181-0/+101
| | | | Signed-off-by: Henryk Heisig <hyniu@o2.pl>
* ptgen: work around gcc miscompilationJonas Gorski2016-09-261-1/+3
| | | | | | | Some gcc versions seem to miscompile code using ternary operators, work around this by just returning the result if exp is 0. Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
* tools/firmware-utils: fix portability issue in mkmerakifw-oldFelix Fietkau2016-09-221-1/+1
| | | | | | Fixes build failure on Mac OS X Signed-off-by: Felix Fietkau <nbd@nbd.name>
* firmware-utils mkmerakifw-old: firmware generator for Z1Christian Lamparter2016-09-191-0/+369
| | | | | | This patch adds firmware generation tool for Cisco's Z1 Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
* firmware-utils: mksenaofw: rework option validationMathias Kresin2016-08-171-19/+22
| | | | | | | The options firmware_type, vendor_id and product_id are not required for decoding an image file. Signed-off-by: Mathias Kresin <dev@kresin.me>
* firmware-utils: mktplinkfw: add support for TP-Link's new region codesMatthias Schiffer2016-08-281-32/+37
| | | | | | | | | TP-Link has changed the way the region is stored in the firmware header, and now provides US- and EU-specific images for the Archer C7. Adding the new region codes is necessary to make LEDE/OpenWrt flashable on devices with the new stock firmwares again. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* apm821xx: add support for the Cisco Meraki MR24Chris Blake2016-07-221-0/+10
| | | | | | | | | | | | | | | | | | | This patch adds support for the Cisco Meraki MR24 Access point to the apm821xx target. Board: MR24 - Meraki MR24 Cloud Managed Access Point CPU: APM82181 SoC 800 MHz (PLB=200 OPB=100 EBC=100) Flash size: 32MiB RAM Size: 128MiB Wireless: Atheros AR9380 5.0GHz + Atheros AR9380 2.4GHz Ethernet ports: 1x Gigabit Atheros AR8035 WARNING: The serial port needs a TTL/RS-232 v3.3 level converter! For flashing instructions, visit: <https://github.com/riptidewave93/Openwrt-MR24/blob/master/README.md#flashing> Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
* firmware-utils: oseama: support extracting entityRafał Miłecki2016-06-151-0/+134
| | | | | | | This updates oseama in firmware-utils to the version from packages keeping them synced. Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
* tools/mkfwimage2: remove 256 length limit for partition imagesAlexander Couzens2016-06-141-1/+5
| | | | Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
* tools/firmware-utils: Add Archer C50 to mktplinkfw2Henryk Heisig2016-06-131-0/+7
| | | | Signed-off-by: Henryk Heisig <hyniu@o2.pl>
* treewide: replace nbd@openwrt.org with nbd@nbd.nameFelix Fietkau2016-06-072-2/+2
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* tools/tplink-safeloader: split CPE210 from CPE510 profileAlexander Couzens2016-05-271-10/+23
| | | | | | | | | The CPE210 was still described for the OEM upgrade as compatible, even the wireless configuration isn't compatible anymore between both series (2ghz and 5ghz). Update the CPE210 image profile to use the new profile. Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
* fw-utils/tplink-safeloader.c: Add support for Archer C2600Ash Benz2016-05-271-3/+111
| | | | Signed-off-by: Ash Benz <ash.benz@bk.ru>
* tools/firmware-utils: remove obsolete firmware utility for airlink 525wFelix Fietkau2016-05-121-332/+0
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* tools: firmware-utils: add region code support to mktplinkfwJohn Crispin2016-04-211-5/+46
| | | | | | Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net> SVN-Revision: 49215
* tools: firmware-utils: clean up mktplinkfwJohn Crispin2016-04-211-434/+34
| | | | | | | | | | | | | Remove the whole board list from mktplinkfw, as OpenWrt doesn't use it and it was severely out of sync with the list of built images for ar71xx. Also: * fix -Wall warnings * add const where appropriate Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net> SVN-Revision: 49214