Makefile 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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 -nographic -net user,hostfwd=tcp::2222-:22 -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),usb)
  42. imageinstall: $(FW_DIR)/$(ROOTFSTARBALL)
  43. @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
  44. @echo "To install everything to USB use scripts/install.sh"
  45. endif
  46. ifeq ($(ADK_TARGET_FS),initramfs)
  47. imageinstall: $(FW_DIR)/$(INITRAMFS)
  48. @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
  49. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  50. @echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
  51. ifeq ($(ADK_HARDWARE_QEMU),y)
  52. @echo "Start qemu with following command line:"
  53. @echo 'qemu-system-i386 -nographic -net user,hostfwd=tcp::2222-:22 -net nic,model=e1000 -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
  54. endif
  55. endif
  56. ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
  57. imageinstall: createinitramfs
  58. @cp $(KERNEL) $(FW_DIR)/${TARGET_KERNEL}
  59. @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
  60. ifeq ($(ADK_HARDWARE_QEMU),y)
  61. @echo "Start qemu with following command line:"
  62. @echo 'qemu-system-i386 -nographic -net user,hostfwd=tcp::2222-:22 -net nic,model=e1000 -kernel $(FW_DIR)/$(TARGET_KERNEL)'
  63. endif
  64. endif
  65. ifeq (${ADK_TARGET_FS},iso)
  66. imageinstall: ${FW_DIR}/${ROOTFSISO}
  67. @echo 'ISO image is at $<'
  68. endif