common-netgear.mk 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. DEVICE_VARS += NETGEAR_KERNEL_MAGIC NETGEAR_BOARD_ID NETGEAR_HW_ID
  2. define Build/netgear-squashfs
  3. rm -rf $@.fs $@.squashfs
  4. mkdir -p $@.fs/image
  5. cp $@ $@.fs/image/uImage
  6. $(STAGING_DIR_HOST)/bin/mksquashfs-lzma \
  7. $@.fs $@.squashfs -be \
  8. -noappend -root-owned -b 65536 \
  9. $(if $(SOURCE_DATE_EPOCH),-fixed-time $(SOURCE_DATE_EPOCH))
  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. define Build/netgear-rootfs
  20. mkimage \
  21. -A mips -O linux -T filesystem -C none \
  22. -M $(NETGEAR_KERNEL_MAGIC) \
  23. -n '$(VERSION_DIST) filesystem' \
  24. -d $(IMAGE_ROOTFS) $@.fs
  25. cat $@.fs >> $@
  26. rm -rf $@.fs
  27. endef
  28. define Build/netgear-uImage
  29. $(call Build/uImage,$(1) -M $(NETGEAR_KERNEL_MAGIC))
  30. endef
  31. define Device/netgear_ath79
  32. KERNEL := kernel-bin | append-dtb | lzma -d20 | netgear-uImage lzma
  33. IMAGES += factory.img
  34. IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | check-size $$$$(IMAGE_SIZE)
  35. IMAGE/factory.img := $$(IMAGE/default) | netgear-dni | check-size $$$$(IMAGE_SIZE)
  36. endef