1
0

Makefile 630 B

123456789101112131415161718192021222324
  1. #
  2. # Copyright (C) 2016 Yousong Zhou <yszhou4tech@gmail.com>
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. include $(INCLUDE_DIR)/image.mk
  9. define Image/BuildKernel
  10. cp $(KDIR)/$(KERNELNAME) $(BIN_DIR)/$(IMG_PREFIX)-$(KERNELNAME)
  11. endef
  12. define Image/Build/Initramfs
  13. cp $(KDIR)/$(KERNELNAME)-initramfs $(BIN_DIR)/$(IMG_PREFIX)-$(KERNELNAME)-initramfs
  14. endef
  15. define Image/Build
  16. $(call Image/Build/$(1))
  17. dd if=$(KDIR)/root.$(1) bs=128k conv=sync | \
  18. gzip -9n >$(BIN_DIR)/$(IMG_PREFIX)-root.$(1).gz
  19. endef
  20. $(eval $(call BuildImage))