diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2018-05-30 20:09:17 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2018-05-30 20:33:56 +0200 |
commit | c553cba4053023bcb51b4a13681a69d484f771a9 (patch) | |
tree | 95870d73824a4a94cb458d9255065502383d4dbb /rules/image-kernel.make | |
parent | 7b294a3ebd724d7a4ad070d4b83ae61c5b55bf10 (diff) | |
download | ptxdist-c553cba4053023bcb51b4a13681a69d484f771a9.tar.gz ptxdist-c553cba4053023bcb51b4a13681a69d484f771a9.tar.xz |
create image rules for the kernel images
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'rules/image-kernel.make')
-rw-r--r-- | rules/image-kernel.make | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/rules/image-kernel.make b/rules/image-kernel.make new file mode 100644 index 000000000..d2e5dd77b --- /dev/null +++ b/rules/image-kernel.make @@ -0,0 +1,42 @@ +# -*-makefile-*- +# +# Copyright (C) 2018 by Michael Olbrich <m.olbrich@pengutronix.de> +# +# See CREDITS for details about who has contributed to this project. +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +IMAGE_PACKAGES-$(PTXCONF_IMAGE_KERNEL) += image-kernel + +# +# Paths and names +# +IMAGE_KERNEL := image-kernel +IMAGE_KERNEL_IMAGE := $(IMAGEDIR)/linuximage + +# ---------------------------------------------------------------------------- +# Image +# ---------------------------------------------------------------------------- + +$(IMAGE_KERNEL_IMAGE): $(STATEDIR)/kernel.install.post + @$(call targetinfo) + +ifdef PTXCONF_IMAGE_KERNEL_INITRAMFS + @echo "Creating '$(KERNEL_IMAGE)' including '$(notdir $(<))'..." + @sed -i -e 's,^CONFIG_INITRAMFS_SOURCE.*$$,CONFIG_INITRAMFS_SOURCE=\"$(<)\",g' \ + $(KERNEL_DIR)/.config + @cd $(KERNEL_DIR) && $(KERNEL_PATH) $(KERNEL_ENV) $(MAKE) \ + $(KERNEL_MAKEVARS) $(KERNEL_IMAGE) +endif + + @echo "Creating '$(notdir $(@))' from '$(notdir $(KERNEL_IMAGE_PATH_y))'..." + @install -m 644 "$(KERNEL_IMAGE_PATH_y)" "$(@)" + + @$(call finish) + +# vim: syntax=make |