Makefile 685 B

123456789101112131415161718192021222324252627
  1. #
  2. # Copyright (C) 2010 OpenWrt.org
  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)-vmlinux.elf
  11. endef
  12. define Image/BuildKernel/Initramfs
  13. cp $(KDIR)/$(KERNELNAME)-initramfs $(BIN_DIR)/$(IMG_PREFIX)-vmlinux-initramfs.elf
  14. endef
  15. define Image/Build/squashfs
  16. $(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
  17. endef
  18. define Image/Build
  19. $(call Image/Build/$(1))
  20. dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
  21. endef
  22. $(eval $(call BuildImage))