Makefile 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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 $(ADK_TOPDIR)/rules.mk
  4. include $(ADK_TOPDIR)/mk/kernel-build.mk
  5. include $(ADK_TOPDIR)/mk/image.mk
  6. KERNEL:=$(LINUX_DIR)/$(ADK_TARGET_KERNEL)
  7. QEMU:=qemu-system-cskyv2
  8. ifeq ($(ADK_TARGET_QEMU_WITH_VIRTIO),y)
  9. QEMU_ARGS:=${ADK_QEMU_ARGS} -M virt
  10. QEMU_ARGS+=-netdev user,id=eth0 -device virtio-net-device,netdev=eth0
  11. endif
  12. # target helper text
  13. ifeq ($(ADK_TARGET_FS),archive)
  14. targethelp:
  15. @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
  16. endif
  17. ifeq ($(ADK_TARGET_FS),initramfs)
  18. targethelp:
  19. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  20. @echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
  21. endif
  22. ifeq ($(ADK_TARGET_FS),initramfsarchive)
  23. targethelp:
  24. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  25. @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
  26. endif
  27. ifeq ($(ADK_TARGET_FS),initramfspiggyback)
  28. targethelp:
  29. @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
  30. ifeq ($(ADK_TARGET_QEMU),y)
  31. @echo "Start qemu with following command line:"
  32. @echo '${QEMU} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
  33. endif
  34. endif
  35. ifeq ($(ADK_TARGET_FS),nfsroot)
  36. targethelp:
  37. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  38. @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
  39. endif
  40. kernel-strip:
  41. @cp $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
  42. kernel-install: kernel-strip
  43. @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
  44. # filesystem specific targets
  45. ifeq ($(ADK_TARGET_FS),archive)
  46. imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) targethelp
  47. endif
  48. ifeq ($(ADK_TARGET_FS),initramfs)
  49. imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
  50. endif
  51. ifeq ($(ADK_TARGET_FS),initramfsarchive)
  52. imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
  53. endif
  54. ifeq ($(ADK_TARGET_FS),initramfspiggyback)
  55. imageinstall: createinitramfs targethelp
  56. endif
  57. ifeq ($(ADK_TARGET_FS),nfsroot)
  58. imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
  59. endif