Makefile 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. ifeq ($(ADK_TARGET_FS),initramfs)
  10. targethelp:
  11. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  12. @echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
  13. ifeq ($(ADK_TARGET_QEMU),y)
  14. @echo "Start qemu with following command line:"
  15. @echo 'qemu-system-${ADK_TARGET_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
  16. endif
  17. endif
  18. ifeq ($(ADK_TARGET_FS),initramfsarchive)
  19. targethelp:
  20. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  21. @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
  22. endif
  23. ifeq ($(ADK_TARGET_FS),initramfspiggyback)
  24. targethelp:
  25. @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
  26. ifeq ($(ADK_TARGET_QEMU),y)
  27. @echo "Start qemu with following command line:"
  28. @echo 'qemu-system-${ADK_TARGET_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
  29. endif
  30. endif
  31. kernel-install:
  32. @cp $(KERNEL) $(FW_DIR)/${TARGET_KERNEL}
  33. # filesystem specific targets
  34. ifeq ($(ADK_TARGET_FS),archive)
  35. imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) targethelp
  36. endif
  37. ifeq ($(ADK_TARGET_FS),initramfs)
  38. imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
  39. endif
  40. ifeq ($(ADK_TARGET_FS),initramfsarchive)
  41. imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
  42. endif
  43. ifeq ($(ADK_TARGET_FS),initramfspiggyback)
  44. imageinstall: createinitramfs targethelp
  45. endif
  46. ifeq ($(ADK_TARGET_FS),nfsroot)
  47. imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
  48. endif