linux: update to 6.10.x, 6.9.x is EOL
[openadk.git] / target / microblaze / Makefile
bloba5c3a24e00cd69f84324a893decfdb5621ebc208
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
13 endif
14 ifeq ($(ADK_TARGET_SYSTEM_QEMU_MICROBLAZE_S3ADSP1800),y)
15 QEMU_ARGS+=-M petalogix-s3adsp1800
16 endif
18 # target helper text
19 ifeq ($(ADK_TARGET_FS),archive)
20 targethelp:
21 @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
22 endif
23 ifeq ($(ADK_TARGET_FS),initramfs)
24 targethelp:
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}'
30 endif
31 endif
32 ifeq ($(ADK_TARGET_FS),initramfsarchive)
33 targethelp:
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),initramfspiggyback)
38 targethelp:
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)'
43 endif
44 endif
45 ifeq ($(ADK_TARGET_FS),squashfs)
46 targethelp:
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)'
52 endif
53 endif
54 ifeq ($(ADK_TARGET_FS),jffs2)
55 targethelp:
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)'
61 endif
62 endif
64 kernel-strip:
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)
72 endif
74 # filesystem specific targets
75 ifeq ($(ADK_TARGET_FS),archive)
76 imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) targethelp
77 endif
78 ifeq ($(ADK_TARGET_FS),initramfs)
79 imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
80 endif
81 ifeq ($(ADK_TARGET_FS),initramfsarchive)
82 imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
83 endif
84 ifeq ($(ADK_TARGET_FS),initramfspiggyback)
85 imageinstall: createinitramfs targethelp
86 endif
87 ifeq ($(ADK_TARGET_FS),squashfs)
88 imageinstall: $(BUILD_DIR)/root.squashfs kernel-install targethelp
89 endif
90 ifeq ($(ADK_TARGET_FS),jffs2)
91 imageinstall: kernel-install $(FW_DIR)/$(ROOTFSJFFS2) targethelp
92 endif