1
0

Makefile 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. QEMU_ARGS:=-nographic -display none -device da,exit_threads=1 -chardev stdio,id=chan1 -chardev pty,id=chan2
  8. # target helper text
  9. ifeq ($(ADK_TARGET_FS),archive)
  10. targethelp:
  11. @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
  12. ifeq ($(ADK_TARGET_QEMU),y)
  13. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  14. @echo "Use following command to create a QEMU Image:"
  15. @echo "./scripts/create.sh qemu-${ADK_TARGET_CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
  16. @echo "Start qemu with following options:"
  17. @echo 'qemu-system-meta ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${ADK_TARGET_CPU_ARCH}.img'
  18. endif
  19. endif
  20. ifeq ($(ADK_TARGET_FS),initramfs)
  21. targethelp:
  22. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  23. @echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
  24. ifeq ($(ADK_TARGET_QEMU),y)
  25. @echo "Start qemu with following command line:"
  26. @echo 'qemu-system-meta ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
  27. endif
  28. endif
  29. ifeq ($(ADK_TARGET_FS),initramfsarchive)
  30. targethelp:
  31. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  32. @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
  33. endif
  34. ifeq ($(ADK_TARGET_FS),initramfspiggyback)
  35. targethelp:
  36. @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
  37. ifeq ($(ADK_TARGET_QEMU),y)
  38. @echo "Start qemu with following command line:"
  39. @echo 'qemu-system-meta ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
  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 nfs root tarball is: ${FW_DIR}/${ROOTFSUSERTARBALL}'
  46. endif
  47. # image creation and kernel install
  48. kernel-strip:
  49. cp $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
  50. kernel-install: kernel-strip
  51. cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
  52. # filesystem specific targets
  53. ifeq ($(ADK_TARGET_FS),archive)
  54. imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) targethelp
  55. endif
  56. ifeq ($(ADK_TARGET_FS),initramfs)
  57. imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
  58. endif
  59. ifeq ($(ADK_TARGET_FS),initramfsarchive)
  60. imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
  61. endif
  62. ifeq ($(ADK_TARGET_FS),initramfspiggyback)
  63. imageinstall: createinitramfs targethelp
  64. endif
  65. ifeq ($(ADK_TARGET_FS),nfsroot)
  66. imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
  67. endif