aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/image/common-netgear.mk
diff options
context:
space:
mode:
authorZoltan HERPAI <wigyori@uid0.hu>2018-06-13 10:51:51 +0200
committerJohn Crispin <john@phrozen.org>2018-06-18 07:10:19 +0200
commit1e0aeb2b55d59a6944e2f1cac1cca71f5d79ce83 (patch)
tree54350e21cb22f5673e5929efa00cee8665a4ec82 /target/linux/ath79/image/common-netgear.mk
parent2b9885571b7a711ccf759f2a0bfb778c36b72513 (diff)
downloadupstream-1e0aeb2b55d59a6944e2f1cac1cca71f5d79ce83.tar.gz
upstream-1e0aeb2b55d59a6944e2f1cac1cca71f5d79ce83.tar.bz2
upstream-1e0aeb2b55d59a6944e2f1cac1cca71f5d79ce83.zip
ath79: move Netgear build code into a common makefile
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
Diffstat (limited to 'target/linux/ath79/image/common-netgear.mk')
-rw-r--r--target/linux/ath79/image/common-netgear.mk22
1 files changed, 22 insertions, 0 deletions
diff --git a/target/linux/ath79/image/common-netgear.mk b/target/linux/ath79/image/common-netgear.mk
new file mode 100644
index 0000000000..ca4e005689
--- /dev/null
+++ b/target/linux/ath79/image/common-netgear.mk
@@ -0,0 +1,22 @@
+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