Makefile 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #
  2. # Copyright (C) 2012-2015 OpenWrt.org
  3. # Copyright (C) 2016-2017 LEDE project
  4. #
  5. # This is free software, licensed under the GNU General Public License v2.
  6. # See /LICENSE for more information.
  7. #
  8. include $(TOPDIR)/rules.mk
  9. include $(INCLUDE_DIR)/image.mk
  10. define Build/sysupgrade-emmc
  11. rm -f [email protected]
  12. mkfs.fat -C [email protected] 3070
  13. ./gen_$(SUBTARGET)_emmc_img.sh $@ \
  14. $(IMAGE_KERNEL) \
  15. [email protected] \
  16. $(IMAGE_ROOTFS)
  17. endef
  18. # default all platform image(fit) build
  19. define Device/Default
  20. PROFILES = Default $$(DEVICE_NAME)
  21. KERNEL_NAME := Image
  22. KERNEL = kernel-bin | lzma | \
  23. fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb
  24. KERNEL_INITRAMFS = kernel-bin | lzma | \
  25. fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb
  26. FILESYSTEMS := squashfs
  27. DEVICE_DTS_DIR := $(DTS_DIR)
  28. IMAGES := sysupgrade.bin
  29. IMAGE/sysupgrade.bin := append-kernel | pad-to 128k | append-rootfs | \
  30. pad-rootfs | append-metadata
  31. SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
  32. endef
  33. include $(SUBTARGET).mk
  34. define Image/Build
  35. $(call Image/Build/$(1),$(1))
  36. endef
  37. $(eval $(call BuildImage))