Makefile 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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)/arch/cris/boot/Image
  7. QEMU_ARGS:=-M axis-dev88 -nographic -monitor none
  8. # target helper text
  9. ifeq ($(ADK_TARGET_FS),archive)
  10. targethelp:
  11. @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
  12. endif
  13. ifeq ($(ADK_TARGET_FS),initramfs)
  14. targethelp:
  15. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  16. @echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
  17. ifeq ($(ADK_TARGET_QEMU),y)
  18. @echo "Start qemu with following command line:"
  19. @echo 'qemu-system-${ADK_TARGET_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
  20. endif
  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-system-${ADK_TARGET_ARCH} ${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. @echo Use sudo ./boot_linux -F -i $(BIN_DIR)/${TARGET_KERNEL} to flash the kernel
  40. @echo Do not forget to set network boot jumper, before you start the foxboard
  41. endif
  42. ifeq ($(ADK_TARGET_FS),squashfs)
  43. targethelp:
  44. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  45. @echo "The RootFS image is: $(FW_DIR)/$(ROOTFSSQUASHFS)"
  46. endif
  47. ifeq ($(ADK_TARGET_FS),jffs2)
  48. targethelp:
  49. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  50. @echo "The RootFS image is: $(FW_DIR)/$(ROOTFSJFFS2)"
  51. endif
  52. kernel-strip:
  53. @cp $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
  54. kernel-install: kernel-strip
  55. @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
  56. # filesystem specific targets
  57. ifeq ($(ADK_TARGET_FS),archive)
  58. imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) targethelp
  59. endif
  60. ifeq ($(ADK_TARGET_FS),initramfs)
  61. imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
  62. endif
  63. ifeq ($(ADK_TARGET_FS),initramfsarchive)
  64. imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
  65. endif
  66. ifeq ($(ADK_TARGET_FS),initramfspiggyback)
  67. imageinstall: createinitramfs targethelp
  68. endif
  69. ifeq ($(ADK_TARGET_FS),nfsroot)
  70. imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
  71. endif
  72. ifeq ($(ADK_TARGET_FS),squashfs)
  73. imageinstall: $(BUILD_DIR)/root.squashfs kernel-install targethelp
  74. endif
  75. ifeq ($(ADK_TARGET_FS),jffs2)
  76. imageinstall: kernel-install $(FW_DIR)/$(ROOTFSJFFS2) targethelp
  77. endif