Makefile 2.4 KB

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