make_targets: Add Kernel Image install support
This commit is contained in:
parent
e1315a74a1
commit
3dd32ccbb6
|
@ -158,6 +158,9 @@ dtbs: scripts
|
|||
dtbs_install:
|
||||
$(Q)$(MAKE) $(dtbinst)=$(boot)/dts
|
||||
|
||||
kernel_install:
|
||||
$(Q)$(MAKE) $(kernelinst)=$(boot)/
|
||||
|
||||
Image-dtb Image.gz-dtb: vmlinux scripts dtbs
|
||||
$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
|
||||
|
||||
|
|
|
@ -254,6 +254,7 @@ modbuiltin := -f $(srctree)/scripts/Makefile.modbuiltin obj
|
|||
# Usage:
|
||||
# $(Q)$(MAKE) $(dtbinst)=dir
|
||||
dtbinst := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.dtbinst obj
|
||||
kernelinst := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.kernelinst obj
|
||||
|
||||
###
|
||||
# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.clean obj=
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
# ==========================================================================
|
||||
# Installing Image file
|
||||
#
|
||||
# Installs Image file from INSTALL_IMAGE_PATH directory or the default location:
|
||||
#
|
||||
# ==========================================================================
|
||||
|
||||
src := $(obj)
|
||||
|
||||
PHONY := __kernel_install
|
||||
__kernel_install:
|
||||
|
||||
export kernelinst-root ?= $(obj)
|
||||
|
||||
include include/config/auto.conf
|
||||
include scripts/Kbuild.include
|
||||
include $(src)/Makefile
|
||||
|
||||
PHONY += __kernel_install_prep
|
||||
__kernel_install_prep:
|
||||
ifeq ("$(kernelinst-root)", "$(obj)")
|
||||
$(Q)mkdir -p $(INSTALL_PATH)
|
||||
endif
|
||||
|
||||
# Helper targets for Installing Kernel into the boot directory
|
||||
quiet_cmd_kernel_install = INSTALL $(2)
|
||||
cmd_kernel_install = mkdir -p $(2); cp $(kernelinst-root)$(2) $(3);
|
||||
|
||||
install-dir = $(patsubst $(kernelinst-root)%,$(INSTALL_PATH)%,$(obj))
|
||||
|
||||
__kernel_install:
|
||||
$(call cmd,kernel_install,Image,$(install-dir))
|
||||
|
||||
.PHONY: __kernel_install
|
Loading…
Reference in New Issue