Skip to content

Commit

Permalink
apm821xx: MX60(W): re-enable + allow bigger future kernels
Browse files Browse the repository at this point in the history
The MX60's kernel is limited to 0x3EFC00 by the values in
mkmerakifw.c. Since the initramfs method of loading the
kernel seems to be working, this patch does away with the
use of the mkmerakifw tool for the MX60(W).

But this will go along with a change in u-boot as well.
So before you upgrade, please attach the serial cable and
perform:

| setenv owrt510_boot run meraki_ubi owrt_bootargs\; run owrt_load1 owrt_bootkernel\; run owrt_load2 owrt_bootkernel
| setenv bootcmd run owrt510_boot
| saveenv

Note: You won't be able to use older OpenWrt releases without
switching the bootcmd back to owrt_boot!

Note2: We are no longer compatible with older OpenWrt MX60 installs.
the legacy BOARD_NAME and SUPPORTED_DEVICES can be dropped. This is
because upgrades from older images are not possible without uboot env
changes anymore. Also the bogus BLOCKSIZE value
(which was set to 63k back then, in order to get the kernel properly
aligned after the fdt + meraki header) can be set to the NANDs real
value. The FDT size (which was needed for alignment) can now be
slimmed down as well.

Co-developed-by: Martin Kennedy <hurricos@gmail.com>
Signed-off-by: Martin Kennedy <hurricos@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
  • Loading branch information
chunkeey committed Oct 22, 2021
1 parent bbb3852 commit 8a04245
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
@@ -0,0 +1,10 @@
. /lib/functions.sh

case "$(board_name)" in
meraki,mx60)
uci set system.@system[0].compat_version="2.0"
uci commit system
;;
esac

exit 0
14 changes: 6 additions & 8 deletions target/linux/apm821xx/image/nand.mk
Expand Up @@ -41,22 +41,20 @@ endef
TARGET_DEVICES += meraki_mr24

define Device/meraki_mx60
DEFAULT := n
DEVICE_VENDOR := Cisco Meraki
DEVICE_MODEL := MX60/MX60W
DEVICE_PACKAGES := kmod-spi-gpio kmod-usb-ledtrig-usbport kmod-usb-dwc2 \
kmod-usb-storage block-mount
BOARD_NAME := mx60
BLOCKSIZE := 63k
BLOCKSIZE := 128k
IMAGES := sysupgrade.bin
DTB_SIZE := 64512
DTB_SIZE := 20480
IMAGE_SIZE := 1021m
KERNEL_SIZE := 4031k
KERNEL := kernel-bin | gzip | uImage gzip | MerakiAdd-dtb | MerakiNAND
KERNEL_INITRAMFS := kernel-bin | gzip | dtb | MuImage-initramfs gzip
KERNEL := kernel-bin | gzip | dtb | MuImage-initramfs gzip
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
UBINIZE_OPTS := -E 5
SUPPORTED_DEVICES += mx60
DEVICE_COMPAT_VERSION := 2.0
DEVICE_COMPAT_MESSAGE := uboot's bootcmd has to be updated to support standard multi-image uImages. \
Upgrade via sysupgrade mechanism is not possible.
endef
TARGET_DEVICES += meraki_mx60

Expand Down

0 comments on commit 8a04245

Please sign in to comment.