Makefile 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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/sh/boot/zImage
  9. QEMU_ARGS:=-M r2d
  10. QEMU_ARGS+=${ADK_QEMU_ARGS}
  11. QEMU_ARGS+=-monitor null
  12. ifeq ($(ADK_TARGET_QEMU_WITH_GRAPHIC),)
  13. QEMU_ARGS+=-serial null -serial stdio
  14. endif
  15. ifeq ($(ADK_TARGET_FS),archive)
  16. imageinstall: $(FW_DIR)/$(ROOTFSTARBALL)
  17. @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
  18. ifneq ($(ADK_HARDWARE_QEMU),)
  19. @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
  20. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  21. @echo "Use following command to create a QEMU Image:"
  22. @echo "./scripts/create.sh qemu-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
  23. @echo "Start qemu with following options:"
  24. @echo 'qemu-system-${CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${CPU_ARCH}.img'
  25. endif
  26. endif
  27. ifeq ($(ADK_TARGET_FS),initramfsarchive)
  28. imageinstall: $(FW_DIR)/$(ROOTFSUSERTARBALL)
  29. @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
  30. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  31. @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
  32. endif
  33. ifeq ($(ADK_TARGET_FS),initramfs)
  34. imageinstall: $(FW_DIR)/$(INITRAMFS)
  35. @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
  36. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  37. @echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
  38. ifeq ($(ADK_HARDWARE_QEMU),y)
  39. @echo "Start qemu with following command line:"
  40. @echo 'qemu-system-${CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
  41. endif
  42. endif
  43. ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
  44. imageinstall: createinitramfs
  45. @cp $(KERNEL) $(FW_DIR)/${TARGET_KERNEL}
  46. @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
  47. ifeq ($(ADK_HARDWARE_QEMU),y)
  48. @echo "Start qemu with following command line:"
  49. @echo 'qemu-system-${CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
  50. endif
  51. endif