Skip to content

Commit f6e7a02

Browse files
committed
Merge tag 'arc-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc
Pull ARC updates from Vineet Gupta: "Things are quieter on upstreaming front as we are mostly focusing on ARCv3/ARC64 port. This contains just build system updates from Masahiro Yamada" * tag 'arc-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARC: build: use $(READELF) instead of hard-coded readelf ARC: build: remove unneeded extra-y ARC: build: move symlink creation to arch/arc/Makefile to avoid race ARC: build: add boot_targets to PHONY ARC: build: add uImage.lzma to the top-level target ARC: build: remove non-existing bootpImage from KBUILD_IMAGE
2 parents aa35e45 + 3a71e42 commit f6e7a02

File tree

2 files changed

+17
-21
lines changed

2 files changed

+17
-21
lines changed

arch/arc/Makefile

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,22 @@ libs-y += arch/arc/lib/ $(LIBGCC)
102102

103103
boot := arch/arc/boot
104104

105-
#default target for make without any arguments.
106-
KBUILD_IMAGE := $(boot)/bootpImage
107-
108-
all: bootpImage
109-
bootpImage: vmlinux
110-
111-
boot_targets += uImage uImage.bin uImage.gz
105+
boot_targets := uImage.bin uImage.gz uImage.lzma
112106

107+
PHONY += $(boot_targets)
113108
$(boot_targets): vmlinux
114109
$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
115110

111+
uimage-default-y := uImage.bin
112+
uimage-default-$(CONFIG_KERNEL_GZIP) := uImage.gz
113+
uimage-default-$(CONFIG_KERNEL_LZMA) := uImage.lzma
114+
115+
PHONY += uImage
116+
uImage: $(uimage-default-y)
117+
@ln -sf $< $(boot)/uImage
118+
@$(kecho) ' Image $(boot)/uImage is ready'
119+
120+
CLEAN_FILES += $(boot)/uImage
121+
116122
archclean:
117123
$(Q)$(MAKE) $(clean)=$(boot)

arch/arc/boot/Makefile

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,23 @@
11
# SPDX-License-Identifier: GPL-2.0
2-
targets := vmlinux.bin vmlinux.bin.gz uImage
32

43
# uImage build relies on mkimage being availble on your host for ARC target
54
# You will need to build u-boot for ARC, rename mkimage to arc-elf32-mkimage
65
# and make sure it's reacable from your PATH
76

87
OBJCOPYFLAGS= -O binary -R .note -R .note.gnu.build-id -R .comment -S
98

10-
LINUX_START_TEXT = $$(readelf -h vmlinux | \
9+
LINUX_START_TEXT = $$($(READELF) -h vmlinux | \
1110
grep "Entry point address" | grep -o 0x.*)
1211

1312
UIMAGE_LOADADDR = $(CONFIG_LINUX_LINK_BASE)
1413
UIMAGE_ENTRYADDR = $(LINUX_START_TEXT)
1514

16-
suffix-y := bin
17-
suffix-$(CONFIG_KERNEL_GZIP) := gz
18-
suffix-$(CONFIG_KERNEL_LZMA) := lzma
19-
20-
targets += uImage
15+
targets += vmlinux.bin
16+
targets += vmlinux.bin.gz
17+
targets += vmlinux.bin.lzma
2118
targets += uImage.bin
2219
targets += uImage.gz
2320
targets += uImage.lzma
24-
extra-y += vmlinux.bin
25-
extra-y += vmlinux.bin.gz
26-
extra-y += vmlinux.bin.lzma
2721

2822
$(obj)/vmlinux.bin: vmlinux FORCE
2923
$(call if_changed,objcopy)
@@ -42,7 +36,3 @@ $(obj)/uImage.gz: $(obj)/vmlinux.bin.gz FORCE
4236

4337
$(obj)/uImage.lzma: $(obj)/vmlinux.bin.lzma FORCE
4438
$(call if_changed,uimage,lzma)
45-
46-
$(obj)/uImage: $(obj)/uImage.$(suffix-y)
47-
@ln -sf $(notdir $<) $@
48-
@echo ' Image $@ is ready'

0 commit comments

Comments
 (0)