@@ -65,6 +65,7 @@ Properties for the device section
* +type+ (mandatory): the type of content for that device or partition
** +boot+: the device contains one or more partitions, and
_may_ serve as a boot device
+** +raw+: the device contains a raw binary blob
* +keep_partitions+ (optional): also copy the individual partition images
for this device to +$(BINARIES_DIR)+. Settings from the partition
@@ -77,6 +78,7 @@ Properties for the partition section
* +type+ (mandatory): the type of content for that device or partition
** +fs+: the partition contains a filesystem
+** +raw+: the partition contains a raw binary blob
* +size+: the size of that partition, in bytes
@@ -104,6 +106,12 @@ Properties for +type=boot+
+boot_type+, some restrictions may apply, and are documented for each
+boot_type+
+Properties for +type=raw+
+^^^^^^^^^^^^^^^^^^^^^^^^^
+
+* +raw_file+: the filename, relative to +$(BINARIES_DIR)+, that contains
+ the binary blob
+
Properties for +boot_type=mbr+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -175,6 +175,11 @@ render_img() {
if [ ! -d "fs/custom/${type}" ]; then
error "'%s': unsupported type '%s'\n" "${img}" "${type}"
fi
+
+ # Special case for 'raw': there is no sub-type, we just fake the
+ # sub-type to be 'raw' as well.
+ [ "${type}" != "raw" ] || sub_type="raw"
+
[ -n "${sub_type}" ] || error "'%s': unspecified %s_type\n" "${img}" "${type}"
if [ ! -f "fs/custom/${type}/${sub_type}" ]; then
error "'%s': unknown %s_type '%s'\n" "${img}" "${type}" "${sub_type}"
new file mode 100644
@@ -0,0 +1,14 @@
+#-----------------------------------------------------------------------------
+# No dependencies
+
+#-----------------------------------------------------------------------------
+do_image_pre() {
+ :
+}
+
+#-----------------------------------------------------------------------------
+do_image_post() {
+ :
+}
+
+#vim: set ft=sh
new file mode 100644
@@ -0,0 +1,12 @@
+# Generate a partition from a plain file
+
+#-----------------------------------------------------------------------------
+# No extra dependencies
+
+#-----------------------------------------------------------------------------
+do_image() {
+ # ${1} is the root_dir, which is irrelevant here
+ local img="${2}"
+
+ dd if="${BINARIES_DIR}/${raw_file}" of="${img}" bs=4096 conv=sparse 2>/dev/null
+}