Makefile 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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: $(BIN_DIR)/$(ROOTFSTARBALL)
  11. @echo "The RootFS tarball is: $(BIN_DIR)/$(ROOTFSTARBALL)"
  12. @echo "To install everything to CompactFlash use scripts/genext2.sh"
  13. endif
  14. ifeq ($(ADK_TARGET_FS),cf)
  15. imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL)
  16. @echo "The RootFS tarball is: $(BIN_DIR)/$(ROOTFSTARBALL)"
  17. @echo "To install everything to CompactFlash use scripts/install.sh"
  18. endif
  19. ifeq ($(ADK_TARGET_FS),nfsroot)
  20. imageinstall: $(BIN_DIR)/$(ROOTFSUSERTARBALL)
  21. @cp $(KERNEL) $(BIN_DIR)/$(TARGET_KERNEL)
  22. @echo 'The linux kernel is here: $(BIN_DIR)/$(TARGET_KERNEL)'
  23. @echo 'The nfs root tarball is: ${BIN_DIR}/${ROOTFSUSERTARBALL}'
  24. endif
  25. ifeq ($(ADK_TARGET_FS),archive)
  26. imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL)
  27. @echo "The RootFS tarball is: $(BIN_DIR)/$(ROOTFSTARBALL)"
  28. ifeq ($(ADK_HARDWARE_QEMU),y)
  29. @cp $(KERNEL) $(BIN_DIR)/$(TARGET_KERNEL)
  30. @echo "Use following command to create a QEMU Image:"
  31. @echo "./scripts/create.sh qemu-${CPU_ARCH}.img $(BIN_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 $(BIN_DIR)/$(TARGET_KERNEL) qemu-${CPU_ARCH}.img'
  34. endif
  35. ifeq ($(ADK_HARDWARE_VBOX),y)
  36. @cp $(KERNEL) $(BIN_DIR)/$(TARGET_KERNEL)
  37. @echo "Use following command to create a VirtualBox Image:"
  38. @echo "./scripts/create.sh -T vdi vbox-${CPU_ARCH}.img $(BIN_DIR)/$(ROOTFSTARBALL)"
  39. endif
  40. endif
  41. ifeq ($(ADK_TARGET_FS),usb)
  42. imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL)
  43. @echo "The RootFS tarball is: $(BIN_DIR)/$(ROOTFSTARBALL)"
  44. @echo "To install everything to USB use scripts/install.sh"
  45. endif
  46. ifeq ($(ADK_TARGET_FS),initramfs)
  47. imageinstall: $(BIN_DIR)/$(INITRAMFS)
  48. @cp $(KERNEL) $(BIN_DIR)/$(TARGET_KERNEL)
  49. @echo 'The kernel file is: $(BIN_DIR)/${TARGET_KERNEL}'
  50. @echo 'The initramfs image is: ${BIN_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 $(BIN_DIR)/$(TARGET_KERNEL) -initrd ${BIN_DIR}/${INITRAMFS}'
  54. endif
  55. endif
  56. ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
  57. imageinstall: createinitramfs
  58. @cp $(KERNEL) $(BIN_DIR)/${TARGET_KERNEL}
  59. @echo 'The kernel+initramfs file is: $(BIN_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 $(BIN_DIR)/$(TARGET_KERNEL)'
  63. endif
  64. endif