Makefile 3.1 KB

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