Makefile 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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 $(TOPDIR)/rules.mk
  4. include $(TOPDIR)/mk/kernel.mk
  5. include $(TOPDIR)/mk/modules.mk
  6. include $(TOPDIR)/mk/kernel-build.mk
  7. include $(TOPDIR)/mk/image.mk
  8. KERNEL:=$(LINUX_DIR)/arch/x86/boot/bzImage
  9. ifeq ($(ADK_TARGET_QEMU_WITH_BOOTLOADER),y)
  10. ifeq ($(ADK_TARGET_QEMU_WITHOUT_GRAPHIC),y)
  11. CREATE:=./scripts/create.sh -g -t
  12. else
  13. CREATE:=./scripts/create.sh -g
  14. endif
  15. else
  16. CREATE:=./scripts/create.sh
  17. endif
  18. ifeq ($(ADK_TARGET_FS),archive)
  19. imageinstall: $(FW_DIR)/$(ROOTFSTARBALL)
  20. @echo 'The RootFS tarball is: ${FW_DIR}/${ROOTFSTARBALL}'
  21. ifeq ($(ADK_TARGET_SYSTEM_QEMU_X86_64),y)
  22. @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
  23. @echo "Use following command to create a QEMU Image:"
  24. @echo "$(CREATE) qemu-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
  25. @echo "Start qemu with following command line:"
  26. ifeq ($(ADK_TARGET_QEMU_WITH_BOOTLOADER),y)
  27. @echo 'qemu-system-x86_64 ${ADK_QEMU_ARGS} -net user -net nic,model=e1000 qemu-${CPU_ARCH}.img'
  28. else
  29. @echo 'qemu-system-x86_64 ${ADK_QEMU_ARGS} -net user -net nic,model=e1000 -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${CPU_ARCH}.img'
  30. endif
  31. endif
  32. endif
  33. ifeq ($(ADK_TARGET_FS),initramfsarchive)
  34. imageinstall: $(FW_DIR)/$(ROOTFSUSERTARBALL)
  35. @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
  36. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  37. @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
  38. endif
  39. ifeq ($(ADK_TARGET_FS),usb)
  40. imageinstall: $(FW_DIR)/$(ROOTFSTARBALL)
  41. @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
  42. @echo "To install everything to USB use scripts/install.sh"
  43. endif
  44. ifeq ($(ADK_TARGET_FS),initramfs)
  45. imageinstall: $(FW_DIR)/$(INITRAMFS)
  46. @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
  47. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  48. @echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
  49. ifeq ($(ADK_TARGET_SYSTEM_QEMU_X86_64),y)
  50. @echo "Start qemu with following command line:"
  51. @echo 'qemu-system-x86_64 ${ADK_QEMU_ARGS} -net user -net nic,model=e1000 -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
  52. endif
  53. endif
  54. ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
  55. imageinstall: createinitramfs
  56. @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
  57. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  58. ifeq ($(ADK_TARGET_SYSTEM_QEMU_X86_64),y)
  59. @echo "Start qemu with following command line:"
  60. @echo 'qemu-system-x86_64 ${ADK_QEMU_ARGS} -net user -net nic,model=e1000 -kernel $(FW_DIR)/$(TARGET_KERNEL)'
  61. endif
  62. endif
  63. ifeq ($(ADK_TARGET_FS),nfsroot)
  64. imageinstall: $(FW_DIR)/$(ROOTFSUSERTARBALL)
  65. @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
  66. @echo 'The linux kernel is here: $(FW_DIR)/$(TARGET_KERNEL)'
  67. @echo 'The nfs root tarball is: ${FW_DIR}/${ROOTFSUSERTARBALL}'
  68. endif