Commit Graph

3230 Commits (6254a2028c181fe9863dc7758d47eda667b4f397)

Author SHA1 Message Date
Chris Blake fac018b25e ar71xx: Remove switch config for the MR12/MR16
These boards do not have a switch, so they should have never been added
to this file in the first place.

Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
8 years ago
Chris Blake 28dd52b079 ar71xx: add mac partition to the MR12/MR16
On the stock Meraki Firmare for the MR12/MR16, a chunk of SPI space
after u-boot-env is used to store the boards Mac address. Sadly as this
was removed on any device already on OpenWRT/LEDE, moving forward a new,
64k partition named "mac" will be used to store the mac address for the
device (which is the minimum size). This allows users to properly set
the correct MAC, without editing the ART partition (which holds the same
MAC for all devices).

The reason the space is taken from kernel instead of rootfs is currently
kernels are only 1.3MB, so that way we can leave the current rootfs
space alone for users who fully utilize the available storage space.

Once this partition is added to a device, you can set your MAC doing the
following:

mtd erase mac
echo -n -e '\x00\x18\x0a\x33\x44\x55' > /dev/mtd5
sync && reboot

Where 00:18:0a:33:44:55 is your MAC address.

This was tested, and confirmed working on both the MR12 and MR16.

Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
8 years ago
Chris Blake d8662ac3c6 ar71xx: Move MR12 & MR16 from legacy to generic
This moves the Meraki MR12 and Meraki MR16 to the new generic target.
Tested and verified working on both devices.

Note that kernel/rootfs images are still generated. This is because they
are used for the inital flashing process due to the fun pace at which
UBoot erases/writes to SPI.

Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
8 years ago
Jing Lin 7ba9a3a504 ar71xx: Add support to DomyWifi DW33D
Signed-off-by: Jing Lin <mumuqz@163.com>
8 years ago
Rafał Miłecki 0658527e1e switch to the new usbport LED trigger
This makes init.d script handle existing UCI entries using the new
trigger. It also switches all targets to use its package.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Henryk Heisig f5aa459043 ar71xx: Add support to TP-Link EAP120
Signed-off-by: Henryk Heisig <hyniu@o2.pl>
8 years ago
Matthias Schiffer 83f7ec31f8
ar71xx: set EU region code for TP-Link TL-WA901ND v4
There is no US firmware for the TL-WA901ND v4 yet, so we'll just
unconditionally set the EU region for now.

This makes LEDE flashable on these devices again. The format of the region
string is slightly different from the one used on the Archer C7 that is
generated by mktplinkfw (the second half of the region string is missing),
but it's similar enough to make it work.

Tested-by: Jannis Pinter <jannis@pinterjann.is>
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
8 years ago
Christian Lamparter 098f7156cc ar71xx: add support for the Airtight C-60
This patch adds support for the Airtight C-60.

SOC:	Atheros AR9344 rev 2 (CPU:560.000MHz)
RAM:	128 MiB
NOR:	MX25L3205D 4MiB
NAND:	ST Micro NAND 32MiB 3,3V 8-bit
SW-NET:	AR8327N (2 Ports)
WLAN1:	Dual-Band AR9340 Rev:2 (built-in SoC)
WLAN2:	Dual-Band AR9300 Rev:4 PCIe Chip

The switch is setup for an accesspoint:
	LAN1: (gigabit) is the wan-port.
	LAN2: (fast ethernet) is bridged with the br-lan.

Flashing Guide (via initramfs):
  1. Connect a PC to the serial port of the C-60.
     power up the C-60.

     Enter u-boot command prompt:
     #> nand erase
     #> setenv bootcmd "bootm 0x9f060000"
     #> saveenv
     #> setenv ipaddr 192.168.1.1
     #> setenv netmask 255.255.255.0
     #> setenv serverip 192.168.1.100
     #> setenv bootfile lede-ar71xx-nand-c-60-initramfs-kernel.bin
     #> tftpboot
     #> bootm

  2. Wait for the C-60 to boot LEDE.
     On the root prompt. Enter:
     # ubiformat /dev/mtd4
     # ubiattach -p /dev/mtd4

  3. After that copy the sysupgrade.tar onto the router and run:
     # sysupgrade sysupgrade.tar

     to flash the image.

Special thanks to Chris Blake <chrisrblake93@gmail.com>. He provided
a C-60 unit and he helped with debugging the switch, LEDs and platfrom
support.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
8 years ago
Karl Palsson 5d04dcedb4 ar71xx: move dragino2 from legacy to generic
Tested on real hardware with r1804.

Signed-off-by: Karl Palsson <karlp@etactica.com>
8 years ago
Florian Beier 5abeba3450
ar71xx: add userspace support for D-Link DIR-869 A1, generate images
Signed-off-by: Florian Beier <beier.florian@gmail.com>
[Matthias Schiffer: fix factory image, improve commit message]
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
8 years ago
Matthias Schiffer 594f0e80ce
ar71xx: add kernel support for D-Link DIR-869 A1
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
8 years ago
Matthias Schiffer e407f1a4c8
ar71xx: add back SEAMA header checksum fix (as used on ramips)
The D-Link DIR-869 A1 doesn't accept images with the jffs2 marker added
after the checksummed range, so we need to include it in the checksum and
fix it on first boot.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
8 years ago
Matthias Schiffer 212ce6bce1
ar71xx: avoid double lzma compression of kernel for SEAMA images
Use relocation loader instead of lzma loader.

Tested on D-Link DIR-869 A1.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
8 years ago
Matthias Schiffer 0d1fb72241
ar71xx: add relocation loader
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
8 years ago
Matthias Schiffer fce0b5d893
ar71xx: clean up SEAMA image build code
Split seama-factory and seama-sysupgrade into smaller pieces (similar to
the ramips code) to make the image generation more flexible.

Also use standard pad-offset instead of adding a block of zeros at the
beginning of the image that is later cut off again. Standard pad-rootfs can
be used as the seal header doesn't contain an image size or checksum.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
8 years ago
Amir Rachum 4c36bcc567
ar71xx: build image for Archer C7 v2 IL
TP-Link uses a different region coding mechanism for IL firmware for the Archer
C7 v2. Instead of of setting the region, they set a different TPLINK_HWREV.

Signed-off-by: Amir Rachum <amir@rachum.com>
8 years ago
Piotr Dymacz 52974da2bb ar71xx: update kernel config symbols
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
8 years ago
Piotr Dymacz c166b050fd ar71xx: base-files: fix boards order in lib/upgrade/platform.sh
Keep also case sections in alphabetical order.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
8 years ago
Piotr Dymacz 8be47007a9 ar71xx: base-files: cleanups in lib/upgrade/platform.sh
This includes:

- code style fixes
- fix boards order within case sections

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
8 years ago
Piotr Dymacz 92870eac27 ar71xx: comsetic cleanups in files/arch/mips/ath79/{Makefile,machtypes.h}
Keep everything in alphabetical order and aligned in columns.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
8 years ago
Piotr Dymacz 6e58440fc1 ar71xx: base-files: cleanups in etc/board.d/01_leds
This includes:

- use of local 'board' variable in LED names, wherever possible
- merge of boards with exactly the same LED configuration

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
8 years ago
Piotr Dymacz c142df3094 ar71xx: fix LED names for GL Innovations boards
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
8 years ago
Piotr Dymacz 8689078a9b ar71xx: base-files: fix code style in etc/board.d/01_leds
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
8 years ago
Piotr Dymacz d09f4e0631 ar71xx: base-files: combine boards with the same config in etc/diag.sh
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
8 years ago
Piotr Dymacz 2917ae91ec ar71xx: base-files: cleanups in etc/diag.sh
This includes:

- code style fixes
- use of local 'board' variable in LED names, wherever possible

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
8 years ago
Piotr Dymacz edcdb93467 ar71xx: base-files: fix boards order in etc/board.d/02_network
Keep everything in alphabetical order. Boards are ordered in two steps,
first within/inside common configuration (case section), then sections,
globally.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
8 years ago
Piotr Dymacz a75cfac1f6 ar71xx: base-files: cleanups in etc/board.d/02_network
This includes:

- code style fixes
- removal of huge comment (it should be in doc, not here) and some small ones
- removal of redundant config for DR531/WPJ531 as the default is the same
- merge of boards with exactly the same interfaces config

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
8 years ago
Piotr Dymacz 4fa90c49c1 ar71xx: base-files: rework etc/board.d/02_network
Convert etc/board.d/02_network in ar71xx target to the same shape
as we have in ramips target. Split code into two new functions:

- interface/s setup in ar71xx_setup_interfaces()
- MAC/s setup in ar71xx_setup_macs()

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
8 years ago
Álvaro Fernández Rojas 7d559169c5 kernel: update to v4.4.23
Refresh patches for all targets that support kernel 4.4.
compile/run-tested on brcm2708/bcm2710 only.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
8 years ago
Martin Blumenstingl e7be0decf6 ar71xx: Do not use a hardcoded ath10k firmware mac address
ar71xx has an init-script for special devices where the ath10k OTP
calibration data is stored on the PCIe card's EEPROM (and thus can only
be read by ath10k). Unfortunately the OTP data uses the default mac
address (= all devices come with the same mac address, which leads to
problems when you have multiple of these devices in the same network).

To work around this the mac address is patched in the firmware during
the first boot of the device. To prevent flash wear this was only done
if the ath10k firmware matched a hardcoded md5sum.
However, if the md5sum does not match this can mean that either the mac
address was already patched (which is fine) - unfortunately it can also
mean that the firmware version was updated without updating the
hardcoded md5sum.

Change the "was the mac address already patched" check to actually
compare the mac address inside the ath10k firmware.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
8 years ago
Chris Blake 68d649f5cd ar71xx: add support for Cisco Meraki Z1 Cloud Managed Teleworker Gateway
This patch adds support for Cisco's Z1.
Detailed instructions for the flashing the device can
be found in the OpenWrt wiki:
<https://wiki.openwrt.org/toh/meraki/z1>

Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
8 years ago
Matthias Schiffer 9dbf8241c3
ar71xx: clean up DEVICE_PACKAGES of legacy devices
Remove arbitrary or redundant packages from DEVICE_PACKAGES.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
8 years ago
Neal Oakey 524d4110f9
ar71xx: add model detection for many Ubiquiti AirMax XM devices
Signed-off-by: Neal Oakey <neal.oakey@bingo-ev.de>
[Matthias Schiffer: minor adjustments]
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
8 years ago
Jo-Philipp Wich 1c09849f6c treewide: remove bad local shell variable declarations
Local variable declarations outside of functions are illegal since the Busybox
update to v1.25.0, therfore remove them from the appropriate places.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Piotr Dymacz dc9172b65b ar71xx: update kernel config symbols
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
8 years ago
Piotr Dymacz 2ad0ecc101 ar71xx: mark U-Boot and radio calibration data partitions as read-only
General convention is to keep U-Boot and radio calibration
data (ART) mtd partitions marked as read-only.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
8 years ago
Matthias Schiffer 01e2024754
ar71xx: set region code of TP-Link TL-WDR3600/4300 to US
There are currently two stock firmwares for the TL-WDR3600/4300, a US and
a universal version. Both allow installing images with US region code, so
we don't need to provide multiple images.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
8 years ago
Matthias Schiffer b063faa2c8
ar71xx: separate TP-Link TL-WDR3600/4300/4310 profiles
Simplify modifying some of the images without affecting the others.

While we're at it, also unify the profiles to use := syntax and add "v1" to
the TL-WDR4300 name to make things more consistent.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
8 years ago
Álvaro Fernández Rojas d14c28fc80 kernel: update kernel 4.4 to version 4.4.20
Refresh patches for all targets that support kernel 4.4.
Compile-tested on brcm2708 only.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
8 years ago
Mathias Kresin 61c2a7339a image: remove padding parameter from append-kernel/append-rootfs
Using pad-to instead of passing the optional padding to append-kernel
or append-rootfs. It could be that the value of a variable is passed.
In case the variable is empty no error is thrown.

Furthermore the purpose of the extra parameter is hard to get without
reading the code.

Signed-off-by: Mathias Kresin <dev@kresin.me>
8 years ago
Mathias Kresin 1cd0a4c688 image: add KERNEL_SIZE to the default device vars
This reverts commit ec37a56587 and fixes
the underlying issue.
8 years ago
Daniel Gimpelevich 993ad29359 kernel: Backport pending appended DTB handling patches
Backport patches from upstream Linux kernel which are making the
kernel stores the appended dtb not in the same resisters as defined in
the UHI specification, use a separate variable on MIPS.

Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
[some modifications]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
8 years ago
Mathias Kresin ec37a56587 ar71xx: fix typo in image build code
The kernel size isn't passed to the append-kernel build step and the
resulting image bricks the device.

Fixes FS#168.

Signed-off-by: Mathias Kresin <dev@kresin.me>
8 years ago
Mathias Kresin c1578d4fc9 cleanup ucidef_set_interface* usage
- quote the interface name
- remove call of not existing function
- remove the proto if it's the default proto

Signed-off-by: Mathias Kresin <dev@kresin.me>
8 years ago
Mathias Kresin 92eaf27c62 use immediate set in target Makefiles
No functional change, it's just to have the same style everywhere. This
way I don't need to use any regex magic to extract all subtargets for
compile tests.

Signed-off-by: Mathias Kresin <dev@kresin.me>
8 years ago
Felix Fietkau 02a9a74d17 ar71xx: fix ethernet driver fast reset issue causing tx timeouts
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Matthias Schiffer fa0096f6cc
ar71xx: generate US- and EU-specific images for the Archer C7 v2
TP-Link has started providing US- and EU-specific stock firmwares that only
allow upgrading to firmwares with the same region code. Provide factory
images for both these regions.

To avoid confusing users outside these regions, we still provide a
"universal" factory.bin without a region code, although flashing either of
the US and EU images would work as well.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
8 years ago
Felix Fietkau 83997146e7 ar71xx: disable flow control to the built-in switch on AR934x
It apparently causes a regression on some devices if the ethernet cable
is plugged in while booting.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Jonas Gorski 8cf1d64f1c ar71xx: switch to 24kc
GCC treats 24kc and 34kc exactly the same and will generate identical
code, so there is no need to tune to 34kc instead of 24kc.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
8 years ago
Stijn Tintel 8072264b96 kernel: update kernel 4.4 to version 4.4.19
Refresh patches for all targets that support kernel 4.4.
Compile-tested on all targets that use kernel 4.4 and aren't marked broken.
Runtime-tested on ar71xx, octeon and x86/64.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
8 years ago
Piotr Dymacz f478fba663 ar71xx: add support for Zbtlink ZBT-WE1526
Zbtlink ZBT-WE1526 is based on Qualcomm Atheros QCA9531 v2.
Short specification:

- 650/400/200 MHz (CPU/DDR/AHB)
- 5x 10/100 Mbps Ethernet
- 1x USB 2.0
- 128 MB of RAM (DDR2)
- 16 MB of FLASH
- 2T2R 2.4 GHz, up to 22 dBm
- two external, non-detachable antennas
- 8x LED, 1x button
- UART header (pinout: VCC, RX, TX, GND)

Flash instruction:

Use sysupgrade in vendor firmare which is based on OpenWrt.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
8 years ago
Chuanhong Guo d1b20a3659 ar71xx: fix profile name of Mercury MW4530R
The mw4530r-v1 profile in tp-link.mk is for Mercury MW4530R.
There is no such a device called TL-WDR4530.
Also change MERCURY to Mercury in /lib/ar71xx.sh

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
8 years ago
Felix Fietkau 6175115541 ar71xx: add missing LZO support select for routerboard devices
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau fb35ac857f ar71xx: remove useless minimal/ath5k profiles
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
diizzyy 1bcad76395 ar71xx: Make wget2nand look for LEDE project firmware files
Make wget2nand aware of the new file names

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
8 years ago
Felix Fietkau 63b525dd6b image: add a helper variable for getting kernel/rootfs from within image Build/* templates
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Jo-Philipp Wich db49dd894e build: rename sysupgrade-nand to sysupgrade-tar
Now that the "sysupgrade-nand" step is used by non-NAND targets as well,
rename it to "sysupgrade-tar" to make it more generic.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Matthias Schiffer adbbfb7ff9
ar71xx: don't use D-Link DIR-505 status LED as ethernet indicator
The stock firmware uses the single LED as status indicator only. Using the
same LED both for status and as ethernet indicator is uncommon, and has
been confusing users who were using the device as a WLAN mesh node (so the
LED was just off, as no ethernet was connected).

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
8 years ago
Matthias Schiffer 500a67a167
ar71xx: add revision detection for D-Link DIR-505 A1/A2
The A1 image also works on the A2, correctly set AR71XX_MODEL in this case.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
8 years ago
John Crispin 96fa9aa13b ar71xx: add a missing ;; to ar71xx.sh
commit 42305ae24a ("ar71xx: add support for gl-mifi")

was missing a ;; breaking boot up

Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
Zhao Gang 42305ae24a ar71xx: add support for gl-mifi
This add initial support for gl-mifi.
Product page: http://www.gl-inet.com/mifi/

Signed-off-by: Zhao Gang <gang.zhao.42@gmail.com>
8 years ago
Matthias Schiffer 9687341808
ar71xx: clean up legacy-devices.mk
Several legacy images were not buildable because of missing profile
definitions in legacy-devices.mk since MultiProfile was removed. Update
legacy-devices.mk to provide all necessary profiles, and change ordering
to match legacy.mk.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
8 years ago
Felix Fietkau f1e085adfe ar71xx: add ath10k firmware to profile defaults where ath10k is used
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau c6c81351b7 ar71xx: add missing profile for the nand subtarget (FS#56)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 16209710d9 ar71xx: fix WNDR4300v1 / WNDR3700v4 build (FS#56)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau ad323881df ar71xx: fix more image build code whitespace/tab issues
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 3d8c8d5e05 ar71xx: fix tab vs whitespace issue in image building code
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 4d0f4f5e52 ar71xx: remove obsolete MultiProfile template code
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Jo-Philipp Wich e633a1b48f ar71xx: fix default network config of WZR-HP-G300NH and CR3000
The network defaults for the WZR-HP-G300NH and CR3000 models wrongly set the
lan interface to a vlan tagged device while the switch was set up in untagged
mode, leading to broken lan side ethernet connectivity by default.

Fix the issue by emitting untagged interfaces, consistent with the switch
setting on the device.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Zhao Gang d963ddf042 ar71xx: add support for gl-ar300m
This add initial support for gl-ar300m router.
Product page: http://www.gl-inet.com/ar300m/

Signed-off-by: Zhao Gang <gang.zhao.42@gmail.com>
8 years ago
Stephen Walker 900da27c91 ar71xx: add software transmit timestamp support
Add software transmit timestamp and ethtool (-T) timestamp support

Signed-off-by: Stephen Walker <stephendwalker+github@gmail.com>
8 years ago
Felix Fietkau a176168a85 ar71xx: define wmac reset function for QCA955x
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Piotr Dymacz d2c9b169b3 ar71xx: add support for jjPlus JWAP230
jjPlus JWAP230 is based on Qualcomm Atheros QCA9558 + QCA8337.
Short specification:

- 720/600/200 MHz (CPU/DDR/AHB)
- 2x 10/100/1000 Mbps Ethernet
- 128 MB of RAM (DDR2)
- 16 MB of FLASH
- 3T3R 2.4 GHz with external PA (SST12LP15A), up to 28 dBm
- 3x MMCX connectors
- power input: 802.3at PoE or wide range DC (36-57 V)
- optional 802.3af PSE
- 1x mini-PCIe connector with PCIe, USB buses and SIM slot
- 1x mini-PCIe connector with PCIe bus
- 1x USB type-A connector
- 6x LED, 1x button (hardware reset)
- RS232 (MAX3223) and (E)JTAG headers

Default configuration:

- WAN on eth1 (RJ45 near LEDs with PoE input)
- LAN on eth0 (RJ45 near DC jack)
- left top LED set to be status LED
- all LEDs configurable form user space

Flash instruction (do it under U-Boot, using RS232):

1. tftp 0x80060000 lede-ar71xx-generic-jwap230-squashfs-sysupgrade.bin
2. erase 0x9f050000 +$filesize
3. cp.b $fileaddr 0x9f050000 $filesize
4. setenv bootcmd "bootm 0x9f050000"
5. saveenv && reset

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
8 years ago
Piotr Dymacz e767980eb8 ar71xx: add support for Wallys DR531
Wallys DR531 is based on Qualcomm Atheros QCA9531 v2.
Short specification:

- 550/400/200 MHz (CPU/DDR/AHB)
- 2x 10/100 Mbps Ethernet
- 64 MB of RAM (DDR2)
- 8 MB of FLASH
- 2T2R 2.4 GHz with external PA (SE2576L), up to 30 dBm
- 2x MMCX connectors
- mini-PCIe connector with PCIe/USB buses and SIM slot
- 7x LED, 1x button, 1x optional buzzer
- UART, (E)JTAG and LED headers

Default configuration:

- WAN on eth1 (RJ45 near DC jack)
- LAN on eth0 (RJ45 near button)
- S4 LED set to be status LED
- all LEDs configurable form user space
- button configured for reset

Flash instruction (do it under U-Boot, using UART):

1. tftp 0x80060000 lede-ar71xx-generic-dr531-squashfs-sysupgrade.bin
2. erase 0x9f050000 +$filesize
3. cp.b $fileaddr 0x9f050000 $filesize
4. setenv bootcmd "bootm 0x9f050000"
5. saveenv && reset

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
8 years ago
Felix Fietkau 70cf8c3048 ar71xx: fix build error when initramfs is disabled
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau d6b3b44d97 ar71xx: fix a legacy image porting issue
Get rid of remaining IMAGE_PROFILE references and move template calls
the right place

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Daniel Dickinson a775c5db46 ar71xx: Fix PowerCloud CAP324 No Cloud title
CAP324 nocloud was missing (No-Cloud) in description

Signed-off-by: Daniel Dickinson <lede@daniel.thecshore.com>
8 years ago
Yousong Zhou 09907170dd ar71xx: base-files: remove the now unneeded 09_fix-seama-header
It was intended as a workaround when jffs2 eof mark was included in the
checksum calculation in seama header.  When qihoo-c301 support was
introduced the board name was not inserted into the case list (because I
was not aware of it's existence), but the issue was fixed by excluding
the jffs2 marker as part of the checksum data

Now we are at it, drop it.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
8 years ago
Yousong Zhou 8d0ec3e672 ar71xx: image: fix typo in MTDPARTS def for qihoo-c301
Reported-by: Syrone Wong <wong.syrone@gmail.com>
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
8 years ago
Yousong Zhou 6d6db4ff7b ar71xx: image: seama: fix making factory and sysupgrade image
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
8 years ago
Sergey Sergeev 17ee6bb8f3 tools: add kernel2minor utility for Mikrotik devices
This patch adds support of Mikrotik yaffs2 filesystem image for kernel file
and tools/kernel2minor package.
We neede this to boot kernel through RouterBoot on new Mikrotik NOR flash devices.

Signed-off-by: Sergey Sergeev <adron@yapic.net>
8 years ago
John Crispin 8fe69e4d42 ar71xx: fix nand device profile
Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
Sergey Sergeev c312cef223 ar71xx: spi-rb4xx fix.
In new kernels we should use clk_prepare_enable instead of clk_enable
since clk_enable does not make proper initialization that leads
to rise WARN_ON messages and not working spi bus on the device.

Signed-off-by: Sergey Sergeev <adron@yapic.net>
8 years ago
Felix Fietkau f9e7ffe73b ar71xx: prevent spurious ethernet resets from dma hang check false positives
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Yousong Zhou 559a7d1177 ar71xx: seama: fix making factory images
rootfs part needs to be aligned to erase block size which is passed as
the 6th argument to Image/Build/Seama  and is now 65536 since commit
commit 5119ee9 "ar71xx: fix bogus hardcoded kernel image size for Seama
images (fixes #20585)", but $(($(6) - 64)) still assumes that the
argument is a limit on kernel partition size, i.e. 1310720, so the
generated factory image is wrong in that the kernel will fail to find
the rootfs (FlySpray link at [1])

This patch will workaround it with the following steps

1. Calculate the required space for seama header and META data in step 5
2. Pre-padding 64 bytes to lzma-compressed loader
3. Generate correctly padded image-$(2).tmp
4. Strip out the padding
5. Seal it with seama utility

While at it convert seama to new build method

[1] FS#35 - mynet-n750 factory images don't find root partition,
    https://bugs.lede-project.org/index.php?do=details&task_id=35

Reported-by: Steven Haigh <netwiz@crc.id.au>
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
8 years ago
Yousong Zhou ea284d704b ar71xx: image: unify indentation with 2 whitespaces
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
8 years ago
Yousong Zhou e3cf2cc1c6 ar71xx: image: remove duplicate IMAGES definition
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
8 years ago
Yousong Zhou 11cbe29833 ar71xx: hiwifi-hc6361: move packages selection to generic.mk
Remove kmod-crypto-deflate and kmod-ledtrig-gpio as the device works the
same by default without them

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
8 years ago
Jo-Philipp Wich 6ee66ae075 ar71xx: further legacy image build fixes
- Add missing macro to trigger the generation of 64k padded squashfs images
- Revert Zcomax image generation to use the prepared 64k squashfs image

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Felix Fietkau be08fdd007 ar71xx: disable pdata->use_flow_control for QCA9558
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 75b2105cd3 ar71xx: rename ethernet pdata->builtin_switch to use_flow_control
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Jo-Philipp Wich 8d1218ca73 ar71xx: merge profiles into image building code
- Remove old style device profiles and convert them to device definitions
  within the image building code

- Fix the legacy build macros for the changed eval depth in the legacy
  image build wrapper

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Hauke Mehrtens 84d489f64f kernel: update to version 4.4.14
Changelog: https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.14

Some manual changes to target/linux/generic/patches-4.4/610-
netfilter_match_bypass_default_checks.patch were needed.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
8 years ago
Felix Fietkau 3bf3512673 Revert "ar71xx: prevent spurious ethernet resets from dma hang check false positives"
This reverts commit 3d58d7f053.
8 years ago
Felix Fietkau 3d58d7f053 ar71xx: prevent spurious ethernet resets from dma hang check false positives
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 26b8db2537 ar71xx: enable flow control for ethernet MACs with built-in switch
Should fix LAN speed issues on some devices. This is an updated version
of the previously reverted commit with the same name.
It improves the check for MACs connected to a built-in switch

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
John Crispin 3874773503 Revert "ar71xx: fix legacy image building"
This reverts commit 59e98b27c9.

and

Revert "ar71xx: merge profiles into image building code"

This reverts commit 636089ead6.

these are still causing issues

Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
Jo-Philipp Wich 59e98b27c9 ar71xx: fix legacy image building
After the conversion from legacy device profiles to the newer profile
information embedded in the image building code, the legacy recipes got
triggered twice with different eval depths, leading to shell syntax errors
when processing certain images.

The double processing was caused by the remaining Image/Build macro in
legacy.mk which serves as main entry point for the new style image build code
in conjunction with the newly introduced LegacyDevice/* macros which caused
the legacy image build fallback code to kick in.

In order to fix the issue, rework all legacy macros to work under the legacy
image build wrapper and remove the Image/Build macro of legacy.mk to prevent
legacy profiles getting executed in the context of the new build code.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
John Crispin 636089ead6 ar71xx: merge profiles into image building code
Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
Yousong Zhou b67066b8fa ar71xx: hiwifi-hc6361: lift size limit on kernel and rootfs parts
The patch has been run-tested and the relevant dmsg logs are as the
following

    [    0.762447] Creating 5 MTD partitions on "spi0.0":
    [    0.767217] 0x000000000000-0x000000010000 : "u-boot"
    [    0.775139] 0x000000010000-0x000000020000 : "bdinfo"
    [    0.781014] 0x000000020000-0x000000fe0000 : "firmware"
    [    0.810558] 2 uimage-fw partitions found on MTD device firmware
    [    0.815043] 0x000000020000-0x000000170000 : "kernel"
    [    0.821925] 0x000000170000-0x000000fe0000 : "rootfs"
    [    0.827587] mtd: device 4 (rootfs) set to be root filesystem
    [    0.831937] 1 squashfs-split partitions found on MTD device rootfs
    [    0.837983] 0x0000005c0000-0x000000fe0000 : "rootfs_data"
    [    0.845621] 0x000000fe0000-0x000000ff0000 : "backup"
    [    0.851445] 0x000000ff0000-0x000001000000 : "art"

While at it, convert to new build method

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
8 years ago
David Pinilla Caparrós bbbe9932e3 ar71xx: WDR4300: Fixed default VLAN order
Reordered the VLANs so the LAN ports are set to VLAN 1 and the WAN port is set to VLAN 2, as in the other routers in the config file. Moreover, this model had this VLAN mapping in OpenWRT Chaos Calmer. It seems that the VLAN were switched when fixing a bug in the port mapping ( OpenWRT changeset 47799 )

Signed-off-by: David Pinilla Caparrós <dpinitux@gmail.com>
8 years ago
Alexander Couzens c2e0c41842 Revert "ar71xx/cpe510: use second wifi calibration table"
Using the high power table can damage the device in some cases.

This reverts commit bf27ac019c.

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
8 years ago
Felix Fietkau 7c02ecdd35 Revert "ar71xx: enable flow control for ethernet MACs with built-in switch"
This reverts commit 1beb5bec64.

It was found to cause the WAN port to fail on some AR934x devices

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Arne Zachlod f869ffdd62 ar71xx: mach-ubnt-xm.c convert patches to mach file
Signed-off-by: Arne Zachlod <arne@nerdkeller.org>
8 years ago
Felix Fietkau 1beb5bec64 ar71xx: enable flow control for ethernet MACs with built-in switch
Should fix LAN speed issues on some devices

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Álvaro Fernández Rojas 0aa6c7df60 kernel: update kernel 4.4 to version 4.4.13
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
8 years ago
Allan Nick Pedrana e61fe4e4d7 ar71xx: add support for OpenEmbed SOM9331
This patch adds the target profile SOM9331 and configures hardware
functionality for the 3x Eth Ports & corresponding LED's, the USB Host,
the USART to USB bridge and the System LED.

Signed-off-by: Allan Nick Pedrana <nik9993@gmail.com>
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
Felix Fietkau 4c5a49031e ar71xx: convert OM2P to device profile
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau ec86d2a605 ar71xx: enable profile sorting in preparation for adding device profiles
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
KeLei Liang 563e9d5e1b ar71xx: add WRTnode2Q support
Signed-off-by: KeLei Liang <xzmu@wrtnode.com>
8 years ago
Alexander Couzens 2a9f03adea ar71xx/image/edimax shorten the revision to 13 character
edimax fails if the revision is longer than 13 characters.
Also change the name from OpenWrt to LEDE

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
8 years ago
Stijn Segers d2a91f9853
ar71xx: Fix TL-WR841N v11 LEDs, use separate machine
Signed-off-by: Stijn Segers <francesco.borromini@inventati.org>
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
Alexander Couzens b7864453f6 ar71xx: switch ordering and template to improve readability
The CPE210's ancestor is the CPE510 not the other way around. The device
profile is also named after the CPE510.

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
8 years ago
Ash Benz 7eb1a7e956 include/image.mk: move build step tplink-safeloader to image.mk
Move tplink-safeloader from target/linux/ar71xx/image/tp-link.mk to include/image.mk

Signed-off-by: Ash Benz <ash.benz@bk.ru>
8 years ago
Cezary Jackiewicz 71e0ef3978 ar71xx: add GPIO pin for usb power switch for RouterBOARD 912
RB912 has one usb shared between external USB and miniPCIe slot. GPIO52 can
reroute power to external USB (=1) or internal miniPCIe slot (=0)

Signed-off-by: Cezary Jackiewicz <cezary@eko.one.pl>
8 years ago
Alexander Couzens bf27ac019c ar71xx/cpe510: use second wifi calibration table
The cpe510 has two calibration tables. The first calibration
table requires to modify ath9k driver to work (patched tx gain table).

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
8 years ago
Alexander Couzens c5ff273d85 ar71xx/cpe510: split profile into 2 profiles cpe210 and cpe510
Split profile into 2GHz and 5GHz. The 5GHz devices are
quite "special". The 2 GHz works perfect.

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
8 years ago
Sven Eckelmann f21de7d9a8 ar71xx: add MR1750v2 to the MR1750 profile
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
8 years ago
Sven Eckelmann c4e3706533 ar71xx: extract ath10k wifi board.bin for the OpenMesh MR1750v2 board
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
8 years ago
Sven Eckelmann 77cb985022 ar71xx: enable sysupgrade for the OpenMesh MR1750v2
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
8 years ago
Sven Eckelmann 58dc285cd6 ar71xx: add user-space support for the OpenMesh MR1750v2
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
8 years ago
Sven Eckelmann f7719dca71 ar71xx: add kernel support for the OpenMesh MR1750v2
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
8 years ago
Sven Eckelmann 634f681da4 ar71xx: add OM2P-HSv3 to the OM2P profile
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
8 years ago
Sven Eckelmann 222dfb3d6a ar71xx: enable sysupgrade for the OpenMesh OM2P-HSv3
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
8 years ago
Sven Eckelmann e10d12411c ar71xx: add user-space support for the OpenMesh OM2P-HSv3
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
8 years ago
Sven Eckelmann 8010e8a370 ar71xx: add kernel support for the OpenMesh OM2P-HSv3
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
8 years ago
Sven Eckelmann 823cea2d5d ar71xx: Allow OpenMesh CE images with more than 3 files
The CE image format used by OpenMesh can contain extra blocks which
are not used for flashing. Only the first three embedded images
(fwupgrade.cfg, kernel, rootfs) are required in this order to successfully
flash an image via sysupgrade. All extra embedded images should be ignored
for the available devices.

Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
8 years ago
Sven Eckelmann d1b4a8cfcf ar71xx: Move OpenMesh image target validation into subfunction
The platform_check_image_openmesh function used break statements to signal
that the board name matched the image target. This worked because the
sysupgrade binary checked the image inside a loop. The break statement
stopped the loop and skipped any additional check.

Instead the check should be done without such sideeffects by simply
combining the board names and image targets. Only a mismatch should cause a
negative result for the caller and skipping of the additional checks.

Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
8 years ago
Sven Eckelmann 6150c15ad1 ar71xx: Generate sysupgrade images for OpenMesh devices
Some OpenWrt based firmwares like Gluon expect that a sysupgrade image
exists when a device firmware can be updated via sysupgrade. This image
wasn't created until now because OpenMesh devices use the same image for
factory and sysupgrade flash. Copying the image from *factory.bin to
*sysupgrade.bin is therefore enough to make the sysupgrade functionality
visible.

Reported-by: Matthias Schiffer <mschiffer@universe-factory.net>
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
8 years ago
Sven Eckelmann 9b6b75d09d ar71xx: Add support for initramfs images for OpenMesh devices
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
8 years ago
Felix Fietkau f85e5e6778 ar71xx: move nand device image definitions to a separate file
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau dcc2ea3cf5 ar71xx: move generic device image definitions to a separate file
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 054df4fda4 ar71xx: split ubnt image building code into a separate file
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 736fc38d33 ar71xx: split legacy image building code into a separate file
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 64b8bb3b69 ar71xx: split tp-link image building code into a separate file
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 72568ea3bd ar71xx: remove linux 4.1 support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Alexander Couzens 94e23bf740 ar71xx/cpe510: enable LNA for CPE210/220/510/520
The LNA improves the rx path. Within a simple test setup
it improved the signal from -60dbm to -40dbm.

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
8 years ago
Álvaro Fernández Rojas c4664b0f91 kernel: update kernel 4.4 to version 4.4.11
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
8 years ago
Felix Fietkau 9d37095fd0 ar71xx: fix a remaining unaligned access issue
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 98204836a4 ar71xx: fix register address calculation for DDR flushing
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 40f08abecf ar71xx: fix typo in pci memory window initialization fix
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Cezary Jackiewicz 5521651863 ar71xx: typo in jjplus profile
Signed-off-by: Cezary Jackiewicz <cezary@eko.one.pl>
8 years ago
Felix Fietkau 7a67b0e362 ar71xx: update to linux 4.4
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 9c556fe73e ar71xx: register the gpio driver earlier
This allows gpio requests from mach files to succeed.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 313474e693 ar71xx: fix a PCI initialization issue in Linux 4.4
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 5b34dffcbd ar71xx: fix DDR write buffer flushing issues with 4.4
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Cezary Jackiewicz 0b45bec22c
ar71xx: add support for TP-LINK TL-WR842N/ND v3
- CPU QCA9531-BL3A
- RAM: 64MB
- flash: 16MB
- USB

AP143 platform, similar to tl-wr841n v10/v11, but with USB

Signed-off-by: Cezary Jackiewicz <cezary@eko.one.pl>
8 years ago
John Crispin cc831e23e1 ar71xx: add proper support for Archer-C7 V2
This has minor differences to the V1

Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
John Crispin f816472f78 ar71xx: Fix TP-LINK Archer-C5/C7 v2 rfkill
Fix ARCHER_C7_GPIO_BTN_RFKILL, which is attached to GPIO23

Signed-off-by: Lars Buerding <lb.wrt@metatux.net>
8 years ago
P.Wassi 8307c2fe68 ar71xx: Add support for Ubiquiti UniFi AP AC PRO
Add support for the Ubiquiti UniFi AP AC PRO
Signed-off-by: P.Wassi <p.wassi at gmx.at>
8 years ago
P.Wassi c855e70491 ar71xx: Rename unifiac to unifiac-lite
To avoid confusion with different unifiac devices, rename existing target
"unifiac" to "unifiac-lite", before "unifiac-pro" is introduced.

Signed-off-by: P.Wassi <p.wassi at gmx.at>
8 years ago
blogic 75629fb2a8 ar71xx: add TP-Link TL-WR810N support
This patch adds support for the TP-Link TL-WR810N.
https://wiki.openwrt.org/toh/tp-link/tl-wr810n

Signed-off-by: Jens Steinhauser <jens.steinhauser@gmail.com>

SVN-Revision: 49286
8 years ago
blogic ba3ed629ea ar71xx: Fix eth0 support for Ubiquiti UniFi AP AC
Fix eth0 support for the Ubiquiti UniFi AP AC
Signed-off-by: Paul Wassi <p.wassi at gmx.at>

SVN-Revision: 49277
8 years ago
Álvaro Fernández Rojas 3faf65e928 kernel: update kernel 4.4 to version 4.4.8
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
8 years ago
John Crispin dc92917409 image / basefiles: make console password configurable
Signed-off-by: Daniel Dickinson <openwrt@daniel.thecshore.com>
Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
John Crispin ee53a240ac ar71xx: Add support for the OMYlink OMY-G1
https://wiki.openwrt.org/toh/omylink/omy-g1

http://www.omylink.com/

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

SVN-Revision: 49258
8 years ago
John Crispin 840bfa8549 ar71xx: Add TP-Link TL-WR740N v6 support to trunk
This patch adds support for the TP-Link TL-WR740N v6 into OpenWrt trunk. Hardware wise, it's very similar to the TL-WR841N v10. See the forum thread [1]. Credit goes to the user 'traveler' who did the legwork and tested builds.

Also thanks to Matthias Schiffer for clarifying the DEVICE_PROFILE settings.

Signed-off by: Stijn Segers <francesco.borromini@inventati.org>

[1]: https://forum.openwrt.org/viewtopic.php?pid=318704

SVN-Revision: 49245
8 years ago
John Crispin 69a368cf7e ar71xx: simplify patch 613 and add missing error handling
Dynamic allocation of label can be simplified.
Also add error handling to deal with failed memory allocation.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

SVN-Revision: 49244
8 years ago
John Crispin 5099a0d386 ar71xx: build TP-LINK Archer C7 images with US region code
Since December 2015, the Archer C7 comes with an US-specific firmware. This
firmware will only allow upgrades with images that contain the US region
code in the firmware header.

The "universal" firmware distributed in the rest of the world doesn't care
about the region code, so we can just unconditionally set the region to US
for now. When other region-specific firmwares appear, we'll need to create
a factory image for each of them.

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

SVN-Revision: 49217
8 years ago
John Crispin b225de37bc ar71xx: fix giving extra arguments to Build/mktplinkfw
The build command will always get the whole argument string in $(1),
regardless of whitespace. We need to use word/wordlist to split the string
after the first word.

Whitespace and quotation will be given to the command verbatim (make will
ignore it), so to give multiple arguments, no quotation marks may be used.

Fixes: r47174 ("ar71xx/image: add options argument to mktplinkfw step")
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>

SVN-Revision: 49216
8 years ago
Hauke Mehrtens e958d49fd1 ar71xx: add config ATH79_MACH_TL_WA901ND_V4 for kernel 4.4
This config option was not added in commit r49158.

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

SVN-Revision: 49195
8 years ago
Hauke Mehrtens 9759aba429 ar71xx: fix build error
This fixes a build error introduced in r49193.

This closes #22230

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

SVN-Revision: 49194
8 years ago
Hauke Mehrtens 00675abc3b ar71xx: fix build with kernel 4.4
The file linux/mdio-gpio.h was moved to linux/platform_data/mdio-gpio.h
in kernel 4.4

Reported-by: Arjen de Korte <arjen+openwrt@de-korte.org>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 49193
8 years ago
Hauke Mehrtens f0b3964f1b kernel: update kernel 4.4 to version 4.4.7
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 49176
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 d9799dea89 ar71xx: add support for Compex WPJ342
OpenWrt can be flashed with following uboot commands:

tftpboot 0x80500000 openwrt-ar71xx-generic-wpj342-16M-squashfs-sysupgrade.bin
erase 0x9f030000 +$filesize
cp.b $fileaddr 0x9f030000 $filesize

Signed-off-by: Christian Mehlis <christian@m3hlis.de>

SVN-Revision: 49157
8 years ago
John Crispin 2cba297ea0 ar71xx: fix nondeterministic hangs during bootconsole/console handover
Reconfiguring the UART when the FIFO is not empty may cause the boot to
hang. This hang is extremely suspectible to timing differences; recompiling
the kernel with the same configuration, but different UTS_VERSION
timestamps can yield images that hang more or less often. Sometimes images
are produced that hang reproducibly.

This patch should also make it into one of the next linux-stable releases,
but it's better to get this fixed as soon as possible.

Fixes #21773, #21857.

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

SVN-Revision: 49156
8 years ago
John Crispin 240ed52317 ar71xx: add OM5P-ACv2 to the OM5P-AC profile
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>

SVN-Revision: 49155
8 years ago
John Crispin 063a6499db ar71xx: extract ath10k wifi board.bin for the OpenMesh OM5P-ACv2 board
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>

SVN-Revision: 49154
8 years ago
John Crispin 3dabaef6a1 ar71xx: enable sysupgrade for the OpenMesh OM5P-ACv2
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>

SVN-Revision: 49151
8 years ago
John Crispin 7461604bd9 ar71xx: add user-space support for the OpenMesh OM5P-ACv2
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>

SVN-Revision: 49150
8 years ago
John Crispin 886cb9a744 ar71xx: add kernel support for the OpenMesh OM5P-ACv2 board
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>

SVN-Revision: 49149
8 years ago
John Crispin 0211fa1253 ar71xx: create profile and build image for the OpenMesh OM5P-AC board
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>

SVN-Revision: 49148
8 years ago
John Crispin 0c0dc3b2bf ar71xx: extract ath10k wifi board.bin for the OpenMesh OM5P-AC board
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>

SVN-Revision: 49147
8 years ago
John Crispin 0ae22974eb ar71xx: enable sysupgrade for the OpenMesh OM5P-AC
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>

SVN-Revision: 49144
8 years ago
John Crispin 2fa2d97ae2 ar71xx: add user-space support for the OpenMesh OM5P-AC
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>

SVN-Revision: 49142
8 years ago
John Crispin 69965212bd ar71xx: add kernel support for the OpenMesh OM5P-AC board
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>

SVN-Revision: 49141
8 years ago
John Crispin 8e2a35afc6 ar71xx: WPN824N: enable buttons
Enable buttons connected to the GPIOs of the AR9285.

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>

SVN-Revision: 49109
8 years ago
John Crispin 38a48a9b42 ar71xx: WPN824N: set WLAN LED name
Make use of ap9x_pci_setup_wmac_led_name() to set the name of the WLAN
LED.

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>

SVN-Revision: 49108
8 years ago
John Crispin 3c91d5a479 ar71xx: fix the revision of a few TP-LINK devices in AR71XX_MODEL to match labels/image names
Let's not confuse users about the revisions of their devices when we can
easily avoid it.

Not tested on real hardware.

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

SVN-Revision: 49107
8 years ago
John Crispin 85c540b94e ar71xx: avoid AR71XX_MODEL ending with a space on some TP-LINK-like devices
Instead of adding the space when combining $model and $hwver, add the space
to the beginning of $hwver, so the resulting string won't end with a space
when $hwver is set to the empty string.

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

SVN-Revision: 49106
8 years ago
John Crispin dfed41d3d8 ar71xx: check both HWID and HWREV on upgrades of TP-LINK devices
There's no reason for us to be more lenient than the stock firmware, so
better check the HWREV as well to avoid bricked devices.

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

SVN-Revision: 49105
8 years ago
John Crispin ba2d1ccffa ar71xx: WNR2200: enable control of all LEDs and buttons
This patch provides full GPIO support for WNR2200 (LEDs and buttons).
It exposes all LEDs to operating system, including Ethernet ones.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>

SVN-Revision: 49101
8 years ago
John Crispin 3da1ef38c1 ar71xx: WNR2200: fix for random WLAN MAC
Fix for invalid/random/duplicate WLAN MAC address in WNR2200.
Permanent platform MAC is calculated and assigned during system startup.
WLAN MAC follows wired Ethernet interface addresses.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>

SVN-Revision: 49100
8 years ago
John Crispin c8dd53e591 ar71xx: Add TL-WR841N/ND v11 support
This patch adds support for the TP-Link TL-WR841N/ND to trunk. It is
similar to the already supported v10 - see [1]. I have added support
based on that topic; in the meantime it has been confirmed working
(see the forum thread, and also [2]).

Signed-off by Stijn Segers <francesco.borromini@inventati.org>

[1]: https://forum.openwrt.org/viewtopic.php?id=61309
[2]: https://forum.openwrt.org/viewtopic.php?id=63657

SVN-Revision: 49099
8 years ago
Luka Perkov 8258f8edb6 ar71xx: cosmetic fix of alfa ap120c/ap96 ordering
Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 49086
8 years ago
Luka Perkov ebaba15331 ar71xx: add support for ap120c
Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 49082
8 years ago
John Crispin 98a01048b8 ar71xx: migrate tplink cpe510 to new build steps
cpe510: Tested sysupgrade and initramfs.
Untested: webIf w/ factory.bin & recovery.bin

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>

SVN-Revision: 49081
8 years ago
John Crispin e0a3a84521 ar71xx/image: allow builds of loader without cmdline injecting
On most platforms the cmdline is supplied by the loader to the kernel.
When using an elf loader with cmdline the size is bloated by 512k.
For loader-elf platforms like the cpe510 better use loader-elf but patch
the cmdline into the kernel.

wdr1043: Tested loader still works using sysupgade image.

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>

SVN-Revision: 49080
8 years ago
John Crispin 5bac8f0fd4 ar71xx/image: introduce LOADER_TYPE to support elf loaders
The loader decompress a lzma compressed kernel. Some bootloaders
only support elf files like the tplink cpe510

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>

SVN-Revision: 49079
8 years ago
John Crispin 5b2d89f060 ar71xx: WNR1000v2: enable control of all LEDs and buttons
This patch provides full GPIO support for WNR1000v2 (LEDs and buttons).
It exposes all LEDs to operating system, including Ethernet ones.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>

SVN-Revision: 49076
8 years ago
John Crispin 9213fefb4d ar71xx: Add QCA955X GPIO mux and function definitions
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>

SVN-Revision: 49075
8 years ago
John Crispin 0afb47718e ar71xx: Add support for ath79_gpio_function_* on QCA955X
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>

SVN-Revision: 49074
8 years ago
John Crispin 58143e9b65 Revert "ar71xx: Clear bits in ath79_setup_qca955x_eth_cfg"
Not all mach-* files set all boards correctly in ETH_CFG. They depend on
some preset values by u-boot which were not previously modified by
ath79_setup_qca955x_eth_cfg. Avoiding to modify them in this function keeps
it backward compatible for these boards.

This reverts commit 119b8ab2c2eac237ec4e9c4d0ed53df22b5c6978.

Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>

SVN-Revision: 49072
8 years ago
John Crispin b269a3520d Revert "ar71xx: Allow to set the RXDV, RXD, TXD, TXE delays for QCA955x"
The default delays RXD 3. RDV 3, TXD 0, TXE 0 doesn't seem to work for some
boards. These boards depend on the preset values of u-boot which may
differ.

This reverts commit f2d4bb96b62512caa161dcc2867c91692fb16a38.

Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>

SVN-Revision: 49071
8 years ago
John Crispin 26d18d4e07 ar71xx: Use private version of ath79_setup_qca955x_eth_cfg for MR1750
The MR1750 must unset some bits in ETH_CFG which were set by u-boot to work
correctly under OpenWrt. But the global function
ath79_setup_qca955x_eth_cfg will not unset all of them to increase the
backward compatiblity with older mach-* files. A private (simplified)
version for MR1750 can be used instead.

Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>

SVN-Revision: 49070
8 years ago
John Crispin bdf76faa3e ar71xx: Use private version of ath79_setup_qca955x_eth_cfg for MR900
The MR900 must unset some bits in ETH_CFG which were set by u-boot to work
correctly under OpenWrt. But the global function
ath79_setup_qca955x_eth_cfg will not unset all of them to increase the
backward compatiblity with older mach-* files. A private (simplified)
version for MR900 can be used instead.

Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>

SVN-Revision: 49069
8 years ago
John Crispin 1cdd3403ba ar71xx: WNR1000v2: fix for random WLAN MAC
Fix for invalid/random WLAN MAC address in WNR1000v2. Permanent platform
MAC is calculated and assigned during system startup. WLAN MAC follows
wired Ethernet interface addresses. This is the same fix as for WNR2000v3
and WNR612v2.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>

SVN-Revision: 49051
8 years ago