What's new

Linksys WRT1900AC, WRT1900ACS, WRT1200AC and WRT3200ACM Router Debian Implementation

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

chadster766

Very Senior Member
I've been independently working on implementing Debian Jessie for the Linksys WRT1900\1200 Router Series.

Some of this development is outside my knowledge. I really need some help with this implementation.

So far I can:
  1. U-Boot Linux kernel 4.2.4 and an Initrd image made from an armhf Debian Jessie chroot rootfs but I haven't gotten Initrd to load the usb-storage modules in order to run a full blown rootfs on a USB storage.
  2. U-Boot Linux kernel 4.2.4 and a Debian Installer Netconsole Initrd image but there is a kernel mismatch which causes the installer to fail at the downloading modules section with the "no modules" error causing the installer to not detect the USB storage.
  3. I tried to U-Boot other Linux kernel versions like 3.16.1 and 3.16.4 but I believe the stock u-boot version isn't new enough for those kernel versions. Even then unless I'm mistaken the Debian Jessie Installer actually requires kernel version 3.16.0-4 which I haven't been able to find it's source.
Debian chroot creation notes:

Code:
debootstrap --foreign --no-check-gpg --arch=armhf jessie /srv/chroot/WRT1900AC-debian-armhf ftp://ftp.debian.org/debian/
cp /usr/bin/qemu-arm-static /srv/chroot/WRT1900AC-debian-armhf/usr/bin/
cp /etc/resolv.conf /srv/chroot/WRT1900AC-debian-armhf/etc/
chroot /srv/chroot/WRT1900AC-debian-armhf
/debootstrap/debootstrap --second-stage
passwd -d root
 
cat << EOT > /etc/apt/sources.list
deb http://ftp.de.debian.org/debian jessie main contrib non-free
deb http://ftp.de.debian.org/debian jessie-updates main contrib non-free
deb http://security.debian.org/debian-security jessie/updates main contrib non-free
EOT
 
apt-get update
apt-get install localepurge
apt-get dist-upgrade
apt-get install locales dialog
#dpkg-reconfigure locales
 
apt-get install openssh-server ntpdate
passwd
 
echo <<EOT >> /etc/network/interfaces
allow-hotplug eth0
iface eth0 inet dhcp
EOT
 
echo MCDEBIAN > /etc/hostname
 
#clean up debian rootfs
apt-get clean
 
mkinitramfs -o /boot/initrd-4.2.4.img 4.2.4
#initrd-4.2.4.img is later copied and renamed to initrd.gz for the uInitrd image creation later on

Linux kernel 4.2.4 build notes:

Code:
make ARCH=arm CROSS_COMPILE=arm-none-eabi- mvebu_v7_defconfig
make ARCH=arm CROSS_COMPILE=arm-none-eabi- menuconfig
 
make ARCH=arm CROSS_COMPILE=arm-none-eabi- -j4 modules
make ARCH=arm CROSS_COMPILE=arm-none-eabi- INSTALL_MOD_PATH=/srv/chroot/WRT1900AC-debian-armhf modules_install
make ARCH=arm CROSS_COMPILE=arm-none-eabi- -j4 zImage
make ARCH=arm CROSS_COMPILE=arm-none-eabi- -j4 dtbs
 
mkimage -A arm -O linux -T kernel -C none -a 0x200000 -e 0x200000 -n "linux-4.2.4" -d arch/arm/boot/zImage  uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x4200000 -e 0x4200000 -n "initrd image" -d initrd.gz  uInitrd
 
setenv bootargs console=ttyS0,115200
tftpboot 0x8000000 uImage
tftpboot 0x10000000 uInitrd
tftpboot 0x18000000 armada-385-linksys-cobra.dtb
bootm 0x8000000 0x10000000 0x18000000

USB Storage is formatted ext4.
 
Last edited:
U-Boot console output:
Code:
Marvell>> bootm 0x8000000 0x10000000 0x18000000
## Booting kernel from Legacy Image at 08000000 ...
   Image Name:   linux-4.2.4
   Created:      2015-11-23  12:51:05 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3645472 Bytes = 3.5 MiB
   Load Address: 00200000
   Entry Point:  00200000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 10000000 ...
   Image Name:   rootfs
   Created:      2015-11-23  14:28:27 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    2714180 Bytes = 2.6 MiB
   Load Address: 04200000
   Entry Point:  04200000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 18000000
   Booting using the fdt blob at 0x18000000
   Loading Kernel Image ... OK
OK
   Loading Ramdisk to 1f711000, end 1f9a7a44 ... OK
   Loading Device Tree to 00ff9000, end 00ffffac ... OK
   Skipping Device Tree update ('fdt_skip_update' = yes)
 
Code:
Starting kernel ...
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.2.4 (root@McDev1) (gcc version 4.8.4 20141219 (release) (4.8.4-1+11-1) ) #10 SMP Sun Nov 22 20:34:16 CST 2015
[    0.000000] CPU: ARMv7 Processor [414fc091] revision 1 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine model: Linksys WRT1900ACv2
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] PERCPU: Embedded 11 pages/cpu @dfbd2000 s14400 r8192 d22464 u45056
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: console=ttyS0,115200
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 509640K/524288K available (5168K kernel code, 240K rwdata, 1420K rodata, 256K init, 195K bss, 14648K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xe0800000 - 0xff000000   ( 488 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0677538   (6590 kB)
[    0.000000]       .init : 0xc0678000 - 0xc06b8000   ( 256 kB)
[    0.000000]       .data : 0xc06b8000 - 0xc06f4360   ( 241 kB)
[    0.000000]        .bss : 0xc06f4360 - 0xc0725350   ( 196 kB)
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  Additional per-CPU info printed with stalls.
[    0.000000]  Build-time adjustment of leaf fanout to 32.
[    0.000000]  RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=2
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] mvebu_mbus: [Firmware Warn]: deprecated mbus-mvebu Device Tree, suspend/resume will not work
[    0.000000] L2C-310 enabling early BRESP for Cortex-A9
[    0.000000] L2C-310 full line of zeros enabled for Cortex-A9
[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
[    0.000000] L2C-310 Coherent cache controller enabled, 16 ways, 1024 kB
[    0.000000] L2C-310 Coherent: CACHE_ID 0x410054c9, AUX_CTRL 0x46070001
[    0.000005] sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 85899345900ns
[    0.000014] clocksource: armada_370_xp_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76450417870 ns
[    0.000205] Console: colour dummy device 80x30
[    0.000213] Calibrating delay loop... 3188.32 BogoMIPS (lpj=15941632)
[    0.059926] pid_max: default: 32768 minimum: 301
[    0.059980] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.059984] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.060205] CPU: Testing write buffer coherency: ok
[    0.060294] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.060316] Setting up static identity map for 0x8280 - 0x82d8
[    0.060395] mvebu-soc-id: MVEBU SoC ID=0x6820, Rev=0x4
[    0.060472] mvebu-pmsu: Initializing Power Management Service Unit
[    0.060914] Booting CPU 1
[    0.119945] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.119971] Brought up 2 CPUs
[    0.119977] SMP: Total of 2 processors activated (6384.02 BogoMIPS).
[    0.119980] CPU: All CPU(s) started in SVC mode.
[    0.120121] devtmpfs: initialized
[    0.121705] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[    0.121812] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.121898] pinctrl core: initialized pinctrl subsystem
[    0.122080] NET: Registered protocol family 16
[    0.122512] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.149924] cpuidle: using governor ladder
[    0.169920] cpuidle: using governor menu
[    0.172213] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[    0.172218] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.172336] mvebu-pmsu: CPU hotplug support is currently broken on Armada 38x: disabling
[    0.172342] mvebu-pmsu: CPU idle is currently broken on Armada 38x: disabling[    0.200473] vgaarb: loaded
[    0.200596] SCSI subsystem initialized
[    0.200801] usbcore: registered new interface driver usbfs
[    0.200829] usbcore: registered new interface driver hub
[    0.200852] usbcore: registered new device driver usb
[    0.200988] Advanced Linux Sound Architecture Driver Initialized.
[    0.201235] Bluetooth: Core ver 2.20
[    0.201259] NET: Registered protocol family 31
[    0.201262] Bluetooth: HCI device and connection manager initialized
[    0.201269] Bluetooth: HCI socket layer initialized
[    0.201273] Bluetooth: L2CAP socket layer initialized
[    0.201284] Bluetooth: SCO socket layer initialized
[    0.201627] clocksource: Switched to clocksource armada_370_xp_clocksource
[    0.206145] NET: Registered protocol family 2
[    0.206410] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.206434] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[    0.206467] TCP: Hash tables configured (established 4096 bind 4096)
[    0.206493] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.206507] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.206574] NET: Registered protocol family 1
[    0.206710] RPC: Registered named UNIX socket transport module.
[    0.206714] RPC: Registered udp transport module.
[    0.206717] RPC: Registered tcp transport module.
[    0.206720] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.206809] Unpacking initramfs...
[    0.285059] Freeing initrd memory: 2652K (df711000 - df9a8000)
[    0.285182] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[    0.285713] futex hash table entries: 512 (order: 3, 32768 bytes)
[    0.286633] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.286643] io scheduler noop registered
[    0.286650] io scheduler deadline registered
[    0.286669] io scheduler cfq registered (default)
[    0.287170] armada-38x-pinctrl f1018000.pinctrl: registered pinctrl driver
[    0.287526] irq: Cannot allocate irq_descs @ IRQ41, assuming pre-allocated
[    0.287673] irq: Cannot allocate irq_descs @ IRQ73, assuming pre-allocated
[\CODE]
 
Code:
[    0.287958] mvebu-pcie soc:pcie-controller: PCI host bridge to bus 0000:00
[    0.287966] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[    0.287971] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xe7ffffff]
[    0.287976] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.288174] PCI: bus0: Fast back to back transfers disabled
[    0.288180] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.288185] pci 0000:00:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.288450] PCI: bus1: Fast back to back transfers disabled
[    0.288757] PCI: bus2: Fast back to back transfers disabled
[    0.288811] pci 0000:00:01.0: BAR 8: assigned [mem 0xe0000000-0xe01fffff]
[    0.288817] pci 0000:00:02.0: BAR 8: assigned [mem 0xe0200000-0xe03fffff]
[    0.288824] pci 0000:01:00.0: BAR 0: assigned [mem 0xe0000000-0xe00fffff 64bit pref]
[    0.288837] pci 0000:01:00.0: BAR 2: assigned [mem 0xe0100000-0xe01fffff 64bit pref]
[    0.288848] pci 0000:00:01.0: PCI bridge to [bus 01]
[    0.288853] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xe01fffff]
[    0.288860] pci 0000:02:00.0: BAR 0: assigned [mem 0xe0200000-0xe02fffff 64bit pref]
[    0.288874] pci 0000:02:00.0: BAR 2: assigned [mem 0xe0300000-0xe03fffff 64bit pref]
[    0.288886] pci 0000:00:02.0: PCI bridge to [bus 02]
[    0.288891] pci 0000:00:02.0:   bridge window [mem 0xe0200000-0xe03fffff]
[    0.288982] mv_xor f1060800.xor: Marvell shared XOR driver
[    0.321893] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy )
[    0.361874] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy )
[    0.361946] mv_xor f1060900.xor: Marvell shared XOR driver
[    0.401874] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy )
[    0.441872] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy )
[    0.468947] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.469872] console [ttyS0] disabled
[    0.489907] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 21, base_baud = 12500000) is a 16550A
[    1.267112] console [ttyS0] enabled
[    1.271154] ahci-mvebu f10a8000.sata: AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x3 impl platform mode
[    1.280260] ahci-mvebu f10a8000.sata: flags: 64bit ncq sntf led only pmp fbs pio slum part sxs
[    1.290721] scsi host0: ahci-mvebu
[    1.294356] scsi host1: ahci-mvebu
[    1.297873] ata1: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x100 irq 38
[    1.305834] ata2: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x180 irq 38
[    1.314173] pxa3xx-nand f10d0000.flash: This platform can't do DMA on this device
[    1.321876] nand: device found, Manufacturer ID: 0x01, Chip ID: 0xf1
[    1.328255] nand: AMD/Spansion S34ML01G2
[    1.332230] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    1.339833] pxa3xx-nand f10d0000.flash: ECC strength 16, ECC step size 2048
[    1.347038] Bad block table found at page 65472, version 0x01
[    1.353073] Bad block table found at page 65408, version 0x01
[    1.361024] 10 ofpart partitions found on MTD device pxa3xx_nand-0
[    1.367242] Creating 10 MTD partitions on "pxa3xx_nand-0":
[    1.372755] 0x000000000000-0x000000200000 : "u-boot"
[    1.378119] 0x000000200000-0x000000240000 : "u_env"
[    1.383326] 0x000000240000-0x000000280000 : "s_env"
[    1.388532] 0x000000900000-0x000000a00000 : "devinfo"
[    1.393921] 0x000000a00000-0x000003200000 : "kernel1"
[    1.399319] 0x000001000000-0x000003200000 : "rootfs1"
[    1.404728] 0x000003200000-0x000005a00000 : "kernel2"
[    1.410137] 0x000003800000-0x000005a00000 : "rootfs2"
[    1.415514] 0x000005a00000-0x000008000000 : "syscfg"
[    1.420816] 0x000000280000-0x000000900000 : "unused_area"
[    1.426971] libphy: Fixed MDIO Bus: probed
[    1.431196] libphy: orion_mdio_bus: probed
[    1.437490] mvneta f1034000.ethernet eth0: Using random mac address ca:75:1b:7f:23:f4
[    1.447352] mvneta f1070000.ethernet eth1: Using hardware mac address 00:50:43:75:78:a6
[    1.455700] xhci-hcd f10f8000.usb3: xHCI Host Controller
[    1.461044] xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 1
[    1.468656] xhci-hcd f10f8000.usb3: hcc params 0x0a000990 hci version 0x100 quirks 0x00010010
[    1.477241] xhci-hcd f10f8000.usb3: irq 40, io mem 0xf10f8000
[    1.483339] hub 1-0:1.0: USB hub found
[    1.487115] hub 1-0:1.0: 1 port detected
[    1.491184] xhci-hcd f10f8000.usb3: xHCI Host Controller
[    1.496531] xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 2
[    1.504081] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    1.512467] hub 2-0:1.0: USB hub found
[    1.516243] hub 2-0:1.0: 1 port detected
[    1.520320] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.526893] ehci-pci: EHCI PCI platform driver
[    1.531382] ehci-orion: EHCI orion driver
[    1.535515] usbcore: registered new interface driver usb-storage
[    1.541672] mousedev: PS/2 mouse device common for all mice
[    1.547566] armada38x-rtc f10a3800.rtc: rtc core: registered f10a3800.rtc as rtc0
[    1.555191] i2c /dev entries driver
[    1.569485] orion_wdt: Initial timeout 171 sec
[    1.574162] sdhci: Secure Digital Host Controller Interface driver
[    1.580366] sdhci: Copyright(c) Pierre Ossman
[    1.584853] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.590659] usbcore: registered new interface driver usbhid
[    1.596261] usbhid: USB HID core driver
[    1.600765] NET: Registered protocol family 17
[    1.605271] ThumbEE CPU extension supported.
[    1.609561] Registering SWP/SWPB emulation handler
[    1.615025] input: gpio_keys as /devices/platform/gpio_keys/input/input0
[    1.621868] armada38x-rtc f10a3800.rtc: setting system clock to 2101-04-24 01:11:07 UTC (4143748267)
[    1.631619] ALSA device list:
[    1.634608]   No soundcards found.
[    1.651639] ata2: SATA link down (SStatus 0 SControl 300)
[    1.657085] ata1: SATA link down (SStatus 0 SControl 300)
[    1.662642] Freeing unused kernel memory: 256K (c0678000 - c06b8000)
Loading, please wait...
[    1.692511] systemd-udevd[1134]: starting version 215
[    1.698515] random: systemd-udevd urandom read with 0 bits of entropy available
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
modprobe: module unknown not found in modules.dep
Begin: Checking  file system ... fsck from util-linux 2.25.2
done.
mount: can't find /root in /etc/fstab
done.
Target filesystem doesn't have requested /sbin/init.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... mount: mounting /dev on /root/dev failed: No such file or directory
done.
No init found. Try passing init= bootarg.
modprobe: module i8042 not found in modules.dep
modprobe: module uhci-hcd not found in modules.dep
modprobe: module ohci-hcd not found in modules.dep
BusyBox v1.22.1 (Debian 1:1.22.0-9+deb8u1) built-in shell (ash)
Enter 'help' for a list of built-in commands.
/bin/sh: can't access tty; job control turned off
(initramfs)
(initramfs)
(initramfs)
(initramfs) ls
bin      dev      init     proc     run      scripts  tmp
conf     etc      lib      root     sbin     sys      var
(initramfs) ls
bin      dev      init     proc     run      scripts  tmp
conf     etc      lib      root     sbin     sys      var
(initramfs) ifconfig
(initramfs) ls
bin      dev      init     proc     run      scripts  tmp
conf     etc      lib      root     sbin     sys      var
(initramfs) cd lib
(initramfs) ls
arm-linux-gnueabihf                   modules
klibc-sKNr1Fw-Rh9G1FYpGCXRnrwmP2A.so  systemd
ld-linux-armhf.so.3                   udev
modprobe.d
(initramfs) cd modules
(initramfs) ls
4.2.4
(initramfs) cd 4.2.4
(initramfs) ;s
/bin/sh: syntax error: unexpected ";"
(initramfs) ls
kernel               modules.builtin.bin  modules.order
modules.alias        modules.dep          modules.softdep
modules.alias.bin    modules.dep.bin      modules.symbols
modules.builtin      modules.devname      modules.symbols.bin
(initramfs)
[\CODE]
 
Code:
chadboot=setenv bootargs root=/dev/nfs ip=192.168.1.1:192.168.1.5::255.255.255.0:MCDEBIAN:eth1 nfsroot=192.168.1.5:/srv/chroot/WRT1900AC-debian-armhf rootwait rw init=/sbin/init console=ttyS0,115200; tftpboot 0x8000000 uImage; bootm 0x8000000
Success, I've gotten Debian Jessie with Linux kernel 4.2.4 to run on the WRT1900AC V2:

I had to add Kernel CGROUP support:
Code:
CONFIG_CGROUPS=y
CONFIG_CGROUP_DEBUG=y
CONFIG_CGROUP_FREEZER=y
CONFIG_CGROUP_DEVICE=y
CONFIG_CPUSETS=y
# CONFIG_PROC_PID_CPUSET is not set
CONFIG_CGROUP_CPUACCT=y
CONFIG_PAGE_COUNTER=y
CONFIG_MEMCG=y
CONFIG_MEMCG_SWAP=y
# CONFIG_MEMCG_SWAP_ENABLED is not set
CONFIG_MEMCG_KMEM=y
CONFIG_CGROUP_PERF=y
CONFIG_CGROUP_SCHED=y
CONFIG_FAIR_GROUP_SCHED=y
CONFIG_CFS_BANDWIDTH=y
CONFIG_RT_GROUP_SCHED=y
CONFIG_BLK_CGROUP=y
CONFIG_DEBUG_BLK_CGROUP=y
CONFIG_CGROUP_WRITEBACK=y

Merge the Kernel image and dtb into one uimage:

Code:
cat arch/arm/boot/zImage arch/arm/boot/dts/armada-385-linksys-cobra.dtb > /tmp/X
mv /tmp/X arch/arm/boot/zImage
 
mkimage -A arm -O linux -T kernel -C none -a 0x200000 -e 0x200000 -n "linux" -d arch/arm/boot/zImage  uImage

Change the U-Boot run command to:

Code:
chadboot=setenv bootargs root=/dev/nfs ip=192.168.1.1:192.168.1.5::255.255.255.0:MCDEBIAN:eth1 nfsroot=192.168.1.5:/srv/chroot/WRT1900AC-debian-armhf rootwait rw init=/sbin/init console=ttyS0,115200; tftpboot 0x8000000 uImage; bootm 0x8000000

I wasn't able to figure out how to get U-Boot to run the rootfs from a USB2.0\3.0 drive. Nothing I tried would get the Debian Jessie armhf Initrd to work with the USB ports as well. My only other option was NFS which is actually very cool and can run any size of rootfs you want in a live sync with the WRT.

Simple NFS config used:

Code:
apt-get install nfs-kernel-server
echo "/srv/chroot    *(rw,sync,no_root_squash)" >> /etc/exports

I ran this command in U-Boot "run chadboot" and to my surprise it fired up :)
 
Last edited:
Code:
Marvell>> run chadboot
Using egiga0 device
TFTP from server 192.168.1.2; our IP address is 192.168.1.1
Filename 'uImage'.
Load address: 0x8000000
Loading: #################################################################
  #################################################################
  #################################################################
  #############################################################
  8.2 MiB/s
done
Bytes transferred = 3746325 (392a15 hex)
## Booting kernel from Legacy Image at 08000000 ...
  Image Name:  linux
  Created:  2015-11-27  2:57:03 UTC
  Image Type:  ARM Linux Kernel Image (uncompressed)
  Data Size:  3746261 Bytes = 3.6 MiB
  Load Address: 00200000
  Entry Point:  00200000
  Verifying Checksum ... OK
  Loading Kernel Image ... OK
OK
Starting kernel ...
[  0.000000] Booting Linux on physical CPU 0x0
[  0.000000] Initializing cgroup subsys cpuset
[  0.000000] Initializing cgroup subsys cpu
[  0.000000] Initializing cgroup subsys cpuacct
[  0.000000] Linux version 4.2.4 (root@McDev1) (gcc version 4.8.4 20141219 (release) (4.8.4-1+11-1) ) #18 SMP Thu Nov 26 20:55:27 CST 2015
[  0.000000] CPU: ARMv7 Processor [414fc091] revision 1 (ARMv7), cr=10c5387d
[  0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[  0.000000] Machine model: Linksys WRT1900ACv2
[  0.000000] Memory policy: Data cache writealloc
[  0.000000] PERCPU: Embedded 11 pages/cpu @dfb52000 s14592 r8192 d22272 u45056
[  0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 129920
[  0.000000] Kernel command line: root=/dev/nfs ip=192.168.1.1:192.168.1.5::255.255.255.0:MCDEBIAN:eth1 nfsroot=192.168.1.5:/srv/chroot/WRT1900AC-debian-armhf rootwait rw init=/sbin/init console=ttyS0,115200
[  0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[  0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[  0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[  0.000000] Memory: 511608K/524288K available (5301K kernel code, 255K rwdata, 1436K rodata, 268K init, 202K bss, 12680K reserved, 0K cma-reserved, 0K highmem)
[  0.000000] Virtual kernel memory layout:
[  0.000000]  vector  : 0xffff0000 - 0xffff1000  (  4 kB)
[  0.000000]  fixmap  : 0xffc00000 - 0xfff00000  (3072 kB)
[  0.000000]  vmalloc : 0xe0800000 - 0xff000000  ( 488 MB)
[  0.000000]  lowmem  : 0xc0000000 - 0xe0000000  ( 512 MB)
[  0.000000]  pkmap  : 0xbfe00000 - 0xc0000000  (  2 MB)
[  0.000000]  modules : 0xbf000000 - 0xbfe00000  (  14 MB)
[  0.000000]  .text : 0xc0008000 - 0xc069c688  (6738 kB)
[  0.000000]  .init : 0xc069d000 - 0xc06e0000  ( 268 kB)
[  0.000000]  .data : 0xc06e0000 - 0xc071fda0  ( 256 kB)
[  0.000000]  .bss : 0xc071fda0 - 0xc0752750  ( 203 kB)
[  0.000000] Hierarchical RCU implementation.
[  0.000000]  Additional per-CPU info printed with stalls.
[  0.000000]  Build-time adjustment of leaf fanout to 32.
[  0.000000]  RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[  0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=2
[  0.000000] NR_IRQS:16 nr_irqs:16 16
[  0.000000] mvebu_mbus: [Firmware Warn]: deprecated mbus-mvebu Device Tree, suspend/resume will not work
[  0.000000] L2C-310 enabling early BRESP for Cortex-A9
[  0.000000] L2C-310 full line of zeros enabled for Cortex-A9
[  0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
[  0.000000] L2C-310 Coherent cache controller enabled, 16 ways, 1024 kB
[  0.000000] L2C-310 Coherent: CACHE_ID 0x410054c9, AUX_CTRL 0x46070001
[  0.000006] sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 85899345900ns
[  0.000015] clocksource: armada_370_xp_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76450417870 ns
[  0.000209] Console: colour dummy device 80x30
[  0.000218] Calibrating delay loop... 3188.32 BogoMIPS (lpj=15941632)
[  0.059927] pid_max: default: 32768 minimum: 301
[  0.059983] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[  0.059987] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[  0.060234] Initializing cgroup subsys blkio
[  0.060240] Initializing cgroup subsys memory
[  0.060255] Initializing cgroup subsys devices
[  0.060260] Initializing cgroup subsys freezer
[  0.060267] Initializing cgroup subsys perf_event
[  0.060272] Initializing cgroup subsys debug
[  0.060282] CPU: Testing write buffer coherency: ok
[  0.060380] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[  0.060404] Setting up static identity map for 0x8280 - 0x82d8
[  0.060483] mvebu-soc-id: MVEBU SoC ID=0x6820, Rev=0x4
[  0.060561] mvebu-pmsu: Initializing Power Management Service Unit
[  0.061038] Booting CPU 1
[  0.119946] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[  0.119976] Brought up 2 CPUs
[  0.119982] SMP: Total of 2 processors activated (6384.02 BogoMIPS).
[  0.119985] CPU: All CPU(s) started in SVC mode.
[  0.120159] devtmpfs: initialized
 
Last edited:
Code:
[  0.121789] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[  0.121893] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[  0.122055] pinctrl core: initialized pinctrl subsystem
[  0.122251] NET: Registered protocol family 16
[  0.122728] DMA: preallocated 256 KiB pool for atomic coherent allocations
[  0.149928] cpuidle: using governor ladder
[  0.169919] cpuidle: using governor menu
[  0.172264] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[  0.172269] hw-breakpoint: maximum watchpoint size is 4 bytes.
[  0.172384] mvebu-pmsu: CPU hotplug support is currently broken on Armada 38x: disabling
[  0.172390] mvebu-pmsu: CPU idle is currently broken on Armada 38x: disabling[  0.190416] vgaarb: loaded
[  0.190548] SCSI subsystem initialized
[  0.190777] usbcore: registered new interface driver usbfs
[  0.190805] usbcore: registered new interface driver hub
[  0.190828] usbcore: registered new device driver usb
[  0.190956] Advanced Linux Sound Architecture Driver Initialized.
[  0.191222] Bluetooth: Core ver 2.20
[  0.191241] NET: Registered protocol family 31
[  0.191245] Bluetooth: HCI device and connection manager initialized
[  0.191251] Bluetooth: HCI socket layer initialized
[  0.191255] Bluetooth: L2CAP socket layer initialized
[  0.191266] Bluetooth: SCO socket layer initialized
[  0.191819] clocksource: Switched to clocksource armada_370_xp_clocksource
[  0.196790] NET: Registered protocol family 2
[  0.197052] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[  0.197076] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[  0.197109] TCP: Hash tables configured (established 4096 bind 4096)
[  0.197134] UDP hash table entries: 256 (order: 1, 8192 bytes)
[  0.197148] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[  0.197221] NET: Registered protocol family 1
[  0.197399] RPC: Registered named UNIX socket transport module.
[  0.197403] RPC: Registered udp transport module.
[  0.197406] RPC: Registered tcp transport module.
[  0.197409] RPC: Registered tcp NFSv4.1 backchannel transport module.
[  0.197621] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[  0.198096] futex hash table entries: 512 (order: 3, 32768 bytes)
[  0.199009] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[  0.199020] io scheduler noop registered
[  0.199025] io scheduler deadline registered
[  0.199047] io scheduler cfq registered (default)
[  0.199561] armada-38x-pinctrl f1018000.pinctrl: registered pinctrl driver
[  0.200004] irq: Cannot allocate irq_descs @ IRQ41, assuming pre-allocated
[  0.200152] irq: Cannot allocate irq_descs @ IRQ73, assuming pre-allocated
[  0.200437] mvebu-pcie soc:pcie-controller: PCI host bridge to bus 0000:00
[  0.200445] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[  0.200450] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xe7ffffff]
[  0.200456] pci_bus 0000:00: root bus resource [bus 00-ff]
[  0.200659] PCI: bus0: Fast back to back transfers disabled
[  0.200664] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[  0.200670] pci 0000:00:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[  0.200937] PCI: bus1: Fast back to back transfers disabled
[  0.201247] PCI: bus2: Fast back to back transfers disabled
[  0.201304] pci 0000:00:01.0: BAR 8: assigned [mem 0xe0000000-0xe01fffff]
[  0.201310] pci 0000:00:02.0: BAR 8: assigned [mem 0xe0200000-0xe03fffff]
[  0.201317] pci 0000:01:00.0: BAR 0: assigned [mem 0xe0000000-0xe00fffff 64bit pref]
[  0.201330] pci 0000:01:00.0: BAR 2: assigned [mem 0xe0100000-0xe01fffff 64bit pref]
[  0.201340] pci 0000:00:01.0: PCI bridge to [bus 01]
[  0.201346] pci 0000:00:01.0:  bridge window [mem 0xe0000000-0xe01fffff]
[  0.201352] pci 0000:02:00.0: BAR 0: assigned [mem 0xe0200000-0xe02fffff 64bit pref]
[  0.201366] pci 0000:02:00.0: BAR 2: assigned [mem 0xe0300000-0xe03fffff 64bit pref]
[  0.201379] pci 0000:00:02.0: PCI bridge to [bus 02]
[  0.201384] pci 0000:00:02.0:  bridge window [mem 0xe0200000-0xe03fffff]
[  0.201480] mv_xor f1060800.xor: Marvell shared XOR driver
[  0.242087] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy )
[  0.282082] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy )
[  0.282157] mv_xor f1060900.xor: Marvell shared XOR driver
[  0.322075] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy )
[  0.362076] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy )
[  0.391724] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[  0.392710] console [ttyS0] disabled
[  0.412745] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 21, base_baud = 12500000) is a 16550A
[  1.233557] console [ttyS0] enabled
[  1.237608] ahci-mvebu f10a8000.sata: AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x3 impl platform mode
[  1.246716] ahci-mvebu f10a8000.sata: flags: 64bit ncq sntf led only pmp fbs pio slum part sxs
[  1.256283] scsi host0: ahci-mvebu
[  1.259933] scsi host1: ahci-mvebu
[  1.263468] ata1: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x100 irq 38
[  1.271418] ata2: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x180 irq 38
[  1.279792] pxa3xx-nand f10d0000.flash: This platform can't do DMA on this device
[  1.287507] nand: device found, Manufacturer ID: 0x01, Chip ID: 0xf1
[  1.293904] nand: AMD/Spansion S34ML01G2
[  1.297842] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[  1.305453] pxa3xx-nand f10d0000.flash: ECC strength 16, ECC step size 2048
[  1.312714] Bad block table found at page 65472, version 0x01
[  1.318746] Bad block table found at page 65408, version 0x01
[  1.324765] 10 ofpart partitions found on MTD device pxa3xx_nand-0
[  1.330970] Creating 10 MTD partitions on "pxa3xx_nand-0":
[  1.336486] 0x000000000000-0x000000200000 : "u-boot"
[  1.341904] 0x000000200000-0x000000240000 : "u_env"
[  1.347175] 0x000000240000-0x000000280000 : "s_env"
[  1.352459] 0x000000900000-0x000000a00000 : "devinfo"
[  1.357909] 0x000000a00000-0x000003200000 : "kernel1"
[  1.363347] 0x000001000000-0x000003200000 : "rootfs1"
[  1.368764] 0x000003200000-0x000005a00000 : "kernel2"
[  1.374207] 0x000003800000-0x000005a00000 : "rootfs2"
[  1.379594] 0x000005a00000-0x000008000000 : "syscfg"
[  1.384917] 0x000000280000-0x000000900000 : "unused_area"
[  1.391070] libphy: Fixed MDIO Bus: probed
[  1.395299] libphy: orion_mdio_bus: probed
[  1.400330] mvneta f1034000.ethernet eth0: Using random mac address 9a:f5:a1:e1:b8:2a
[  1.408959] mvneta f1070000.ethernet eth1: Using hardware mac address 00:50:43:75:78:a6
[  1.417282] xhci-hcd f10f8000.usb3: xHCI Host Controller
[  1.422633] xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 1
[  1.430238] xhci-hcd f10f8000.usb3: hcc params 0x0a000990 hci version 0x100 quirks 0x00010010
[  1.438821] xhci-hcd f10f8000.usb3: irq 40, io mem 0xf10f8000
[  1.444925] hub 1-0:1.0: USB hub found
[  1.448703] hub 1-0:1.0: 1 port detected
[  1.452789] xhci-hcd f10f8000.usb3: xHCI Host Controller
[  1.458126] xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 2
[  1.465684] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[  1.474087] hub 2-0:1.0: USB hub found
[  1.477863] hub 2-0:1.0: 1 port detected
[  1.481961] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[  1.488516] ehci-pci: EHCI PCI platform driver
[  1.493011] ehci-orion: EHCI orion driver
[  1.497134] usbcore: registered new interface driver usb-storage
[  1.503297] mousedev: PS/2 mouse device common for all mice
[  1.509189] armada38x-rtc f10a3800.rtc: rtc core: registered f10a3800.rtc as rtc0
[  1.516809] i2c /dev entries driver
[  1.531103] orion_wdt: Initial timeout 171 sec
[  1.535774] sdhci: Secure Digital Host Controller Interface driver
[  1.541987] sdhci: Copyright(c) Pierre Ossman
[  1.546460] sdhci-pltfm: SDHCI platform and OF driver helper
[  1.552282] usbcore: registered new interface driver usbhid
[  1.557875] usbhid: USB HID core driver
[  1.562358] NET: Registered protocol family 17
[  1.566888] ThumbEE CPU extension supported.
[  1.571179] Registering SWP/SWPB emulation handler
[  1.576837] input: gpio_keys as /devices/platform/gpio_keys/input/input0
[  1.583736] armada38x-rtc f10a3800.rtc: setting system clock to 1986-04-11 03:17:51 UTC (513573471)
[  1.621827] ata1: SATA link down (SStatus 0 SControl 300)
[  1.627266] ata2: SATA link down (SStatus 0 SControl 300)
[  3.671853] mvneta f1070000.ethernet eth1: Link is Up - 1Gbps/Full - flow control off
[  3.711854] IP-Config: Complete:
[  3.715097]  device=eth1, hwaddr=00:50:43:75:78:a6, ipaddr=192.168.1.1, mask=255.255.255.0, gw=255.255.255.255
[  3.725497]  host=MCDEBIAN, domain=, nis-domain=(none)
[  3.731003]  bootserver=192.168.1.5, rootserver=192.168.1.5, rootpath=
[  3.737943] ALSA device list:
[  3.740921]  No soundcards found.
[  3.748690] VFS: Mounted root (nfs filesystem) on device 0:13.
[  3.754870] devtmpfs: mounted
[  3.757950] Freeing unused kernel memory: 268K (c069d000 - c06e0000)
[  3.822031] random: systemd urandom read with 8 bits of entropy available
[  3.830927] systemd[1]: systemd 215 running in system mode. (+PAM +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ -SECCOMP -APPARMOR)
[  3.844398] systemd[1]: Detected architecture 'arm'.
 
Last edited:
Code:
Welcome to Debian GNU/Linux 8 (jessie)!
[  3.876471] systemd[1]: Failed to insert module 'autofs4'
[  3.882032] systemd[1]: Failed to insert module 'ipv6'
[  3.887914] systemd[1]: Set hostname to <MCDEBIAN>.
[  4.044432] systemd[1]: Cannot add dependency job for unit dbus.socket, ignoring: Unit dbus.socket failed to load: No such file or directory.
[  4.057253] systemd[1]: Cannot add dependency job for unit display-manager.service, ignoring: Unit display-manager.service failed to load: No such file or directory.
[  4.072949] systemd[1]: Starting Forward Password Requests to Wall Directory Watch.
[  4.080767] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[  4.088404] systemd[1]: Expecting device dev-ttyS0.device...
  Expecting device dev-ttyS0.device...
[  4.111885] systemd[1]: Starting Remote File Systems (Pre).
[  OK  ] Reached target Remote File Systems (Pre).
[  4.131850] systemd[1]: Reached target Remote File Systems (Pre).
[  4.137997] systemd[1]: Starting Encrypted Volumes.
[  OK  ] Reached target Encrypted Volumes.
[  4.161847] systemd[1]: Reached target Encrypted Volumes.
[  4.167300] systemd[1]: Starting Dispatch Password Requests to Console Directory Watch.
[  4.175422] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[  4.183396] systemd[1]: Starting Paths.
[  OK  ] Reached target Paths.
[  4.201854] systemd[1]: Reached target Paths.
[  4.206274] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[  4.215739] systemd[1]: Starting Swap.
[  OK  ] Reached target Swap.
[  4.241847] systemd[1]: Reached target Swap.
[  4.246155] systemd[1]: Starting Root Slice.
[  OK  ] Created slice Root Slice.
[  4.271851] systemd[1]: Created slice Root Slice.
[  4.276595] systemd[1]: Starting User and Session Slice.
[  OK  ] Created slice User and Session Slice.
[  4.301857] systemd[1]: Created slice User and Session Slice.
[  4.307650] systemd[1]: Starting /dev/initctl Compatibility Named Pipe.
[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
[  4.331853] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
[  4.338865] systemd[1]: Starting Delayed Shutdown Socket.
[  OK  ] Listening on Delayed Shutdown Socket.
[  4.361852] systemd[1]: Listening on Delayed Shutdown Socket.
[  4.367642] systemd[1]: Starting Journal Socket (/dev/log).
[  OK  ] Listening on Journal Socket (/dev/log).
[  4.391853] systemd[1]: Listening on Journal Socket (/dev/log).
[  4.397826] systemd[1]: Starting udev Kernel Socket.
[  OK  ] Listening on udev Kernel Socket.
[  4.421853] systemd[1]: Listening on udev Kernel Socket.
[  4.427216] systemd[1]: Starting udev Control Socket.
[  OK  ] Listening on udev Control Socket.
[  4.451853] systemd[1]: Listening on udev Control Socket.
[  4.457300] systemd[1]: Starting Journal Socket.
[  OK  ] Listening on Journal Socket.
[  4.481852] systemd[1]: Listening on Journal Socket.
[  4.486869] systemd[1]: Starting Sockets.
[  OK  ] Reached target Sockets.
[  4.511850] systemd[1]: Reached target Sockets.
[  4.516424] systemd[1]: Starting System Slice.
[  OK  ] Created slice System Slice.
[  4.541852] systemd[1]: Created slice System Slice.
[  4.546774] systemd[1]: Starting system-getty.slice.
[  OK  ] Created slice system-getty.slice.
[  4.571853] systemd[1]: Created slice system-getty.slice.
[  4.577294] systemd[1]: Starting system-serial\x2dgetty.slice.
[  OK  ] Created slice system-serial\x2dgetty.slice.
[  4.601853] systemd[1]: Created slice system-serial\x2dgetty.slice.
[  4.608179] systemd[1]: Mounted POSIX Message Queue File System.
[  4.614257] systemd[1]: Mounted Huge Pages File System.
[  4.619526] systemd[1]: Starting udev Coldplug all Devices...
  Starting udev Coldplug all Devices...
[  4.644960] systemd[1]: Starting Load Kernel Modules...
  Starting Load Kernel Modules...
[  4.673874] systemd[1]: Started Create list of required static device nodes for the current kernel.
[  4.683184] systemd[1]: Starting Create Static Device Nodes in /dev...
  Starting Create Static Device Nodes in /dev...
[  4.713018] systemd[1]: Mounting Debug File System...
  Mounting Debug File System...
[  4.734361] systemd[1]: Started Set Up Additional Binary Formats.
[  4.740684] systemd[1]: Starting Journal Service...
  Starting Journal Service...
[  OK  ] Started Journal Service.
[  4.781913] systemd[1]: Started Journal Service.
[  OK  ] Reached target Slices.
  Starting Remount Root and Kernel File Systems...
[  OK  ] Mounted Debug File System.
[  OK  ] Started Load Kernel Modules.
[  OK  ] Started Create Static Device Nodes in /dev.
[  OK  ] Started Remount Root and Kernel File Systems.
[  OK  ] Started udev Coldplug all Devices.
  Starting Load/Save Random Seed...
  Starting udev Kernel Device Manager...
[  OK  ] Reached target Local File Systems (Pre).
[  5.024270] systemd-udevd[2047]: starting version 215
[  OK  ] Reached target Local File Systems.
  Starting Create Volatile Files and Directories...
[  OK  ] Reached target Remote File Systems.
  Starting Trigger Flushing of Journal to Persistent Storage...
  Starting Apply Kernel Variables...
[  OK  ] Started udev Kernel Device Manager.
[  OK  ] Started Load/Save Random Seed.
[  OK  ] Started Create Volatile Files and Directories.
[  OK  ] Started Apply Kernel Variables.
[  OK  ] Found device /dev/ttyS0.
[  5.281018] systemd-journald[1290]: Received request to flush runtime journal from PID 1
[  OK  ] Started Trigger Flushing of Journal to Persistent Storage.
[  6.314247] random: nonblocking pool is initialized
  Starting Update UTMP about System Boot/Shutdown...
  Starting LSB: Raise network interfaces....
  Starting Copy rules generated while the root was ro...
[  OK  ] Started Copy rules generated while the root was ro.
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[  8.911832] mvneta f1034000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[  OK  ] Started LSB: Raise network interfaces..
[  OK  ] Reached target Network.
[  OK  ] Reached target Network is Online.
[  OK  ] Reached target System Initialization.
[  OK  ] Reached target Timers.
[  OK  ] Reached target Basic System.
  Starting Regular background program processing daemon...
[  OK  ] Started Regular background program processing daemon.
  Starting OpenBSD Secure Shell server...
[  OK  ] Started OpenBSD Secure Shell server.
  Starting /etc/rc.local Compatibility...
  Starting getty on tty2-tty6 if dbus and logind are not available...
  Starting LSB: Start NTP daemon...
  Starting Permit User Sessions...
[  OK  ] Started /etc/rc.local Compatibility.
[  OK  ] Started Permit User Sessions.
  Starting Getty on tty2...
[  OK  ] Started Getty on tty2.
  Starting Getty on tty1...
[  OK  ] Started Getty on tty1.
  Starting Serial Getty on ttyS0...
[  OK  ] Started Serial Getty on ttyS0.
[  OK  ] Started getty on tty2-tty6 if dbus and logind are not available.
  Starting Getty on tty6...
[  OK  ] Started Getty on tty6.
  Starting Getty on tty5...
[  OK  ] Started Getty on tty5.
  Starting Getty on tty4...
[  OK  ] Started Getty on tty4.
  Starting Getty on tty3...
[  OK  ] Started Getty on tty3.
[  OK  ] Reached target Login Prompts.
Debian GNU/Linux 8 MCDEBIAN ttyS0
MCDEBIAN login:
 
Last edited:
Initial network:
Code:
root@MCDEBIAN:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 9a:f5:a1:e1:b8:2a
          inet addr:192.168.200.170  Bcast:192.168.200.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:195 errors:0 dropped:0 overruns:0 frame:0
          TX packets:162 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:532
          RX bytes:19544 (19.0 KiB)  TX bytes:14940 (14.5 KiB)
          Interrupt:35
 
eth1      Link encap:Ethernet  HWaddr 00:50:43:75:78:a6
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:17453 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10954 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:532
          RX bytes:14689524 (14.0 MiB)  TX bytes:1791844 (1.7 MiB)
          Interrupt:36
 
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Top:

wrt1900ac-v2-debian-jessie-top.PNG
 
With the below kernel build ".config" changes the WRT1900AC V2 detects and mounts a USB3.0 Key 64Gb Corsair Slider formatted ext4:

Code:
root@McDev1:~/WRT1900AC-V2/kernel/linux-4.2.4# diff .config McDebian.config|grep ">"
> # CONFIG_BLK_DEV_THROTTLING is not set
> # CONFIG_CFQ_GROUP_IOSCHED is not set
> # CONFIG_CGROUP_NET_PRIO is not set
> # CONFIG_CGROUP_NET_CLASSID is not set
> # CONFIG_RFKILL_REGULATOR is not set
> CONFIG_SATA_AHCI_PLATFORM=y
> # CONFIG_EMAC_ROCKCHIP is not set
> CONFIG_BCMA=m
> CONFIG_BCMA_HOST_PCI_POSSIBLE=y
> CONFIG_BCMA_HOST_PCI=y
> # CONFIG_BCMA_HOST_SOC is not set
> CONFIG_BCMA_DRIVER_PCI=y
> # CONFIG_BCMA_DRIVER_GMAC_CMN is not set
> # CONFIG_BCMA_DRIVER_GPIO is not set
> # CONFIG_BCMA_DEBUG is not set
> CONFIG_REGULATOR=y
> # CONFIG_REGULATOR_DEBUG is not set
> CONFIG_REGULATOR_FIXED_VOLTAGE=y
> # CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
> # CONFIG_REGULATOR_USERSPACE_CONSUMER is not set
> # CONFIG_REGULATOR_ACT8865 is not set
> # CONFIG_REGULATOR_AD5398 is not set
> # CONFIG_REGULATOR_ANATOP is not set
> # CONFIG_REGULATOR_DA9210 is not set
> # CONFIG_REGULATOR_DA9211 is not set
> # CONFIG_REGULATOR_FAN53555 is not set
> # CONFIG_REGULATOR_GPIO is not set
> # CONFIG_REGULATOR_ISL9305 is not set
> # CONFIG_REGULATOR_ISL6271A is not set
> # CONFIG_REGULATOR_LP3971 is not set
> # CONFIG_REGULATOR_LP3972 is not set
> # CONFIG_REGULATOR_LP872X is not set
> # CONFIG_REGULATOR_LP8755 is not set
> # CONFIG_REGULATOR_LTC3589 is not set
> # CONFIG_REGULATOR_MAX1586 is not set
> # CONFIG_REGULATOR_MAX8649 is not set
> # CONFIG_REGULATOR_MAX8660 is not set
> # CONFIG_REGULATOR_MAX8952 is not set
> # CONFIG_REGULATOR_MAX8973 is not set
> # CONFIG_REGULATOR_PFUZE100 is not set
> # CONFIG_REGULATOR_TPS51632 is not set
> # CONFIG_REGULATOR_TPS62360 is not set
> # CONFIG_REGULATOR_TPS65023 is not set
> # CONFIG_REGULATOR_TPS6507X is not set
> # CONFIG_REGULATOR_TPS6524X is not set
> # CONFIG_VGA_ARB is not set
> # CONFIG_SOUND is not set
> # CONFIG_USB_HID is not set
>
> #
> # USB HID Boot Protocol drivers
> #
> # CONFIG_USB_KBD is not set
> # CONFIG_USB_MOUSE is not set
> CONFIG_USB_EHCI_HCD_PLATFORM=m
> CONFIG_USB_OHCI_HCD=m
> CONFIG_USB_OHCI_HCD_PCI=m
> CONFIG_USB_OHCI_HCD_PLATFORM=m
> CONFIG_USB_UHCI_HCD=m
> CONFIG_USB_HCD_BCMA=m
> CONFIG_USB_PHY=y
> CONFIG_NOP_USB_XCEIV=y
> CONFIG_AUTOFS4_FS=y
> CONFIG_PERCPU_RWSEM=y
[EMAIL]root@McDev1:~/WRT1900AC-V2/kernel/linux-4.2.4#[/EMAIL]

I should now be able to mount and run the rootfs from the USB3.0 Key. This could increase the performance of the Debian OS greatly but ideally I wanted the OS to run off the USB2.0 port so the USB3.0 port could be used for NAS purposes. I suppose a USB3.0 drive could do both the OS and file sharing with little performance loss.
 
The wireless driver and firmware for the WRT1900AC V2 88W8864 radios has been added:

https://github.com/kaloz/mwlwifi

mwlwifi Makefile changes:
Code:
obj-m += mwlwifi.o
 
mwlwifi-objs            += main.o
mwlwifi-objs            += mac80211.o
mwlwifi-objs            += fwdl.o
mwlwifi-objs            += fwcmd.o
mwlwifi-objs            += tx.o
mwlwifi-objs            += rx.o
mwlwifi-objs            += isr.o
mwlwifi-$(CONFIG_DEBUG_FS) += debugfs.o
#ifeq (1, $(BUILD_MFG))
#mwlwifi-objs += mfg.o
#endif
 
#AS             = $(CROSS_COMPILE)as
#LD             = $(CROSS_COMPILE)ld
#CC             = $(CROSS_COMPILE)gcc
 
#EXTRA_CFLAGS+= -I${KDIR}
#EXTRA_CFLAGS+= -O2 -funroll-loops -D__CHECK_ENDIAN__
 
#ifeq (1, $(BUILD_MFG))
#EXTRA_CFLAGS+= -DCONFIG_SUPPORT_MFG
#endif
 
#EXTRA_CFLAGS+= -I${PWD}
 
#all:
#       $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
 
#clean:
#       rm -f *.o *.a *.s *.ko *.ko.cmd *.o.cmd *.mod.* .mwlwifi.*
#       rm -rf modules.order Module.symvers .tmp_versions
#

Added the driver to the end of the kernel driver/Kconfig file:
Code:
source "drivers/mwlwifi/Kconfig"

Added the driver to the end of the kernel driver/Makefile:
Code:
obj-$(CONFIG_MWLWIFI)           += mwlwifi/

Added the driver firmware blobs to the kernel /firmware directory:
Code:
root@McDev1:~/WRT1900AC-V2/kernel/linux-4.2.4# ls firmware/mwlwifi
88W8864.bin  88W8897.bin  Marvell_license.txt

Added the driver firmware to the kernel firmware/Makefile:
Code:
fw-shipped-$(CONFIG_MWLWIFI) += mwlwifi/88W8864.bin mwlwifi/88W8897.bin mwlwifi/Marvell_license.txt

Success the latest Marvel Linux 88W8864 driver is in operation :)
 
Last edited:
Code:
root@MCDEBIAN:~# iw dev
phy#1
        Interface wlan1
                ifindex 5
                wdev 0x100000001
                addr 00:25:9c:13:96:a3
                type managed
phy#0
        Interface wlan0
                ifindex 4
                wdev 0x1
                addr 00:25:9c:13:96:a4
                type managed

Code:
root@MCDEBIAN:~# ifconfig wlan0 up
root@MCDEBIAN:~# ifconfig wlan1 up
root@MCDEBIAN:~# ifconfig
eth0      Link encap:Ethernet  HWaddr d2:26:d4:7a:97:37
          inet addr:192.168.200.103  Bcast:192.168.200.255  Mask:255.255.255.0
          inet6 addr: fe80::d026:d4ff:fe7a:9737/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1623 errors:0 dropped:0 overruns:0 frame:0
          TX packets:481 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:532
          RX bytes:342346 (334.3 KiB)  TX bytes:41928 (40.9 KiB)
          Interrupt:34
 
eth1      Link encap:Ethernet  HWaddr 00:50:43:75:78:a6
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::250:43ff:fe75:78a6/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:130226 errors:0 dropped:0 overruns:0 frame:0
          TX packets:71610 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:532
          RX bytes:155049555 (147.8 MiB)  TX bytes:35458612 (33.8 MiB)
          Interrupt:36
 
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
 
wlan0     Link encap:Ethernet  HWaddr 00:25:9c:13:96:a4
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
 
wlan1     Link encap:Ethernet  HWaddr 00:25:9c:13:96:a3
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Code:
root@MCDEBIAN:~# iw wlan0 scan|grep -i ssid
        SSID: McWifi_AC
root@MCDEBIAN:~# iw wlan1 scan|grep -i ssid
        SSID:
        SSID: McWifi_AC

Moving on to network configurations below:
  1. Route\Firewall eth0 (WAN) and br0 (LAN\WLAN); maybe this easiest accomplished with either Untangle or Pfsense
  2. DHCP Server
  3. Enable Wireless AP mode on the radios and a base wireless config
  4. Bridge0 eth1, wlan0 and wlan1
 
I configured Debian Jessie as an AP by adding bridge-utils and hostapd.

Kernel build ".config" changes to support ethernet bridging and hostapd:
Code:
< CONFIG_STP=m
< CONFIG_BRIDGE=m
< CONFIG_BRIDGE_IGMP_SNOOPING=y
< CONFIG_LLC=m
< CONFIG_NL80211_TESTMODE=y

Hostapd default config:
Code:
root@MCDEBIAN:/etc/default# cat hostapd
# Defaults for hostapd initscript
#
# See /usr/share/doc/hostapd/README.Debian for information about alternative
# methods of managing hostapd.
#
# Uncomment and set DAEMON_CONF to the absolute path of a hostapd configuration
# file and hostapd will be started during system boot. An example configuration
# file can be found at /usr/share/doc/hostapd/examples/hostapd.conf.gz
#
#DAEMON_CONF=""
 
# Additional daemon options to be appended to hostapd command:-
#       -d   show more debug messages (-dd for even more)
#       -K   include key data in debug messages
#       -t   include timestamps in some debug messages
#
# Note that -B (daemon mode) and -P (pidfile) options are automatically
# configured by the init.d script and must not be added to DAEMON_OPTS.
#
#DAEMON_OPTS=""
 
DAEMON_CONF="/etc/hostapd/wlan0.conf /etc/hostapd/wlan1.conf"
 
root@MCDEBIAN:/etc/default#

Hostapd wireless configs:

Code:
root@MCDEBIAN:/etc/default# cat /etc/hostapd/wlan0.conf
interface=wlan0
bridge=br0
driver=nl80211
ctrl_interface=/var/run/hostapd
ssid=McWRT50
ignore_broadcast_ssid=0
hw_mode=a
channel=36
auth_algs=1
wmm_enabled=1
ieee80211n=1
ht_capab=[LDPC][HT40+][SHORT-GI-20][SHORT-GI-40]
ieee80211ac=1
vht_capab=[MAX-MPDU-7991][RXLDPC][SHORT-GI-80][RX-STBC-1][SU-BEAMFORMER][SU-BEAMFORMEE][MAX-A-MPDU-LEN-EXP7][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN]
vht_oper_chwidth=1
vht_oper_centr_freq_seg0_idx=42
 
#wpa=2
#wpa_passphrase=1234567890
#wpa_key_mgmt=WPA-PSK
#wpa_pairwise=TKIP
#rsn_pairwise=CCMP
country_code=US
root@MCDEBIAN:/etc/default#

Code:
root@MCDEBIAN:/etc/default# cat /etc/hostapd/wlan1.conf
interface=wlan1
bridge=br0
driver=nl80211
ctrl_interface=/var/run/hostapd
ssid=McWRT24
ignore_broadcast_ssid=0
hw_mode=g
channel=5
auth_algs=1
wmm_enabled=1
ieee80211n=1
ht_capab=[LDPC][SHORT-GI-20][SHORT-GI-40]
ieee80211ac=1
 
#wpa=2
#wpa_passphrase=1234567890
#wpa_key_mgmt=WPA-PSK
#wpa_pairwise=TKIP
#rsn_pairwise=CCMP
country_code=US
root@MCDEBIAN:/etc/default#
 
With the below kernel build ".config" changes the WRT1900AC V2 detects and mounts a USB3.0 Key 64Gb Corsair Slider formatted ext4:

Code:
root@McDev1:~/WRT1900AC-V2/kernel/linux-4.2.4# diff .config McDebian.config|grep ">"
> # CONFIG_BLK_DEV_THROTTLING is not set
> # CONFIG_CFQ_GROUP_IOSCHED is not set
> # CONFIG_CGROUP_NET_PRIO is not set
> # CONFIG_CGROUP_NET_CLASSID is not set
> # CONFIG_RFKILL_REGULATOR is not set
> CONFIG_SATA_AHCI_PLATFORM=y
> # CONFIG_EMAC_ROCKCHIP is not set
> CONFIG_BCMA=m
> CONFIG_BCMA_HOST_PCI_POSSIBLE=y
> CONFIG_BCMA_HOST_PCI=y
> # CONFIG_BCMA_HOST_SOC is not set
> CONFIG_BCMA_DRIVER_PCI=y
> # CONFIG_BCMA_DRIVER_GMAC_CMN is not set
> # CONFIG_BCMA_DRIVER_GPIO is not set
> # CONFIG_BCMA_DEBUG is not set
> CONFIG_REGULATOR=y
> # CONFIG_REGULATOR_DEBUG is not set
> CONFIG_REGULATOR_FIXED_VOLTAGE=y
> # CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
> # CONFIG_REGULATOR_USERSPACE_CONSUMER is not set
> # CONFIG_REGULATOR_ACT8865 is not set
> # CONFIG_REGULATOR_AD5398 is not set
> # CONFIG_REGULATOR_ANATOP is not set
> # CONFIG_REGULATOR_DA9210 is not set
> # CONFIG_REGULATOR_DA9211 is not set
> # CONFIG_REGULATOR_FAN53555 is not set
> # CONFIG_REGULATOR_GPIO is not set
> # CONFIG_REGULATOR_ISL9305 is not set
> # CONFIG_REGULATOR_ISL6271A is not set
> # CONFIG_REGULATOR_LP3971 is not set
> # CONFIG_REGULATOR_LP3972 is not set
> # CONFIG_REGULATOR_LP872X is not set
> # CONFIG_REGULATOR_LP8755 is not set
> # CONFIG_REGULATOR_LTC3589 is not set
> # CONFIG_REGULATOR_MAX1586 is not set
> # CONFIG_REGULATOR_MAX8649 is not set
> # CONFIG_REGULATOR_MAX8660 is not set
> # CONFIG_REGULATOR_MAX8952 is not set
> # CONFIG_REGULATOR_MAX8973 is not set
> # CONFIG_REGULATOR_PFUZE100 is not set
> # CONFIG_REGULATOR_TPS51632 is not set
> # CONFIG_REGULATOR_TPS62360 is not set
> # CONFIG_REGULATOR_TPS65023 is not set
> # CONFIG_REGULATOR_TPS6507X is not set
> # CONFIG_REGULATOR_TPS6524X is not set
> # CONFIG_VGA_ARB is not set
> # CONFIG_SOUND is not set
> # CONFIG_USB_HID is not set
>
> #
> # USB HID Boot Protocol drivers
> #
> # CONFIG_USB_KBD is not set
> # CONFIG_USB_MOUSE is not set
> CONFIG_USB_EHCI_HCD_PLATFORM=m
> CONFIG_USB_OHCI_HCD=m
> CONFIG_USB_OHCI_HCD_PCI=m
> CONFIG_USB_OHCI_HCD_PLATFORM=m
> CONFIG_USB_UHCI_HCD=m
> CONFIG_USB_HCD_BCMA=m
> CONFIG_USB_PHY=y
> CONFIG_NOP_USB_XCEIV=y
> CONFIG_AUTOFS4_FS=y
> CONFIG_PERCPU_RWSEM=y
[EMAIL]root@McDev1:~/WRT1900AC-V2/kernel/linux-4.2.4#[/EMAIL]

I should now be able to mount and run the rootfs from the USB3.0 Key. This could increase the performance of the Debian OS greatly but ideally I wanted the OS to run off the USB2.0 port so the USB3.0 port could be used for NAS purposes. I suppose a USB3.0 drive could do both the OS and file sharing with little performance loss.

Should this work with a eSATA SSD connected to the USB2.0/eSATA port?
 
Should this work with a eSATA SSD connected to the USB2.0/eSATA port?
It should work but I'm not sure I have the right kernel modules loaded for the multifunction USB2.0/eSATA port. I do know that the USB2.0 portion of the multifunction USB2.0 port works.

When I get a chance I will do some testing for you.
 
This is amazing. Thanks for sharing!
 
Hi Chadster,

Just letting you know that I have finally installed your firmware and am having a ball. It is about 15 years since I last ran a Debian server, and it is all coming back to me. It is rock solid. I have installed Samba and a few other tools I like to use. It is a joy to use after OpenWRT.

I have not yet used the wireless drivers, but note from your GIT that you have some in beta. Give me a week or so to baseline the system and I'll be happy to start using the wifi drivers and give you some feedback.

This is a great project. Well done.
 
I'm glad you are enjoying Debian on your Linksys WRT router.

The McDebian 4.4.16 firmware and wireless drivers for are quite stable and wireless should be active upon boot by default.
 

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top