Skip to content

Commit 2d9d028

Browse files
committed
Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kbuild fix from Michal Marek: "Here is an ARM Makefile fix that you even acked. After nobody wanted to take it, it ended up in the kbuild tree" * 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: arm, kbuild: make "make install" not depend on vmlinux
2 parents f112bf8 + 19514fc commit 2d9d028

File tree

3 files changed

+29
-10
lines changed

3 files changed

+29
-10
lines changed

arch/arm/Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,15 @@ archprepare:
296296
# Convert bzImage to zImage
297297
bzImage: zImage
298298

299-
zImage Image xipImage bootpImage uImage: vmlinux
299+
BOOT_TARGETS = zImage Image xipImage bootpImage uImage
300+
INSTALL_TARGETS = zinstall uinstall install
301+
302+
PHONY += bzImage $(BOOT_TARGETS) $(INSTALL_TARGETS)
303+
304+
$(BOOT_TARGETS): vmlinux
300305
$(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@
301306

302-
zinstall uinstall install: vmlinux
307+
$(INSTALL_TARGETS):
303308
$(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@
304309

305310
%.dtb: | scripts

arch/arm/boot/Makefile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,24 +95,24 @@ initrd:
9595
@test "$(INITRD)" != "" || \
9696
(echo You must specify INITRD; exit -1)
9797

98-
install: $(obj)/Image
99-
$(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
98+
install:
99+
$(CONFIG_SHELL) $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" \
100100
$(obj)/Image System.map "$(INSTALL_PATH)"
101101

102-
zinstall: $(obj)/zImage
103-
$(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
102+
zinstall:
103+
$(CONFIG_SHELL) $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" \
104104
$(obj)/zImage System.map "$(INSTALL_PATH)"
105105

106-
uinstall: $(obj)/uImage
107-
$(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
106+
uinstall:
107+
$(CONFIG_SHELL) $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" \
108108
$(obj)/uImage System.map "$(INSTALL_PATH)"
109109

110110
zi:
111-
$(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
111+
$(CONFIG_SHELL) $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" \
112112
$(obj)/zImage System.map "$(INSTALL_PATH)"
113113

114114
i:
115-
$(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
115+
$(CONFIG_SHELL) $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" \
116116
$(obj)/Image System.map "$(INSTALL_PATH)"
117117

118118
subdir- := bootp compressed dts

arch/arm/boot/install.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,20 @@
2020
# $4 - default install path (blank if root directory)
2121
#
2222

23+
verify () {
24+
if [ ! -f "$1" ]; then
25+
echo "" 1>&2
26+
echo " *** Missing file: $1" 1>&2
27+
echo ' *** You need to run "make" before "make install".' 1>&2
28+
echo "" 1>&2
29+
exit 1
30+
fi
31+
}
32+
33+
# Make sure the files actually exist
34+
verify "$2"
35+
verify "$3"
36+
2337
# User may have a custom install script
2438
if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi
2539
if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi

0 commit comments

Comments
 (0)