diff options
author | David Woodhouse <dwmw2@infradead.org> | 2007-12-02 21:56:58 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-12-05 22:44:30 -0500 |
commit | 773f76b1601d53dc8485675736b845cc3644921a (patch) | |
tree | 4305e6a8175b262612bf74cfc8f09f572046dbe2 /arch/powerpc/boot/Makefile | |
parent | 5c539ee38263c12121d777c2e7119807742e9368 (diff) |
[POWERPC] Implement 'make bootwrapper_install'
This adds a 'bootwrapper_install' make target for the powerpc
architecture, which installs the wrapper script, intermediate object
files and device-tree sources for later use.
This will then allow bootable zImages to be created other than in the
context of a kernel build.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/boot/Makefile')
-rw-r--r-- | arch/powerpc/boot/Makefile | 48 |
1 files changed, 48 insertions, 0 deletions
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 | |||
243 | clean-kernel += $(addsuffix .gz,$(clean-kernel)) | 243 | clean-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). |
245 | clean-files += $(addprefix $(objtree)/, $(clean-kernel)) | 245 | clean-files += $(addprefix $(objtree)/, $(clean-kernel)) |
246 | |||
247 | WRAPPER_OBJDIR := /usr/lib/kernel-wrapper | ||
248 | WRAPPER_DTSDIR := /usr/lib/kernel-wrapper/dts | ||
249 | WRAPPER_BINDIR := /usr/sbin | ||
250 | INSTALL := install | ||
251 | |||
252 | extra-installed := $(patsubst $(obj)/%, $(DESTDIR)$(WRAPPER_OBJDIR)/%, $(extra-y)) | ||
253 | hostprogs-installed := $(patsubst %, $(DESTDIR)$(WRAPPER_BINDIR)/%, $(hostprogs-y)) | ||
254 | wrapper-installed := $(DESTDIR)$(WRAPPER_BINDIR)/wrapper | ||
255 | dts-installed := $(patsubst $(obj)/dts/%, $(DESTDIR)$(WRAPPER_DTSDIR)/%, $(wildcard $(obj)/dts/*.dts)) | ||
256 | |||
257 | all-installed := $(extra-installed) $(hostprogs-installed) $(wrapper-installed) $(dts-installed) | ||
258 | |||
259 | quiet_cmd_mkdir = MKDIR $(patsubst $(INSTALL_HDR_PATH)/%,%,$@) | ||
260 | cmd_mkdir = mkdir -p $@ | ||
261 | |||
262 | quiet_cmd_install = INSTALL $(patsubst $(DESTDIR)$(WRAPPER_OBJDIR)/%,%,$@) | ||
263 | cmd_install = $(INSTALL) -m0644 $(patsubst $(DESTDIR)$(WRAPPER_OBJDIR)/%,$(obj)/%,$@) $@ | ||
264 | |||
265 | quiet_cmd_install_dts = INSTALL $(patsubst $(DESTDIR)$(WRAPPER_DTSDIR)/%,dts/%,$@) | ||
266 | cmd_install_dts = $(INSTALL) -m0644 $(patsubst $(DESTDIR)$(WRAPPER_DTSDIR)/%,$(srctree)/$(obj)/dts/%,$@) $@ | ||
267 | |||
268 | quiet_cmd_install_exe = INSTALL $(patsubst $(DESTDIR)$(WRAPPER_BINDIR)/%,%,$@) | ||
269 | cmd_install_exe = $(INSTALL) -m0755 $(patsubst $(DESTDIR)$(WRAPPER_BINDIR)/%,$(obj)/%,$@) $@ | ||
270 | |||
271 | quiet_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 | |||