Compare commits

..

2 Commits

Author SHA1 Message Date
dchvs 4c1ccb84dc Add Kernel Image install support 2021-03-03 22:53:37 -06:00
dchvs d6f6f6956c Add dtbs_install Makefile target to install DTBs 2021-03-02 01:37:32 -06:00
3 changed files with 43 additions and 0 deletions

View File

@ -150,9 +150,17 @@ zinstall install:
%.dtb: scripts
$(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@
PHONY += dtbs dtbs_install
dtbs: scripts
$(Q)$(MAKE) $(build)=$(boot)/dts dtbs
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)/$@

View File

@ -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=

View File

@ -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