DebianOn is an effort to document how to install, configure and use Debian on some specific hardware. Therefore potential buyers would know if that hardware is supported and owners would know how get the best out of that hardware. The purpose is not to duplicate the Debian Official Documentation, but to document how to install Debian on some specific hardware. If you need help to get Debian running on your hardware, please have a look at our user support channels where you may find specific channels (mailing list, IRC channel) dedicated to certain types of hardware. |
Translation(s): none
Contents
Models covered
Cisco Linksys WRT1200 AC
- Marvell Armada 385, ARMv7, 512MB DDR3 SDRAM
Overall Status
Core Components |
||
Boot Standard Kernel: |
|
|
LAN network card (Generic Ethernet): |
|
|
Detect CD/DVD (Generic DVD+RW) : |
n/a |
|
Detect hard drives: |
(USB/eSATA) |
|
CPU Frequency Scaling |
|
|
Hibernation |
|
|
Sleep / Suspend |
|
|
Xorg |
|
|
Wireless/Wifi |
|
Legend :
= OK ; Unsupported(No Driver) ; = Error (Couldn't get it working); [?] Unknown, Not Test ; [-] Not-applicable
= Configuration Required; = Only works with a non-free driver and or firmware
Important Note
Successful installation requires USB-TTL cable attached to router's serial port (pin 1 - Gnd, pin 2 - Tx, pin 4 - Rx), working TFTP server in the same LAN segment, and any USB/eSATA-attached HDD (internal MTD chip is hardly enough to store Debian kernel and initrd).
Configuration
Download current d-i kernel, initrd and dtb:
wget http://ftp.debian.org/debian/dists/stretch/main/installer-armhf/current/images/netboot/vmlinuz http://ftp.debian.org/debian/dists/stretch/main/installer-armhf/current/images/netboot/initrd.gz http://ftp.debian.org/debian/dists/stretch/main/installer-armhf/current/images/device-tree/armada-385-linksys-caiman.dtb
Prepare u-boot images (need to have u-boot tools installed), place vmlinux and initrd at TFTP root:
cat vmlinuz armada-385-linksys-caiman.dtb > blob mkimage -A arm -O linux -T kernel -C none -a 0x200000 -e 0x200000 -n "d-i" -d blob vmlinux mkimage -A arm -O linux -T ramdisk -C gzip -a 0x4200000 -e 0x4200000 -n "d-i initrd" -d initrd.gz initrd
Attach USB-TTL cable, USB drive, and a single CAT5e cable (any LAN port). Power on the router. Interrupt autoboot process. Configure u-boot:
setenv ipaddr xx.xx.xx.2 setenv serverip xx.xx.xx.1 setenv bootargs console=ttyS0,115200n8 setenv fdt_skip_update yes tftpboot 0x8000000 vmlinux tftpboot 0x10000000 initrd bootm 0x8000000 0x10000000
Debian installer should start on serial console. Proceed as usual. Since Armada 385 is not supported by d-i, it'll try to install grub, but will fail. At the end of installation, obtain shell for your new Debian installation, and install flash-kernel package.
Make the following files with the following contents:
/etc/flash-kernel/db:
Machine: Marvell Armada 380/385 (Device Tree) Kernel-Flavors: armmp DTB-Id: armada-385-linksys-caiman.dtb DTB-Append-From: 4.9.0 Mtd-Kernel: kernel1 Mtd-Initrd: rootfs1 U-Boot-Kernel-Address: 0x200000 U-Boot-Initrd-Address: 0x4200000 Required-Packages: u-boot-tools Bootloader-Sets-Incorrect-Root: yes
/etc/flash-kernel/machine:
Marvell Armada 380/385 (Device Tree)
Invoke /usr/sbin/flash-kernel, it should overwrite /dev/mtd4 with Debian kernel and /dev/mtd5 with Debian initrd.
Install u-boot-tools, make the following configuration file:
/etc/fw_env.config:
/dev/mtd1 0x0 0x20000 0x40000
From now on, /usr/bin/fw_printenv should print u-boot configuration for your router. Using /usr/bin/fw_setenv, set the following bootscript.
nandboot=setenv fdt_skip_update yes; setenv bootargs console=ttyS0,115200 root=/dev/mapper/vg00-root ro quiet; nand read 0x2000000 kernel 0x400000; nand read 0x3000000 rootfs 0x2000000; bootm 0x2000000 0x3000000
Reboot, enjoy your Debian installation.
Power Management
CPU scaling for this board is disabled at Debian's kernels. Suspend/hibernate/hybrid-sleep were not tested, as it would make a little sense on a router.
WiFi
WRT1200AC uses Marvell 88W8664 802.11ac chip, which requires both out-of-tree kernel module and a non-free firmware.
System Summary
lspci
00:01.0 PCI bridge [0604]: Marvell Technology Group Ltd. Device [11ab:6820] (rev 04)
00:02.0 PCI bridge [0604]: Marvell Technology Group Ltd. Device [11ab:6820] (rev 04)
01:00.0 Ethernet controller [0200]: Marvell Technology Group Ltd. 88W8864 [Avastar] 802.11ac Wireless [11ab:2a55]
02:00.0 Ethernet controller [0200]: Marvell Technology Group Ltd. 88W8864 [Avastar] 802.11ac Wireless [11ab:2a55]
lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub bDeviceClass 9 Hub bDeviceProtocol 3 iProduct 2 xHCI Host Controller Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub bDeviceClass 9 Hub bDeviceProtocol 1 Single TT iProduct 2 xHCI Host Controller Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub bDeviceClass 9 Hub bDeviceProtocol 1 Single TT iProduct 2 EHCI Host Controller
Resources
Useful Links
https://wiki.openwrt.org/toh/linksys/wrt_ac_series
http://blog.schmorp.de/2017-11-10-gnudebian-on-the-linksys-wrt3200acm.html