Makefile 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. ifeq ($(ADK_TARGET_FS),nfsroot)
  24. targethelp:
  25. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  26. @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
  27. endif
  28. kernel-strip:
  29. $(TARGET_CROSS)objcopy $(OSTRIP) -S $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
  30. kernel-install: kernel-strip
  31. @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
  32. # filesystem specific targets
  33. ifeq ($(ADK_TARGET_FS),initramfs)
  34. imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
  35. endif
  36. ifeq ($(ADK_TARGET_FS),initramfsarchive)
  37. imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
  38. endif
  39. ifeq ($(ADK_TARGET_FS),initramfspiggyback)
  40. imageinstall: createinitramfs targethelp
  41. endif
  42. ifeq ($(ADK_TARGET_FS),nfsroot)
  43. imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
  44. endif