diff options
author | Chris Blake <chrisrblake93@gmail.com> | 2016-10-24 14:05:54 -0500 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2016-10-26 12:37:45 +0200 |
commit | 28dd52b079d39fa80dd801e2864bea42251fd50b (patch) | |
tree | 92fdf3ea51892e09d93d7f78cb2eecab1e00100c /target/linux/ar71xx/image/generic.mk | |
parent | d8662ac3c6a2ecd3834d109c5d3abd864fb23a50 (diff) | |
download | upstream-28dd52b079d39fa80dd801e2864bea42251fd50b.tar.gz upstream-28dd52b079d39fa80dd801e2864bea42251fd50b.tar.bz2 upstream-28dd52b079d39fa80dd801e2864bea42251fd50b.zip |
ar71xx: add mac partition to the MR12/MR16
On the stock Meraki Firmare for the MR12/MR16, a chunk of SPI space
after u-boot-env is used to store the boards Mac address. Sadly as this
was removed on any device already on OpenWRT/LEDE, moving forward a new,
64k partition named "mac" will be used to store the mac address for the
device (which is the minimum size). This allows users to properly set
the correct MAC, without editing the ART partition (which holds the same
MAC for all devices).
The reason the space is taken from kernel instead of rootfs is currently
kernels are only 1.3MB, so that way we can leave the current rootfs
space alone for users who fully utilize the available storage space.
Once this partition is added to a device, you can set your MAC doing the
following:
mtd erase mac
echo -n -e '\x00\x18\x0a\x33\x44\x55' > /dev/mtd5
sync && reboot
Where 00:18:0a:33:44:55 is your MAC address.
This was tested, and confirmed working on both the MR12 and MR16.
Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
Diffstat (limited to 'target/linux/ar71xx/image/generic.mk')
-rw-r--r-- | target/linux/ar71xx/image/generic.mk | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/target/linux/ar71xx/image/generic.mk b/target/linux/ar71xx/image/generic.mk index 4a81a17d67..070bfbb1d6 100644 --- a/target/linux/ar71xx/image/generic.mk +++ b/target/linux/ar71xx/image/generic.mk @@ -112,8 +112,8 @@ define Device/mr12 DEVICE_TITLE := Meraki MR12 DEVICE_PACKAGES := kmod-spi-gpio BOARDNAME = MR12 - IMAGE_SIZE = 15744k - MTDPARTS = spi0.0:256k(u-boot)ro,256k(u-boot-env)ro,13440k(rootfs),2304k(kernel),128k(art)ro,15744k@0x80000(firmware) + IMAGE_SIZE = 15680k + MTDPARTS = spi0.0:256k(u-boot)ro,256k(u-boot-env)ro,13440k(rootfs),2240k(kernel),64k(mac),128k(art)ro,15680k@0x80000(firmware) IMAGE/kernel.bin = append-kernel IMAGE/rootfs.bin = append-rootfs | pad-rootfs IMAGE/sysupgrade.bin = append-rootfs | pad-rootfs | pad-to 13440k | append-kernel | check-size $$$$(IMAGE_SIZE) @@ -125,8 +125,8 @@ define Device/mr16 DEVICE_TITLE := Meraki MR16 DEVICE_PACKAGES := kmod-spi-gpio BOARDNAME = MR16 - IMAGE_SIZE = 15744k - MTDPARTS = spi0.0:256k(u-boot)ro,256k(u-boot-env)ro,13440k(rootfs),2304k(kernel),128k(art)ro,15744k@0x80000(firmware) + IMAGE_SIZE = 15680k + MTDPARTS = spi0.0:256k(u-boot)ro,256k(u-boot-env)ro,13440k(rootfs),2240k(kernel),64k(mac),128k(art)ro,15680k@0x80000(firmware) IMAGE/kernel.bin = append-kernel IMAGE/rootfs.bin = append-rootfs | pad-rootfs IMAGE/sysupgrade.bin = append-rootfs | pad-rootfs | pad-to 13440k | append-kernel | check-size $$$$(IMAGE_SIZE) |