1
0

Makefile 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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/microblaze/boot/$(ADK_TARGET_KERNEL)
  9. ifeq ($(ADK_TARGET_QEMU_MICROBLAZE_MODEL_ML605),y)
  10. QEMU_ARGS+=-M petalogix-ml605 -dtb target/microblaze/ml605.dtb
  11. endif
  12. ifeq ($(ADK_TARGET_QEMU_MICROBLAZE_MODEL_S3ADSP1800),y)
  13. QEMU_ARGS+=-M petalogix-s3adsp1800
  14. endif
  15. ifeq ($(ADK_TARGET_FS),squashfs)
  16. imageinstall: $(BUILD_DIR)/root.squashfs
  17. qemu-img create -f raw $(FW_DIR)/$(ROOTFSSQUASHFS) $(ADK_TARGET_MTD_SIZE)
  18. dd conv=notrunc if=$(BUILD_DIR)/root.squashfs of=$(FW_DIR)/$(ROOTFSSQUASHFS)
  19. @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
  20. ifneq ($(ADK_HARDWARE_QEMU),)
  21. @echo "Start qemu with following options:"
  22. @echo 'qemu-system-${CPU_ARCH} $(QEMU_ARGS) -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) -pflash $(FW_DIR)/$(ROOTFSSQUASHFS)'
  23. endif
  24. endif
  25. ifeq ($(ADK_TARGET_FS),jffs2)
  26. imageinstall: $(FW_DIR)/$(ROOTFSJFFS2)
  27. @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
  28. ifneq ($(ADK_HARDWARE_QEMU),)
  29. @echo "Start qemu with following options:"
  30. @echo 'qemu-system-${CPU_ARCH} $(QEMU_ARGS) -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) -pflash $(FW_DIR)/$(ROOTFSJFFS2)'
  31. endif
  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. ifneq ($(ADK_HARDWARE_QEMU),)
  39. @echo "Start qemu with following command line:"
  40. @echo 'qemu-system-${CPU_ARCH} $(QEMU_ARGS) -nographic -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. ifneq ($(ADK_HARDWARE_QEMU),)
  48. @echo "Start qemu with following command line:"
  49. @echo 'qemu-system-${CPU_ARCH} $(QEMU_ARGS) -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL)'
  50. endif
  51. endif
  52. ifeq ($(ADK_TARGET_FS),archive)
  53. imageinstall: $(FW_DIR)/$(ROOTFSTARBALL)
  54. @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
  55. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  56. @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
  57. endif
  58. ifeq ($(ADK_TARGET_FS),initramfsarchive)
  59. imageinstall: $(FW_DIR)/$(ROOTFSUSERTARBALL)
  60. @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
  61. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  62. @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
  63. endif