Makefile 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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),genext2fs)
  19. imageinstall: $(FW_DIR)/$(ROOTFSTARBALL)
  20. @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
  21. @echo "To install everything to CompactFlash use scripts/genext2.sh"
  22. endif
  23. ifeq ($(ADK_TARGET_FS),cf)
  24. imageinstall: $(FW_DIR)/$(ROOTFSTARBALL)
  25. @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
  26. @echo "To install everything to CompactFlash use scripts/install.sh"
  27. endif
  28. ifeq ($(ADK_TARGET_FS),nfsroot)
  29. imageinstall: $(FW_DIR)/$(ROOTFSUSERTARBALL)
  30. @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
  31. @echo 'The linux kernel is here: $(FW_DIR)/$(TARGET_KERNEL)'
  32. @echo 'The nfs root tarball is: ${FW_DIR}/${ROOTFSUSERTARBALL}'
  33. endif
  34. ifeq ($(ADK_TARGET_FS),archive)
  35. imageinstall: $(FW_DIR)/$(ROOTFSTARBALL)
  36. @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
  37. ifeq ($(ADK_HARDWARE_QEMU),y)
  38. @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
  39. @echo "Use following command to create a QEMU Image:"
  40. @echo "$(CREATE) qemu-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
  41. @echo "Start qemu with following command line:"
  42. ifeq ($(ADK_TARGET_QEMU_WITH_BOOTLOADER),y)
  43. @echo 'qemu-system-i386 ${ADK_QEMU_ARGS} -net user -net nic,model=e1000 qemu-${CPU_ARCH}.img'
  44. else
  45. @echo 'qemu-system-i386 ${ADK_QEMU_ARGS} -net user -net nic,model=e1000 -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${CPU_ARCH}.img'
  46. endif
  47. endif
  48. ifeq ($(ADK_HARDWARE_VBOX),y)
  49. @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
  50. @echo "Use following command to create a VirtualBox Image:"
  51. @echo "./scripts/create.sh -T vdi vbox-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
  52. endif
  53. endif
  54. ifeq ($(ADK_TARGET_FS),initramfsarchive)
  55. imageinstall: $(FW_DIR)/$(ROOTFSUSERTARBALL)
  56. @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
  57. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  58. @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
  59. endif
  60. ifeq ($(ADK_TARGET_FS),usb)
  61. imageinstall: $(FW_DIR)/$(ROOTFSTARBALL)
  62. @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
  63. @echo "To install everything to USB use scripts/install.sh"
  64. endif
  65. ifeq ($(ADK_TARGET_FS),initramfs)
  66. imageinstall: $(FW_DIR)/$(INITRAMFS)
  67. @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
  68. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  69. @echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
  70. ifeq ($(ADK_HARDWARE_QEMU),y)
  71. @echo "Start qemu with following command line:"
  72. @echo 'qemu-system-i386 ${ADK_QEMU_ARGS} -net user -net nic,model=e1000 -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
  73. endif
  74. endif
  75. ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
  76. imageinstall: createinitramfs
  77. @cp $(KERNEL) $(FW_DIR)/${TARGET_KERNEL}
  78. @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
  79. ifeq ($(ADK_HARDWARE_QEMU),y)
  80. @echo "Start qemu with following command line:"
  81. @echo 'qemu-system-i386 ${ADK_QEMU_ARGS} -net user -net nic,model=e1000 -kernel $(FW_DIR)/$(TARGET_KERNEL)'
  82. endif
  83. endif
  84. ifeq (${ADK_TARGET_FS},iso)
  85. imageinstall: ${FW_DIR}/${ROOTFSISO}
  86. @echo 'ISO image is at $<'
  87. endif