Makefile 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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)/$(ADK_TARGET_KERNEL)
  7. # target helper text
  8. ifeq ($(ADK_TARGET_FS),archive)
  9. targethelp:
  10. @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
  11. endif
  12. ifeq ($(ADK_TARGET_FS),initramfs)
  13. targethelp:
  14. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  15. @echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
  16. endif
  17. ifeq ($(ADK_TARGET_FS),initramfsarchive)
  18. targethelp:
  19. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  20. @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
  21. endif
  22. ifeq ($(ADK_TARGET_FS),initramfspiggyback)
  23. targethelp:
  24. @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
  25. ifeq ($(ADK_TARGET_LITTLE_ENDIAN),y)
  26. ifeq ($(ADK_TARGET_SYSTEM_NSIM_ARCV1),y)
  27. @echo './scripts/nsim.sh arcv1 $(FW_DIR)/${TARGET_KERNEL}'
  28. endif
  29. ifeq ($(ADK_TARGET_SYSTEM_NSIM_ARCV2),y)
  30. @echo './scripts/nsim.sh arcv2 $(FW_DIR)/${TARGET_KERNEL}'
  31. endif
  32. endif
  33. ifeq ($(ADK_TARGET_BIG_ENDIAN),y)
  34. ifeq ($(ADK_TARGET_SYSTEM_NSIM_ARCV1),y)
  35. @echo './scripts/nsim.sh arcv1-be $(FW_DIR)/${TARGET_KERNEL}'
  36. endif
  37. ifeq ($(ADK_TARGET_SYSTEM_NSIM_ARCV2),y)
  38. @echo './scripts/nsim.sh arcv2-be $(FW_DIR)/${TARGET_KERNEL}'
  39. endif
  40. endif
  41. endif
  42. ifeq ($(ADK_TARGET_FS),nfsroot)
  43. targethelp:
  44. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  45. @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
  46. endif
  47. kernel-strip:
  48. @cp $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
  49. kernel-install: kernel-strip
  50. @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
  51. # filesystem specific targets
  52. ifeq ($(ADK_TARGET_FS),archive)
  53. imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) targethelp
  54. endif
  55. ifeq ($(ADK_TARGET_FS),initramfs)
  56. imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
  57. endif
  58. ifeq ($(ADK_TARGET_FS),initramfsarchive)
  59. imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
  60. endif
  61. ifeq ($(ADK_TARGET_FS),initramfspiggyback)
  62. imageinstall: createinitramfs targethelp
  63. endif
  64. ifeq ($(ADK_TARGET_FS),nfsroot)
  65. imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
  66. endif