summaryrefslogtreecommitdiffstats
path: root/rules/image-hdimg.make
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2014-04-27 17:55:04 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2014-05-05 17:30:50 +0200
commit2794b6744d2959f55a40952a05d92d07fc85d364 (patch)
tree1273cc16cd9994e7650f64330ba53abf1b2ff5f4 /rules/image-hdimg.make
parent66fc8c5e2ba35c909ffccaa0cd9337be90019db4 (diff)
downloadptxdist-2794b6744d2959f55a40952a05d92d07fc85d364.tar.gz
ptxdist-2794b6744d2959f55a40952a05d92d07fc85d364.tar.xz
image-hdimg: add generic HD image
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'rules/image-hdimg.make')
-rw-r--r--rules/image-hdimg.make54
1 files changed, 54 insertions, 0 deletions
diff --git a/rules/image-hdimg.make b/rules/image-hdimg.make
new file mode 100644
index 000000000..b5441dc80
--- /dev/null
+++ b/rules/image-hdimg.make
@@ -0,0 +1,54 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2014 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_HDIMG) += image-hdimg
+
+#
+# Paths and names
+#
+IMAGE_HDIMG := image-hdimg
+IMAGE_HDIMG_DIR := $(BUILDDIR)/$(IMAGE_HDIMG)
+IMAGE_HDIMG_IMAGE := $(IMAGEDIR)/hd.img
+IMAGE_HDIMG_CONFIG := hd.config
+
+# ----------------------------------------------------------------------------
+# Image
+# ----------------------------------------------------------------------------
+
+ifdef PTXCONF_IMAGE_HDIMG
+IMAGE_HDIMG_BOOTLOADER_ENV := \
+ BOOTLOADER_IMAGES='' \
+ BOOTLOADER_PARTIONS=''
+
+ifdef PTXCONF_IMAGE_HDIMG_GRUB
+IMAGE_HDIMG_BOOTLOADER_ENV = \
+ GRUB_STAGE_DIR=$(GRUB_STAGE_DIR) \
+ BOOTLOADER_IMAGES='include("grub.config")' \
+ BOOTLOADER_PARTIONS='include("grub_partitions.config")'
+endif
+ifdef PTXCONF_IMAGE_HDIMG_BAREBOX
+IMAGE_HDIMG_BOOTLOADER_ENV := \
+ BOOTLOADER_IMAGES='' \
+ BOOTLOADER_PARTIONS='include("barebox_partitions.config")'
+endif
+
+IMAGE_HDIMG_ENV = \
+ $(IMAGE_HDIMG_BOOTLOADER_ENV)
+
+$(IMAGE_HDIMG_IMAGE):
+ @$(call targetinfo)
+ @$(call image/genimage, IMAGE_HDIMG)
+ @$(call finish)
+endif
+
+# vim: syntax=make