Commit Graph

217 Commits (fbd4214bb0727268aa535af5b600d38939ec8dbc)

Author SHA1 Message Date
Adrian Schmutzler 6da5356195 lantiq: disable default build for devices with 4M flash
It has been decided that the 19.07 release will be last one to include
4/32 devices.

This disables default build for all devices with 4M flash on lantiq.
Note that this will affect _all_ devices for amazonse ("ase") and
xway_legacy subtarget.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Alexander Couzens bf5d800578
lantiq: fritz 7360 v2: remove additional supported devices
The additional supported device isn't required since this is a new
device. Some board contains an addtional device,
those device were supported in earlier versions which used the
"old" image builder code.
To support an sysupgrade from such old version, there is the all caps
additional device.

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Alexander Couzens 0962baae4e lantiq: fritz 7360 v2: rename device before it will be used
Use similiar naming scheme as ath79.
Since the fritz 7360 v2 was only in the tree for 2 days, there
is no compatibility for the old image.
Users which has installed the fritz 7360 v2 before this change, must
use sysupgrade --force to skip checks on the board.

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Yushi Nishida 78bebe680f
lantiq/xrx200: add support for the Fritzbox 7360v2
This commit adds support for the Fritzbox 7360v2

CPU: VR9 500MHz Cores: 2
RAM: 128 MB
NOR-Flash: 32 MB
WLAN: AR9287-BL1A

DECT is not working.

Thanks Sebastian Ortwein for adding 7360SL.
The dts file is derived from avm_fritz7360sl.dts.

Firmware can be flashed with this method:

1.) Set your client IP to 192.168.178.2
2.) Power on your your Fritzbox and connect to 192.168.178.1
    via ftp in the first 5 seconds.
3.) login with adam2/adam2
4.) type into the ftp prompt:

passive
binary
debug 1
quote MEDIA FLSH // (not FLASH)
put openwrt-lantiq-xrx200-avm_fritz7360v2-squashfs-sysupgrade.bin mtd1
// using the correct location for the squashfs-sysupgrade-firmware.bin

5.) wait till red light flashing turns off.
6.) type: exit

Run tested with kernel 4.19 and 5.4 on Fritzbox 7360 V2.

Issue:
Ethernet speed is slow, (iperf between a Xiaomi mir3g
and this router results in <80Mbits throughput
with a wired cable when using the gbit ports.)

Signed-off-by: Yushi Nishida <kyro2man@gmx.net>
4 years ago
Sungbo Eo 3f14f034fb treewide: omit IMAGE_SIZE argument from check-size
Now that check-size uses IMAGE_SIZE by default, we can skip the argument from
image recipes to reduce redundancy.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
[do not touch ar71xx]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Sungbo Eo 5b392c7119 treewide: gather DEVICE_VARS into one place
Place DEVICE_VARS assignments at the top of the file or above Device/Default
to make them easier to find.

For ramips, remove redundant values already present in parent file.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
[do not touch ar71xx, extend commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Sungbo Eo 90daff4cf8 build: image: move IMAGE_SIZE to image.mk
IMAGE_SIZE is widely used in many targets. Declare it in the default template to
clean up redundant code. This also prevents deriving IMAGE_SIZE unintentionally
from the previously defined device.

While at it, remove duplicate KERNEL_SIZE declaration.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years ago
Adrian Schmutzler 2dc0a8c180 lantiq: tidy up image/Makefile
This harmonizes indent for Build blocks and removes multiple empty
lines.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 719e106855 lantiq: fix setting SOC to DEFAULT_SOC
This adds the missing assignment of DEFAULT_SOC to the SOC variable
by default.

Fixes: 09ee51c614 ("lantiq: define SOC only once for uniform targets")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 09ee51c614 lantiq: define SOC only once for uniform targets
In lantiq there are several subtarget where all devices have the
same value set to the SOC variable for each device individually.

This patch introduces a non-device-dependent variable DEFAULT_SOC,
which is used if no specific SOC is set for a device, and thus reduces
the number of redundant definitions drastically.

This is applied to all subtargets except xway, as only the latter has
two different SOCs.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler d9a0794f8d lantiq: move DTS_DIR variable out of Device definition
The DTS_DIR variable is not a device variable, thus it should not
be set inside Device/Default but globally.

Fixes: c640370939 ("lantiq: use soc_vendor_device scheme on DTS file")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 44cb4fd5e6 lantiq: fix model name for BT Home Hub 3 Type A
The number 3 was accidentally removed from the name during split
of DEVICE_TITLE.

Fixes: fd66687058 ("lantiq: split up DEVICE_TITLE")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Kevin Schmidt 77e27e0f53 lantiq: enable 5ghz wifi on VR200/VR200v
Enable mt76 driver on VR200/VR200v.

Signed-off-by: Kevin Schmidt <kevin.patrick.schmidt@googlemail.com>
4 years ago
Adrian Schmutzler c640370939 lantiq: use soc_vendor_device scheme on DTS file
This renames lantiq DTS(I) files to follow soc_vendor_device scheme.
This will make DTS files easier to maintain.

As a side effect, DTS file name can be derived from device node
names now, only having to specify a SOC variable in Makefiles.

While at it, move files to arch/mips/boot/dts/lantiq subfolder.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler de6dd7a8db lantiq: split device definitions into files
This splits device definitions into several *.mk files to increase
overview.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Daniel Golle ccf3bac6f3 lantiq: add device alias for Alpha ASL56026
BT Openreach ECI VDSL Modem V-2FUb/I is an alias of Alpha ASL56026 as
also stated in the original commit message adding the device
(commit 6254a2028c "lantiq: add support for the Alpha ASL56026").

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Adrian Schmutzler 0fcab46f97 lantiq: sort device definitions in image/Makefile
This sorts the device definitions in image/Makefile alphabetically
for each subtarget/block.

The order of blocks has not been touched.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Moritz Warning fd66687058 lantiq: split up DEVICE_TITLE
DEVICE_TITLE is split up into DEVICE_VENDOR, DEVICE_MODEL and DEVICE_VARIANT
Uses DEVICE_ALT* variables for alternative vendor/retailer names.

Signed-off-by: Moritz Warning <moritzwarning@web.de>
5 years ago
David Bauer 891a700759 lantiq: enable second VPE on Fritz!Box 7412
The AVM Fritz!Box 7412 does not use the VMMC part of the Lantiq chip but
rather a proprietary solution based on the DECT chip for the FXS ports.

Therefore, the second VPE can be enabled for use with OpenWrt.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
Johann Neuhauser c3c3cd5e4a lantiq: use wpad-basic for boards with enough storage
This commit selects wpad-basic for the FRITZ!Box 7312 and 7412 as
wpad-mini is only selected on boards with small flash.

Signed-off-by: Johann Neuhauser <johann@it-neuhauser.de>
[add short description]
Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
Danijel Tudek eae6cac6a3 lantiq: add support for AVM FRITZ!Box 7362 SL
Hardware:
- SoC: Lantiq VRX288
- RAM: Winbond W971GG6JB 1 Gb (128 MiB)
- Flash:
  - SPI: 8 Mb (1 MiB) for bootloader and tffs
  - NAND: 1 Gb (128 MiB) for OS
- xDSL: Lantiq VRX208
- WLAN: Atheros AR9381
- DECT: Dialog Semiconductors SC14441

Everything except FXS/DECT works
(no drivers for AVM's FXS implementation with SC14441).

Installation via FTP:
1. Use scripts/flashing/eva_ramboot.py to send initramfs-kernel.bin
to the device when powering on.
Standard AVM procedures with finding the correct IP address and
the right moment to open FTP apply here (approx. 4 seconds on 7362SL).
IMPORTANT: set lzma compression in ramdisk options, bootloader stalls
when receiving uncompressed images.

2. Transfer sysupgrade.bin image with scp to /tmp directory
and run sysupgrade

3. First boot might take a bit longer if linux_fs_start was set to 1,
in that case the device will reboot twice, first time it will fail to load
second kernel (overwritten by ubifs), set linux_fs_start to 0 and reboot.

OpenWrt uses the entire NAND flash. Kernel uses 4 MiB and rootfs uses
the rest of 124 MiB, overwriting everything related to FRITZ!OS - both
OS images, config and answering machine/media server data.
To return to FRITZ!OS, use AVM's recovery image.

Signed-off-by: Danijel Tudek <danijel.tudek@gmail.com>
5 years ago
Andy Binder 20f48c8ae3 lantiq: add support for AVM FRITZ!Box 7412
Hardware:

SoC: Lantiq VRX 220
CPU Cores: 2x MIPS 34Kc at 500 MHz
RAM: 128 MiB 250 MHz
Storage: 128 MiB NAND flash
Ethernet: built-in Fast Ethernet switch, only port 2 is used
Wireless: Atheros AR9287-BL1A b/g/n with 2 pcb antennas
Modem: built-in A/VDSL2 modem
DECT: Dialog SC14441
LEDs: 1 two-color, 4 one-color
Buttons: 2
FXS: 1 port via TAE or RJ12 connector
Everything except FXS/DECT works
(no drivers for AVM's FXS implementation with SC14441).

Installation:

Use the eva_ramboot.py script to load an initramfs image on the
device. Run it a few seconds after turning the device on.
$ scripts/flashing eva_ramboot 192.168.178.1 bin/targets/lantiq/xrx200/openwrt-lantiq-xrx200-avm_fritz7412-initramfs-kernel.bin
If it fails to find the device try the ip address 169.254.120.1.
(Firmware updates or the recovery tool apparently change it.)

IMPORTANT: set lzma compression in ramdisk options, bootloader stalls
when receiving uncompressed images.

The device will load it in ram and boot it. You can reach it under
the openwrt default ip address 192.168.1.1.

Check if the key linux_fs_start is not set to 1 in tffs:
$ fritz_tffs_nand -d /dev/mtd1 -n linux_fs_start
If it is set to 1, the bootloader will select the wrong set of
partitions. Restart the box and install an FritzOS upgrade or do a
recovery. Afterwards start again at step 1.

Run sysupgrade to persistently install OpenWRT.

Signed-off-by: Valentin Spreckels <Valentin.Spreckels@Informatik.Uni-Oldenburg.de>
Signed-off-by: Andy Binder <AndyBinder@gmx.de>
5 years ago
Christian Lamparter 33727ecea5 lantiq: enlarge ZyXEL P-2812HNU-F1 kernel partition (FS#2124)
The current snapshot release kernel with it's 2119245 Byte
size is too big to fit into the 2097152 (2MiB) area that
was set aside for the kernel. Which causes the device to
fail to boot (after an update or even during a fresh install)

 NAND read: device 0 offset 0x60000, size 0x200000
  2097152 bytes read: OK
 ## Booting kernel from Legacy Image at 80800000 ...
    Image Name:   MIPS OpenWrt Linux-4.14.98
    Created:      2019-02-13   9:37:36 UTC
    Image Type:   MIPS Linux Kernel Image (lzma compressed)
    Data Size:    2119245 Bytes = 2 MiB
    Load Address: 80002000
    Entry Point:  80002000
    Verifying Checksum ... Bad Data CRC
 ERROR: can't get kernel image!

This patch fixes the problem by enlarging the kernel partition
at the cost of the ubi/data partition behind it. The patch
also adds a KERNEL_SIZE variable to the image Makefile to
prevent silent corruptions from happening in the future.

Please note: The u-boot environment for the router also
needs to be updated. So please attach an appropriate
serial converter cable and enter the following commands
into the u-boot prompt:

 setenv nboot 'nand read 0x80800000 0x60000 0x300000; bootm 0x80800000'
 saveenv

The wiki has been updated accordingly:
<https://openwrt.org/toh/zyxel/p2812hnu-f1>

Fixes: FS#2124
Suggested-by: Mafketel (User on bugs.openwrt.org)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years ago
David Bauer d4ba7bab25 lantiq: make AVM FRITZ!Box naming consistent
This commit changes the model string and device title of all AVM boards
to fit the naming of the manufacturer.

Drop all provider-specific titles as they are re-used for every device
generation by 1&1. The original AVM model name is printed on the bottom
of every devices.

Exception applies for boards which are only supported by a specific
sub-revision.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
Kevin Schmidt bce555b09b lantiq: enable FXS ports on VR200v
Disables SMP support.
Add VR200 target to keep SMP on FXS-less device variant.

Signed-off-by: Kevin Schmidt <kevin.patrick.schmidt@googlemail.com>
6 years ago
Mathias Kresin 80c61c161a treewide: use wpad-basic for not small flash targets
Add out of the box support for 802.11r and 802.11w to all targets not
suffering from small flash.

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

Mathias did all the heavy lifting on this, but I'm the one who should
get shouted at for committing.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
6 years ago
John Crispin 61b5b4971e mac80211: make ath10k-ct the default ath10k
We select ath10k-ct by default, but it is still possible to build
the upstream version.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John Crispin <john@phrozen.org>
6 years ago
Johann Neuhauser 02d53e6a21 lantiq: add support for FritzBox 7312
The FritzBox 7312 is also known as 1&1 WLAN-MODEM. The device is almost
the same as FB7330, but only one ETH-Port and no USB.

Hardware
SoC: Lantiq Xway ARX188 PSB 50812 EL
RAM: 64MB DDR1 (Zentel A4S12D40FTP-G5)
Ethernet: Atheros 8030
Wireless: Atheros AR9227 b/g/n 2x2
DSL: Lantiq ADSL2+
DECT: Dialog SC14441
Buttons: WiFi, DECT
LEDs: Power/DSL, Fon, DECT, WLAN, Info

LEDs
Power: GPIO#44 (active low)
Internet: GPIO#47 (active low)
DECT: GPIO#38 (active low)
WLAN: GPIO#37 (active low)
Info: GPIO#35 (active low)

The Fon LED is labeled as internet in avm gpl sources.

Buttons
WLAN: GPIO#1 (active low)
DECT: GPIO#2 (active low)

Phy
GPIO#03: 25 MHz
GPIO#34: Reset (active low)
GPIO#39: Int
GPIO#42: MII MDIO
GPIO#43: MII MDC

PCIe
GPIO#21: reset (active low)

Installation:

To install OpenWrt via Eva bootloader, within the first seconds after
power on a ftp connection need to be established to the FRITZ!Box at
192.168.178.1 and the the following ftp commands need to be run:

  ftp> quote USER adam2
  ftp> quote PASS adam2
  ftp> binary
  ftp> debug
  ftp> passive
  ftp> quote MEDIA FLSH
  ftp> put /path/to/openwrt-lantiq-xway-avm_fritz7312-squashfs-sysupgrade.bin mtd1
  ftp> quote REBOOT

Signed-off-by: Johann Neuhauser <johann@it-neuhauser.de>
6 years ago
Mathias Kresin 0b62fe5ed8 lantiq: complete AVM FRITZ!Box 3370 support
Rename the image and use a compatible string which indicates that only
hardware revision 2 and higher is supported.

It allows to use the wireless LED, as HWRev 1 uses GPIO#39 for the
wireless LED and starting with HWRev 2 GPIO#35 is used for the wireless
LED and GPIO#39 for IFX_GPIO_MODULE_EXTPHY_MDIO.

The HWREV can be checked by connecting to the fritzbox right after power
on via ftp:

  ftp> quote GETENV HWSubRevision

Within the same HW revision 5 of the Fritz!Box 3370 different NAND flash
chips are used. Usually it isn't a big deal but depending on the used
NAND flash chip, the ECC calculation is done different (and incompatible
of course).

Boards with a Micron MT29F1G08ABADA NAND flash chip are using the NAND
chip to calculate the ECC (on-die). Boards with a Hynix HY27UF081G2M NAND
flash chip are doing the ECC calculation in software.

Supporting both with a single DTS isn't possible. It might be possible
to add a patch selecting the ECC mode dynamicaly based on the found NAND
flash chip. But such a patch has no chance to get accepted upstream and
most likely need to be touched with every kernel update.

Instead two images are created. One for Micron NAND flash chip and one
for Hynix NAND flash chip. So far no pattern is known to identify the
used flash chip without opening the box.

Add the power off GPIO. At least EVA version 2186 sets/keeps the GPIO as
input, which will cause a reboot 30sec after power on. For boards with
EVA version 2186 the installation is tricky as it has to be finished
within the 30sec time frame.

The EVA version can be checked by connecting to the fritzbox right after
power on via ftp:

  ftp> quote GETENV urlader-version

The ath9k eeprom/caldata is at a different and offset and stored in
reverse order (from the last byte to the beginning) on the flash.
Reverse the bits to bring the data into the format expected by the
ath9k driver.

Since the ath9k eeprom is stored in reverse order on flash, we can not
use the mac address from the on flash eeprom. Get the MAC address from
the tffs instead.

Within the same HW revision 5 of the Fritz!Box 3370 both version of the
vr9 SoC are used. During preparation of kernel 4.14 support, all
devicetree source files were changed to load the vr9 v1.1 and vr9 v1.2
gphy firmware, which fixed the embedded phys for boards using the
version 1.2 of the vr9 SoC.

While at it, add a trigger to make use of the LAN LED. Setup the
build-in switch and add a hint for LuCI two show the ports in order
matching the labels on the case

Add support for the second USB port and provide the volatage GPIOs. Use
GPIO#21 as PCIe reset pin. The lan led is connected to GPIO#38.

Name the rootfs partition ubi and remove the mtd/rootfs related kernel
bootargs to use the OpenWrt autoprobing based on the partition name.

Enable sysupgrade support to allow an upgrade from a running system.
Since sysupgrade wasn't supported till now, drop image build code which
was added to allow a sysupgrade from earlier OpenWrt versions.

Build images that allow an (initial) installation via EVA bootloader.

To install OpenWrt via Eva bootloader, within the first seconds after
power on a ftp connection need to be established to the FRITZ!Box at
192.168.178.1 and the the following ftp commands need to be run:

  ftp> quote USER adam2
  ftp> quote PASS adam2
  ftp> binary
  ftp> debug
  ftp> passive
  ftp> quote SETENV linux_fs_start 0
  ftp> quote MEDIA FLSH
  ftp> put /path/to/openwrt-lantiq-xrx200-FRITZ3370-eva-kernel.bin mtd1
  ftp> put /path/to/openwrt-lantiq-xrx200-FRITZ3370-eva-filesystem.bin mtd0

Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin 74a0d8cd92 build: consolidate fake uImage header build commands
Merge the two existing functions and use a parameter for the type
header field.

It updates the syntax of the former mpc85xx fake ramdisk header
command to be compatible with mkimage from u-boot 2018.03 and fixes the
build error spotted by the build bot.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Thomas Nixon 8c88e23b99 lantiq: fix DM200 boot with fake uImage headers
The latest bootloader versions load the firmware into memory and call
`chk_dniimg` (defined in Netgear GPL release), which expects to find
three consecutive block-aligned uImages. Add two fake uImage headers
after the kernel to fool this check.

This wastes up to 128k of space for alignment. The alternative would be
to put the rootfs in a second uImage, but this would limit the firmware
size to 0x710000 (the number of bytes loaded and verified by the
bootloader) instead of 0x7b0000 (the size of the firmware partition).

Signed-off-by: Thomas Nixon <tom@tomn.co.uk>
6 years ago
Valentin Spreckels ac1c31c259 lantiq: fix AVM initramfs image
Create an initramfs that can be used with the EVA bootloader.

Signed-off-by: Valentin Spreckels <Valentin.Spreckels@Informatik.Uni-Oldenburg.DE>
6 years ago
Mathias Kresin f8a6987cd1 lantiq: make dts files and kernel config kernel version specific
Move the devicetree source files to a kernel specific directory in
preparation of adding kernel 4.14 support.

Rename the subtarget kernel config files to match a specific kernel
version.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Felix Fietkau cde71a543c build: replace uses of OpenWrt with $(VERSION_DIST)
This makes the distribution name more configurable.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Mathias Kresin d726187367 lantiq: fix wbmr-hp-g300h image metadata
The Annex A and Annex B version are using the same (old) userspace
boardname. Update the SUPPORTED_DEVICES to allow an update from lede-17.01.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin 4a4d957d1a lantiq: sync image filename with boardname
Use <manufacturer>_<modelname> as image name.

Use the BOARD_NAME variable to ensure that the former used boardname is
still used as the subdirectory name for the sysupgrade-tar image, to
not break sysupgrade from earlier versions.

While at it, normalise the image filenames by using only lower case
characters and bin as file extension for sysupgrade images.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin 58c6ad53a8 lantiq: drop unused variable from image build code
Remove the DEVICE_PROFILE variable. The variable isn't
used at all.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin 63d7f7fc92 lantiq: use the compatible string as board name
Use the first compatible string as board name in userspace. Add the new
board name as well as the former used board name to the image metadata
to keep compatibilty with already deployed installations.

Don't add the former used boardname for boards which exists only in
master or evaluation boards.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Luis Araneda 575178e462 treewide: add only one device when appending to TARGET_DEVICES
This will avoid some conflicts when doing a git rebase or merge,
specially when adding support to a new device.

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
[drop brcm47xx changes which rename the images]
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin ab6620e817 lantiq: dgn3500 drop worldwide suffix
Remove the WW suffix, everything without a region suffix is world wide
anyway.

While at it, normalise the image filenames by using only lower case
characters.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Zoltan HERPAI 7b5c989ab9 merge: targets: update image generation and targets
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
7 years ago
Thibaut VARÈNE 254061ee97 build: add mktplinkfw2 hardcoded values to makefile
This patch adds all the board-specific values currently hardcoded
in mktplinkfw2.c back to the respective device declarations in the
makefiles.

The rationale is to avoid modifying the source code every time a
new board or board variant is added.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
7 years ago
Daniel Golle 2f0a8558be lantiq: ACMP252: clean up device modules
Install kmod-rt2800-pci instead of only the rt2x00 library.
Fixes missing wireless interface on AudioCodes AC-MP252.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
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
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 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
Mathias Kresin 8e0d7d6574 build: move lzma2eva build step to image-commands.mk
Move it to image-commands.mk so that it can used by other targets with
eva based boards as well.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Tino Reichardt 712ebe95f8 lantiq: add Allnet ALL0333CJ support
This patch adds support for the Allnet ADSL2+ Modem ALL0333CJ.

Specifications:
- SoC: Amazon-SE
- RAM: 16MB
- Storage: 4MB NOR FLash
- LEDs: Power, Ethernet, DSL (Sync)
- Buttons: 1x Reset Button (not currently supported, will be done)
- 1x Ethernet-Port: 1x RJ45 10/100BaseTX
- 1x WAN-Port: AnnexB & J, G.992.1(ADSL), G.992.3(ADSL2), G.992.5(ADSL2+)

Installation:
- can be done via telnet+tftp or serial console
- default passwords:
  - via telnet (root:admin)
  - via webinterface http://172.16.1.254:8235/ (admin:coolwhite)

Installation via telnet / tftp:
host: # your own host must have an tftpd daemon, then do this:
host: ifconfig eth0:172 172.16.1.1 up
host: # telnet to allnet modem, root:admin
host: telnet 172.16.1.254
modem: # kill this daemon, it spams your console
modem: killall dsl_cpe_control
modem: # change to some place in ram:
modem: cd /ramdisk/tftp_upload
modem: # load lede-lantiq-ase-ALL0333CJ-squashfs-sysupgrade.bin alias uImage
modem: tftp -g -r uImage 172.16.1.1
modem: # load these extra tools from your tftpd via:
modem: # source: https://github.com/mcmilk/uboot-utils/releases/download/0.1/mips32.tar.gz
modem: tftp -g -r flashwrite 172.16.1.1
modem: tftp -g -r fw_setenv 172.16.1.1
modem: tftp -g -r fw.conf 172.16.1.1
modem: ln -s fw_setenv fw_printenv
modem: chmod +x *
modem: ./fw_setenv disable_recovery y
modem: ./fw_setenv kernel_addr 0xb0010000
modem: ./flashwrite /dev/mtd/1 uImage 0

Installation via serial line at uboot:
uboot: # erase everything exept bootloader
uboot: protect on b0000000 +10000; protect on b03f0000 +10000
uboot: erase all
uboot: # get new firmware via tftp:
uboot: tftpboot 0x80100000 uImage; setenv kernel_addr 0xb0010000
uboot: # copy to flash:
uboot: cp.b 0x80100000 $(kernel_addr) $(filesize)
uboot: # disable proprietary image checking:
uboot: setenv disable_recovery=y; saveenv
uboot: # reboot with LEDE ;)
uboot: reset

Ethernet works as expected, DSL syncronization does not work properly
currently, I am working on this issue.

Signed-off-by: Tino Reichardt <milky-lede@mcmilk.de>
7 years ago
Tino Reichardt 995ad357f9 lantiq: enable Netgear DGN1000B image build
Enable the building of Netgear DGN1000B images. I have an
example device here, but it was not tested currently.
Also WLAN and USB is not ready in the moment.

This is just the proper way, so that developing on this
device is known to be done in the near future.

Signed-off-by: Tino Reichardt <milky-lede@mcmilk.de>
7 years ago
Alex Maclean 6254a2028c lantiq: add support for the Alpha ASL56026
The ASL56026 is a VDSL2 router with dual 100mbit ethernet,
also known as the ECI B-FOCuS V-2FUb/I.

CPU: Lantiq XRX268 v1.1 at 333MHz
Modem: Lantiq VRX208
RAM: 32MiB DDR2 at 167MHz
Flash: 8MiB NOR, Spansion S29GL064N90TF04

UART is at JP1:
Pin 1 TX
Pin 2 GND
Pin 3 +3.3V
Pin 4 NC
Pin 5 RX

Boot selection pins are exposed via several resistor jumpers:
boot_sel0 is at J15, on the rear of the board. Default is high.
boot_sel1 is at J3, next to the flash - it is also the flash CE# pin. Default is low.
boot_sel2 is at J12, directly below the SoC. Default is low.
boot_sel3 is at J16, on the rear of the board. Default is low.

The boot_sel pins should never be shorted, the jumper must be moved or
a lower value resistor used to change the pull (existing resistors are 4k7, 1k should work)

To install with the stock bootloader you must break the built in image selection process
which uses at least the following vars: f_upgrade_addr, f_upgrade2_addr, loadaddr, kernel_addr, activeregion, committedregion
This is done by setting loadaddr and both f_upgrade_addr vars to the same address:

	VR9 # setenv loadaddr 0xB0040000
	VR9 # setenv f_upgrade_addr 0xB0040000
	VR9 # setenv f_upgrade2_addr 0xB0040000
	VR9 # saveenv

Then flash the firmware image:

	VR9 # tftpboot 0x81000000 lede-lantiq-xrx200-ASL56026-squashfs-sysupgrade.bin
	VR9 # erase B0040000 +${filesize}
	VR9 # cp.b 0x81000000 0xB0040000 ${filesize}

Signed-off-by: Alex Maclean <monkeh@monkeh.net>
7 years ago