1
0

Makefile 1.3 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. # target helper text
  9. ifeq ($(ADK_TARGET_FS),initramfs)
  10. targethelp:
  11. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  12. @echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
  13. endif
  14. ifeq ($(ADK_TARGET_FS),initramfsarchive)
  15. targethelp:
  16. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  17. @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
  18. endif
  19. ifeq ($(ADK_TARGET_FS),initramfspiggyback)
  20. targethelp:
  21. @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
  22. endif
  23. kernel-strip:
  24. $(TARGET_CROSS)objcopy $(OSTRIP) -S $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
  25. kernel-install: kernel-strip
  26. @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
  27. # filesystem specific targets
  28. ifeq ($(ADK_TARGET_FS),initramfs)
  29. imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
  30. endif
  31. ifeq ($(ADK_TARGET_FS),initramfsarchive)
  32. imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
  33. endif
  34. ifeq ($(ADK_TARGET_FS),initramfspiggyback)
  35. imageinstall: createinitramfs targethelp
  36. endif