aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/Makefile3
-rw-r--r--arch/powerpc/boot/Makefile48
2 files changed, 51 insertions, 0 deletions
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index bd87626c1f60..f70df9b64f8f 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -167,6 +167,9 @@ boot := arch/$(ARCH)/boot
167$(BOOT_TARGETS): vmlinux 167$(BOOT_TARGETS): vmlinux
168 $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@) 168 $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
169 169
170bootwrapper_install:
171 $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
172
170define archhelp 173define archhelp
171 @echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage.*)' 174 @echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage.*)'
172 @echo ' install - Install kernel using' 175 @echo ' install - Install kernel using'
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 18e32719d0ed..e1c73e9afa59 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -243,3 +243,51 @@ clean-kernel := vmlinux.strip vmlinux.bin
243clean-kernel += $(addsuffix .gz,$(clean-kernel)) 243clean-kernel += $(addsuffix .gz,$(clean-kernel))
244# If not absolute clean-files are relative to $(obj). 244# If not absolute clean-files are relative to $(obj).
245clean-files += $(addprefix $(objtree)/, $(clean-kernel)) 245clean-files += $(addprefix $(objtree)/, $(clean-kernel))
246
247WRAPPER_OBJDIR := /usr/lib/kernel-wrapper
248WRAPPER_DTSDIR := /usr/lib/kernel-wrapper/dts
249WRAPPER_BINDIR := /usr/sbin
250INSTALL := install
251
252extra-installed := $(patsubst $(obj)/%, $(DESTDIR)$(WRAPPER_OBJDIR)/%, $(extra-y))
253hostprogs-installed := $(patsubst %, $(DESTDIR)$(WRAPPER_BINDIR)/%, $(hostprogs-y))
254wrapper-installed := $(DESTDIR)$(WRAPPER_BINDIR)/wrapper
255dts-installed := $(patsubst $(obj)/dts/%, $(DESTDIR)$(WRAPPER_DTSDIR)/%, $(wildcard $(obj)/dts/*.dts))
256
257all-installed := $(extra-installed) $(hostprogs-installed) $(wrapper-installed) $(dts-installed)
258
259quiet_cmd_mkdir = MKDIR $(patsubst $(INSTALL_HDR_PATH)/%,%,$@)
260 cmd_mkdir = mkdir -p $@
261
262quiet_cmd_install = INSTALL $(patsubst $(DESTDIR)$(WRAPPER_OBJDIR)/%,%,$@)
263 cmd_install = $(INSTALL) -m0644 $(patsubst $(DESTDIR)$(WRAPPER_OBJDIR)/%,$(obj)/%,$@) $@
264
265quiet_cmd_install_dts = INSTALL $(patsubst $(DESTDIR)$(WRAPPER_DTSDIR)/%,dts/%,$@)
266 cmd_install_dts = $(INSTALL) -m0644 $(patsubst $(DESTDIR)$(WRAPPER_DTSDIR)/%,$(srctree)/$(obj)/dts/%,$@) $@
267
268quiet_cmd_install_exe = INSTALL $(patsubst $(DESTDIR)$(WRAPPER_BINDIR)/%,%,$@)
269 cmd_install_exe = $(INSTALL) -m0755 $(patsubst $(DESTDIR)$(WRAPPER_BINDIR)/%,$(obj)/%,$@) $@
270
271quiet_cmd_install_wrapper = INSTALL $(patsubst $(DESTDIR)$(WRAPPER_BINDIR)/%,%,$@)
272 cmd_install_wrapper = $(INSTALL) -m0755 $(patsubst $(DESTDIR)$(WRAPPER_BINDIR)/%,$(srctree)/$(obj)/%,$@) $@ ;\
273 sed -i $@ -e 's%^object=.*%object=$(WRAPPER_OBJDIR)%' \
274 -e 's%^objbin=.*%objbin=$(WRAPPER_BINDIR)%' \
275
276
277$(DESTDIR)$(WRAPPER_OBJDIR) $(DESTDIR)$(WRAPPER_DTSDIR) $(DESTDIR)$(WRAPPER_BINDIR):
278 $(call cmd,mkdir)
279
280$(extra-installed) : $(DESTDIR)$(WRAPPER_OBJDIR)/% : $(obj)/% | $(DESTDIR)$(WRAPPER_OBJDIR)
281 $(call cmd,install)
282
283$(hostprogs-installed) : $(DESTDIR)$(WRAPPER_BINDIR)/% : $(obj)/% | $(DESTDIR)$(WRAPPER_BINDIR)
284 $(call cmd,install_exe)
285
286$(dts-installed) : $(DESTDIR)$(WRAPPER_DTSDIR)/% : $(srctree)/$(obj)/dts/% | $(DESTDIR)$(WRAPPER_DTSDIR)
287 $(call cmd,install_dts)
288
289$(wrapper-installed): $(DESTDIR)$(WRAPPER_BINDIR) $(srctree)/$(obj)/wrapper | $(DESTDIR)$(WRAPPER_BINDIR)
290 $(call cmd,install_wrapper)
291
292$(obj)/bootwrapper_install: $(all-installed)
293