-
-
Notifications
You must be signed in to change notification settings - Fork 11.1k
ath79: support Meraki MR18 and Z1 #12517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Two Mikrotik board families (SXT 5nD R2 and Routerboard 92x are using software ECC on NAND. Some of them use chips capable of subpage write, others do not - within the same family, and a common block size is required for UBI, to avoid mounting errors. Set the ECC step size explicitly for them to 2048B, so UBI can mount existing volumes without problems, at the same time allowing to unlocking subpage write functionality, reuqired for Meraki MR18. Fixes: 6561ca1 ("ath79: ar934x: fix mounting issues if subpage is not supported") Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
This is necessary to support the Meraki MR18 and likely Z1 as well. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
This sort of reverts Koen Vandeputte's commit 6561ca1 ("ath79: ar934x: fix mounting issues if subpage is not supported") since it does not work on the MR18 as the UBI is coming from Meraki in that way and it used to work with AR71XX before. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
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 AR8236 (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:
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>
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. copy over the sysupgrade.bin for the router and use sysupgrade
to make the installation permanent.
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Specifications:
SOC: Atheros/Qualcomm QCA9557-AT4A @ 720MHz
RAM: 2x Winbond W9751G6KB-25 (128 MiB)
FLASH: Hynix H27U1G8F2BTR-BC TSOP48 ONFI NAND (128 MiB)
WIFI1: Atheros AR9550 5.0GHz (SoC)
WIFI2: Atheros AR9582-AR1A 2.4GHz
WIFI2: Atheros AR9582-AR1A 2.4GHz + 5GHz
PHYETH: Atheros AR8035-A, 802.3af PoE capable Atheros (1x Gigabit LAN)
LED: 1x Power-LED, 1 x RGB Tricolor-LED
INPUT: One Reset Button
UART: JP1 on PCB (Labeled UART), 3.3v-Level, 115200n8
(VCC, RX, TX, GND - VCC is closest to the boot set jumper
under the console pins.)
Flashing instructions:
Depending on the installed firmware, there fastly different methods
to flash a MR18. These have been documented on:
<https://openwrt.org/toh/meraki/mr18>
Note: upgrades from AR71XX are possible, but require the force
sysupgrade option.
The LEDs has changed since AR71XX. The white LED is now used during
the boot and when upgrading instead of the green tricolor LED.
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
Thank you.
Yes, I don't have the mikrotik boards, but since Koen is fine with the
proposed mikrotik change, the mr18 image is definitely ready for inclusion.
I can do that on Sunday.
The Z1 is different, the last word was that it bricked the router. And
resetting an Z1 is from what was told me, not that straight forward as it
involves shorting out data pins on the nand chip during boot in order to
trigger recovery/fallback. So if there isn't a confirmation, I would rather
err on the side of caution than let people unknowingly brick their routers.
Lech Perczak ***@***.***> schrieb am Mo., 8. Mai 2023, 19:49:
… Bring back Cisco Meraki MR18 and Z1 from long limbo after ar71xx removal.
Based largely on @chunkeey <https://github.com/chunkeey>'s work, fixing
only a few typos, but with added fix for potentially affected Mikrotik
devices using SW ECC for their NAND flash. Installation is the same as it
was in ar71xx.
------------------------------
You can view, comment on, or merge this pull request online at:
#12517
Commit Summary
- 2a4b993
<2a4b993>
ath79: set 2048B ECC size for Mikrotik boards using soft ECC
- 30a35ad
<30a35ad>
ath79: nand: enable software BCH support
- d555c82
<d555c82>
ath79: ar934x: still advertise subpage on soft ecc
- 23bc2a5
<23bc2a5>
ath79: add Cisco Meraki Z1
- 55df742
<55df742>
ath79: add Cisco Meraki MR18
File Changes
(12 files <https://github.com/openwrt/openwrt/pull/12517/files>)
- *A* target/linux/ath79/dts/ar9344_meraki_z1.dts
<https://github.com/openwrt/openwrt/pull/12517/files#diff-9900fb9d52a5522dc3b5ef9b4923340ab7fede00a2e0a53dd50f9f913973a197>
(164)
- *M* target/linux/ath79/dts/ar9344_mikrotik_routerboard-sxt-5nd-r2.dts
<https://github.com/openwrt/openwrt/pull/12517/files#diff-aecdc17f0ea6b1c7b3199bcd9536144e2487c4b3980f130e726c57faafd710d3>
(1)
- *A* target/linux/ath79/dts/qca9557_meraki_mr18.dts
<https://github.com/openwrt/openwrt/pull/12517/files#diff-6c26a4fe8961ada32349850023c81600d1344cc4024655e171b50ca977cccd87>
(155)
- *M* target/linux/ath79/dts/qca9558_mikrotik_routerboard-92x.dtsi
<https://github.com/openwrt/openwrt/pull/12517/files#diff-c658c23696e69cc76a97e5caafe4b37adda994f8b37629ab74944a0a14090a2f>
(1)
- *M* target/linux/ath79/files/drivers/mtd/nand/raw/ar934x_nand.c
<https://github.com/openwrt/openwrt/pull/12517/files#diff-5e8977133ed95f6ced5dde78dd73047d3ccec66c0d079a906e28f37914670731>
(6)
- *M* target/linux/ath79/image/lzma-loader/src/ar71xx_regs.h
<https://github.com/openwrt/openwrt/pull/12517/files#diff-48c1f1b035c33d9538bf78a8ee0b6b6cedb5bcf42ec497fd17fffed0bfcdc8a0>
(17)
- *M* target/linux/ath79/image/lzma-loader/src/board.c
<https://github.com/openwrt/openwrt/pull/12517/files#diff-74f29e0776c729d6c3e87763804bf6a0966ccf22e2b6468db1ebf26cb7744ad7>
(129)
- *M* target/linux/ath79/image/nand.mk
<https://github.com/openwrt/openwrt/pull/12517/files#diff-666195a7a487da3e55148b1df48f7a2cde66b53022757789711e077ddac3e364>
(44)
- *M* target/linux/ath79/nand/base-files/etc/board.d/01_leds
<https://github.com/openwrt/openwrt/pull/12517/files#diff-8af4e389c6115f53336b81379d8d090b1b6f8d25e7f2730fed7fde020e2f323a>
(3)
- *M* target/linux/ath79/nand/base-files/etc/board.d/02_network
<https://github.com/openwrt/openwrt/pull/12517/files#diff-8ead21ab8e4c2233f95cfc0d83dcb6cab2bb7e53d91e556be30c3c03c514f611>
(14)
- *M*
target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
<https://github.com/openwrt/openwrt/pull/12517/files#diff-03807ab8902784dcdfe29710cc2a50e5b8518708d498955778b169b54f4fcc8e>
(64)
- *M* target/linux/ath79/nand/config-default
<https://github.com/openwrt/openwrt/pull/12517/files#diff-1ef4b44125dd920b6e3f51e0132e662fdd0c89f93e83e27d2d1e302b483bb6f2>
(1)
Patch Links:
- https://github.com/openwrt/openwrt/pull/12517.patch
- https://github.com/openwrt/openwrt/pull/12517.diff
—
Reply to this email directly, view it on GitHub
<#12517>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGAEZT65FES23WA6XSP6ILXFEW4FANCNFSM6AAAAAAXSJENMY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
Okay, feel free to not include Z1 - I pulled it in because it was easier to cherry-pick changes for MR18 from your staging tree. |
|
Merged without Z1 for now. Thanks! (Edit: I'm interested in backporting this too. Let's give this like a month and if nobody says anything. The MR18 could get a 22.03 release too... It would be great since maybe 22.03 could still support produce an ath79 initramfs.) |
|
Should work without a hitch, I was able to run this ath79 board on MR18 before 22.03 got branched off as well. |
True, it's been running for a long time here as well. I'm worried about the NAND changes. Another NAND device could have sneaked by. |
|
I checked that while backporting for my own use - only those two Mikrotiks are affected. If no ECC mode is set, it defaults to hw. And IIRC no new Mikrotik NAND devices were added from 21.02 until migration to |
|
@chunkeey I just checked downloads.openwrt.org for an image for MR18 and strangely, I found no initramfs image. It might be worth to check buildbot logs to see why it happened. Maybe it'll appear on next build, though. |
|
Just tested todays master on a large set of various rb922 boards. Found one: |
|
This begs the question, if ath79 NAND driver actually respects the |
|
I went through the code and think I noticed another issue also. The check now for 2048 is within ecc_engine_host condition, not within ecc_engine_soft. So on todays driver, it simply does not enter that branch afaict. I hope to dig a little bit deeper on Friday when I'm back at the office. |
Bring back Cisco Meraki MR18 and Z1 from long limbo after ar71xx removal. Based largely on @chunkeey's work, fixing only a few typos, but with added fix for potentially affected Mikrotik devices using SW ECC for their NAND flash. Installation is the same as it was in ar71xx.