1
0

Makefile 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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/Prepare
  10. -rm -rf $(KDIR)/linux-system.axf
  11. cp $(LINUX_DIR)/arch/$(LINUX_KARCH)/boot/Image $(KDIR)/Image
  12. $(MAKE) -C boot-wrapper clean
  13. $(MAKE) -C boot-wrapper compile
  14. endef
  15. define Build/Clean
  16. $(MAKE) -C boot-wrapper clean
  17. endef
  18. define Image/Build/QemuVirt
  19. $(CP) $(KDIR)/Image $(BIN_DIR)/$(IMG_PREFIX)-qemu-virt.Image
  20. ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
  21. $(CP) $(KDIR)/Image-initramfs $(BIN_DIR)/$(IMG_PREFIX)-qemu-virt-initramfs.Image
  22. endif
  23. endef
  24. define Image/Build/VexpressFoundation
  25. $(CP) $(KDIR)/linux-system.axf $(BIN_DIR)/$(IMG_PREFIX)-vexpress-foundation.axf
  26. endef
  27. define Image/BuildKernel
  28. $(call Image/Build/QemuVirt)
  29. $(call Image/Build/VexpressFoundation)
  30. endef
  31. define Image/Build/squashfs
  32. $(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
  33. endef
  34. define Image/Build
  35. $(call Image/Build/$(1))
  36. dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
  37. endef
  38. $(eval $(call BuildImage))