forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/arch/xtensa/boot/Makefile
....@@ -9,15 +9,15 @@
99
1010
1111 # KBUILD_CFLAGS used when building rest of boot (takes effect recursively)
12
-KBUILD_CFLAGS += -fno-builtin -Iarch/$(ARCH)/boot/include
13
-HOSTFLAGS += -Iarch/$(ARCH)/boot/include
12
+KBUILD_CFLAGS += -fno-builtin
1413
1514 BIG_ENDIAN := $(shell echo __XTENSA_EB__ | $(CC) -E - | grep -v "\#")
1615
17
-export ccflags-y
1816 export BIG_ENDIAN
1917
2018 subdir-y := lib
19
+targets += vmlinux.bin vmlinux.bin.gz
20
+targets += uImage xipImage
2121
2222 # Subdirs for the boot loader(s)
2323
....@@ -29,24 +29,29 @@
2929 Image: boot-elf
3030 zImage: boot-redboot
3131 uImage: $(obj)/uImage
32
+xipImage: $(obj)/xipImage
3233
3334 boot-elf boot-redboot: $(addprefix $(obj)/,$(subdir-y))
3435 $(Q)$(MAKE) $(build)=$(obj)/$@ $(MAKECMDGOALS)
3536
3637 OBJCOPYFLAGS = --strip-all -R .comment -R .notes -O binary
3738
38
-vmlinux.bin: vmlinux FORCE
39
+$(obj)/vmlinux.bin: vmlinux FORCE
3940 $(call if_changed,objcopy)
4041
41
-vmlinux.bin.gz: vmlinux.bin FORCE
42
+$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
4243 $(call if_changed,gzip)
4344
44
-boot-elf: vmlinux.bin
45
-boot-redboot: vmlinux.bin.gz
45
+boot-elf: $(obj)/vmlinux.bin
46
+boot-redboot: $(obj)/vmlinux.bin.gz
4647
4748 UIMAGE_LOADADDR = $(CONFIG_KERNEL_LOAD_ADDRESS)
4849 UIMAGE_COMPRESSION = gzip
4950
50
-$(obj)/uImage: vmlinux.bin.gz FORCE
51
+$(obj)/uImage: $(obj)/vmlinux.bin.gz FORCE
5152 $(call if_changed,uimage)
5253 $(Q)$(kecho) ' Kernel: $@ is ready'
54
+
55
+$(obj)/xipImage: vmlinux FORCE
56
+ $(call if_changed,objcopy)
57
+ $(Q)$(kecho) ' Kernel: $@ is ready'