Lech Perczak aadcb4abef ath79: add Cisco Meraki Z1
Specifications:

SOC:	Atheros AR9344 @ 560MHz
RAM:	2x Winbond W9751G6KB-25 (128 MiB)
FLASH:	Hynix H27U1G8F2BTR (128 MiB)
WIFI1:	Atheros AR9340 5.0GHz (SoC)
WIFI2:	Atheros AR9280 2.4GHz
SWITCH:	Atheros AR8327 (5x Gigabit (1x WAN, 4x LAN)
LED:	1x Power-LED, 1 x RGB Tricolor-LED
INPUT:	One Reset Button
USB:	One USB 2.0 Port
UART:	JP1 on PCB (Labeled UART), 3.3v-Level, 115200n8
        (GND, TX, RX, VCC - GND is next to the UART silk screen)

Flashing Instructions:

If your device still has vulnerable firmware, then existing installation
instructions can be used. Devices currently running ar71xx firmware can
be upgraded directly, although ar71xx firmware will complain,
because of changed metadata format. So you'll have to force the upgrade.

If your firmware is too new, there are two options
- temporarily adding a SPI-NOR flash to boot initramfs from
  (recommended)
- patching NAND image with initramfs with external programmer
  (recommended if and only if you have access to 360-clip, or
  similar device, that doesn't require desoldering a TSOP48 chip))

Since this device is brought over from an old AR71xx, there's
already a wiki-page with detailed instructions:
<https://openwrt.org/toh/meraki/z1>

Installing from SPI-NOR:
- Download pre-built image from
  <https://github.com/Leo-PL/OpenWrt-Meraki-Z1>
  or assemble your own by splicing
  router-u-boot <https://github.com/CodeFetch/router-u-boot>
  image for TP-Link WDR4300 with Z1 initramfs in uImage format.
  To build uImage initramfsf from source, remove the "KERNEL_INITRAMFS"
  variable from target/linux/ath79/image/nand.mk for Z1.
  Put the U-boot image at offset 0, initramfs at offset 131072.
- Write the image to an 8MB (or greater) SPI flash
- Temporarily bridge - or solder in a 220-ohm resistor between pins 6
  and 8 of the SPI-NOR chip to override boot source to SPI
- When the initramfs first boots, write the standard initramfs to NAND,
  to both 'kernel' and 'recovery' partitions

  $ mtd write /tmp/openwrt-ath79-nand-meraki_z1-initramfs-kernel.bin kernel
  $ mtd write /tmp/openwrt-ath79-nand-meraki_z1-initramfs-kernel.bin recovery

  Now you can disconnect the resistor and try to boot the system from
  NAND. If it works, continue with installation, as described for legacy
  method using vulnerable stock firmware.
- When done, you can remove SPI-NOR chip and the resistor altogether,
  it can be reused to perform installation on other devices,
  or act as a recovery boot source if needed, if the recovery initramfs
  fails for any reason.

Installing by patching NAND
- If you'd like to desolder NAND to perform this, I highly advise
  against it, use SPI-NOR method above instead.
- If you have external programmer and a NAND clip, read out the whole
  chip image, while keeping the device in reset by shorting SRST
  (pin 11) to ground in JTAG connector,
  and store a backup in a safe place.
- Patch the chip image with initramfs for raw NAND from
  <https://github.com/Leo-PL/OpenWrt-Meraki-Z1>, by using a script
  there, or manually:

  $ dd if=openwrt-ath79-nand-meraki_z1-initramfs-kernel-rawnand.bin of=z1_dump.img bs=135168 seek=1 conv=notrunc
  $ dd if=openwrt-ath79-nand-meraki_z1-initramfs-kernel-rawnand.bin of=z1_dump.img bs=135168 seek=65 conv=notrunc

  This will write the initramfs to both kernel and recovery partitions,
  which is highly recommended, as due to device architecture it is
  notoriously hard to unbrick.
- Write the image back to the NAND, again, keeping the CPU in the reset.
- When the unit boots to initramfs, proceed as per existing instructions
  for volnerable firmware.

Legacy installation on vulnerable stock firmware:
The gist:
1. Get a root-shell on the device (see wiki). (needs UART access)
2. make a backup (to a PC/safe location) of the existing Meraki
   firmware.
3. copy over the OpenWrt initramfs kernel for the Z1.
   This gets written into the kernel NAND partition.
   (Verify that written image is complete!)

After the following reboot and successfull boot of the staging
OpenWrt initramfs image:

4. Free up space by removing Meraki firmware partitions from UBI volume
   to free up space for OpenWrt (example given for the latest wired-14
   version):
   $ ubirmvol -N storage /dev/ubi0
   $ ubirmvol -N rootfs-wired-14-202005181203-G201ba9ed-rel-gazebo-1 /dev/ubi0
   $ ubirmvol -N rootfs-wired-14-202005181203-G201ba9ed-rel-gazebo-2 /dev/ubi0

4. copy over the sysupgrade.bin for the router and use sysupgrade
   to make the installation permanent.

Notable changes from ar71xx support:
- LED colors are now different, because nu801 userspace driver is used
  for the RGB LED.

Acknowledgments:
- Hal Martin, for providing additional devices for research, including
  one modded for SPI boot and with removable NAND
- Christian Lamparter for initial device tree and image configuration

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>

[Finished support, updated commit message with new installation
methods]
Co-authored-by: Christian Lamparter <chunkeey@gmail.com>
Co-authored-by: Lech Perczak <lech.perczak@gmail.com>
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17665
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-28 10:38:36 +02:00
2026-05-28 10:38:36 +02:00
2026-05-25 23:37:21 +02:00
2024-05-17 22:03:06 +03:00

OpenWrt logo

OpenWrt Project is a Linux operating system targeting embedded devices. Instead of trying to create a single, static firmware, OpenWrt provides a fully writable filesystem with package management. This frees you from the application selection and configuration provided by the vendor and allows you to customize the device through the use of packages to suit any application. For developers, OpenWrt is the framework to build an application without having to build a complete firmware around it; for users this means the ability for full customization, to use the device in ways never envisioned.

Sunshine!

Download

Built firmware images are available for many architectures and come with a package selection to be used as WiFi home router. To quickly find a factory image usable to migrate from a vendor stock firmware to OpenWrt, try the Firmware Selector.

If your device is supported, please follow the Info link to see install instructions or consult the support resources listed below.

An advanced user may require additional or specific package. (Toolchain, SDK, ...) For everything else than simple firmware download, try the wiki download page:

Development

To build your own firmware you need a GNU/Linux, BSD or macOS system (case sensitive filesystem required). Cygwin is unsupported because of the lack of a case sensitive file system.

Requirements

You need the following tools to compile OpenWrt, the package names vary between distributions. A complete list with distribution specific packages is found in the Build System Setup documentation.

binutils bzip2 diff find flex gawk gcc-6+ getopt grep install libc-dev libz-dev
make4.1+ perl python3.7+ rsync subversion unzip which

Quickstart

  1. Run ./scripts/feeds update -a to obtain all the latest package definitions defined in feeds.conf / feeds.conf.default

  2. Run ./scripts/feeds install -a to install symlinks for all obtained packages into package/feeds/

  3. Run make menuconfig to select your preferred configuration for the toolchain, target system & firmware packages.

  4. Run make to build your firmware. This will download all sources, build the cross-compile toolchain and then cross-compile the GNU/Linux kernel & all chosen applications for your target system.

The main repository uses multiple sub-repositories to manage packages of different categories. All packages are installed via the OpenWrt package manager called opkg. If you're looking to develop the web interface or port packages to OpenWrt, please find the fitting repository below.

  • LuCI Web Interface: Modern and modular interface to control the device via a web browser.

  • OpenWrt Packages: Community repository of ported packages.

  • OpenWrt Routing: Packages specifically focused on (mesh) routing.

  • OpenWrt Video: Packages specifically focused on display servers and clients (Xorg and Wayland).

Support Information

For a list of supported devices see the OpenWrt Hardware Database

Documentation

Support Community

  • Forum: For usage, projects, discussions and hardware advise.
  • Support Chat: Channel #openwrt on oftc.net.

Developer Community

License

OpenWrt is licensed under GPL-2.0

S
Description
This repository is a mirror of https://git.openwrt.org/openwrt/openwrt.git It is for reference only and is not active for check-ins. We will continue to accept Pull Requests here. They will be merged via staging trees then into openwrt.git.
Readme 1 GiB
Languages
C 64.8%
Makefile 20.8%
Shell 7.3%
Perl 2.4%
UnrealScript 1.9%
Other 2.6%