Makefile 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. MODEL:=petalogix-ml605
  11. DTB:=-dtb target/microblaze/ml605.dtb
  12. endif
  13. ifeq ($(ADK_TARGET_QEMU_MICROBLAZE_MODEL_S3ADSP1800),y)
  14. MODEL:=petalogix-s3adsp1800
  15. DTB:=
  16. endif
  17. ifeq ($(ADK_TARGET_FS),squashfs)
  18. imageinstall: $(BUILD_DIR)/root.squashfs
  19. qemu-img create -f raw $(FW_DIR)/$(ROOTFSSQUASHFS) $(ADK_TARGET_MTD_SIZE)
  20. dd conv=notrunc if=$(BUILD_DIR)/root.squashfs of=$(FW_DIR)/$(ROOTFSSQUASHFS)
  21. @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
  22. ifneq ($(ADK_HARDWARE_QEMU),)
  23. @echo "Start qemu with following options:"
  24. @echo 'qemu-system-${CPU_ARCH} -M $(MODEL) -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) -pflash $(FW_DIR)/$(ROOTFSSQUASHFS) $(DTB)'
  25. endif
  26. endif
  27. ifeq ($(ADK_TARGET_FS),jffs2)
  28. imageinstall: $(FW_DIR)/$(ROOTFSJFFS2)
  29. @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
  30. ifneq ($(ADK_HARDWARE_QEMU),)
  31. @echo "Start qemu with following options:"
  32. @echo 'qemu-system-${CPU_ARCH} -M $(MODEL) -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) -pflash $(FW_DIR)/$(ROOTFSJFFS2) $(DTB)'
  33. endif
  34. endif
  35. ifeq ($(ADK_TARGET_FS),initramfs)
  36. imageinstall: $(FW_DIR)/$(INITRAMFS)
  37. @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
  38. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  39. @echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
  40. ifneq ($(ADK_HARDWARE_QEMU),)
  41. @echo "Start qemu with following command line:"
  42. @echo 'qemu-system-${CPU_ARCH} -M $(MODEL) -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS} $(DTB)'
  43. endif
  44. endif
  45. ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
  46. imageinstall: createinitramfs
  47. @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
  48. @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
  49. ifneq ($(ADK_HARDWARE_QEMU),)
  50. @echo "Start qemu with following command line:"
  51. @echo 'qemu-system-${CPU_ARCH} -M $(MODEL) -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) $(DTB)'
  52. endif
  53. endif