Commit Graph

18109 Commits (c2a11bc8e44af3259a4bed99b46e8a7db6a18c81)

Author SHA1 Message Date
Alexander Couzens 8c96eb2fdb
ar71xx/image: change unifi UBNT_CHIP to ar7240
Verified by OEM firmware images which contains the same
chip.

Tested-by: Andreas Bräu <ab@andi95.de>
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
7 years ago
Matthias Schiffer 16222a1010
ar71xx: set US region code for TP-Link TL-WR710N v1 image
Non-US versions of the TP-Link TL-WR710N v1 don't have a region code so
far, so we can just set US unconditionally.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years ago
Matthias Schiffer 438dcbfe74
base-files: automatically handle paths and symlinks for RAMFS_COPY_BIN
Depending on busybox applet selection, paths of basic utiilties may differ,
and may not work as symlinks to busybox. Simply using whatever binary is
found in PATH and detecting symlinks automatically is more robust and
easier to maintain.

The list of binaries is also slightly cleaned up and duplicates are
removed.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years ago
Matthias Schiffer f464da623d
kirkwood: upgrade: fix RAMFS_COPY_*
RAMFS_COPY_* are moved to platform.sh toplevel. The nand_do_upgrade call is
moved to platform_do_upgrade.

Fixes: 30f61a34b4 "base-files: always use staged sysupgrade"
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years ago
Matthias Schiffer 08a94ecaee
ipq806x: upgrade: fix RAMFS_COPY_*
RAMFS_COPY_* are moved to platform.sh toplevel. The unneeded
linksys_preupgrade function is removed, and the nand_do_upgrade call is
moved to platform_do_upgrade.

Fixes: 30f61a34b4 "base-files: always use staged sysupgrade"
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years ago
Matthias Schiffer 73f675415c
bcm53xx: upgrade: fix RAMFS_COPY_*
Fixes: 30f61a34b4 "base-files: always use staged sysupgrade"
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years ago
Piotr Dymacz 9d07d2dc56 ar71xx: image: simplify Meraki MR16 device definition
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Enrique Giraldo afcf5f69be ar71xx: fix upgrade platform check for Compex WPJ558
The magic number was wrong and always marked the images as invalid.

Signed-off-by: Enrique Giraldo <enrique.giraldo@galgus.net>
7 years ago
Piotr Dymacz befc763ed1 ar71xx: support LED in TP-Link TL-WR902AC RJ45 socket
TP-Link TL-WR902AC has another one, tiny LED inside RJ45 socket which is
attached to GPIO15. Add support for it, use it as a "lan" LED and rename
old one to "internet". Also, fix uci option name for "lan" LED in system
configuration ("wan" -> "lan").

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Piotr Dymacz 42c8bbb69b ar71xx: verify TP-Link TL-WR902AC sysupgrade image
Until we enable requirement for metadata in sysupgrade images under
ar71xx target, this prevents users from using wrong image.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Henryk Heisig 096a604df0 ar71xx: add metadata to some TP-Link images
This commit adds metadata to TP-Link sysupgrade images
created by tplink-safeloader with uImage kernel header.

Signed-off-by: Henryk Heisig <hyniu@o2.pl>
7 years ago
Mathias Kresin 01819254af ramips: sound-mt7620: fix dependencies for kernel 4.9
With kernel 4.8 common used code was moved to a shared kmod. Add the
missing dependency to the shared snd-soc-simple-card-utils.ko.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin 1743ed49c1 kernel: add missing symbols
Fixes the ramips and xburst/qi_lb60 build.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin 3dc757856c lantiq: fix typo in EASY80920.dtsi
There is no device tree property named phynmode0. Use phy-mode as it is
done for the other ethernet nodes.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Thomas Nixon 50e3659703 lantiq: add Netgear DM200 support
Netgear DM200 is an inexpensive VDSL modem:

    CPU: VRX220 MIPS 34Kc 5.6 @ 500Mhz
    RAM: 64MiB
    Flash: 8MiB
    Ethernet: 1x100M
    DSL: VDSL2+, ADSL2+
    reset button, 3x bi-color LEDs

Serial port is 115200 baud, on the 4 pin header; pins from the bottom to
top are GND, RX, TX.

To upgrade from the vendor firmware, upload factory.img

The DM200 bootloader supports flashing over TFTP; hold the reset button
while powering on the device, and wait for the power light to start
flashing green before releasing. The device is now listening on
192.168.0.1/24, and can be sent a factory.img or a netgear image with a
TFTP put.

Once the image is loaded, it will be written to the flash, and the
device will reboot; this will take a few minutes.

Thanks to Edward O'Callaghan and Baptiste Jonglez, who implemented their
own ports for this device and provided valuable feedback.

Signed-off-by: Thomas Nixon <tom@tomn.co.uk>
7 years ago
Matthias Schiffer 4b32d66216
ramips: simplify ubnt-erx-sfp device definition
Most of the ubnt-erx definition can be reused; the package removals in
DEVICE_PACKAGES have become redundant after d17cb4a68a "ramips: purge
default packages on MT7621".

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years ago
Felix Fietkau 7887a46f45 build: enable gzipping of images on x86 even if ext4 is disabled
There is lots of padding between the boot partition and the rootfs, so
gzipping is helpful here

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Ram Chandra Jangir c2a4f144d7 ipq806x: Enable AP148 fit image(.itb) generation
This change enables .itb image generation for AP148,
It will help us to boot and test AP148 with NOR flash.

Signed-off-by: Ram Chandra Jangir <rjangir@codeaurora.org>
7 years ago
John Crispin fddc78bc11 ramips: bump to v4.9
Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
Jonas Gorski a0bb6c91fe brcm63xx: remove misleading warning about partial SPI NOR writes
The warning will be triggered by jffs2 or UBI, and partial writes are no
issue for most flash chips.

Fixes: 2a2b16210b ("brcm63xx: backport upstream solution for SPI message size limits")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Mathias Kresin 0825de2df7 kirkwood: drop kernel 4.4 support
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Paul Wassi 9808b9ae02 kirkwood: switch to kernel 4.9
Add patches-4.9, some of them (heavily) rewritten:
  - ea4500 is upstream available, keep only LEDE changes in dts
  - ea3500 is changed to match the structure of the upstream ea4500 dts
  - nsa310s rewritten to include the common dtsi
  - nsa325 is dropped, since already upstream

Signed-off-by: Paul Wassi <p.wassi@gmx.at>
Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
[refresh kernel config, add on100, use the switchdev based mv88e6171
driver for the linksys boards, keep lede specific rootfs/kernel
partition names for linksys boards, reorder patches]
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin 08c499f865 lantiq: use img file extension for DGN3500 factory images
The Netgear UI in basic mode refuses the upgrade file if the the
fileextension is not img. The expert/advanced mode accepts any
fileextension. Use img to make it work in any case.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Piotr Dymacz cf23547e57 ar71xx: fix TPLINK_BOARD_ID for Archer C58 and TL-WA855RE
Rename TPLINK_BOARD_NAME to TPLINK_BOARD_ID for two ommited devices.

Fixes: 7d6c63d ("build: rename TPLINK_BOARD_NAME to TPLINK_BOARD_ID")
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Qian Zheng a08ec9a54d ar71xx: fix Netgear WNDR3700 v4 switch port mapping
Signed-off-by: Qian Zheng <sotux82@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
Piotr Dymacz 0a2e4204db ar71xx: generic: enable CONFIG_MTD_SPLIT_TPLINK_FW
We can use "tplink-fw" mtd splitter for TP-Link devices which use kernel
with TP-Link header embedded inside "safeloader" image type and thus get
rid of statically defined "kernel" and "rootfs" partitions in cmdline.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Piotr Dymacz 43ae7dcdd4 ar71xx: refresh and cleanup mikrotik subtarget kernel config
Refresh mikrotik subtarget kernel config and enable kernel support for
boards which belong to this subtarget only.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Piotr Dymacz f67ad17d19 ar71xx: refresh and cleanup nand subtarget kernel config
Refresh nand subtarget kernel config and enable kernel support for
boards which belong to this subtarget only.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Piotr Dymacz cc9b9c5885 ar71xx: refresh and cleanup target kernel config
Refresh target kernel config and disable kernel support for all boards
which belong to nand and mikrotik subtargets only.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Hauke Mehrtens 1f991bb365 brcm47xx: Add support for kernel 4.9
I tested this on a WRT54GS and a WRT610N V1.
The WRT610N does not boot when the kernel is too big, so I deactivated KALLSYMS

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Hauke Mehrtens b56995550a brcm47xx: refresh kernel configuration
Run make kernel_oldconfig on the brcm47xx target.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Hauke Mehrtens 250d305455 brcm47xx: remove kernel 4.1 support
Kernel 4.1 is not supported by LEDE for some time now.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Mirko Parthey e3b339e2ea brcm47xx: use DMZ LED as status indicator
On the Linksys WRT54GSv1, the Power LED flickers in the "off" state.
Indicate status using the DMZ LED if available, since it has solid "on" and
"off" states.

This change was tested on the WRT54GSv1, but may also affect other brcm47xx
devices.

Fixes FS#793.

Signed-off-by: Mirko Parthey <mirko.parthey@web.de>
7 years ago
Mirko Parthey 1dace8cbe0 brcm47xx: resolve GPIO conflict for WRT54GSv1
On the Linksys WRT54GSv1, the adm6996 switch driver and the
gpio_button_hotplug module both claim GPIO 6, which is connected to the
Reset button.  When the switch driver's request wins, the Reset button
cannot work. This makes it impossible to enter failsafe mode without a
serial console.

Stop requesting the "adm_rc" GPIO in the switch driver, since it is not
used anywhere.

Fixes FS#792.

Signed-off-by: Mirko Parthey <mirko.parthey@web.de>
7 years ago
Jonas Gorski eaaba94bf6 kernel: add missing symbol to generic
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Jonas Gorski beaaf214f7 brcm63xx: refresh smp config
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Jonas Gorski d131e36e41 brcm63xx: enable KEXEC for SMP again
It seems it compiles again, so there is no reason to keep it disabled.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Jonas Gorski 2983576bae brcm63xx: disable commandline parts parser
We don't use it, so no need to have it enabled.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Anthony Sepa f9b67b89d3 brcm63xx: add support for the Actiontec R1000H gateway
SOC: Broadcom BCM6368 (2 * Broadcom BMIPS4350 V3.1 / 400 MHz)
Flash size: 32MB (split 16/16 dual boot)
RAM size: 64MB
Wireless: BCM432x 802.11a/b/g/n(pci)
Ethernet: Broadcom BCM53115
USB: 1 x USB 2.0

Known issues:
 - Unable to detect 53115 switch attached to MDIO. Not supported
 - No support for the cable port

More info on the device and the research can be found at:
http://www.actiontec.com/212.html

Same FCC ID as:
https://wikidevi.com/wiki/Actiontec_V1000H_(Telus)

Signed-off-by: Anthony Sepa <anthonysepa@yahoo.ca>
[jonas.gorski: fix commit subject/message]
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Jonas Gorski 1dc7a0cfd5 brcm63xx: fix bcm6328 pinmux other register
The pinmux register is at relative offset 0x8, not 0xc. Fixes hang
when trying to modify pins >= 32.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Jo-Philipp Wich 28cb6ed949 ar71xx: fix typo in network defaults
Commit 9fec39a (ar71xx: add support for TP-Link TL-WA855RE v1) introduced a
typo in 02_network, fix it by removing the stray paren.

Reported-by: Henryk Heisig <hyniu@o2.pl>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years ago
Piotr Dymacz a73471dea7 ar71xx: image: specify TPLINK_HWID for TP-Link RE450
TPLINK_HWID hasn't been specified for TP-Link RE450 since the begin.
As we don't want to break sysupgrade (all existing LEDE release images
for this board have TPLINK_HWID set to 0x0), set it explicitly to 0x0.

Fixes FS#852

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
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 c55fadcacb ramips: image: simplify TP-Link Archer devices definitions
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Piotr Dymacz 5b7f592251 build: move mktplinkfw2 related commands to image-commands.mk
There are already two targets (lantiq, ramips) which use mktplinkfw2
tool for creating images. This de-duplicates code, introduces two new
build commands: tplink-v2-header, tplink-v2-image and makes use of
them in place of old, (sub)target specific ones.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Piotr Dymacz 7d6c63d875 build: rename TPLINK_BOARD_NAME to TPLINK_BOARD_ID
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Piotr Dymacz ad8c315812 ar71xx: fix switch port mapping for TP-Link TL-WR74xN/D series
Fixes FS#843

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
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