openwrt/target/linux
Martin Kennedy af9dee336d ath79: add support for Meraki MR16
Port device support for Meraki MR16 from the ar71xx target to ath79.

Specifications:

  * AR7161 CPU, 16 MiB Flash, 64 MiB RAM
  * One PoE-capable Gigabit Ethernet Port
  * AR9220 / AR9223 (2x2 11an / 11n) WLAN

Installation:

  * Requires TFTP server at 192.168.1.101, w/ initramfs & sysupgrade .bins
  * Open shell case and connect a USB to TTL cable to upper serial headers
  * Power on the router; connect to U-boot over 115200-baud connection
  * Interrupt U-boot process to boot Openwrt by running:
       setenv bootcmd bootm 0xbf0a0000; saveenv;
       tftpboot 0c00000 <filename-of-initramfs-kernel>.bin;
       bootm 0c00000;
  * Copy sysupgrade image to /tmp on MR16
  * sysupgrade /tmp/<filename-of-sysupgrade>.bin

Notes:

  - There are two separate ARTs in the partition (offset 0x1000/0x5000 and
    0x11000/0x15000) in the OEM device. I suspect this is an OEM artifact;
    possibly used to configure the radios for different regions,
    circumstances or RF frontends. Since the ar71xx target uses the
    second offsets, use that second set (0x11000 and 0x15000) for the ART.

  - kmod-owl-loader is still required to load the ART partition into the
    driver.

  - The manner of storing MAC addresses is updated from ar71xx; it is
    at 0x66 of the 'config' partition, where it was discovered that the
    OEM firmware stores it. This is set as read-only. If you are
    migrating from ar71xx and used the method mentioned above to
    upgrade, use kmod-mtd-rw or UCI to add the MAC back in. One more
    method for doing this is described below.

  - Migrating directly from ar71xx has not been thoroughly tested, but
    one method has been used a couple of times with good success,
    migrating 18.06.2 to a full image produced as of this commit. Please
    note that these instructions are only for experienced users, and/or
    those still able to open their device up to flash it via the serial
    headers should anything go wrong.

    1) Install kmod-mtd-rw and uboot-envtools
    2) Run `insmod mtd-rw.ko i_want_a_brick=1`
    3) Modify /etc/fw_env.config to point to the u-boot-env partition.
       The file /etc/fw_env.config should contain:

       # MTD device   env offset  env size    sector size
       /dev/mtd1      0x00000     0x10000     0x10000

       See https://openwrt.org/docs/techref/bootloader/uboot.config
       for more details.

    4) Run `fw_printenv` to verify everything is correct, as per the
       link above.
    5) Run `fw_setenv bootcmd bootm 0xbf0a0000` to set a new boot address.
    6) Manually modify /lib/upgrade/common.sh's get_image function:
       Change ...

       cat "$from" 2>/dev/null | $cmd

       ... into ...

       (
         dd if=/dev/zero bs=1 count=$((0x66)) ; # Pad the first 102 bytes
         echo -ne '\x00\x18\x0a\x12\x34\x56'  ; # Add in MAC address
         dd if=/dev/zero bs=1 count=$((0x20000-0x66-0x6)) ; # Pad the rest
         cat "$from" 2>/dev/null | $cmd
       )

       ... which, during the upgrade process, will pad the image by
       128K of zeroes-plus-MAC-address, in order for the ar71xx's
       firmware partition -- which starts at 0xbf080000 -- to be
       instead aligned with the ath79 firmware partition, which
       starts 128K later at 0xbf0a0000.

    7) Copy the sysupgrade image into /tmp, as above
    8) Run `sysupgrade -F /tmp/<sysupgrade>.bin`, then wait

    Again, this may BRICK YOUR DEVICE, so make *sure* to have your
    serial cable handy.

Addenda:

  - The MR12 should be able to be migrated in a nearly identical manner as
    it shares much of its hardware with the MR16.

  - Thank-you Chris B for copious help with this port.

Signed-off-by: Martin Kennedy <hurricos@gmail.com>
[fix typo in compat message, drop art DT label,
move 05_fix-compat-version to subtarget]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-31 17:41:21 +02:00
..
apm821xx apm821xx: fix typos in .dts files 2020-08-29 17:15:09 +02:00
arc770 kernel: set WATCHDOG_CORE dependency in kmod-hwmon-sch5627 2020-08-24 14:09:11 +02:00
archs38 treewide: use wpad-basic-wolfssl as default 2020-08-20 14:19:39 +02:00
armvirt kernel: set WATCHDOG_CORE dependency in kmod-hwmon-sch5627 2020-08-24 14:09:11 +02:00
at91 at91: explicitly set CONFIG_USB_SUPPORT for sam9x subtarget 2020-08-27 16:36:18 +02:00
ath25 treewide: use wpad-basic-wolfssl as default 2020-08-20 14:19:39 +02:00
ath79 ath79: add support for Meraki MR16 2020-08-31 17:41:21 +02:00
bcm27xx kernel: bump 5.4 to 5.4.61 2020-08-30 19:44:47 +02:00
bcm47xx treewide: use wpad-basic-wolfssl as default 2020-08-20 14:19:39 +02:00
bcm53xx treewide: use wpad-basic-wolfssl as default 2020-08-20 14:19:39 +02:00
bcm63xx kernel: set WATCHDOG_CORE dependency in kmod-hwmon-sch5627 2020-08-24 14:09:11 +02:00
cns3xxx treewide: use wpad-basic-wolfssl as default 2020-08-20 14:19:39 +02:00
gemini gemini: Add swap partition to DNS-313 2020-07-31 18:34:40 +02:00
generic kernel: add options needed for SELinux 2020-08-31 01:15:41 +01:00
imx6 kernel: unify CONFIG_GPIO_SYSFS in kernel configs 2020-08-06 12:37:04 +02:00
ipq40xx kernel: bump 5.4 to 5.4.61 2020-08-30 19:44:47 +02:00
ipq806x kernel: bump 5.4 to 5.4.61 2020-08-30 19:44:47 +02:00
ipq807x kernel: unify CONFIG_GPIO_SYSFS in kernel configs 2020-08-06 12:37:04 +02:00
kirkwood treewide: use wpad-basic-wolfssl as default 2020-08-20 14:19:39 +02:00
lantiq lantiq: remove vmmc node from FritzBox 7412 dts 2020-08-20 23:45:39 +02:00
layerscape kernel: bump 5.4 to 5.4.61 2020-08-30 19:44:47 +02:00
malta kernel: set WATCHDOG_CORE dependency in kmod-hwmon-sch5627 2020-08-24 14:09:11 +02:00
mediatek kernel: bump 5.4 to 5.4.61 2020-08-30 19:44:47 +02:00
mpc85xx treewide: use wpad-basic-wolfssl as default 2020-08-20 14:19:39 +02:00
mvebu mvebu: LS421DE: add linkstation poweroff driver 2020-08-28 10:44:29 +01:00
mxs treewide: make dependency on kmod-usb-net selective 2020-08-10 12:54:30 +02:00
octeon octeon: add support for Itus Shield Router 2020-08-16 02:15:06 +02:00
octeontx kernel: bump 5.4 to 5.4.60 2020-08-24 17:33:58 +02:00
omap treewide: use wpad-basic-wolfssl as default 2020-08-20 14:19:39 +02:00
oxnas oxnas: kd20: revert accedintally commited change 2020-08-29 01:16:24 +01:00
pistachio pistachio: Use kernel 5.4 by default 2020-08-27 00:34:46 +02:00
ramips ramips: rt3883: use lzma-loader for DIR-645 2020-08-28 00:25:34 +02:00
rb532 treewide: use wpad-basic-wolfssl as default 2020-08-20 14:19:39 +02:00
rockchip kernel: bump 5.4 to 5.4.58 2020-08-18 18:14:54 +02:00
samsung kernel: Update kernel 4.14 to version 4.14.187 2020-07-04 21:12:42 +02:00
sunxi treewide: use wpad-basic-wolfssl as default 2020-08-20 14:19:39 +02:00
tegra treewide: use wpad-basic-wolfssl as default 2020-08-20 14:19:39 +02:00
uml uml: update to linux 5.4 2020-08-22 07:02:01 +02:00
x86 kernel: set WATCHDOG_CORE dependency in kmod-hwmon-sch5627 2020-08-24 14:09:11 +02:00
zynq kernel: unify CONFIG_GPIO_SYSFS in kernel configs 2020-08-06 12:37:04 +02:00
Makefile build: add 'make kernel_xconfig' command 2020-07-08 16:07:05 +02:00