Skip to contentSkip to conversation

Simplify the creation of cramfs images

PATCH New Andrea Adami 1 participant 3 messages Aug 29, 2013

lore
Share & tools
lore
#0 lore raw

cover Simplify the creation of cramfs images

Extending the util-linux recipe allows the creation of cramfs images with tools contained in oe-core.

The cramfs recipe in meta-filesystems will be removed so there will be any conflict nor replacement of cramfs-native.

This fixes as well an HOB bug (missing helper for cramfs).

Andrea Adami (2):
util-linux: package mkfs.cramfs and fsck.cramfs image_types.bbclass: use mkfs.cramfs instead of makecramfs

 meta/classes/image_types.bbclass            | 4 ++--
 meta/recipes-core/util-linux/util-linux.inc | 5 +++++
 2 files changed, 7 insertions(+), 2 deletions(-)
Signature · 1 line
1.8.1.5
#1 lore raw

PATCH 1/2 util-linux: package mkfs.cramfs and fsck.cramfs

The recipe builds the two utils which are unpackaged.

---
 meta/recipes-core/util-linux/util-linux.inc | 5 +++++
 1 file changed, 5 insertions(+)
meta/recipes-core/util-linux/util-linux.inc +5 -0
index 961bcc5..8a14d16 100644
@@ -36,6 +36,7 @@ PACKAGES =+ "util-linux-agetty util-linux-fdisk util-linux-cfdisk util-linux-sfd
              util-linux-libblkid-dev util-linux-libuuid util-linux-libuuid-dev \
              util-linux-uuidgen util-linux-lscpu util-linux-fsck util-linux-blkid \
              util-linux-mkfs util-linux-mcookie util-linux-reset util-linux-uuidd \
+             util-linux-mkfs.cramfs util-linux-fsck.cramfs \
              util-linux-partx ${PN}-bash-completion"
 
 EXTRA_OECONF = "--libdir=${base_libdir} --disable-use-tty-group \
@@ -83,6 +84,10 @@ FILES_util-linux-lscpu = "${bindir}/lscpu"
 FILES_util-linux-fsck = "${base_sbindir}/fsck*"
 FILES_util-linux-mkfs = "${sbindir}/mkfs"
 
+FILES_util-linux-fsck.cramfs = "${sbindir}/fsck.cramfs"
+FILES_util-linux-mkfs.cramfs = "${sbindir}/mkfs.cramfs"
+
+
 # Util-linux' blkid replaces the e2fsprogs one
 FILES_util-linux-blkid = "${base_sbindir}/blkid*"
 RCONFLICTS_util-linux-blkid = "e2fsprogs-blkid"
Signature · 1 line
1.8.1.5
#2 lore raw

PATCH 2/2 image_types.bbclass: use mkfs.cramfs instead of makecramfs

In reply to Andrea Adami

The former is provided by util-linux and the latter is now to be removed for meta-filesystems.

This allows to generate cramfs images whithout extra layers.

---
 meta/classes/image_types.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/classes/image_types.bbclass +2 -2
index c168ed5..8c49169 100644
@@ -139,7 +139,7 @@ IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${DEPLO
 IMAGE_CMD_sum.jffs2 = "${IMAGE_CMD_jffs2} && sumtool -i ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 \
 	-o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.sum.jffs2 -n ${EXTRA_IMAGECMD}"
 
-IMAGE_CMD_cramfs = "mkcramfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cramfs ${EXTRA_IMAGECMD}"
+IMAGE_CMD_cramfs = "mkfs.cramfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cramfs ${EXTRA_IMAGECMD}"
 
 oe_mkext234fs () {
 	fstype=$1
@@ -218,7 +218,7 @@ EXTRA_IMAGECMD_elf ?= ""
 IMAGE_DEPENDS = ""
 IMAGE_DEPENDS_jffs2 = "mtd-utils-native"
 IMAGE_DEPENDS_sum.jffs2 = "mtd-utils-native"
-IMAGE_DEPENDS_cramfs = "cramfs-native"
+IMAGE_DEPENDS_cramfs = "util-linux-native"
 IMAGE_DEPENDS_ext2 = "e2fsprogs-native"
 IMAGE_DEPENDS_ext3 = "e2fsprogs-native"
 IMAGE_DEPENDS_ext4 = "e2fsprogs-native"
Signature · 1 line
1.8.1.5