ath79: move Netgear build code into a common makefile
[openwrt/openwrt.git] / target / linux / ath79 / image / common-netgear.mk
1 define Build/netgear-squashfs
2 rm -rf $@.fs $@.squashfs
3 mkdir -p $@.fs/image
4 cp $@ $@.fs/image/uImage
5 $(STAGING_DIR_HOST)/bin/mksquashfs-lzma \
6 $@.fs $@.squashfs -be \
7 -noappend -root-owned -b 65536 \
8 $(if $(SOURCE_DATE_EPOCH),-fixed-time $(SOURCE_DATE_EPOCH))
9
10 dd if=/dev/zero bs=1k count=1 >> $@.squashfs
11 mkimage \
12 -A mips -O linux -T filesystem -C none \
13 -M $(NETGEAR_KERNEL_MAGIC) \
14 -a 0xbf070000 -e 0xbf070000 \
15 -n 'MIPS $(VERSION_DIST) Linux-$(LINUX_VERSION)' \
16 -d $@.squashfs $@
17 rm -rf $@.squashfs $@.fs
18 endef
19
20 define Build/netgear-uImage
21 $(call Build/uImage,$(1) -M $(NETGEAR_KERNEL_MAGIC))
22 endef