new file mode 100644
@@ -0,0 +1,28 @@
+# Extensions for core-image-full-cmdline image recipe
+# to generate .swu image using swupdate class
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+inherit image_types_swu
+
+SRC_URI_wandboard = " \
+ file://emmcsetup.lua \
+ file://sw-description \
+"
+
+# Uncomment below line to enable .swu image generation
+#IMAGE_FSTYPES_wandboard += "ext4.gz swu"
+
+# remove comment when configuring to generate ext4.gz.enc or
+# ext4.gz.enc.swu images and add a key to the build directory
+# as "conf/enc.key"
+#SWUPDATE_AES_FILE = "${TOPDIR}/conf/enc.key"
+
+#SWUPDATE_IMAGES_FSTYPES[core-image-full-cmdline] = ".ext4.gz.enc"
+SWUPDATE_IMAGES_FSTYPES[core-image-full-cmdline] = ".ext4.gz"
+
+# images to build before building swupdate image
+IMAGE_DEPENDS = "core-image-full-cmdline"
+
+# images and files that will be included in the .swu image
+SWUPDATE_IMAGES = "core-image-full-cmdline"
new file mode 100644
@@ -0,0 +1,12 @@
+function preinst()
+ local out = "Post installed script called"
+
+ return true, out
+
+end
+
+function postinst()
+ local out = "Post installed script called"
+
+ return true, out
+end
new file mode 100644
@@ -0,0 +1,71 @@
+software =
+{
+ version = "@@DISTRO_VERSION@@";
+
+ @@MACHINE@@ = {
+ hardware-compatibility: [ "revB", "revC", "revD"];
+ stable : {
+ copy1 : {
+ images: (
+ {
+ filename = "@@IMAGE_LINK_NAME@@.ext4.gz";
+ type = "raw";
+ compressed = true;
+ device = "/dev/mmcblk2p1";
+ }
+ );
+ scripts: (
+ {
+ filename = "emmcsetup.lua";
+ type = "lua";
+ }
+ );
+ uboot: (
+ {
+ name = "rootpart";
+ value = "1";
+ },
+ {
+ name = "finduuid";
+ value = "part uuid mmc 0:${rootpart} uuid";
+ },
+ {
+ name = "scan_dev_for_boot_part";
+ value = "setenv devplist ${rootpart};for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done";
+ }
+ );
+
+ };
+ copy2 : {
+ images: (
+ {
+ filename = "@@IMAGE_LINK_NAME@@.ext4.gz";
+ type = "raw";
+ compressed = true;
+ device = "/dev/mmcblk2p2";
+ }
+ );
+ scripts: (
+ {
+ filename = "emmcsetup.lua";
+ type = "lua";
+ }
+ );
+ uboot: (
+ {
+ name = "rootpart";
+ value = "2";
+ },
+ {
+ name = "finduuid";
+ value = "part uuid mmc 0:${rootpart} uuid";
+ },
+ {
+ name = "scan_dev_for_boot_part";
+ value = "setenv devplist ${rootpart};for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done";
+ }
+ );
+ };
+ };
+ }
+}
Extend core-image-full-cmdline with options for building .swu images. Signed-off-by: Anatolij Gustschin <agust@denx.de> --- .../images/core-image-full-cmdline.bbappend | 28 ++++++++ .../wandboard/emmcsetup.lua | 12 ++++ .../wandboard/sw-description | 71 +++++++++++++++++++ 3 files changed, 111 insertions(+) create mode 100644 recipes-extended/images/core-image-full-cmdline.bbappend create mode 100644 recipes-extended/images/core-image-full-cmdline/wandboard/emmcsetup.lua create mode 100644 recipes-extended/images/core-image-full-cmdline/wandboard/sw-description