Commit 9f261e36 authored by Leon M. George's avatar Leon M. George Committed by Adrian Schmutzler

ath79: build Compex WPJ531 cpximg files

Generate additional images that are compatible to the cpximg loader.
The cpximg loader can be started either by holding the reset button during
power up or by entering the u-boot prompt and entering 'cpximg'.
Once it's running, a TFTP-server under will accept the image
appropriate for the board revision that is etched on the board.

For example, if the board is labelled '7A04':

tftp -v -m binary -c put openwrt-ath79-generic-compex_wpj531-16m-squashfs-cpximg-7A04.bin

These files can also be used with the sysupgrade utility in stock images (add
SSH key in luci for root access).
Signed-off-by: default avatarLeon M. George <[email protected]>
[fix sorting of definitions]
Signed-off-by: Adrian Schmutzler's avatarAdrian Schmutzler <[email protected]>
parent e10dd483
......@@ -50,6 +50,29 @@ define Build/cybertan-trx
-rm [email protected]
define Build/mkmylofw_16m
$(eval device_id=$(word 1,$(1)))
$(eval revision=$(word 2,$(1)))
# On WPJ344, WPJ531, and WPJ563, the default boot command tries 0x9f680000
# first and fails if the remains of the stock image are sill there
# - resulting in an infinite boot loop.
# The size parameter is grown to have that block deleted if the firmware
# isn't big enough by itself.
let \
size="$$(stat -c%s [email protected])" \
pad="$(subst k,* 1024,$(BLOCKSIZE))" \
pad="(pad - (size % pad)) % pad" \
newsize='size + pad' ; \
[ $$newsize -lt $$((0x660000)) ] && newsize=0x660000 ; \
$(STAGING_DIR_HOST)/bin/mkmylofw \
-B WPE72 -i 0x11f6:$(device_id):0x11f6:$(device_id) -r $(revision) \
-s 0x1000000 -p0x30000:$$newsize:al:0x80060000:"OpenWRT":[email protected] \
[email protected].new
@mv [email protected] [email protected]
define Build/mkwrggimg
$(STAGING_DIR_HOST)/bin/mkwrggimg -b \
-i [email protected] -o [email protected] -d /dev/mtdblock/1 \
......@@ -426,6 +449,11 @@ define Device/compex_wpj531-16m
IMAGES += cpximg-7a03.bin cpximg-7a04.bin cpximg-7a06.bin cpximg-7a07.bin
IMAGE/cpximg-7a03.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | mkmylofw_16m 0x68a 2
IMAGE/cpximg-7a04.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | mkmylofw_16m 0x693 3
IMAGE/cpximg-7a06.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | mkmylofw_16m 0x693 3
IMAGE/cpximg-7a07.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | mkmylofw_16m 0x693 3
TARGET_DEVICES += compex_wpj531-16m
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment