forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/arch/xtensa/boot/Makefile
....@@ -14,10 +14,11 @@
1414
1515 BIG_ENDIAN := $(shell echo __XTENSA_EB__ | $(CC) -E - | grep -v "\#")
1616
17
-export ccflags-y
1817 export BIG_ENDIAN
1918
2019 subdir-y := lib
20
+targets += vmlinux.bin vmlinux.bin.gz
21
+targets += uImage xipImage
2122
2223 # Subdirs for the boot loader(s)
2324
....@@ -29,24 +30,29 @@
2930 Image: boot-elf
3031 zImage: boot-redboot
3132 uImage: $(obj)/uImage
33
+xipImage: $(obj)/xipImage
3234
3335 boot-elf boot-redboot: $(addprefix $(obj)/,$(subdir-y))
3436 $(Q)$(MAKE) $(build)=$(obj)/$@ $(MAKECMDGOALS)
3537
3638 OBJCOPYFLAGS = --strip-all -R .comment -R .notes -O binary
3739
38
-vmlinux.bin: vmlinux FORCE
40
+$(obj)/vmlinux.bin: vmlinux FORCE
3941 $(call if_changed,objcopy)
4042
41
-vmlinux.bin.gz: vmlinux.bin FORCE
43
+$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
4244 $(call if_changed,gzip)
4345
44
-boot-elf: vmlinux.bin
45
-boot-redboot: vmlinux.bin.gz
46
+boot-elf: $(obj)/vmlinux.bin
47
+boot-redboot: $(obj)/vmlinux.bin.gz
4648
4749 UIMAGE_LOADADDR = $(CONFIG_KERNEL_LOAD_ADDRESS)
4850 UIMAGE_COMPRESSION = gzip
4951
50
-$(obj)/uImage: vmlinux.bin.gz FORCE
52
+$(obj)/uImage: $(obj)/vmlinux.bin.gz FORCE
5153 $(call if_changed,uimage)
5254 $(Q)$(kecho) ' Kernel: $@ is ready'
55
+
56
+$(obj)/xipImage: vmlinux FORCE
57
+ $(call if_changed,objcopy)
58
+ $(Q)$(kecho) ' Kernel: $@ is ready'