openwrtv3/target/linux/ath79/image/common-netgear.mk
Mathias Kresin 38877d8873 ath79: mark netgear variables as device specific
The variables are used in image build recipes and need to be marked as
per devices vars to be stored individual per image define. Otherwise
the last defined variable will be used for all boards.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2018-08-08 08:11:11 +02:00

24 lines
697 B
Makefile

DEVICE_VARS += NETGEAR_KERNEL_MAGIC NETGEAR_BOARD_ID NETGEAR_HW_ID
define Build/netgear-squashfs
rm -rf $@.fs $@.squashfs
mkdir -p $@.fs/image
cp $@ $@.fs/image/uImage
$(STAGING_DIR_HOST)/bin/mksquashfs-lzma \
$@.fs $@.squashfs -be \
-noappend -root-owned -b 65536 \
$(if $(SOURCE_DATE_EPOCH),-fixed-time $(SOURCE_DATE_EPOCH))
dd if=/dev/zero bs=1k count=1 >> $@.squashfs
mkimage \
-A mips -O linux -T filesystem -C none \
-M $(NETGEAR_KERNEL_MAGIC) \
-a 0xbf070000 -e 0xbf070000 \
-n 'MIPS $(VERSION_DIST) Linux-$(LINUX_VERSION)' \
-d $@.squashfs $@
rm -rf $@.squashfs $@.fs
endef
define Build/netgear-uImage
$(call Build/uImage,$(1) -M $(NETGEAR_KERNEL_MAGIC))
endef