1
0

Makefile 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include $(ADK_TOPDIR)/rules.mk
  4. include $(ADK_TOPDIR)/mk/kernel-build.mk
  5. include $(ADK_TOPDIR)/mk/image.mk
  6. KERNEL:=$(LINUX_DIR)/vmlinux
  7. OSTRIP:=-R .reginfo -R .notes -R .note -R .comment -R .mdebug -R .note.gnu.build-id
  8. QEMU_ARGS:=-nographic
  9. # target helper text
  10. ifeq ($(ADK_TARGET_FS),initramfs)
  11. targethelp:
  12. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  13. @echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
  14. endif
  15. ifeq ($(ADK_TARGET_FS),initramfsarchive)
  16. targethelp:
  17. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  18. @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
  19. endif
  20. ifeq ($(ADK_TARGET_FS),initramfspiggyback)
  21. targethelp:
  22. @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
  23. endif
  24. kernel-strip:
  25. $(TARGET_CROSS)objcopy $(OSTRIP) -S $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
  26. kernel-install: kernel-strip
  27. @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
  28. # filesystem specific targets
  29. ifeq ($(ADK_TARGET_FS),initramfs)
  30. imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
  31. endif
  32. ifeq ($(ADK_TARGET_FS),initramfsarchive)
  33. imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
  34. endif
  35. ifeq ($(ADK_TARGET_FS),initramfspiggyback)
  36. imageinstall: createinitramfs targethelp
  37. endif