Commit Graph

513 Commits (1634461bd208f4bd108ea5c3d3f1cf9eb56d4a7e)

Author SHA1 Message Date
Piotr Dymacz a3d232e1e6 firmware-utils: mktplinkfw: add option for endianness swap
This adds command line option in "mktplinkfw" tool for endianness swap
in kernel load address and entry point fields. As in "mktplinkfw2" tool,
we will need this for little-endian targets, like "ramips".

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Piotr Dymacz 3b7928cc9d firmware-utils: mktplinkfw2: add missing options descriptions
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Piotr Dymacz 6165e4aab0 ar71xx: add support for TP-Link TL-WR902AC v1
TP-Link TL-WR902AC v1 is a pocket-size, dual-band (AC750), successor of
TL-MR3020 (both devices use very similar enclosure, in same size). New
device is based on Qualcomm QCA9531 v2 + QCA9887. FCC ID: TE7WR902AC.

Specification:

- 650/391/216 MHz (CPU/DDR/AHB)
- 1x 10/100 Mbps Ethernet
- 1x USB 2.0 (GPIO-controlled power)
- 64 MB of RAM (DDR2)
- 8 MB of FLASH
- 2T2R 2.4 GHz (QCA9531)
- 1T1R 5 GHz (QCA9887)
- 5x LED (GPIO-controlled), 2x button, 1x 3-pos switch
- UART pads on PCB (TP1 -> TX, TP2 -> RX, TP3 -> GND, TP4 -> 3V3, jumper
  resitors are missing on TX/RX lines)
- 1x micro USB (for power only)

Flash instructions:

Use "factory" image under vendor GUI.

Recovery instructions:

This device contains tftp recovery mode inside U-Boot. You can use it to
flash LEDE (use "factory" image) or vendor firmware.

1. Configure PC with static IP 192.168.0.66/24 and tftp server.
2. Rename "lede-ar71xx-generic-tl-wr902ac-v1-squashfs-factory.bin"
   to "wr902acv1_un_tp_recovery.bin" and place it in tftp server dir.
3. Connect PC with LAN port, press the reset button, power up the router
   and keep button pressed until WPS LED lights up.
4. Router will download file from server, write it to flash and reboot.

Root access over serial line in vendor firmware: root/sohoadmin.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Rafał Miłecki 23da3fbf68 firmware-utils: mktplinkfw2: fix MD5 salt
LEDE supports few devices using TP-Link firmware format (V2 or V3):
ArcherC20i, ArcherC50, ArcherMR200, TDW8970, TDW8980, TL-WR840N v4,
TL-WR841N v13 and VR200v

Testing mktplinkfw2 tool with official (vendor generated) firmware files
for above devices has shown an error when comparing calculated and
included MD5 sum, e.g.:
> mktplinkfw2 -i Archer_C20iv1_0.9.1_3.2_up_boot\(170221\)_2017-02-21_17.14.03.bin | grep -A 1 MD5Sum1
Header MD5Sum1         : 22 5a cb 92 10 d2 95 7b df 62 9a f8 62 17 37 10 (*ERROR*)
          --> expected : ad 19 11 d1 78 98 a7 42 5f 2e 64 da 8a 34 ec cb

This problem has been verified to occur with:
Archer_C20iv1_0.9.1_3.2_up_boot(170221)_2017-02-21_17.14.03.bin
Archer MR200v1_0.9.1_1.1_up_boot_v004a.0 Build 160905 Rel.60037n.bin
TD-W8970v3_0.9.1_2.0_up_boot(160816)_2016-08-16_10.40.57.bin
TD-W8980v1_0.6.0_1.8_up_boot(150514)_2015-05-14_11.16.43.bin
Archer_VR200vv2_0.2.0_0.8.0_up_boot(161202)_2016-12-05_14.39.06.bin

For some images, e.g.:
Archer_C50v3_EU_0.9.1_0.3_up_boot[170417-rel52298].bin
TL-WR840Nv4_EU_0.9.1_4.16_up_boot[170421-rel70692].bin
TL-WR841Nv13_0.9.1_3.16_up_boot(161012).bin
mktplinkfw2 calculates zero MD5 so these has to be fixed separately:
> mktplinkfw2 -i TL-WR841Nv13_0.9.1_3.16_up_boot\(161012\).bin | grep -A 1 MD5Sum1
Header MD5Sum1         : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 (*ERROR*)
          --> expected : 6f 1d 9b 57 5d 42 14 6d bf a2 03 9d 46 7d 55 55

It's most likely that MD5 salt used in mktplinkfw2 has been always wrong
(and it's not a matter of e.g. a vendor change). Update it to fix MD5
calculation.

This has been also verified to calculate MD5 correctly for other (not
yet supported) devices, e.g.:
Archer_C3150v2_0.1.0_0.9.1_up_boot(160812)_2016-08-12_10.52.54.bin
Archer_C3200v1_0.9.1_0.1_up_boot(160704)_2016-07-04_15.48.28.bin

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Mathias Kresin <dev@kresin.me>
7 years ago
Rafał Miłecki 896246b8c5 firmware-utils: mktplinkfw2: fix support for -w option
This fixes copy & paste typo when reading -w argument.

Fixes: 4b35e174ca ("firmware-utils: mktplinkfw2: support additional hardware version")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Piotr Dymacz 24043a0d2e ramips: add support for TP-Link TL-WR840N v4 and TL-WR841N v13
TP-Link TL-WR840N v4 and TL-WR841N v13 are simple N300 routers with
5-port FE switch and non-detachable antennas. Both are very similar
and are based on MediaTek MT7628NN (aka MT7628N) WiSoC.

The difference between these two models is in number of available
LEDs, buttons and power input switch.

This work is partially based on GitHub PR#974.

Specification:

- MT7628N/N (580 MHz)
- 64 MB of RAM (DDR2)
- 8 MB of FLASH
- 2T2R 2.4 GHz
- 5x 10/100 Mbps Ethernet
- 2x external, non-detachable antennas
- UART (J1) header on PCB (115200 8n1)
- TL-WR840N v4: 5x LED (GPIO-controlled), 1x button
- TL-WR841N v13: 8x LED (GPIO-controlled*), 2x button, power input
  switch

* WAN LED in TL-WR841N v13 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.

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 ("0x4"/"0x13" for these devices) but it seems
that anything other than "0" is correct.

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.

Tests showed that the GUI upgrade routine copies value of "Additional
Hardware Version" from existing firmware into offset "0x2023c" in
provided file, _before_ storing it in flash. In case of vendor firmware
upgrade files (which all include U-Boot image and two headers), this
offset points to the matching field in kernel+rootfs firmware part
header. Unfortunately, in case of LEDE factory image file which contains
only one header, it points to the offset "0x2023c" in kernel image. This
leads to a corrupted kernel and ends up with a "soft-bricked" device.

The good news is that U-Boot in these devices contains well known tftp
recovery mode, which can be triggered with "reset" button. What's more,
in comparison to some of older MediaTek based TP-Link devices, this
recovery mode doesn't write whole file at offset "0x0" in flash, without
verifying provided file in advance. In case of recovery mode in these
devices, first "0x20000" bytes are always skipped and "0x7a0000" bytes
from rest of the file are stored in flash at offset "0x20000".

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:

1. Configure PC with static IP 192.168.0.66/24 and tftp server.
2. Rename "lede-ramips-mt7628-tl-wr84...-squashfs-tftp-recovery.bin"
   to "tp_recovery.bin" and place it in tftp server directory.
3. 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.
4. Router will download file from server, write it to flash and reboot.

To access U-Boot CLI, keep pressed "4" key during boot.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Piotr Dymacz 4b35e174ca firmware-utils: mktplinkfw2: support additional hardware version
As it turned out, some of new MediaTek based TP-Link devices use value
from field at 0x3c offset in version 3 of TP-Link header to specify
"Additional Hardware Version".

Value from this field is validated during regular (GUI) firmware upgrade
on devices like TL-WR840N v4 or TL-WR841N v13. If it's zero (based on
some tests, it seems that firmware will accept anything != 0), errors
like below are printed on console and upgrade fails:

[ rsl_sys_updateFirmware ] 2137:  Firmware Additional HardwareVersion
check failed

[ rdp_updateFirmware ] 345:  perror:4506

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Henryk Heisig b05c7193fd ar71xx: add support for TP-Link Archer C58 v1
TP-Link Archer C58 v1 is a dual-band AC1350 router, based on Qualcomm
QCA9561 + QCA9886. It looks like Archer C59 v1 without USB port.

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
- 6x LED, 3x button
- UART header on PCB, RX, TX at TP4+5 (backside)

QCA9886 wlan needs pre_cal_data file and enable ieee80211 phy hotplug to
patch macaddress.

Flash instruction:

Use "factory" image directly in vendor GUI.

Recovery method:

1. Set PC to fixed ip address 192.168.0.66/24.
2. Download "lede-ar71xx-generic-archer-c58-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:

tftp 0x81000000 lede-ar71xx-...-sysupgrade.bin
erase 0x9f020000 +$filesize
cp.b $fileaddr 0x9f020000 $filesize
reset

This commit is based on GitHub PR#1112

Signed-off-by: Henryk Heisig <hyniu@o2.pl>
7 years ago
Jean-Pierre St-Yves 01280bc8dc firmware-utils: tplink-safeloader: add support for Archer C5 v2 JP/US
Add support for Japan and US versions of TP-Link Archer C5 v2

Signed-off-by: Jean-Pierre St-Yves <jpstyves@gmail.com>
7 years ago
Henryk Heisig 7d21b4eed0 firmware-utils: tplink-safeloader: add support for Archer C59/C60 RU
Add support for Russian version of TP-Link Archer C59/C60 v1

Signed-off-by: Henryk Heisig <hyniu@o2.pl>
7 years ago
Federico Cappon 9fec39a033 ar71xx: add support for TP-Link TL-WA855RE v1
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>
7 years ago
Mathias Kresin 06741411e0 firmware-utils: fix dgn3500sum compiler warnings
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>
7 years ago
Alexander Couzens c47a1a3527 firmware-utils: honor env SOURCE_DATE_EPOCH
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>
7 years ago
Ludwig Thomeczek 9cd69c45c5 firmware-utils: tplink-safeloader: add TP-Link Archer C25 v1
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>
7 years ago
Serg Studzinskii b7cc661615 ar71xx: add support for TP-Link TL-WR942N v1
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>
7 years ago
Jan Niehusmann c4022243d8 firmware-utils: tplink-safeloader: support strings as soft_version
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>
7 years ago
Rafał Miłecki dfac808076 firmware-utils: tplink-safeloader: add support for Archer C5 V2
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Piotr Dymacz 56561b9f51 ar71xx: add support for TP-Link TL-WA850RE v2
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>
7 years ago
FUKAUMI Naoki 7faee1bc9f firmware-utils: improve tools for Buffalo DHP series
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>
7 years ago
Henryk Heisig e39dc8d823 ar71xx: add support to TP-Link Archer C59v1 and C60v1
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>
7 years ago
John Crispin 920ee1f707 Revert "tools: wrt400n: fix making factory images with kernel bigger than 1MB"
This reverts commit 5f9b20bc7d.

The builders were failing with a segfault when generating the image

Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
Yousong Zhou 5f9b20bc7d tools: wrt400n: fix making factory images with kernel bigger than 1MB
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
7 years ago
Matthias Schiffer 2ee3e8dd42
firmware-utils: tplink-safeloader: add support for TP-Link WBS210/510 1.2
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years ago
Henryk Heisig c8043137bb ramips: Add support to TP-Link Archer MR200
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>
8 years ago
Radek Dostál 5515edae9f firmware-utils/tplink-safeloader: add support for TP-Link RE450
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>
8 years ago
Tal Keren 0d9d980ecd firmware-utils: kernel image generator for TP-Link RE450
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>
8 years ago
Matthias Schiffer 51740990cd
firmware-utils: add support for TL-WR1043ND v4 to mktplinkfw and 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>
8 years ago
Jo-Philipp Wich fff6443b5b
firmware-utils/tplink-safeloader: refactor code for further board support
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>
8 years ago
Jo-Philipp Wich d58e8a9076
firmware-utils/tplink-safeloader: make vendor data optional
Restructure the code a bit to allow for omitting vendor data when generating
factory images.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Jo-Philipp Wich 38ebd1d133 firmware-utils: add E2100L support to addpattern.c
Based on OpenWrt PR#250

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Matthias Schiffer d1a2c3f9b1
firmware-utils: tplink-safeloader: update support lists for CPE210/510/...
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>
8 years ago
Rafał Miłecki cb7ab730c7 firmware-utils: replace md5 code with Alexander Peslyak's implementation
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>
8 years ago
Florian Fainelli 97eff5cba5 firmware-utils: Fix build failure in mkmerakifw.c FS#298
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: a72e1692b8 ("firmware-utils: Add support for the Cisco Meraki MX60/MX60W")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
8 years ago
Chris Blake a72e1692b8 firmware-utils: Add support for the Cisco Meraki MX60/MX60W
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>
8 years ago
Rafał Miłecki 0d3be662ce firmware-utils: tplink-safeloader: keep per-device info on trailing char
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: fd924d2068 ("firmware-utils: tplink-safeloader: use one function for generating images")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki 222783c65c firmware-utils: tplink-safeloader: add Archer C9 support
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki fd924d2068 firmware-utils: tplink-safeloader: use one function for generating images
Thanks to the struct device_info we can now use one unified function.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki ea249f01b1 firmware-utils: tplink-safeloader: add struct device_info
This struct stores all device specific info which allows making do_eap
function more generic.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Vitaly Chekryzhev a4814c744c firmware-utils: add tool to create zyxel images
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>
8 years ago
FUKAUMI Naoki 0165203304 ar71xx: add support for Buffalo BHR-4GRV2
Signed-off-by: FUKAUMI Naoki <naobsd@gmail.com>
8 years ago
Alexandru Ardelean 00d1e6c75e firmware-utils: fix compilation on MacOS X
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>
8 years ago
Stijn Tintel 55eb6ed061 firmware-utils: mkwrggimg: new tool for D-Link DAP-2695
Based on mkwrgimg.c.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: John Crispin <john@phrozen.org>
8 years ago
Henryk Heisig f5aa459043 ar71xx: Add support to TP-Link EAP120
Signed-off-by: Henryk Heisig <hyniu@o2.pl>
8 years ago
Jonas Gorski 997fed94e3 ptgen: work around gcc miscompilation
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>
8 years ago
Felix Fietkau 64568cac91 tools/firmware-utils: fix portability issue in mkmerakifw-old
Fixes build failure on Mac OS X

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Christian Lamparter 7219c30da4 firmware-utils mkmerakifw-old: firmware generator for Z1
This patch adds firmware generation tool for Cisco's Z1

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years ago
Mathias Kresin 0ac50a661b firmware-utils: mksenaofw: rework option validation
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>
8 years ago
Matthias Schiffer a4fc62bc0e
firmware-utils: mktplinkfw: add support for TP-Link's new region codes
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>
8 years ago
Chris Blake a57d6e2d47 apm821xx: add support for the Cisco Meraki MR24
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>
8 years ago
Rafał Miłecki f966ea2f49 firmware-utils: oseama: support extracting entity
This updates oseama in firmware-utils to the version from packages
keeping them synced.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
8 years ago
Alexander Couzens 5a5934f0c2 tools/mkfwimage2: remove 256 length limit for partition images
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
8 years ago
Henryk Heisig 6e0eccc5aa tools/firmware-utils: Add Archer C50 to mktplinkfw2
Signed-off-by: Henryk Heisig <hyniu@o2.pl>
8 years ago
Felix Fietkau 7eeb254cc4 treewide: replace nbd@openwrt.org with nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Alexander Couzens 8241479605 tools/tplink-safeloader: split CPE210 from CPE510 profile
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>
8 years ago
Ash Benz 955c341d3b fw-utils/tplink-safeloader.c: Add support for Archer C2600
Signed-off-by: Ash Benz <ash.benz@bk.ru>
8 years ago
Felix Fietkau ac780e3ac8 tools/firmware-utils: remove obsolete firmware utility for airlink 525w
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
John Crispin d35801b9c5 tools: firmware-utils: add region code support to mktplinkfw
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>

SVN-Revision: 49215
8 years ago
John Crispin 51b6448746 tools: firmware-utils: clean up mktplinkfw
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
8 years ago
John Crispin 5f1a82ec4f ar71xx: add TP-Link TL-WA901ND-v4 support
Signed-off-by: Tiziano Bacocco <tizbac2@gmail.com>

SVN-Revision: 49158
8 years ago
John Crispin 3fd98db818 ar71xx: Add support for the OMYlink OMY-X1
This patch adds support for the OMYlink OMY-X1

https://wiki.openwrt.org/toh/omylink/omy-x1

http://www.omylink.com/

Signed-off-by: L. D. Pinney <ldpinney@gmail.com>

SVN-Revision: 49026
8 years ago
John Crispin 4d97c8bab0 ramips: Add a tool to create JCG factory images
replace spaces with tabs

Signed-off-by: Reinhard Max <reinhard@m4x.de>

SVN-Revision: 48901
8 years ago
John Crispin 678dcef7a5 ramips: Add a tool to create JCG factory images
This tool creates factory images for JCG routers.
Details can be found in the header comment of jcgimage.c.

Signed-off-by: Reinhard Max <reinhard@m4x.de>
Reviewed-by: Torsten Duwe <duwe@lst.de>

SVN-Revision: 48888
8 years ago
Felix Fietkau 076d58d344 firmware-utils: mkfwimage: fix firmware_max_length for XM layout
The new u-boot version bundled with the 5.6.x firmwares from Ubiquiti gets
confused by the smaller rootfs partition size; this can lead to various
issues:

1. We've gotten reports that flashing from the 5.6.x stock firmware to
   OpenWrt will brick devices; I wasn't able to reproduce this myself
2. Flashing from 5.5.x stock firmware to OpenWrt and back to stock (via
   TFTP recovery), following by an update to 5.6.x via web interface can
   yield a bricked device with the following properties:
   - It can't be booted without entering commands over a serial console, as
     u-boot supplies the wrong MTD layout
   - The web interface won't accept any image with the original flash
     layout, so stock firmware upgrades are impossible
   - As the TFTP recovery doesn't update u-boot, returning to the old
     u-boot from firmware 5.5.x is impossible

To recover from 2., creating an OpenWrt image which doesn't set u-boot as
read-only and flashing a backup of the old u-boot from there is the only
way known to me. (Fixing the mtdparts variable in u-boot-env from OpenWrt
might also work; settings this from u-boot over serial didn't have
any permanent effect.)

Fix all of this by setting the correct flash layout also used by the stock
firmware. Flashing has been tested from both firmware 5.5.x and 5.6.x. The
fixed layout also matches the mtdparts defined by OpenWrt.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>

SVN-Revision: 48829
8 years ago
Felix Fietkau 619a58d641 ar71xx, firmware-utils: split ubdev01 flash layout from XM
The ubdev01 profile defines its own MTDPARTS with smaller firmware
partition, so give it its own UBNT_BOARD in mkfwimage.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>

SVN-Revision: 48828
8 years ago
Felix Fietkau bd93998df6 firmware-utils: mkfwimage: add -Wall, fix obvious bugs causing compile warnings
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>

SVN-Revision: 48827
8 years ago
John Crispin d6cb792d21 ar71xx: Added support for TL-WA801NDv3
Signed-off-by: Tiziano Bacocco <tizbac2@gmail.com>

SVN-Revision: 48705
8 years ago
Rafał Miłecki 590c7825c1 firmware-utils: add oseama tool for creating Seama entities
It has an important feature (compared to seama) of using multiple input
files, aligning them and padding zeroes until reaching a specified
absolute offset. This is needed for a proper flash layout on NAND. We
want kernel partition to be big enough to handle future updates without
a need to resize it and wipe whole "ubi" partition. It's important as
we don't want to lose block counters.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 48601
8 years ago
Hauke Mehrtens 13b8b8c2e7 lantiq: add support for TP-Link VR200v
This adds basic support for TP-Link VR200v.
Currently the following parts are not working: FXO, Voice, DECT, WIFI (both)

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 48328
8 years ago
John Crispin 16317ceb4f firmware-utils: allow mkfwimage2 to use - in partition names
Signed-off-by: Roman Yeryomin <roman@advem.lv>

SVN-Revision: 47975
9 years ago
John Crispin 244173a093 firmware-utils: fix various compiler warnings
mostly implicit defines due to missing includes plus one const that
shouldn't be one.

Signed-off-by: Felix Kaechele <felix@kaechele.ca>

SVN-Revision: 47865
9 years ago
John Crispin 0231d41352 mktplinkfw: add missing exceeding bytes info to logs
Add the info on exceeding bytes also to the remaining log messages.

Signed-off-by: Felix Kaechele <felix@kaechele.ca>

SVN-Revision: 47864
9 years ago
John Crispin 90e4b76bd1 firmware-utils mkmerakifw: firmware generator for MR18
This patch adds firmware generation tool for Cisco's MR18

Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>

SVN-Revision: 47856
9 years ago
Jonas Gorski 008aec391a brcm63xx: work around boot failures with squashfs on BCM6368
Due to the LWL/LWR SMP issue on BCM6368, booting with squash might fail
if the rootfs is not word aligned. As a quick fix, work around it by
ensuring this condition is always true.

Reported-by: Álvaro Fernández Rojas <noltari@gmail.com>
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 47380
9 years ago
John Crispin 257e76a3df ar71xx: Bitmain Antminer S1 & S3 cleanup
Sets the LEDs to boardname:color:led-name
Sets the LAN to eth0
Other corrections such as the Machine Name and HWIDs
v2 corrects the profile names in the Makefile and changes tabs to spaces
in the Makefile 'define Device/' like the other devices.

Signed-off-by: L. D. Pinney <ldpinney@gmail.com>

SVN-Revision: 47221
9 years ago
John Crispin 21e1b4163f tools/firmware-utils: tplink-safeloader: add version 1.1 support to CPE210/220/510/520
The hardware is identical to version 1.0, add the new models to the support
list.

Also remove the empty line at the end of the support list, the current
stock images don't have it either.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>

SVN-Revision: 47212
9 years ago
John Crispin fea5d26c7f tools/firmware-utils: tplink-safeloader: fix support-list format, clean up vendor information
The first 4 bytes of the support list and the vendor information are
supposed to contain the length of these fields.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>

SVN-Revision: 47211
9 years ago
John Crispin e9ed50829e tools/firmware-utils: tplink-safeloader: clean up code
There is no reason for the internal functions not to be static.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>

SVN-Revision: 47210
9 years ago
Felix Fietkau 86492a1eb8 firmware-utils/buffalo-enc: explicitly use signed char for checksum function
ARM defaults to unsigned char and that breaks the calculation, as it
relies on sign extension

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 47186
9 years ago
Felix Fietkau 772e2c0a77 firmware-utils/buffalo-enc: add support for decrypting data with an offset
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 47185
9 years ago
Hauke Mehrtens 3d1a65adb4 tools: firmware-utils: fix compiler warnings
This just fixes a lot of compiler warnings.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 47181
9 years ago
John Crispin 161179f40b lantiq: Add target TP-Link TD-W8980
The device is similar to the TD-W8970, beside a different Atheros 2.4 GHz
wireless chip and the additional, PCI connected, WAVE300 5 GHz wireless.

Signed-off-by: Mathias Kresin <openwrt@kresin.me>

SVN-Revision: 47130
9 years ago
John Crispin cc3747e9e2 tools/firmware-utils: add header version 2 support for mktplinkfw
Signed-off-by: Weijie Gao <hackpascal@gmail.com>

This patch adds header version 2 option for mktplinkfw.

The version 2 header is used for AR/QCA firmwares and is not the same as
the header generated by mktplinkfw2.
Instead, it is nearly the same as version 1 header except for the header
version and the RSA signature.

The header version 2 support is used for newer TP-Link routers which have
only a 64kb bootloader part, e.g. TL-WDR6500 v2.

SVN-Revision: 46661
9 years ago
John Crispin a77a9f520c firmware-utils mktplinkfw: print amount of exceeding bytes
This is very useful for trimming images towards 4 MiB flash size.

Signed-off-by: Stephan Maka <stephan@spaceboyz.net>

SVN-Revision: 46469
9 years ago
John Crispin 5cd49bb067 ar71xx: add support for Onion Omega
This patch adds support for the Onion Omega.

https://onion.io/omega

Signed-off-by: L. D. Pinney <ldpinney@gmail.com>
Acked-by: Boken Lin <bl@onion.io>
Tested-by: Jacky Huang <huangfangcheng@163.com>

SVN-Revision: 46458
9 years ago
John Crispin 055663201b ar71xx: Add Support for the Bitmain Antminer S3
This patch adds support for the Bitmain Antminer S3 Cryptocurrency Miner

http://wiki.openwrt.org/toh/bitmain/s3

Signed-off-by: L. D. Pinney <ldpinney@gmail.com>

SVN-Revision: 46236
9 years ago
John Crispin e85f3471ba ar71xx: add support for TL-WR720N-v4.
The hardware should be almost the same as TL-WR720N-v3.  WiFi and LAN networks
were tested by "Lo Yuk Fai <loyukfai@gmail.com>".  Failsafe and slider switch
were tested by "Wong min <alpha080@gmail.com>".

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>

SVN-Revision: 46046
9 years ago
John Crispin 694dd581eb ar71xx: Add Support for the Bitmain Antminer S1
This patch adds support for the Bitmain Antminer S1 Cryptocurrency Miner

http://wiki.openwrt.org/toh/bitmain/s1

Signed-off-by: L. D. Pinney <ldpinney@gmail.com>
Acked-by: James Hilliard <james.hilliard1@gmail.com>

SVN-Revision: 46044
9 years ago
Felix Fietkau 39b8f7c0f7 firmware-tools/ptgen: use stdint types for struct pte
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45957
9 years ago
Felix Fietkau 6263567444 firmware-tools/ptgen: fix endianness conversion for PTE .start, .length field.
They are of 32-bit little endian integers.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>

SVN-Revision: 45956
9 years ago
John Crispin 5d3f0eea1c tools/firmware-utils: Allow changing the CRC32 poly value in mkbrnimg
VGV7519 is currently the only device with brnboot support. It seems to
be happy with 0x2083b8ed as CRC32 poly. However, VGV7510KW22 fails to
validate the checksum - it requires 0x04c11db7 instead.

I have built an brnboot image manually on the command line, once with
the old code and then with the new code but passing the old CRC32
poly value. Both resulted in a brnboot image with the same sha1sum.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

SVN-Revision: 45881
9 years ago
Rafał Miłecki 63cac50d24 firmware-utils: asustrx: support setting firmware version
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 45791
9 years ago
Rafał Miłecki 6feb68603a firmware-utils: asustrx: new tool for TRX format with Asus tail
Asus devices use TRX format with some extra data at the end.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 45773
9 years ago
Felix Fietkau a13e2d0e5c mktplinkfw: add flag to ignore size limit (used for initramfs images)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45644
9 years ago
Jonas Gorski bb54859543 brcm63xx: do not align squashfs rootfs start
We do not need to align the start of read only rootfs's to erase blocks.
This allows us to write the squashfs rootfs directly behind the kernel,
potentially freeing up one erase block.

We still need to align for jffs2, so add a flag for imagetag to
optionally align the rootfs start.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 44556
9 years ago
Jonas Gorski 56fd5df368 firmware-utils: imagetag: use cyg_crc32 instead of duplicating code
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 44554
9 years ago
John Crispin 9358a8a798 ar71xx: TL-WA7210n v2 support
This patch adds support for TP-Link TL-WA7210n[0]

[0] http://www.tplink.com/en/products/details/?model=TL-WA7210N

Signed-off-by: Hendrik Frenzel <hfrenzel@scunc.net>

SVN-Revision: 44526
9 years ago
Jo-Philipp Wich f7e56763e1 tools: remove static linking support
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 44285
9 years ago
John Crispin baaef42952 ar71xx: Revert "added board support for compex wpj558"
This reverts commit f7873071561d82e75ba2dc46433a2982fef8ac6f.

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 44245
9 years ago
John Crispin bc906ca59e added board support for compex wpj558
Signed-off-by: Christian Mehlis <christian@m3hlis.de>

SVN-Revision: 44237
9 years ago
John Crispin 4961c7d0f5 ar71xx: add support for TL-WA701ND v2
Signed-off-by: Luigi Tarenga <luigi.tarenga@gmail.com>

SVN-Revision: 44063
9 years ago
Florian Fainelli 0c5feac573 tools: edimax_fw_header: fix suspicious memset usage
memset() was called with a size argument against a pointer size, not the
structure size itself.

Signed-off-by: Florian Fainelli <florian@openwrt.org>

SVN-Revision: 43913
9 years ago
Felix Fietkau 265174ef48 tools/firmware-utils: add version 3 header support for mktplinkfw2
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43897
9 years ago
Felix Fietkau c12ac30870 buffalo-enc: pass the longstate option to decryption
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43756
10 years ago
Felix Fietkau 8e8437103c buffalo-enc: accept the longstate command line option
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43755
10 years ago
Imre Kaloz 211cac98d5 Belkin AC 1750 DB (F9K1115v2) support
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>

SVN-Revision: 43734
10 years ago
John Crispin 8a123f6f66 ramips: generate factory images for Nexx devices
Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>

SVN-Revision: 43541
10 years ago
Felix Fietkau 40e8649947 firmware-utils: remove dependency on error.h in tplink-safeloader
Fixes build on Mac OS X

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43402
10 years ago
John Crispin f318ae995a firmware-utils: add new tool tplink-safeloader for the new TP-LINK Pharos devices (CPE210/220/510/520)
The new TP-LINK Pharos series uses a new bootloader, the "TP-LINK Safeloader".
It uses an advanced firmware image format, containing an image partition table
and a flash partition table (and image partitions are mapped to the
corresponding flash partitions). The exact image format is documented in the
source code.

Furthermore, the bootloader expects the kernel image as an ELF executable.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>

SVN-Revision: 43384
10 years ago
John Crispin d0bf15f235 ramips: add support for A5-V11 board (resubmit)
(Reposted due to an issue with the patchwork server during original submission)

Unbranded. Silkscreen on PCB is “A5-V11”, believed to be made by Bococom (or at least uses Bococom image encryption - as used on poray devices - but different key)

Signed-off-by: Gareth Bryan <gareth@mx9.org>

SVN-Revision: 43102
10 years ago
Felix Fietkau a1b6a7e572 firmware-utils: rename encrypt()/decrypt() in mkhilinkfw to avoid collisions
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 42998
10 years ago
John Crispin 6e1637f8fa firmware-utils: restore compilation of mkhilinkfw.
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>

SVN-Revision: 42989
10 years ago
John Crispin 7322fe161a firmware-utils: fix compilation warnings.
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>

SVN-Revision: 42986
10 years ago
Jo-Philipp Wich 6358368500 firmware-utils: allow passing a specific MBR signature to ptgen
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 42934
10 years ago
John Crispin 7ab5357280 firmware-utils: add NEXX factory image support
This patch adds support to encode and decode images for certain types of
NEXX routers.

SVN-Revision: 42784
10 years ago
John Crispin 058a5c85ef firmware-utils: made mkdir615h1 work for all Senao-produced devices as mksenaofw and cleaned up some of its formatting
Signed-off-by: Forest Crossman <cyrozap@gmail.com>

SVN-Revision: 41962
10 years ago
Jonas Gorski b8f5c43748 firmware-utils: add new tool for fixing headers on ZyXEL devices (brcm63xx)
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 41849
10 years ago
Gabor Juhos def30210f8 firmware-utils/mktplinkfw: add support for GL.iNet v1
Patch is based on http://patchwork.openwrt.org/patch/5273/.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Signed-off-by: Michel Stempin <michel.stempin@wanadoo.fr>
Signed-off-by: Mark Janssen <mark@sig-io.nl>
Signed-off-by: alzhao <alzhao@gmail.com>
Patchwork: http://patchwork.openwrt.org/patch/5653/
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 41620
10 years ago
John Crispin ea137d3735 firmware-utils/mkdir615h1: fix magic XOR calculation
Signed-off-by: Forest Crossman <cyrozap@gmail.com>

SVN-Revision: 41314
10 years ago
John Crispin 575127fe1c lantiq: DGN3500 (all known variants) factory and sysupgrade image building support
This patch adds factory image building for the DGN3500, all variants,
and fixes sysupgrade images to make them play nice with the sercomm
secondary boot loader.

The factory images can be used directly in the update dialog in the
interface of the stock firmware and via the special Sercomm bootmode
and a special windows flashing utility (allegedly present in the CD
that came with the device -- but it's also compatible with the NSLU2
Upgrade_207_XP utility.) The special bootmode can be activated by
turning the device on while holding the reset button pressed, then
releasing it when the power led starts blinking red and green. Please
notice that if using the 207 utility, it will always report that the
flashing failed even though it completed successfully. Just power
cycle the router manually after the utility reports the failure and
OpenWRT will boot. This same utility (despite reporting failure in
this case too) can revert a DGN3500 (any variant) to the appropriate
stock Netgear firmware.

This patch is a heavily modified version of a package I found on the
OpenWRT forum with a couple fixes and features added -- mainly the
generation of all the different image variants to support all known
models directly, atm known variants are AnnexA-WW, AnnexA-NA and
AnnexB-DE/GR.

I tested the patch successfully on my device.

Signed-off-by: Marco Antonio Mauro <marcus90@gmail.com>

SVN-Revision: 41236
10 years ago
John Crispin dc5fe5f73f ramips: RT-N56U support fixes and factory image creation
Signed-off-by: Mikko Hissa <mikko.hissa@werzek.com>

SVN-Revision: 41224
10 years ago
John Crispin 3208d0d7b7 firmware-utils: add Gemtek header tool
Generates webflash-compatible images for a few RT2880 routers based
on Gemtek OEM boards.

Signed-off-by: Claudio Leite <leitec@staticky.com>

SVN-Revision: 40551
10 years ago
Gabor Juhos 1a53806b86 firmware-utils/mktplinkfw: add support for TL-WDR4300v1 (IL)
The version of TL-WDR4300 sold in Israel comes with a different
hardware id.

Patch-by: Daniel <daniel@makrotopia.org>
Patchwork: http://patchwork.openwrt.org/patch/5001/
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 40037
10 years ago
Gabor Juhos d9341f97ed firmware-utils/mktplinkfw: add support for the Oolite v1 board
Patch-by: Lars Bøgild Thomsen <lth@cow.dk>
Patchwork: http://patchwork.openwrt.org/patch/4922/
[juhosg: fix whitespaces]
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 40035
10 years ago
Gabor Juhos 6aae3694c9 firmware-utils/mktplinkfw: add an option to generate 16MiB images
Signed-off-by: Andrew 'Necromant' Andrianov <andrew@ncrmnt.org>
Patchwork: http://patchwork.openwrt.org/patch/2449/
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 40034
10 years ago
Gabor Juhos fe99a2d67d firmware-utils/mktplinkfw: allow to reserve space in the generated images
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 39396
10 years ago
John Crispin 9821ce8ed6 ralink: don't build mkhilinkfw untilt he ssl header dependency is resolved
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 39248
10 years ago
John Crispin 4bf844e834 firmware-utils: mkhilinkfw breaks the build bots
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 39243
10 years ago
John Crispin 2b4a04089f firmware-utils: add HLK-RM04 tool
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 39238
10 years ago
John Crispin 3b4152bfda firmware-utils: check_magic() in buffalo-lib.c always return 0
spotted with cppcheck

Signed-off-by: Etienne CHAMPETIER <etienne.champetier@free.fr>

SVN-Revision: 39171
11 years ago
Gabor Juhos 2b6ca18e82 firmware-utils/mkplinkfw: add TL-WA801ND v2 support
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Patchwork: http://patchwork.openwrt.org/patch/4503/
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 39066
11 years ago
Gabor Juhos fd8e5b04b4 firmware-utils/trx: remove trailing whitespaces
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 38963
11 years ago
Gabor Juhos b61b447472 firmware-utils/trx: fix two bugs
- fix crc32 calculation if -F was enabled.

 - don't convert the crc32 to little endian twice.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>

SVN-Revision: 38962
11 years ago
Gabor Juhos 4069a50de6 firmware-utils/mkplinkfw: add TL-WR1043ND v2 support
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 38957
11 years ago
Gabor Juhos 5a85a21e06 tools: adapt addpattern for WD's Range Extender
A few things had to be changed to add support for these devices:
 - support code patterns with 8 characters
 - new board definition for the range extender device

Patchwork: http://patchwork.openwrt.org/patch/4280/
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 38685
11 years ago
Gabor Juhos d9c9633d19 firmware-utils: remove the wndr3700 utility
It is not used anymore.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 38663
11 years ago
Gabor Juhos 50458fb24c mkfwimage: Increase RSPRO maximum size to 0xF00000 (15 MiB)
RSPRO has 16MiB of Flash, using the following layout:

[    2.930000] 0x000000000000-0x000000030000 : "RedBoot"
[    2.940000] 0x000000030000-0x000000130000 : "kernel"
[    2.950000] 0x000000130000-0x000000ff0000 : "rootfs"
[    2.960000] 0x000000ff0000-0x000000fff000 : "FIS directory"
[    2.970000] 0x000000fff000-0x000001000000 : "RedBoot config"

Firmware images contain kernel and rootfs, so they can use up to 0xFF0000 -
0x30000 = 0xFC0000 (15,75MiB) of space. We don't include the RedBoot and FIS
partitions and leave an extra 0xC0000 (768KiB) of space.

This is based on revision 18410 which sets the limit to 0xB00000 (11 MiB).

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 38484
11 years ago
John Crispin fa4ca9d7eb tools: add tool to generate dcs93xl images
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 38317
11 years ago
Gabor Juhos da3700b2a6 firmware-utils/mktplinkfw: add support for the TL-MR13U board
Signed-off-by: Oleg Titov <oleg.titov@gmail.com>
Patchwork: http://patchwork.openwrt.org/patch/4063/
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 38065
11 years ago
John Crispin 15721d535b firmware-utils: add a tool TP-Link v2 image generation
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 37726
11 years ago
John Crispin 1af56d7c46 firmware-utils: remove v2 support
we will use gabors patch instead

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37725
11 years ago
John Crispin 815d9334e2 firmware-utils: fix segfault introduced by v2 changes
Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com>

SVN-Revision: 37724
11 years ago
John Crispin eb844ad321 firmware-utils: add support for TDW8970 to mktplinkfw
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37718
11 years ago
John Crispin 85cb2c4f9e firmware-utils: add v2 header support to firmware-utils
only image build works. inspect and md5 checksum support are not implemented yet

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37717
11 years ago
John Crispin aaedf6c8c6 ramips: add basics for Poray devices
This commit adds the basic elements to support Poray brand routers.
It contains a tool to do the encryption/obfuscation that is used in
Poray routers.

Support for Poray devices was worked on by:

Felix Kaechele <heffer@fedoraproject.org>
Luis Soltero <lsoltero@globalmarinenet.com>
Michel Stempin <michel.stempin@wanadoo.fr>

Signed-off-by: Felix Kaechele <heffer@fedoraproject.org>

SVN-Revision: 37635
11 years ago
Gabor Juhos 2fb993fdbf firmware-utils/mktplinkfw: add support for the TL-MR10U board
Based on andelf's patch:
http://andelf.diandian.com/post/2013-05-22/40050677370

Signed-off-by: Oleg Titov <oleg.titov@gmail.com>
Patchwork: http://patchwork.openwrt.org/patch/3840/
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 37549
11 years ago
Florian Fainelli b5b3e94132 tools: add Broadcom cable modem firmware image creator
Signed-off-by: Florian Fainelli <florian@openwrt.org>

SVN-Revision: 36873
11 years ago
Gabor Juhos 3a407a0986 firmware-utils/mkcameofw: allow to use combined kernel image
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 36583
11 years ago
Gabor Juhos 9658206abc firmware-utils/mktplinkfw: add description for -W option into usage output
Add description for -W <hwrev> option into usage output of mktplinkfw.

Signed-off-by: yousong <yszhou4tech@gmail.com>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 36497
11 years ago
Gabor Juhos 85db8b7a21 firmware-utils/mktplinkfw: add support for the TL-WR720N v3 board
Signed-off-by: yousong <yszhou4tech@gmail.com>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 36455
11 years ago
John Crispin 48feea4861 Add Netgear WNCE2001 (OF version)
Add Netgear WNCE2001.

This is a small RT3052 device with 4MB spi flash and 32MB ram.
2 built-in antennas, 1x fastE, no USB, reset & wps switch.
On my model the AP/RT switch is unpopulated, but I verified the gpio
mapping for it.
The stock firmware is running an unprotected tftpd which allows you
to read any file from the filesystem.
Serial port is present on testpads (See image on the wiki page).
There are more testpads below the shield near the SoC, which
may have JTAG.

Slight annoyance: The bootloader is checksumming kernel&rootfs, but
can be tricked by zeroing checksum and length fields in the checksum
partition, see
target/linux/ramips/base-files/lib/preinit/04_disable_wnce2001_flash_checksumming

The manufacturer image is very similar to the DAP one, so I slightly
modified mkdapimg to support generating it.

The resulting
openwrt-ramips-rt305x-wnce2001-squashfs-factory-(worldwide|northamerica).bin
can be used to flash from stock to OpenWRT using the stock firmware
upgrade function, without using the serial port.

http://www.netgear.com/landing/wnce2001.aspx
http://wiki.openwrt.org/toh/netgear/wnce2001

Signed-off-by: Tobias Diedrich <ranma+openwrt@tdiedrich.de>

SVN-Revision: 36289
11 years ago
Gabor Juhos 55e2ae7452 firmware-utils/mktplinkfw: Add support for MR3420v2
Patch-by: Dmytro <dioptimizer@gmail.com>
Patchwork: http://patchwork.openwrt.org/patch/3441/
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 35963
11 years ago
Gabor Juhos ddb29bebf5 firmware-utils/mktplinkfw: add support for the TL-WA830RE v1/v2 boards
Signed-off-by: Ronald Hecht <ronald.hecht@gmx.de>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 35787
11 years ago
Gabor Juhos c75c1e03a3 firmware-utils/mktplinkfw: add support for the TL-WDR4900 v1
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 35593
11 years ago
Gabor Juhos cbeb862b95 firmware-utils/mktplinkfw: add TP-LINK TL-WR743ND v2 support
AR9331 based, these same as 741v4

Signed-off-by: Cezary Jackiewicz <cezary.jackiewicz@gmail.com>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 35448
11 years ago
John Crispin 2739a19992 adds support for Edimax BR-6524N
fixes #12754

Signed-off-by: <rq@akl.lt>

SVN-Revision: 35019
12 years ago
Gabor Juhos cbc3aebcc7 firmware-utils/mktplinkfw: add support for the TL-MR3220 v2
Based on the following patch:
http://patchwork.openwrt.org/patch/3043/

Signed-off-by: Cezary Jackiewicz <cezary.jackiewicz@gmail.com>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 34781
12 years ago
Gabor Juhos 113b6b96c1 firmware-utils/mkfwimage2: allow to use numbers in partition names
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 34729
12 years ago
Gabor Juhos dfab9cb4e7 firmware-utils/mktplinkfw: add support for TP-LINK WA801NDv1
Patch-by: Amir Sagie <openwrt-devel@taproot.org.il>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 34575
12 years ago
Gabor Juhos 588c81d1e0 firmware-utils/mktplinkfw: add support for TL-WA7510N
[juhosg: separated from the http://patchwork.openwrt.org/patch/2820/ patch]

Signed-off-by: Stefan Helmert <helst_listen@aol.de>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 34189
12 years ago
Gabor Juhos 86b788b1b4 firmware-utils: new tool for fixing U-Media firmware headers
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 33848
12 years ago
Gabor Juhos 25250a22ef tools/firmware-utils: add seama tool
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 33840
12 years ago
Jonas Gorski 997ace7e5e firmware-utils: move bcm_tag.h here
Since there is only one user of bcm_tag.h left, we can safely move it
into the firmware-utils directory, replacing the symlink.

SVN-Revision: 33655
12 years ago
Gabor Juhos 872e798473 tools/firmware-utils: add a new tool for TEW-712BR firmware generation
SVN-Revision: 33233
12 years ago
John Crispin 6c9d20d6e7 tools/firmware-utils/ptgen option to use MB rounding
SVN-Revision: 33218
12 years ago
Gabor Juhos 25ac1447ed tools/firmware-utils: add tool for DIR-651-H1 firmware generation
Signed-off-by: Mikko Hissa <mikko.hissa@uta.fi>

SVN-Revision: 33204
12 years ago
Jo-Philipp Wich cf1698c637 use HOST_STATIC_LINKING instead of hardcoding -static
SVN-Revision: 33140
12 years ago
Jo-Philipp Wich e2e55d7acd firmware-utils: link statically
SVN-Revision: 33117
12 years ago
John Crispin fb81e7a802 adds mkdapimg
Signed-off-by: Yoichi Shinoda <shinoda@jaist.ac.jp>

SVN-Revision: 32822
12 years ago
Gabor Juhos a45427bc79 firmware-utils/mktplinkfw: allow to specify firmware version
SVN-Revision: 32616
12 years ago
Jonas Gorski b31108e0a8 tools: imagetag: add parameter for padding images
Allow images to be padded to a certain size. This prevents CFE from
flashing them to the second image offset.

SVN-Revision: 31875
12 years ago
Gabor Juhos de7324674a firmware-utils/mktplinkfw: add support for the TL-WR1041N v2
Patch-by: Vince Huang <axishero@foxmail.com>

SVN-Revision: 31609
12 years ago
Gabor Juhos 84267683bb firmware-utils/mkfwimage: allow to override firmware magic
SVN-Revision: 30627
12 years ago
John Crispin cd1a204365 Support booting the Speedport W502V using BRN-BOOT.
While the disadvantage is less available flash space, it's easy and
safe to flash without opening the device.
Going back to the original firmware is also possible.

This patch add two firmware utilities, mkbrncmdline and mkbrnboot.

mkbrncmdline patches the uncompressed kernel so the registeres a0 to
a3 are initialized and the memory size is passed in.

mkbrnboot takes the lzma compressed kernel and squashfs images and
creates a firmware image that can be flashed using the BRN-BOOT
recovery kernel, which is booted by holding both buttons when
powering up the device and will listen on http://192.168.2.1.

The firmware file from bin/lantiq/ to use is
openwrt-lantiq-danube-ARV4525PW-BRNDTW502-brnImage

The BRN-BOOT recovery kernel does size-check the image, so if it's
too big to fit into flash it will complain accordingly.

A second patch is needed to make the wired network interface work
since there is no u-boot to pre-initialise it.

Signed-off-by: Tobias Diedrich <ranma+openwrt@tdiedrich.de>

SVN-Revision: 30532
12 years ago
Gabor Juhos 1338af2640 firmware-utils/mkmylofw: add WPE72 support
Signed-off-by: Johnathan Boyce <jon.boyce@globalreach.eu.com>

SVN-Revision: 29913
12 years ago
John Crispin ccb6b0a063 tools: clean up Makefiles / make ccache work
SVN-Revision: 29754
13 years ago
Gabor Juhos 8a8e5bde15 firware-utils/mktplinkfw: add TL-WR2543N/ND support
SVN-Revision: 29681
13 years ago
Gabor Juhos 923e5d3543 firmware-utils/mktplinkfw: add support for TL-WA701N/ND
SVN-Revision: 29655
13 years ago
Gabor Juhos 55e13f4e6a firmware-utils/mktplinkfw: add support for TL-MR3020
Signed-off-by: Christian Cier-Zniewski <c.cier@gmx.de>

SVN-Revision: 29650
13 years ago
Gabor Juhos 29a2c2ea80 firmware-utils/mktplinkfw: add ability to put jffs2 eof marker into the image
SVN-Revision: 29544
13 years ago
Gabor Juhos 2592c0a283 tools/mktplinkfw: allow to specify hw_id, hw_rev and flash_layout
SVN-Revision: 29466
13 years ago
Gabor Juhos 54c8d61b03 firmware-utils/mktplinkfw: allow to align the rootfs on a specified boundary
SVN-Revision: 29445
13 years ago
Gabor Juhos 81cda3e2f1 firmware-utils/mktplinkfw: fix combined image creation
SVN-Revision: 29409
13 years ago
Gabor Juhos 6632e38d08 firmware-utils/mktplinfw: use htonl/ntohl
Based on a patch by Adrian Chadd <adrian@freebsd.org>

SVN-Revision: 29327
13 years ago
Gabor Juhos 13b0ec6cf7 firmware-utils/mktplinkfw: add TL-WR741ND v4
SVN-Revision: 28707
13 years ago
Vasilis Tsiligiannis aadbbc4bac Add firmware tool for generating factory images for Edimax devices
SVN-Revision: 28688
13 years ago
Gabor Juhos 500a8e2014 firmware-utils/mktplinkfw: fix hardware id of the TL-WR740 v3
SVN-Revision: 28602
13 years ago
Gabor Juhos 712521955b firmware-utils/mktplinkfw: add support for TL-WR703N v1
Patch-by: dongyuqi <729650915@qq.com>

SVN-Revision: 28278
13 years ago
Gabor Juhos ffbdaf8ec8 firmware-utils/mktplinkfw: add support for TL-WR743ND v1
Signed-off-by: Paul Fertser <fercerpav@gmail.com>

SVN-Revision: 28270
13 years ago
Gabor Juhos 9faace4327 firmware-utils/mktplinkfw: add support for TL-WR740N v3
Signed-off-by: Martin Raykov <martin.raykov@gmail.com>

SVN-Revision: 28268
13 years ago
Felix Fietkau bdb676b90d firmware-utils: rename the devname variable in mkwrgimg to avoid a clash with a BSD stdlib function
SVN-Revision: 27553
13 years ago
Gabor Juhos 9d980dc121 tools/firmware-utils: add yet another buffalo tool
SVN-Revision: 27475
13 years ago
Gabor Juhos 533067b8f5 tools/firmware-utils: allow to create buffalo image from two files
SVN-Revision: 27473
13 years ago
Gabor Juhos ea6bc8858a tools/firmware-utils: allow to create buffalo tags w/o hw version
SVN-Revision: 27472
13 years ago
Gabor Juhos 1c5b7d0a32 tools/firmware-utils: add new firmware tool for the DIR-300-B1 board
SVN-Revision: 27438
13 years ago
Hauke Mehrtens fbed51a8b5 firmware-utils: fix build on big endian systems
This closes #9446

SVN-Revision: 27255
13 years ago
Gabor Juhos 0d7a558f23 tools/firmware-utils: fix buffalo csum calculation
Also print an error message if decryption fails.

SVN-Revision: 27167
13 years ago
Gabor Juhos 145402e11b tools/firmware-utils: add support for hd_id tag into mkdniimg
Signed-off-by: Mark Mentovai <mark@moxienet.com>

SVN-Revision: 27052
13 years ago
Gabor Juhos fb9a672c78 tools/firmware-utils: add buffalo specific fw tools
SVN-Revision: 27050
13 years ago
Florian Fainelli dce13b8c4d bcm63xx: Add firmware helpers for T-Home Speedport W 303V
Add two helpers for generating correctly tagged images for the T-Home
Speedport W 303V Typ B as well as xor'd ones as required by CFE.

Signed-off-by: Jonas Gorski <jonas.gorski+openwrt@gmail.com>

SVN-Revision: 26877
13 years ago
Daniel Dickinson f83c5938d2 bcm63xx: Move the OpenWrt rootfs length field
Dual image capable CFEs store an image sequence at the same place as
currently OpenWrt stores the actual rootfs length, so it will get
overwritten when flashing through such a CFE.

To prevent this from happening, move the rootfs length field to the next
four bytes, thus completely using the reserved1 field.

Since the reserved1 field is now completely in use, it does not make sense
to allow it to be set from the imagetag utility, so remove the option.

Signed-off-by: Jonas Gorski <jonas.gorski+openwrt@gmail.com>

SVN-Revision: 26680
13 years ago