Makefile 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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.mk
  5. include $(ADK_TOPDIR)/mk/modules.mk
  6. include $(ADK_TOPDIR)/mk/kernel-build.mk
  7. include $(ADK_TOPDIR)/mk/image.mk
  8. KERNEL:=$(LINUX_DIR)/vmlinux
  9. QEMU_ARGS:=${ADK_QEMU_ARGS}
  10. ifeq ($(ADK_TARGET_QEMU_M68K_Q800),y)
  11. QEMU_ARGS+=-M q800
  12. endif
  13. ifeq ($(ADK_TARGET_QEMU_M68K_MCF5208),y)
  14. QEMU_ARGS+=-M mcf5208evb -cpu m5208
  15. endif
  16. # target helper text
  17. ifeq ($(ADK_TARGET_FS),archive)
  18. targethelp:
  19. @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
  20. ifeq ($(ADK_TARGET_QEMU),y)
  21. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  22. @echo "Use following command to create a QEMU Image:"
  23. @echo "./scripts/create.sh qemu-${ADK_TARGET_CPU_ARCH}.img $(FW_DIR)/$(ROOTFSUSERTARBALL)"
  24. @echo "Start qemu with following options:"
  25. @echo 'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${ADK_TARGET_CPU_ARCH}.img'
  26. endif
  27. endif
  28. ifeq ($(ADK_TARGET_FS),initramfs)
  29. targethelp:
  30. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  31. @echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
  32. ifeq ($(ADK_TARGET_QEMU),y)
  33. @echo "Start qemu with following command line:"
  34. @echo 'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
  35. endif
  36. ifeq ($(ADK_TARGET_SYSTEM_ARANYM_M68K),y)
  37. @sed -e "s#@@KERNEL@@#$(FW_DIR)/$(TARGET_KERNEL)#" \
  38. -e "s#@@INITRAMFS@@#${FW_DIR}/${INITRAMFS}#" \
  39. $(ADK_TOPDIR)/target/m68k/aranym.cfg.in \
  40. > $(ADK_TOPDIR)/target/m68k/aranym.cfg
  41. @echo 'Start aranym with: aranym-mmu -l -c target/m68k/aranym.cfg'
  42. @echo 'Ungrab mouse with middle mouse click'
  43. endif
  44. endif
  45. ifeq ($(ADK_TARGET_FS),initramfsarchive)
  46. targethelp:
  47. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  48. @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
  49. endif
  50. ifeq ($(ADK_TARGET_FS),initramfspiggyback)
  51. targethelp:
  52. @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
  53. ifeq ($(ADK_TARGET_QEMU),y)
  54. @echo "Start qemu with following command line:"
  55. @echo 'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
  56. endif
  57. endif
  58. kernel-strip:
  59. kernel-install: kernel-strip
  60. @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
  61. # filesystem specific targets
  62. ifeq ($(ADK_TARGET_FS),archive)
  63. imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
  64. endif
  65. ifeq ($(ADK_TARGET_FS),initramfs)
  66. imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
  67. endif
  68. ifeq ($(ADK_TARGET_FS),initramfsarchive)
  69. imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
  70. endif
  71. ifeq ($(ADK_TARGET_FS),initramfspiggyback)
  72. imageinstall: createinitramfs targethelp
  73. endif