Makefile 2.6 KB

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