1 # This file is part of the OpenADK project. OpenADK is copyrighted
2 # material, please see the LICENCE file in the top-level directory.
4 include $(ADK_TOPDIR
)/rules.mk
5 include $(ADK_TOPDIR
)/mk
/kernel-build.mk
6 include $(ADK_TOPDIR
)/mk
/image.mk
8 KERNEL
:=$(LINUX_DIR
)/arch
/microblaze
/boot
/$(ADK_TARGET_KERNEL
)
10 QEMU_ARGS
:=${ADK_QEMU_ARGS}
11 ifeq ($(ADK_TARGET_SYSTEM_QEMU_MICROBLAZE_ML605
),y
)
12 QEMU_ARGS
+=-M petalogix-ml605
-dtb target
/microblaze
/ml605.dtb
14 ifeq ($(ADK_TARGET_SYSTEM_QEMU_MICROBLAZE_S3ADSP1800
),y
)
15 QEMU_ARGS
+=-M petalogix-s3adsp1800
19 ifeq ($(ADK_TARGET_FS
),archive
)
21 @echo
"The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
23 ifeq ($(ADK_TARGET_FS
),initramfs
)
25 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
26 @echo
'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
27 ifeq ($(ADK_TARGET_QEMU
),y
)
28 @echo
"Start qemu with following command line:"
29 @echo
'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
32 ifeq ($(ADK_TARGET_FS
),initramfsarchive
)
34 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
35 @echo
"The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
37 ifeq ($(ADK_TARGET_FS
),initramfspiggyback
)
39 @echo
'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
40 ifeq ($(ADK_TARGET_QEMU
),y
)
41 @echo
"Start qemu with following command line:"
42 @echo
'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
45 ifeq ($(ADK_TARGET_FS
),squashfs
)
47 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
48 @echo
"The RootFS image is: $(FW_DIR)/$(ROOTFSSQUASHFS)"
49 ifeq ($(ADK_TARGET_QEMU
),y
)
50 @echo
"Start qemu with following options:"
51 @echo
'qemu-system-${ADK_TARGET_CPU_ARCH} $(QEMU_ARGS) -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) -pflash $(FW_DIR)/$(ROOTFSSQUASHFS)'
54 ifeq ($(ADK_TARGET_FS
),jffs2
)
56 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
57 @echo
"The RootFS image is: $(FW_DIR)/$(ROOTFSJFFS2)"
58 ifeq ($(ADK_TARGET_QEMU
),y
)
59 @echo
"Start qemu with following options:"
60 @echo
'qemu-system-${ADK_TARGET_CPU_ARCH} $(QEMU_ARGS) -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) -pflash $(FW_DIR)/$(ROOTFSJFFS2)'
65 @cp
$(KERNEL
) $(BUILD_DIR
)/$(TARGET_KERNEL
)
67 kernel-install
: kernel-strip
68 @cp
$(KERNEL
) $(FW_DIR
)/$(TARGET_KERNEL
)
69 ifeq ($(ADK_TARGET_FS
),squashfs
)
70 env PATH
=$(HOST_PATH
) qemu-img create
-f raw
$(FW_DIR
)/$(ROOTFSSQUASHFS
) $(ADK_TARGET_MTD_SIZE
)
71 dd conv
=notrunc if
=$(BUILD_DIR
)/root.squashfs of
=$(FW_DIR
)/$(ROOTFSSQUASHFS
)
74 # filesystem specific targets
75 ifeq ($(ADK_TARGET_FS
),archive
)
76 imageinstall
: $(FW_DIR
)/$(ROOTFSTARBALL
) targethelp
78 ifeq ($(ADK_TARGET_FS
),initramfs
)
79 imageinstall
: kernel-install
$(FW_DIR
)/$(INITRAMFS
) targethelp
81 ifeq ($(ADK_TARGET_FS
),initramfsarchive
)
82 imageinstall
: kernel-install
$(FW_DIR
)/$(ROOTFSUSERTARBALL
) targethelp
84 ifeq ($(ADK_TARGET_FS
),initramfspiggyback
)
85 imageinstall
: createinitramfs targethelp
87 ifeq ($(ADK_TARGET_FS
),squashfs
)
88 imageinstall
: $(BUILD_DIR
)/root.squashfs kernel-install targethelp
90 ifeq ($(ADK_TARGET_FS
),jffs2
)
91 imageinstall
: kernel-install
$(FW_DIR
)/$(ROOTFSJFFS2
) targethelp