Makefile 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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)/vmlinux
  7. ZKERNEL:=$(LINUX_DIR)/arch/cris/boot/Image
  8. QEMU_ARGS:=-M axis-dev88 -nographic -monitor none
  9. # target helper text
  10. ifeq ($(ADK_TARGET_FS),archive)
  11. targethelp:
  12. @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
  13. endif
  14. ifeq ($(ADK_TARGET_FS),initramfs)
  15. targethelp:
  16. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  17. @echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
  18. ifeq ($(ADK_TARGET_QEMU),y)
  19. @echo "Start qemu with following command line:"
  20. @echo 'qemu-system-${ADK_TARGET_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
  21. endif
  22. endif
  23. ifeq ($(ADK_TARGET_FS),initramfsarchive)
  24. targethelp:
  25. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  26. @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
  27. endif
  28. ifeq ($(ADK_TARGET_FS),initramfspiggyback)
  29. targethelp:
  30. @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
  31. ifeq ($(ADK_TARGET_QEMU),y)
  32. @echo "Start qemu with following command line:"
  33. @echo 'qemu-system-${ADK_TARGET_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
  34. endif
  35. endif
  36. kernel-strip:
  37. @cp $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
  38. kernel-install: kernel-strip
  39. @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
  40. # filesystem specific targets
  41. ifeq ($(ADK_TARGET_FS),archive)
  42. imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) targethelp
  43. endif
  44. ifeq ($(ADK_TARGET_FS),initramfs)
  45. imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
  46. endif
  47. ifeq ($(ADK_TARGET_FS),initramfsarchive)
  48. imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
  49. endif
  50. ifeq ($(ADK_TARGET_FS),initramfspiggyback)
  51. imageinstall: createinitramfs targethelp
  52. endif
  53. ifeq ($(ADK_TARGET_FS),nfsroot)
  54. imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
  55. endif