Commit 65898b37 authored by Max Filippov's avatar Max Filippov

xtensa: move vmlinux.bin[.gz] to boot subdirectory

vmlinux.bin and vmlinux.bin.gz are always rebuilt in the kernel build
process. Add them to 'targets' and move them to the boot subdirectory
where their rules are. Update make rules that refer to them.
Reviewed-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
parent 10b60595
...@@ -17,6 +17,7 @@ BIG_ENDIAN := $(shell echo __XTENSA_EB__ | $(CC) -E - | grep -v "\#") ...@@ -17,6 +17,7 @@ BIG_ENDIAN := $(shell echo __XTENSA_EB__ | $(CC) -E - | grep -v "\#")
export BIG_ENDIAN export BIG_ENDIAN
subdir-y := lib subdir-y := lib
targets += vmlinux.bin vmlinux.bin.gz
# Subdirs for the boot loader(s) # Subdirs for the boot loader(s)
...@@ -35,19 +36,19 @@ boot-elf boot-redboot: $(addprefix $(obj)/,$(subdir-y)) ...@@ -35,19 +36,19 @@ boot-elf boot-redboot: $(addprefix $(obj)/,$(subdir-y))
OBJCOPYFLAGS = --strip-all -R .comment -R .notes -O binary OBJCOPYFLAGS = --strip-all -R .comment -R .notes -O binary
vmlinux.bin: vmlinux FORCE $(obj)/vmlinux.bin: vmlinux FORCE
$(call if_changed,objcopy) $(call if_changed,objcopy)
vmlinux.bin.gz: vmlinux.bin FORCE $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
$(call if_changed,gzip) $(call if_changed,gzip)
boot-elf: vmlinux.bin boot-elf: $(obj)/vmlinux.bin
boot-redboot: vmlinux.bin.gz boot-redboot: $(obj)/vmlinux.bin.gz
UIMAGE_LOADADDR = $(CONFIG_KERNEL_LOAD_ADDRESS) UIMAGE_LOADADDR = $(CONFIG_KERNEL_LOAD_ADDRESS)
UIMAGE_COMPRESSION = gzip UIMAGE_COMPRESSION = gzip
$(obj)/uImage: vmlinux.bin.gz FORCE $(obj)/uImage: $(obj)/vmlinux.bin.gz FORCE
$(call if_changed,uimage) $(call if_changed,uimage)
$(Q)$(kecho) ' Kernel: $@ is ready' $(Q)$(kecho) ' Kernel: $@ is ready'
......
...@@ -18,9 +18,9 @@ boot-y := bootstrap.o ...@@ -18,9 +18,9 @@ boot-y := bootstrap.o
OBJS := $(addprefix $(obj)/,$(boot-y)) OBJS := $(addprefix $(obj)/,$(boot-y))
$(obj)/Image.o: vmlinux.bin $(OBJS) $(obj)/Image.o: $(obj)/../vmlinux.bin $(OBJS)
$(Q)$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \ $(Q)$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
--add-section image=vmlinux.bin \ --add-section image=$< \
--set-section-flags image=contents,alloc,load,load,data \ --set-section-flags image=contents,alloc,load,load,data \
$(OBJS) $@ $(OBJS) $@
......
...@@ -19,9 +19,9 @@ LIBS := arch/xtensa/boot/lib/lib.a arch/xtensa/lib/lib.a ...@@ -19,9 +19,9 @@ LIBS := arch/xtensa/boot/lib/lib.a arch/xtensa/lib/lib.a
LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
$(obj)/zImage.o: vmlinux.bin.gz $(OBJS) $(obj)/zImage.o: $(obj)/../vmlinux.bin.gz $(OBJS)
$(Q)$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \ $(Q)$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
--add-section image=vmlinux.bin.gz \ --add-section image=$< \
--set-section-flags image=contents,alloc,load,load,data \ --set-section-flags image=contents,alloc,load,load,data \
$(OBJS) $@ $(OBJS) $@
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment