Makefile 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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)/vmlinux
  9. QEMU_ARGS:=-M sun4u
  10. ifeq ($(ADK_TARGET_QEMU_WITH_GRAPHIC),)
  11. QEMU_ARGS+=-nographic
  12. endif
  13. ifeq ($(ADK_TARGET_QEMU_WITH_VIRTIO),y)
  14. QEMU_ARGS+=-net nic,model=virtio -net user
  15. ifeq ($(ADK_TARGET_FS),archive)
  16. QEMU_ARGS+=-drive file=qemu-${CPU_ARCH}.img,if=virtio,index=0
  17. endif
  18. endif
  19. ifeq ($(ADK_TARGET_FS),archive)
  20. imageinstall: $(FW_DIR)/$(ROOTFSTARBALL)
  21. @cp $(KERNEL) $(FW_DIR)/${TARGET_KERNEL}
  22. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  23. @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
  24. ifeq ($(ADK_TARGET_SYSTEM_QEMU_SPARC64),y)
  25. @echo "Use following command to create a QEMU Image:"
  26. @echo "./scripts/create.sh qemu-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
  27. @echo "Start qemu with following command line:"
  28. @echo 'qemu-system-sparc64 $(QEMU_ARGS) -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${CPU_ARCH}.img'
  29. endif
  30. endif
  31. ifeq ($(ADK_TARGET_FS),initramfsarchive)
  32. imageinstall: $(FW_DIR)/$(ROOTFSUSERTARBALL)
  33. @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
  34. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  35. @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
  36. endif
  37. ifeq ($(ADK_TARGET_FS),initramfs)
  38. imageinstall: $(FW_DIR)/$(INITRAMFS)
  39. @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
  40. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  41. @echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
  42. ifeq ($(ADK_TARGET_SYSTEM_QEMU_SPARC64),y)
  43. @echo "Start qemu with following command line:"
  44. @echo 'qemu-system-sparc64 $(QEMU_ARGS) -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
  45. endif
  46. endif
  47. ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
  48. imageinstall: createinitramfs
  49. @cp $(KERNEL) $(FW_DIR)/${TARGET_KERNEL}
  50. @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
  51. ifeq ($(ADK_TARGET_SYSTEM_QEMU_SPARC64),y)
  52. @echo "Start qemu with following command line:"
  53. @echo 'qemu-system-sparc64 $(QEMU_ARGS) -kernel $(FW_DIR)/$(TARGET_KERNEL)'
  54. endif
  55. endif