rework jffs2 images creation, add jffs2 summary
cover rework jffs2 images creation, add jffs2 summary
* The first patch adds support for the creation of
* jffs2 summary images for a faster mount.
* The second patch forces the --no-cleanmarkers option
* to further improve boot time.
Andrea Adami (2):
image_types.bbclass: implement jffs2 summary images (sum.jffs2) image_types.bbclass: disable cleanmarkers for jffs2 images
meta/classes/image_types.bbclass | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
Signature · 1 line
1.7.3.4
PATCH 1/2 image_types.bbclass: implement jffs2 summary images (sum.jffs2)
* Building the jffs2 filesystem to include summary information speeds up
* the mount process considerably at the cost of increased size.
* The rate of speedup is generally higher on NAND chips and on the chips
* where the erase block size is large.
--- meta/classes/image_types.bbclass | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
meta/classes/image_types.bbclass +4 -1
@@ -35,6 +35,8 @@ XZ_COMPRESSION_LEVEL ?= "-e -9" XZ_INTEGRITY_CHECK ?= "crc32" IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 ${EXTRA_IMAGECMD}" +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 ${EXTRA_IMAGECMD}" IMAGE_CMD_cramfs = "mkcramfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cramfs ${EXTRA_IMAGECMD}"
@@ -138,6 +140,7 @@ EXTRA_IMAGECMD_btrfs ?= "" IMAGE_DEPENDS = "" IMAGE_DEPENDS_jffs2 = "mtd-utils-native" +IMAGE_DEPENDS_sum.jffs2 = "mtd-utils-native" IMAGE_DEPENDS_cramfs = "cramfs-native" IMAGE_DEPENDS_ext2 = "genext2fs-native" IMAGE_DEPENDS_ext2.gz = "genext2fs-native"
@@ -157,4 +160,4 @@ IMAGE_DEPENDS_ubi = "mtd-utils-native" IMAGE_DEPENDS_ubifs = "mtd-utils-native" # This variable is available to request which values are suitable for IMAGE_FSTYPES -IMAGE_TYPES = "jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma" +IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma"
Signature · 1 line
1.7.3.4
Re: [PATCH 1/2] image_types.bbclass: implement jffs2 summary images (sum.jffs2)
Quoted 6 lines · Andrea Adami
* Building the jffs2 filesystem to include summary information speeds up
* the mount process considerably at the cost of increased size.
* The rate of speedup is generally higher on NAND chips and on the chips
* where the erase block size is large.Signed-off-by Andrea Adami <[email protected]>
Quoted 39 lines
---
meta/classes/image_types.bbclass | 5 ++++-1 files changed, 4 insertions(+), 1 deletions(-)meta/classes/image_types.bbclass +0
-0@@ -35,6 +35,8 @@ XZ_COMPRESSION_LEVEL ?= "-e -9"XZ_INTEGRITY_CHECK ?= "crc32"
IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 ${EXTRA_IMAGECMD}" +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 ${EXTRA_IMAGECMD}"IMAGE_CMD_cramfs = "mkcramfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cramfs ${EXTRA_IMAGECMD}"
meta/classes/image_types.bbclass +0
-0@@ -138,6 +140,7 @@ EXTRA_IMAGECMD_btrfs ?= ""IMAGE_DEPENDS = ""
IMAGE_DEPENDS_jffs2 = "mtd-utils-native"
+IMAGE_DEPENDS_sum.jffs2 = "mtd-utils-native"
IMAGE_DEPENDS_cramfs = "cramfs-native"
IMAGE_DEPENDS_ext2 = "genext2fs-native"
IMAGE_DEPENDS_ext2.gz = "genext2fs-native"meta/classes/image_types.bbclass +0
-0@@ -157,4 +160,4 @@ IMAGE_DEPENDS_ubi = "mtd-utils-native"IMAGE_DEPENDS_ubifs = "mtd-utils-native"
# This variable is available to request which values are suitable for
IMAGE_FSTYPESmeta/classes/image_types.bbclass +1
-2-IMAGE_TYPES = "jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma" +IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma" --1.7.3.4
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Signature · 1 line
Tom
Re: [PATCH 1/2] image_types.bbclass: implement jffs2 summary images (sum.jffs2)
Quoted 7 lines · Tom Rini
Quoted 6 lines · Andrea Adami
* Building the jffs2 filesystem to include summary information speeds up
* the mount process considerably at the cost of increased size.
* The rate of speedup is generally higher on NAND chips and on the chips
* where the erase block size is large.Signed-off-by Andrea Adami <[email protected]>
I'll repeat my comment from yesterday, but IMHO it would be easier to
see the difference between those 2 images if the IMAGE_CMD_jffs2 output is renamed to .jffs2.nosummary and IMAGE_CMD_sum.jffs2 (or renamed IMAGE_CMD_jffs2.summary) produces .jffs2.summary (or even just .jffs2 if we can agree that .summary is what enduser wants by default)
But other than that it looks fine and will make my IMAGE_DEPENDS_jffs2 a bit shorter.
Regards,
Quoted 52 lines
Acked-by Tom Rini <[email protected]>Quoted 39 lines
---
meta/classes/image_types.bbclass | 5 ++++-1 files changed, 4 insertions(+), 1 deletions(-)meta/classes/image_types.bbclass +0
-0@@ -35,6 +35,8 @@ XZ_COMPRESSION_LEVEL ?= "-e -9"XZ_INTEGRITY_CHECK ?= "crc32"
IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 ${EXTRA_IMAGECMD}" +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 ${EXTRA_IMAGECMD}"IMAGE_CMD_cramfs = "mkcramfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cramfs ${EXTRA_IMAGECMD}"
meta/classes/image_types.bbclass +0
-0@@ -138,6 +140,7 @@ EXTRA_IMAGECMD_btrfs ?= ""IMAGE_DEPENDS = ""
IMAGE_DEPENDS_jffs2 = "mtd-utils-native"
+IMAGE_DEPENDS_sum.jffs2 = "mtd-utils-native"
IMAGE_DEPENDS_cramfs = "cramfs-native"
IMAGE_DEPENDS_ext2 = "genext2fs-native"
IMAGE_DEPENDS_ext2.gz = "genext2fs-native"meta/classes/image_types.bbclass +0
-0@@ -157,4 +160,4 @@ IMAGE_DEPENDS_ubi = "mtd-utils-native"IMAGE_DEPENDS_ubifs = "mtd-utils-native"
# This variable is available to request which values are suitable for
IMAGE_FSTYPESmeta/classes/image_types.bbclass +1
-2-IMAGE_TYPES = "jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma" +IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma" --1.7.3.4
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-coreSignature · 6 lines
Tom _______________________________________________ Openembedded-core mailing list [email protected] http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Re: [PATCH 1/2] image_types.bbclass: implement jffs2 summary images (sum.jffs2)
Quoted 7 lines · Martin Jansa
Quoted 6 lines · Tom Rini
Quoted 5 lines · Andrea Adami
* Building the jffs2 filesystem to include summary information speeds up
* the mount process considerably at the cost of increased size.
* The rate of speedup is generally higher on NAND chips and on the chips
* where the erase block size is large.
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Signed-off-by Andrea Adami <[email protected]>I'll repeat my comment from yesterday, but IMHO it would be easier to
see the difference between those 2 images if theIMAGE_CMD_jffs2output is renamed to .jffs2.nosummary and IMAGE_CMD_sum.jffs2 (or renamed IMAGE_CMD_jffs2.summary) produces .jffs2.summary (or even just .jffs2 if we can agree that .summary is what enduser wants by default)
I tried to keep the patch not too invasive and did not introduce a special EXTRA string for sumtool.
The most widely used options (-p -l -e) are common, though.
Unfortunately summary means we have a bigger image:
44M Dec 8 16:14 core-image-sato-c7x0-20111208151047.rootfs.jffs2 57M Dec 8 16:14 core-image-sato-c7x0-20111208151047.rootfs.sum.jffs2
Being some devices have strict size requirements I think it is better to build both kind of images.
Cheers
Andrea
Quoted 67 lines
But other than that it looks fine and will make my
IMAGE_DEPENDS_jffs2a bit shorter.Regards,
Quoted 48 lines
Acked-by Tom Rini <[email protected]>Quoted 35 lines
---
meta/classes/image_types.bbclass | 5 ++++-1 files changed, 4 insertions(+), 1 deletions(-)meta/classes/image_types.bbclass +0
-0@@ -35,6 +35,8 @@ XZ_COMPRESSION_LEVEL ?= "-e -9"XZ_INTEGRITY_CHECK ?= "crc32"
IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 ${EXTRA_IMAGECMD}" +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 ${EXTRA_IMAGECMD}"IMAGE_CMD_cramfs = "mkcramfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cramfs ${EXTRA_IMAGECMD}"
meta/classes/image_types.bbclass +0
-0@@ -138,6 +140,7 @@ EXTRA_IMAGECMD_btrfs ?= ""IMAGE_DEPENDS = ""
IMAGE_DEPENDS_jffs2 = "mtd-utils-native"
+IMAGE_DEPENDS_sum.jffs2 = "mtd-utils-native"
IMAGE_DEPENDS_cramfs = "cramfs-native"
IMAGE_DEPENDS_ext2 = "genext2fs-native"
IMAGE_DEPENDS_ext2.gz = "genext2fs-native"meta/classes/image_types.bbclass +0
-0@@ -157,4 +160,4 @@ IMAGE_DEPENDS_ubi = "mtd-utils-native"IMAGE_DEPENDS_ubifs = "mtd-utils-native"
# This variable is available to request which values are suitable for
IMAGE_FSTYPESmeta/classes/image_types.bbclass +1
-2-IMAGE_TYPES = "jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma" +IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma" --1.7.3.4
Quoted 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core--
TomQuoted 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core--
Martin 'JaMa' Jansa jabber: [email protected]_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [PATCH 1/2] image_types.bbclass: implement jffs2 summary images (sum.jffs2)
Quoted 18 lines · Andrea Adami
Quoted 7 lines · Martin Jansa
Quoted 6 lines · Tom Rini
Quoted 5 lines · Andrea Adami
* Building the jffs2 filesystem to include summary information speeds up
* the mount process considerably at the cost of increased size.
* The rate of speedup is generally higher on NAND chips and on the chips
* where the erase block size is large.Quoted 6 lines
Quoted 1 line
Quoted 1 line
Signed-off-by Andrea Adami<[email protected]>I'll repeat my comment from yesterday, but IMHO it would be easier to
see the difference between those 2 images if theIMAGE_CMD_jffs2output is renamed to .jffs2.nosummary and IMAGE_CMD_sum.jffs2 (or renamed IMAGE_CMD_jffs2.summary) produces .jffs2.summary (or even just .jffs2 if we can agree that .summary is what enduser wants by default)I tried to keep the patch not too invasive and did not introduce a special EXTRA string for sumtool.
The most widely used options (-p -l -e) are common, though.
Quoted 7 lines
Unfortunately summary means we have a bigger image:
44M Dec 8 16:14 core-image-sato-c7x0-20111208151047.rootfs.jffs2 57M Dec 8 16:14 core-image-sato-c7x0-20111208151047.rootfs.sum.jffs2Being some devices have strict size requirements I think it is better to build both kind of images.
Not sure exactly what sumtools does,
but as I understood it, it does things which the targets need to be doing at first startup otherwise.
Does that not mean that the target rootfs will grow from 44 MB to 57 MB during that process?
If it does, you never want to have the non-sumtool version. (I guess if you downloaded the file over a 20 bps channel to a nuclear submarine, you would disagree)
BR
Ulf
Quoted 71 lines
Cheers
Andrea
Quoted 55 lines
But other than that it looks fine and will make my
IMAGE_DEPENDS_jffs2a bit shorter.Regards,
Quoted 46 lines
Acked-by Tom Rini<[email protected]>Quoted 35 lines
--- meta/classes/image_types.bbclass | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)meta/classes/image_types.bbclass +4
-2@@ -35,6 +35,8 @@ XZ_COMPRESSION_LEVEL ?= "-e -9" XZ_INTEGRITY_CHECK ?= "crc32" IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 ${EXTRA_IMAGECMD}" +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 ${EXTRA_IMAGECMD}" IMAGE_CMD_cramfs = "mkcramfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cramfs ${EXTRA_IMAGECMD}"@@ -138,6 +140,7 @@ EXTRA_IMAGECMD_btrfs ?= "" IMAGE_DEPENDS = "" IMAGE_DEPENDS_jffs2 = "mtd-utils-native" +IMAGE_DEPENDS_sum.jffs2 = "mtd-utils-native" IMAGE_DEPENDS_cramfs = "cramfs-native" IMAGE_DEPENDS_ext2 = "genext2fs-native" IMAGE_DEPENDS_ext2.gz = "genext2fs-native"@@ -157,4 +160,4 @@ IMAGE_DEPENDS_ubi = "mtd-utils-native" IMAGE_DEPENDS_ubifs = "mtd-utils-native" # This variable is available to request which values are suitable for IMAGE_FSTYPES -IMAGE_TYPES = "jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma" +IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma" --1.7.3.4
Quoted 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core--
TomQuoted 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-coreQuoted 8 lines
--
Martin 'JaMa' Jansa jabber: [email protected]_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Signature · 3 lines
Best Regards Ulf Samuelsson eMagii
Re: [PATCH 1/2] image_types.bbclass: implement jffs2 summary images (sum.jffs2)
Quoted 36 lines · Ulf Samuelsson
Quoted 35 lines · Andrea Adami
Quoted 15 lines · Martin Jansa
Quoted 4 lines · Tom Rini
Quoted 1 line · Andrea Adami
Quoted 8 lines
Quoted 8 lines
* Building the jffs2 filesystem to include summary information speeds up
* the mount process considerably at the cost of increased size.
* The rate of speedup is generally higher on NAND chips and on the chips
* where the erase block size is large.Signed-off-by Andrea Adami<[email protected]>Quoted 8 lines
I'll repeat my comment from yesterday, but IMHO it would be easier to see the difference between those 2 images if the
IMAGE_CMD_jffs2output is
renamed to .jffs2.nosummary and IMAGE_CMD_sum.jffs2 (or renamed IMAGE_CMD_jffs2.summary)
produces .jffs2.summary (or even just .jffs2 if we can agree that .summary is
what enduser wants by default)I tried to keep the patch not too invasive and did not introduce a special EXTRA string for sumtool.
The most widely used options (-p -l -e) are common, though.Unfortunately summary means we have a bigger image:
44M Dec 8 16:14 core-image-sato-c7x0-20111208151047.rootfs.jffs2 57M Dec 8 16:14 core-image-sato-c7x0-20111208151047.rootfs.sum.jffs2
Quoted 6 lines
Quoted 3 lines
Being some devices have strict size requirements I think it is better to build both kind of images.
Not sure exactly what sumtools does,
but as I understood it, it does things which the targets need to be doing at first startup otherwise.
No, this operation cannot be done runtime.
http://www.embedded-linux.co.uk/tutorial/jffs2-summary
"
The tools that does that, mkfs.jffs2, does not do anything about summary nodes, or to put it another way, by default you will end up with an image that takes a long time to mount. The secret is that you have to use a second tool from mtdutils: sumtool.
"
Regards
Andrea
Quoted 112 lines
Does that not mean that the target rootfs will grow from 44 MB to 57 MB during that process?
If it does, you never want to have the non-sumtool version. (I guess if you downloaded the file over a 20 bps channel to a nuclear submarine, you would disagree)
BR
UlfQuoted 79 lines
Cheers
Andrea
Quoted 67 lines
But other than that it looks fine and will make my
IMAGE_DEPENDS_jffs2a bit shorter.Regards,
Quoted 57 lines
Acked-by Tom Rini<[email protected]>Quoted 45 lines
---
meta/classes/image_types.bbclass | 5 ++++-1 files changed, 4 insertions(+), 1 deletions(-)meta/classes/image_types.bbclass +0
-0@@ -35,6 +35,8 @@ XZ_COMPRESSION_LEVEL ?= "-e -9"XZ_INTEGRITY_CHECK ?= "crc32"
IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 ${EXTRA_IMAGECMD}" +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 ${EXTRA_IMAGECMD}"IMAGE_CMD_cramfs = "mkcramfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cramfs ${EXTRA_IMAGECMD}"
meta/classes/image_types.bbclass +0
-0@@ -138,6 +140,7 @@ EXTRA_IMAGECMD_btrfs ?= ""IMAGE_DEPENDS = ""
IMAGE_DEPENDS_jffs2 = "mtd-utils-native"
+IMAGE_DEPENDS_sum.jffs2 = "mtd-utils-native"
IMAGE_DEPENDS_cramfs = "cramfs-native"
IMAGE_DEPENDS_ext2 = "genext2fs-native"
IMAGE_DEPENDS_ext2.gz = "genext2fs-native"meta/classes/image_types.bbclass +0
-0@@ -157,4 +160,4 @@ IMAGE_DEPENDS_ubi = "mtd-utils-native"IMAGE_DEPENDS_ubifs = "mtd-utils-native"
# This variable is available to request which values are suitable for
IMAGE_FSTYPES
-IMAGE_TYPES = "jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma"
+IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma"
--
1.7.3.4Quoted 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core--
TomQuoted 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-coreQuoted 8 lines
--
Martin 'JaMa' Jansa jabber: [email protected]_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-coreQuoted 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core--
Best Regards
Ulf Samuelsson
eMagii_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [PATCH 1/2] image_types.bbclass: implement jffs2 summary images (sum.jffs2)
In reply to Ulf SamuelssonQuoted 10 lines · Ulf Samuelsson
Not sure exactly what sumtools does,
but as I understood it, it does things which the targets need to be doing at first startup otherwise.Does that not mean that the target rootfs will grow from 44 MB to 57 MB during that process?
If it does, you never want to have the non-sumtool version. (I guess if you downloaded the file over a 20 bps channel to a nuclear submarine, you would disagree)
It doesn't. It will compute all this data into memory at each boot increasing boot time but it won't write it back to the flash.
The sum images just mean the data can be directly loaded without computation and reading a lot more of the flash.
Cheers,
Richard
Re: [PATCH 1/2] image_types.bbclass: implement jffs2 summary images (sum.jffs2)
In reply to Andrea AdamiQuoted 20 lines · Andrea Adami
Quoted 7 lines · Martin Jansa
Quoted 6 lines · Tom Rini
Quoted 5 lines · Andrea Adami
* Building the jffs2 filesystem to include summary information speeds up
* the mount process considerably at the cost of increased size.
* The rate of speedup is generally higher on NAND chips and on the chips
* where the erase block size is large.Quoted 7 lines
Quoted 1 line
Quoted 1 line
Signed-off-by Andrea Adami <[email protected]>I'll repeat my comment from yesterday, but IMHO it would be easier to
see the difference between those 2 images if theIMAGE_CMD_jffs2output is renamed to .jffs2.nosummary and IMAGE_CMD_sum.jffs2 (or renamed IMAGE_CMD_jffs2.summary) produces .jffs2.summary (or even just .jffs2 if we can agree that .summary is what enduser wants by default)I tried to keep the patch not too invasive and did not introduce a special EXTRA string for sumtool.
The most widely used options (-p -l -e) are common, though.
Quoted 6 lines
Unfortunately summary means we have a bigger image:
44M Dec 8 16:14 core-image-sato-c7x0-20111208151047.rootfs.jffs2 57M Dec 8 16:14 core-image-sato-c7x0-20111208151047.rootfs.sum.jffs2Being some devices have strict size requirements I think it is better to build both kind of images.
Today I've noticed that it doesn't work for me:
I have changed EXTRA_IMAGECMD_jffs2 to use new sum.jffs2:
http://git.shr-project.org/git/?p=meta-smartphone.git;a=blobdiff;f=meta-openmoko/conf/machine/om-gta02.conf;h=ad71d3db386b7d7df6ab484ea9ad80260da30373;hp=7cfb1b2a07b09ac3a35a27d209015ea8533ff632;hb=26d60e47358abe66d7d0fdbe6d5adea8f46bdbe2;hpb=043b5ac84794946e88e880b722fed445d3d985c5
OE om-gta02@shr ~/shr-core $ bitbake -e shr-lite-image | tee -a image.log
OE om-gta02@shr ~/shr-core $ grep ^EXTRA_IMAGECMD image.log | grep jffs2
EXTRA_IMAGECMD_sum.jffs2="--eraseblock=0x20000 --no-cleanmarkers --littleendian --pad"
EXTRA_IMAGECMD_jffs2="--little-endian --eraseblock=0x20000 --pagesize=0x800 --no-cleanmarkers --pad; mv /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-lite-20111211-om-gta02.rootfs.jffs2 /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-lite-20111211-om-gta02.rootfs.jffs2.nosummary;"
This looks right (notice that sumtool is using different --little-endian/--littleendian).
OE om-gta02@shr ~/shr-core $ grep IMAGE_CMD image.log | grep jffs2
# 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_sum.jffs2="mkfs.jffs2 --root=/OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/shr-lite-image/2.0-r20/rootfs --faketime --output=/OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-lite-20111211-om-gta02.rootfs.jffs2 -n && sumtool -i /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-lite-20111211-om-gta02.rootfs.jffs2 -o /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-lite-20111211-om-gta02.rootfs.sum.jffs2 -n"
# IMAGE_CMD_jffs2=mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 -n ${EXTRA_IMAGECMD}
IMAGE_CMD_jffs2="mkfs.jffs2 --root=/OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/shr-lite-image/2.0-r20/rootfs --faketime --output=/OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-lite-20111211-om-gta02.rootfs.jffs2 -n"
Here we can see that bitbake -e didn't expand EXTRA_IMAGECMD right, but it seems like do_rootfs have them not empty:
shr-core/tmp/work/om_gta02-oe-linux-gnueabi/shr-image/2.0-r18/temp/run.do_rootfs.688:
# Image generation code for image type sum.jffs2
ROOTFS_SIZE=`du -ks /OE/shr-core/tmp/work/om_gta02-oe-linux-gnueabi/shr-image/2.0-r18/rootfs|awk '{size = $1 * 1.3 + 0; OFMT = "%.0f" ; print (size > 65536 ? size : 65536) }'`
mkfs.jffs2 --root=/OE/shr-core/tmp/work/om_gta02-oe-linux-gnueabi/shr-image/2.0-r18/rootfs --faketime --output=/OE/shr-core/tmp/deploy/images/om-gta02/shr-full-20111210-om-gta02.rootfs.jffs2 -n --eraseblock=0x20000 --no-cleanmarkers --littleendian --pad && sumtool -i /OE/shr-core/tmp/deploy/images/om-gta02/shr-full-20111210-om-gta02.rootfs.jffs2 -o /OE/shr-core/tmp/deploy/images/om-gta02/shr-full-20111210-om-gta02.rootfs.sum.jffs2 -n --eraseblock=0x20000 --no-cleanmarkers --littleendian --pad
cd /OE/shr-core/tmp/deploy/images/om-gta02/
rm -f /OE/shr-core/tmp/deploy/images/om-gta02/full-om-gta02.sum.jffs2
ln -s shr-full-20111210-om-gta02.rootfs.sum.jffs2 /OE/shr-core/tmp/deploy/images/om-gta02/full-om-gta02.sum.jffs2Notice that IMAGE_CMD_jffs2 is using EXTRA_IMAGECMD_sum.jffs2 (so params for sumtool not mkfs.jffs2) when it's expanded inside IMAGE_CMD_sum.jffs2 variable
openembedded-core/meta/classes/image_types.bbclass:IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 -n ${EXTRA_IMAGECMD}"
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}"And causing
mkfs.jffs2: unrecognized option '--littleendian'
mkfs.jffs2: error!: Usage: mkfs.jffs2 [OPTIONS]
And using EXTRA_IMAGECMD_jffs2 in IMAGE_CMD_jffs2 breaks parsing..
ERROR: Unable to parse /OE/shr-core/openembedded-core/meta/recipes-core/images/core-image-minimal-initramfs.bb | ETA: --:--:--
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/bb/codeparser.py", line 268, in ShellParser.parse_shell(value='\t#set -x\n\trm -rf /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs\n\trm -rf /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/multilib\n\tmkdir -p /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs\n\tmkdir -p /OE/shr-core/tmp-eglibc/deploy/images/om-gta02\n\n\tcp /OE/shr-core/openembedded-core/meta/files/deploydir_readme.txt /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt\n\n\tif [ "0" != "1" ]; then\n\t\tfor devtable in /OE/shr-core/meta-handheld/files/device_table-minimal.txt; do\n\t\t\tmakedevs -r /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs -D $devtable\n\t\tdone\n\tfi\n\n\trootfs_ipk_do_rootfs\n\n\tinsert_feed_uris\n\n\tif [ "xldconfig-native:do_populate_sysroot" != "x" ]; then\n\t\t# Run ldconfig on the image to create a valid cache\n\t\t# (new format for cross arch compatibility)\n\t\techo executing: ldconfig -r /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs -c new -v\n\t\tldconfig -r /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs -c new -v\n\tfi\n\n\t# (re)create kernel modules dependencies\n\t# This part is done by kernel-module-* postinstall scripts but if image do\n\t# not contains modules at all there are few moments in boot sequence with\n\t# "unable to open modules.dep" message.\n\tif [ -e /OE/shr-core/tmp-eglibc/sysroots/om-gta02/kernel/kernel-abiversion ]; then\n\t\tKERNEL_VERSION=cat /OE/shr-core/tmp-eglibc/sysroots/om-gta02/kernel/kernel-abiversion\n\n\t\tmkdir -p /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs/lib/modules/$KERNEL_VERSION\n\t\tarm-oe-linux-gnueabi-depmod -a -b /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs -F /OE/shr-core/tmp-eglibc/sysroots/om-gta02/kernel/System.map-$KERNEL_VERSION $KERNEL_VERSION\n\tfi\n\n\t${IMAGE_PREPROCESS_COMMAND}\n\n\t\n\t# Image generation code for image type cpio.gz\n\tROOTFS_SIZE=du -ks /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs|awk \'{size = $1 * 1.3 + 0; OFMT = "%.0f" ; print (size > 8192 ? size : 8192) }\'\n\tcd /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs && (find . | cpio -o -H newc | gzip -c -9 >/OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.cpio.gz)\n\tcd /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/\n\trm -f /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/core-image-minimal-initramfs-om-gta02.cpio.gz\n\tln -s shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.cpio.gz /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/core-image-minimal-initramfs-om-gta02.cpio.gz\n\t# Image generation code for image type tar.gz\n\tROOTFS_SIZE=du -ks /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs|awk \'{size = $1 * 1.3 + 0; OFMT = "%.0f" ; print (size > 8192 ? size : 8192) }\'\n\tcd /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs && tar -zcvf /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.tar.gz .\n\tcd /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/\n\trm -f /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/core-image-minimal-initramfs-om-gta02.tar.gz\n\tln -s shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.tar.gz /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/core-image-minimal-initramfs-om-gta02.tar.gz\n\t# Image generation code for image type sum.jffs2\n\tROOTFS_SIZE=du -ks /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs|awk \'{size = $1 * 1.3 + 0; OFMT = "%.0f" ; print (size > 8192 ? size : 8192) }\'\n\tmkfs.jffs2 --root=/OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs --faketime --output=/OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.jffs2 -n --little-endian --eraseblock=0x20000 --pagesize=0x800 --no-cleanmarkers --pad; mv /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.jffs2 /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.jffs2.nosummary; && sumtool -i /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.jffs2 \t-o /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.sum.jffs2 -n --eraseblock=0x20000 --no-cleanmarkers --littleendian --pad \n\tcd /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/\n\trm -f /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/core-image-minimal-initramfs-om-gta02.sum.jffs2\n\tln -s shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.sum.jffs2 /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/core-image-minimal-initramfs-om-gta02.sum.jffs2\n\n\n\t do_testlab ;\n\n\t\n'):
try:
> tokens, _ = pyshyacc.parse(value, eof=True, debug=False)
except pyshlex.NeedMore:
File "/usr/lib64/python2.7/site-packages/bb/pysh/pyshyacc.py", line 673, in parse(input='\t#set -x\n\trm -rf /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs\n\trm -rf /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/multilib\n\tmkdir -p /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs\n\tmkdir -p /OE/shr-core/tmp-eglibc/deploy/images/om-gta02\n\n\tcp /OE/shr-core/openembedded-core/meta/files/deploydir_readme.txt /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt\n\n\tif [ "0" != "1" ]; then\n\t\tfor devtable in /OE/shr-core/meta-handheld/files/device_table-minimal.txt; do\n\t\t\tmakedevs -r /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs -D $devtable\n\t\tdone\n\tfi\n\n\trootfs_ipk_do_rootfs\n\n\tinsert_feed_uris\n\n\tif [ "xldconfig-native:do_populate_sysroot" != "x" ]; then\n\t\t# Run ldconfig on the image to create a valid cache\n\t\t# (new format for cross arch compatibility)\n\t\techo executing: ldconfig -r /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs -c new -v\n\t\tldconfig -r /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs -c new -v\n\tfi\n\n\t# (re)create kernel modules dependencies\n\t# This part is done by kernel-module-* postinstall scripts but if image do\n\t# not contains modules at all there are few moments in boot sequence with\n\t# "unable to open modules.dep" message.\n\tif [ -e /OE/shr-core/tmp-eglibc/sysroots/om-gta02/kernel/kernel-abiversion ]; then\n\t\tKERNEL_VERSION=cat /OE/shr-core/tmp-eglibc/sysroots/om-gta02/kernel/kernel-abiversion\n\n\t\tmkdir -p /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs/lib/modules/$KERNEL_VERSION\n\t\tarm-oe-linux-gnueabi-depmod -a -b /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs -F /OE/shr-core/tmp-eglibc/sysroots/om-gta02/kernel/System.map-$KERNEL_VERSION $KERNEL_VERSION\n\tfi\n\n\t${IMAGE_PREPROCESS_COMMAND}\n\n\t\n\t# Image generation code for image type cpio.gz\n\tROOTFS_SIZE=du -ks /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs|awk \'{size = $1 * 1.3 + 0; OFMT = "%.0f" ; print (size > 8192 ? size : 8192) }\'\n\tcd /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs && (find . | cpio -o -H newc | gzip -c -9 >/OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.cpio.gz)\n\tcd /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/\n\trm -f /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/core-image-minimal-initramfs-om-gta02.cpio.gz\n\tln -s shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.cpio.gz /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/core-image-minimal-initramfs-om-gta02.cpio.gz\n\t# Image generation code for image type tar.gz\n\tROOTFS_SIZE=du -ks /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs|awk \'{size = $1 * 1.3 + 0; OFMT = "%.0f" ; print (size > 8192 ? size : 8192) }\'\n\tcd /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs && tar -zcvf /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.tar.gz .\n\tcd /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/\n\trm -f /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/core-image-minimal-initramfs-om-gta02.tar.gz\n\tln -s shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.tar.gz /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/core-image-minimal-initramfs-om-gta02.tar.gz\n\t# Image generation code for image type sum.jffs2\n\tROOTFS_SIZE=du -ks /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs|awk \'{size = $1 * 1.3 + 0; OFMT = "%.0f" ; print (size > 8192 ? size : 8192) }\'\n\tmkfs.jffs2 --root=/OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs --faketime --output=/OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.jffs2 -n --little-endian --eraseblock=0x20000 --pagesize=0x800 --no-cleanmarkers --pad; mv /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.jffs2 /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.jffs2.nosummary; && sumtool -i /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.jffs2 \t-o /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.sum.jffs2 -n --eraseblock=0x20000 --no-cleanmarkers --littleendian --pad \n\tcd /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/\n\trm -f /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/core-image-minimal-initramfs-om-gta02.sum.jffs2\n\tln -s shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.sum.jffs2 /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/core-image-minimal-initramfs-om-gta02.sum.jffs2\n\n\n\t do_testlab ;\n\n\t\n', eof=True, debug=False):
debug = 2
> return yacc.parse(lexer=lexer, debug=debug), remaining
File "/usr/lib64/python2.7/site-packages/ply/yacc.py", line 265, in LRParser.parse(input=None, lexer=<bb.pysh.pyshlex.PLYLexer instance at 0x9638248>, debug=False, tracking=0, tokenfunc=None):
else:
> return self.parseopt_notrack(input,lexer,debug,tracking,tokenfunc)
File "/usr/lib64/python2.7/site-packages/ply/yacc.py", line 1047, in LRParser.parseopt_notrack(input=None, lexer=<bb.pysh.pyshlex.PLYLexer instance at 0x9638248>, debug=False, tracking=0, tokenfunc=None):
errtoken.lexer = lexer
> tok = self.errorfunc(errtoken)
del errok, token, restart # Delete special functions
File "/usr/lib64/python2.7/site-packages/bb/pysh/pyshyacc.py", line 646, in p_error(p=LexToken(AND_IF,'&&',0,0)):
w(' %r\n' % n)
> raise sherrors.ShellSyntaxError(''.join(msg))
ShellSyntaxError: LexToken(AND_IF,'&&',0,0)
followed by:
LexToken(TOKEN,'sumtool',0,0)
LexToken(TOKEN,'-i',0,0) LexToken(TOKEN,'/OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.jffs2',0,0) LexToken(TOKEN,'-o',0,0) LexToken(TOKEN,'/OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.sum.jffs2',0,0)
Quoted 77 lines
Cheers
Andrea
Quoted 59 lines
But other than that it looks fine and will make my
IMAGE_DEPENDS_jffs2a bit shorter.Regards,
Quoted 48 lines
Acked-by Tom Rini <[email protected]>Quoted 35 lines
---
meta/classes/image_types.bbclass | 5 ++++-1 files changed, 4 insertions(+), 1 deletions(-)meta/classes/image_types.bbclass +0
-0@@ -35,6 +35,8 @@ XZ_COMPRESSION_LEVEL ?= "-e -9"XZ_INTEGRITY_CHECK ?= "crc32"
IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 ${EXTRA_IMAGECMD}" +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 ${EXTRA_IMAGECMD}"IMAGE_CMD_cramfs = "mkcramfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cramfs ${EXTRA_IMAGECMD}"
meta/classes/image_types.bbclass +0
-0@@ -138,6 +140,7 @@ EXTRA_IMAGECMD_btrfs ?= ""IMAGE_DEPENDS = ""
IMAGE_DEPENDS_jffs2 = "mtd-utils-native"
+IMAGE_DEPENDS_sum.jffs2 = "mtd-utils-native"
IMAGE_DEPENDS_cramfs = "cramfs-native"
IMAGE_DEPENDS_ext2 = "genext2fs-native"
IMAGE_DEPENDS_ext2.gz = "genext2fs-native"meta/classes/image_types.bbclass +0
-0@@ -157,4 +160,4 @@ IMAGE_DEPENDS_ubi = "mtd-utils-native"IMAGE_DEPENDS_ubifs = "mtd-utils-native"
# This variable is available to request which values are suitable for
IMAGE_FSTYPESmeta/classes/image_types.bbclass +1
-2-IMAGE_TYPES = "jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma" +IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma" --1.7.3.4
Quoted 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core--
TomQuoted 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-coreQuoted 8 lines
--
Martin 'JaMa' Jansa jabber: [email protected]_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Re: [PATCH 1/2] image_types.bbclass: implement jffs2 summary images (sum.jffs2)
Quoted 25 lines · Martin Jansa
Quoted 24 lines · Andrea Adami
Quoted 7 lines · Martin Jansa
Quoted 6 lines · Tom Rini
Quoted 5 lines · Andrea Adami
* Building the jffs2 filesystem to include summary information speeds up
* the mount process considerably at the cost of increased size.
* The rate of speedup is generally higher on NAND chips and on the chips
* where the erase block size is large.Quoted 7 lines
Quoted 1 line
Quoted 1 line
Signed-off-by Andrea Adami <[email protected]>I'll repeat my comment from yesterday, but IMHO it would be easier to
see the difference between those 2 images if theIMAGE_CMD_jffs2output is renamed to .jffs2.nosummary and IMAGE_CMD_sum.jffs2 (or renamed IMAGE_CMD_jffs2.summary) produces .jffs2.summary (or even just .jffs2 if we can agree that .summary is what enduser wants by default)I tried to keep the patch not too invasive and did not introduce a special EXTRA string for sumtool.
The most widely used options (-p -l -e) are common, though.Unfortunately summary means we have a bigger image:
44M Dec 8 16:14 core-image-sato-c7x0-20111208151047.rootfs.jffs2 57M Dec 8 16:14 core-image-sato-c7x0-20111208151047.rootfs.sum.jffs2
Quoted 8 lines
Quoted 2 lines
Being some devices have strict size requirements I think it is better to build both kind of images.
Today I've noticed that it doesn't work for me:
I have changed
EXTRA_IMAGECMD_jffs2to use new sum.jffs2:
http://git.shr-project.org/git/?p=meta-smartphone.git;a=blobdiff;f=meta-openmoko/conf/machine/om-gta02.conf;h=ad71d3db386b7d7df6ab484ea9ad80260da30373;hp=7cfb1b2a07b09ac3a35a27d209015ea8533ff632;hb=26d60e47358abe66d7d0fdbe6d5adea8f46bdbe2;hpb=043b5ac84794946e88e880b722fed445d3d985c5
Martin,
the idea of the patch was to keep things simple.
After all most machines only specify endianness, eraseblocksize and padding. The few which are using summary jffs2 in meta-handhels appear to be Zaurus and hx4700 (I'll send a patch to fix ipaq's too) and fwiw beagleboard used '-npl' so I think we cover the most common case when people are setting
EXTRA_IMAGECMD_jffs2 = "-p -l --eraseblock=${ERASEBLOCKSIZE}"
and for the rare case they add IMAGE_FSTYPES += "tar.gz jffs2 sum.jffs2":
EXTRA_IMAGECMD_sum.jffs2 = "${EXTRA_IMAGECMD_jffs2}"
This happens to work just as intended, without adding another var for sumtool args.
mkfs.jffs2
--root=/oe/oe-core/build/tmp-eglibc/work/c7x0-oe-linux-gnueabi/core-image-sato-1.0-r0/rootfs --faketime --output=/oe/oe-core/build/tmp-eglibc/deploy/images/core-image-sato-c7x0-20111210181230.rootfs.jffs2 -n -p -l --eraseblock=0x4000
cd /oe/oe-core/build/tmp-eglibc/deploy/images/
rm -f /oe/oe-core/build/tmp-eglibc/deploy/images/core-image-sato-c7x0.jffs2
ln -s core-image-sato-c7x0-20111210181230.rootfs.jffs2
/oe/oe-core/build/tmp-eglibc/deploy/images/core-image-sato-c7x0.jffs2
# Image generation code for image type sum.jffs2
ROOTFS_SIZE=`du -ks
/oe/oe-core/build/tmp-eglibc/work/c7x0-oe-linux-gnueabi/core-image-sato-1.0-r0/rootfs|awk '{size = $1 * 1.3 + 0; OFMT = "%.0f" ; print (size > 65536 ? size :
65536) }'`
mkfs.jffs2
--root=/oe/oe-core/build/tmp-eglibc/work/c7x0-oe-linux-gnueabi/core-image-sato-1.0-r0/rootfs --faketime --output=/oe/oe-core/build/tmp-eglibc/deploy/images/core-image-sato-c7x0-20111210181230.rootfs.jffs2 -n -p -l --eraseblock=0x4000 && sumtool -i /oe/ oe-core/build/tmp-eglibc/deploy/images/core-image-sato-c7x0-20111210181230.rootfs.jffs2
-o /oe/oe-core/build/tmp-eglibc/deploy/images/core-image-sato-c7x0-20111210181230.rootfs.sum.jffs2
-n -p -l --eraseblock=0x4000
cd /oe/oe-core/build/tmp-eglibc/deploy/images/
rm -f /oe/oe-core/build/tmp-eglibc/deploy/images/core-image-sato-c7x0.sum.jffs2 ln -s core-image-sato-c7x0-20111210181230.rootfs.sum.jffs2
/oe/oe-core/build/tmp-eglibc/deploy/images/core-image-sato-c7x0.sum.jffs2
Being that IMAGE_CMD_sum.jffs2 cannot be overriden I adapted the EXTRA_IMAGECMD_jffs2 and simplified it in the way the string can be used by sumtool.
To have full customization you'd need a weak assignment in image_types.bbclass.
Quoted 7 lines
OE om-gta02@shr ~/shr-core $ bitbake -e shr-lite-image | tee -a image.log
OE om-gta02@shr ~/shr-core $ grep ^EXTRA_IMAGECMD image.log | grep jffs2
EXTRA_IMAGECMD_sum.jffs2="--eraseblock=0x20000 --no-cleanmarkers --littleendian --pad"
EXTRA_IMAGECMD_jffs2="--little-endian --eraseblock=0x20000 --pagesize=0x800 --no-cleanmarkers --pad; mv /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-lite-20111211-om-gta02.rootfs.jffs2 /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-lite-20111211-om-gta02.rootfs.jffs2.nosummary;"This looks right (notice that sumtool is using different --little-endian/--littleendian).
Pls use -l ;)
Quoted 141 lines
OE om-gta02@shr ~/shr-core $ grep
IMAGE_CMDimage.log | grep jffs2
# 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_sum.jffs2="mkfs.jffs2 --root=/OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/shr-lite-image/2.0-r20/rootfs --faketime --output=/OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-lite-20111211-om-gta02.rootfs.jffs2 -n && sumtool -i /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-lite-20111211-om-gta02.rootfs.jffs2 -o /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-lite-20111211-om-gta02.rootfs.sum.jffs2 -n" # IMAGE_CMD_jffs2=mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 -n ${EXTRA_IMAGECMD}
IMAGE_CMD_jffs2="mkfs.jffs2 --root=/OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/shr-lite-image/2.0-r20/rootfs --faketime --output=/OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-lite-20111211-om-gta02.rootfs.jffs2 -n"Here we can see that bitbake -e didn't expand
EXTRA_IMAGECMDright, but it seems likedo_rootfshave them not empty:shr-core/tmp/work/om_gta02-oe-linux-gnueabi/shr-image/2.0-r18/temp/run.do_rootfs.688:
# Image generation code for image type sum.jffs2
ROOTFS_SIZE=du -ks /OE/shr-core/tmp/work/om_gta02-oe-linux-gnueabi/shr-image/2.0-r18/rootfs|awk '{size = $1 * 1.3 + 0; OFMT = "%.0f" ; print (size > 65536 ? size : 65536) }'
mkfs.jffs2 --root=/OE/shr-core/tmp/work/om_gta02-oe-linux-gnueabi/shr-image/2.0-r18/rootfs --faketime --output=/OE/shr-core/tmp/deploy/images/om-gta02/shr-full-20111210-om-gta02.rootfs.jffs2 -n --eraseblock=0x20000 --no-cleanmarkers --littleendian --pad && sumtool -i /OE/shr-core/tmp/deploy/images/om-gta02/shr-full-20111210-om-gta02.rootfs.jffs2 -o /OE/shr-core/tmp/deploy/images/om-gta02/shr-full-20111210-om-gta02.rootfs.sum.jffs2 -n --eraseblock=0x20000 --no-cleanmarkers --littleendian --pad cd /OE/shr-core/tmp/deploy/images/om-gta02/
rm -f /OE/shr-core/tmp/deploy/images/om-gta02/full-om-gta02.sum.jffs2
ln -s shr-full-20111210-om-gta02.rootfs.sum.jffs2 /OE/shr-core/tmp/deploy/images/om-gta02/full-om-gta02.sum.jffs2Notice that
IMAGE_CMD_jffs2is using EXTRA_IMAGECMD_sum.jffs2 (so params for sumtool not mkfs.jffs2) when it's expanded inside IMAGE_CMD_sum.jffs2 variableopenembedded-core/meta/classes/image_types.bbclass:
IMAGE_CMD_jffs2= "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 -n ${EXTRA_IMAGECMD}" 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}"And causing
mkfs.jffs2: unrecognized option '--littleendian'
mkfs.jffs2: error!: Usage: mkfs.jffs2 [OPTIONS]And using
EXTRA_IMAGECMD_jffs2inIMAGE_CMD_jffs2breaks parsing..ERROR: Unable to parse /OE/shr-core/openembedded-core/meta/recipes-core/images/core-image-minimal-initramfs.bb | ETA: --:--:--
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/bb/codeparser.py", line 268, in ShellParser.parse_shell(value='\t#set -x\n\trm -rf /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs\n\trm -rf /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/multilib\n\tmkdir -p /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs\n\tmkdir -p /OE/shr-core/tmp-eglibc/deploy/images/om-gta02\n\n\tcp /OE/shr-core/openembedded-core/meta/files/deploydir_readme.txt /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt\n\n\tif [ "0" != "1" ]; then\n\t\tfor devtable in /OE/shr-core/meta-handheld/files/device_table-minimal.txt; do\n\t\t\tmakedevs -r /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs -D $devtable\n\t\tdone\n\tfi\n\n\trootfs_ipk_do_rootfs\n\n\tinsert_feed_uris\n\n\tif [ "xldconfig-native:do_populate_sysroot" != "x" ]; then\n\t\t# Run ldconfig on the image to create a valid cache\n\t\t# (new format for cross arch compatibility)\n\t\techo executing: ldconfig -r /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs -c new -v\n\t\tldconfig -r /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs -c new -v\n\tfi\n\n\t# (re)create kernel modules dependencies\n\t# This part is done by kernel-module-* postinstall scripts but if image do\n\t# not contains modules at all there are few moments in boot sequence with\n\t# "unable to open modules.dep" message.\n\tif [ -e /OE/shr-core/tmp-eglibc/sysroots/om-gta02/kernel/kernel-abiversion ]; then\n\t\tKERNEL_VERSION=cat /OE/shr-core/tmp-eglibc/sysroots/om-gta02/kernel/kernel-abiversion\n\n\t\tmkdir -p /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs/lib/modules/$KERNEL_VERSION\n\t\tarm-oe-linux-gnueabi-depmod -a -b /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs -F /OE/shr-core/tmp-eglibc/sysroots/om-gta02/kernel/System.map-$KERNEL_VERSION $KERNEL_VERSION\n\tfi\n\n\t${IMAGE_PREPROCESS_COMMAND}\n\n\t\n\t# Image generation code for image type cpio.gz\n\tROOTFS_SIZE=du -ks /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs|awk \'{size = $1 * 1.3 + 0; OFMT = "%.0f" ; print (size > 8192 ? size : 8192) }\'\n\tcd /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs && (find . | cpio -o -H newc | gzip -c -9 >/OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.cpio.gz)\n\tcd /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/\n\trm -f /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/core-image-minimal-initramfs-om-gta02.cpio.gz\n\tln -s shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.cpio.gz /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/core-image-minimal-initramfs-om-gta02.cpio.gz\n\t# Image generation code for image type tar.gz\n\tROOTFS_SIZE=du -ks /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs|awk \'{size = $1 * 1.3 + 0; OFMT = "%.0f" ; print (size > 8192 ? size : 8192) }\'\n\tcd /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs && tar -zcvf /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.tar.gz .\n\tcd /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/\n\trm -f /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/core-image-minimal-initramfs-om-gta02.tar.gz\n\tln -s shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.tar.gz /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/core-image-minimal-initramfs-om-gta02.tar.gz\n\t# Image generation code for image type sum.jffs2\n\tROOTFS_SIZE=du -ks /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs|awk \'{size = $1 * 1.3 + 0; OFMT = "%.0f" ; print (size > 8192 ? size : 8192) }\'\n\tmkfs.jffs2 --root=/OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs --faketime --output=/OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.jffs2 -n --little-endian --eraseblock=0x20000 --pagesize=0x800 --no-cleanmarkers --pad; mv /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.jffs2 /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.jffs2.nosummary; && sumtool -i /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.jffs2 \t-o /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.sum.jffs2 -n --eraseblock=0x20000 --no-cleanmarkers --littleendian --pad \n\tcd /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/\n\trm -f /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/core-image-minimal-initramfs-om-gta02.sum.jffs2\n\tln -s shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.sum.jffs2 /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/core-image-minimal-initramfs-om-gta02.sum.jffs2\n\n\n\tdo_testlab;\n\n\t\n'):
try:
> tokens, _ =pyshyacc.parse(value, eof=True, debug=False)
except pyshlex.NeedMore:
File "/usr/lib64/python2.7/site-packages/bb/pysh/pyshyacc.py", line 673, in parse(input='\t#set -x\n\trm -rf /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs\n\trm -rf /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/multilib\n\tmkdir -p /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs\n\tmkdir -p /OE/shr-core/tmp-eglibc/deploy/images/om-gta02\n\n\tcp /OE/shr-core/openembedded-core/meta/files/deploydir_readme.txt /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt\n\n\tif [ "0" != "1" ]; then\n\t\tfor devtable in /OE/shr-core/meta-handheld/files/device_table-minimal.txt; do\n\t\t\tmakedevs -r /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs -D $devtable\n\t\tdone\n\tfi\n\n\trootfs_ipk_do_rootfs\n\n\tinsert_feed_uris\n\n\tif [ "xldconfig-native:do_populate_sysroot" != "x" ]; then\n\t\t# Run ldconfig on the image to create a valid cache\n\t\t# (new format for cross arch compatibility)\n\t\techo executing: ldconfig -r /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs -c new -v\n\t\tldconfig -r /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs -c new -v\n\tfi\n\n\t# (re)create kernel modules dependencies\n\t# This part is done by kernel-module-* postinstall scripts but if image do\n\t# not contains modules at all there are few moments in boot sequence with\n\t# "unable to open modules.dep" message.\n\tif [ -e /OE/shr-core/tmp-eglibc/sysroots/om-gta02/kernel/kernel-abiversion ]; then\n\t\tKERNEL_VERSION=cat /OE/shr-core/tmp-eglibc/sysroots/om-gta02/kernel/kernel-abiversion\n\n\t\tmkdir -p /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs/lib/modules/$KERNEL_VERSION\n\t\tarm-oe-linux-gnueabi-depmod -a -b /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs -F /OE/shr-core/tmp-eglibc/sysroots/om-gta02/kernel/System.map-$KERNEL_VERSION $KERNEL_VERSION\n\tfi\n\n\t${IMAGE_PREPROCESS_COMMAND}\n\n\t\n\t# Image generation code for image type cpio.gz\n\tROOTFS_SIZE=du -ks /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs|awk \'{size = $1 * 1.3 + 0; OFMT = "%.0f" ; print (size > 8192 ? size : 8192) }\'\n\tcd /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs && (find . | cpio -o -H newc | gzip -c -9 >/OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.cpio.gz)\n\tcd /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/\n\trm -f /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/core-image-minimal-initramfs-om-gta02.cpio.gz\n\tln -s shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.cpio.gz /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/core-image-minimal-initramfs-om-gta02.cpio.gz\n\t# Image generation code for image type tar.gz\n\tROOTFS_SIZE=du -ks /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs|awk \'{size = $1 * 1.3 + 0; OFMT = "%.0f" ; print (size > 8192 ? size : 8192) }\'\n\tcd /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs && tar -zcvf /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.tar.gz .\n\tcd /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/\n\trm -f /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/core-image-minimal-initramfs-om-gta02.tar.gz\n\tln -s shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.tar.gz /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/core-image-minimal-initramfs-om-gta02.tar.gz\n\t# Image generation code for image type sum.jffs2\n\tROOTFS_SIZE=du -ks /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs|awk \'{size = $1 * 1.3 + 0; OFMT = "%.0f" ; print (size > 8192 ? size : 8192) }\'\n\tmkfs.jffs2 --root=/OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs --faketime --output=/OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.jffs2 -n --little-endian --eraseblock=0x20000 --pagesize=0x800 --no-cleanmarkers --pad; mv /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.jffs2 /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.jffs2.nosummary; && sumtool -i /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.jffs2 \t-o /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.sum.jffs2 -n --eraseblock=0x20000 --no-cleanmarkers --littleendian --pad \n\tcd /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/\n\trm -f /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/core-image-minimal-initramfs-om-gta02.sum.jffs2\n\tln -s shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.sum.jffs2 /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/core-image-minimal-initramfs-om-gta02.sum.jffs2\n\n\n\tdo_testlab;\n\n\t\n', eof=True, debug=False):
debug = 2
> returnyacc.parse(lexer=lexer, debug=debug), remainingFile "
/usr/lib64/python2.7/site-packages/ply/yacc.py", line 265, in LRParser.parse(input=None, lexer=<bb.pysh.pyshlex.PLYLexer instance at0x9638248>, debug=False, tracking=0, tokenfunc=None):
else:
> returnself.parseopt_notrack(input,lexer,debug,tracking,tokenfunc)File "
/usr/lib64/python2.7/site-packages/ply/yacc.py", line 1047, in LRParser.parseopt_notrack(input=None, lexer=<bb.pysh.pyshlex.PLYLexer instance at0x9638248>, debug=False, tracking=0, tokenfunc=None):
errtoken.lexer = lexer
> tok =self.errorfunc(errtoken)
del errok, token, restart # Delete special functions
File "/usr/lib64/python2.7/site-packages/bb/pysh/pyshyacc.py", line 646, in p_error(p=LexToken(AND_IF,'&&',0,0)):
w(' %r\n' % n)
> raise sherrors.ShellSyntaxError(''.join(msg))ShellSyntaxError:
LexToken(AND_IF,'&&',0,0)
followed by:
LexToken(TOKEN,'sumtool',0,0)
LexToken(TOKEN,'-i',0,0)LexToken(TOKEN,'/OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.jffs2',0,0)LexToken(TOKEN,'-o',0,0)LexToken(TOKEN,'/OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.sum.jffs2',0,0)Quoted 73 lines
Cheers
Andrea
Quoted 59 lines
But other than that it looks fine and will make my
IMAGE_DEPENDS_jffs2a bit shorter.Regards,
Quoted 48 lines
Acked-by Tom Rini <[email protected]>Quoted 35 lines
---
meta/classes/image_types.bbclass | 5 ++++-1 files changed, 4 insertions(+), 1 deletions(-)meta/classes/image_types.bbclass +0
-0@@ -35,6 +35,8 @@ XZ_COMPRESSION_LEVEL ?= "-e -9"XZ_INTEGRITY_CHECK ?= "crc32"
IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 ${EXTRA_IMAGECMD}" +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 ${EXTRA_IMAGECMD}"IMAGE_CMD_cramfs = "mkcramfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cramfs ${EXTRA_IMAGECMD}"
meta/classes/image_types.bbclass +0
-0@@ -138,6 +140,7 @@ EXTRA_IMAGECMD_btrfs ?= ""IMAGE_DEPENDS = ""
IMAGE_DEPENDS_jffs2 = "mtd-utils-native"
+IMAGE_DEPENDS_sum.jffs2 = "mtd-utils-native"
IMAGE_DEPENDS_cramfs = "cramfs-native"
IMAGE_DEPENDS_ext2 = "genext2fs-native"
IMAGE_DEPENDS_ext2.gz = "genext2fs-native"meta/classes/image_types.bbclass +0
-0@@ -157,4 +160,4 @@ IMAGE_DEPENDS_ubi = "mtd-utils-native"IMAGE_DEPENDS_ubifs = "mtd-utils-native"
# This variable is available to request which values are suitable for
IMAGE_FSTYPESmeta/classes/image_types.bbclass +1
-2-IMAGE_TYPES = "jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma" +IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma" --1.7.3.4
Quoted 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core--
TomQuoted 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-coreQuoted 8 lines
--
Martin 'JaMa' Jansa jabber: [email protected]_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-coreQuoted 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Quoted 8 lines
--
Martin 'JaMa' Jansa jabber: [email protected]_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Regards
Andrea
Re: [PATCH 1/2] image_types.bbclass: implement jffs2 summary images (sum.jffs2)
Quoted 80 lines · Andrea Adami
Quoted 25 lines · Martin Jansa
Quoted 24 lines · Andrea Adami
Quoted 7 lines · Martin Jansa
Quoted 6 lines · Tom Rini
Quoted 5 lines · Andrea Adami
* Building the jffs2 filesystem to include summary information speeds up
* the mount process considerably at the cost of increased size.
* The rate of speedup is generally higher on NAND chips and on the chips
* where the erase block size is large.Quoted 7 lines
Quoted 1 line
Quoted 1 line
Signed-off-by Andrea Adami <[email protected]>I'll repeat my comment from yesterday, but IMHO it would be easier to
see the difference between those 2 images if theIMAGE_CMD_jffs2output is renamed to .jffs2.nosummary and IMAGE_CMD_sum.jffs2 (or renamed IMAGE_CMD_jffs2.summary) produces .jffs2.summary (or even just .jffs2 if we can agree that .summary is what enduser wants by default)I tried to keep the patch not too invasive and did not introduce a special EXTRA string for sumtool.
The most widely used options (-p -l -e) are common, though.Unfortunately summary means we have a bigger image:
44M Dec 8 16:14 core-image-sato-c7x0-20111208151047.rootfs.jffs2 57M Dec 8 16:14 core-image-sato-c7x0-20111208151047.rootfs.sum.jffs2Quoted 8 lines
Quoted 2 lines
Being some devices have strict size requirements I think it is better to build both kind of images.
Today I've noticed that it doesn't work for me:
I have changed
EXTRA_IMAGECMD_jffs2to use new sum.jffs2:
http://git.shr-project.org/git/?p=meta-smartphone.git;a=blobdiff;f=meta-openmoko/conf/machine/om-gta02.conf;h=ad71d3db386b7d7df6ab484ea9ad80260da30373;hp=7cfb1b2a07b09ac3a35a27d209015ea8533ff632;hb=26d60e47358abe66d7d0fdbe6d5adea8f46bdbe2;hpb=043b5ac84794946e88e880b722fed445d3d985c5Martin,
the idea of the patch was to keep things simple.
After all most machines only specify endianness, eraseblocksize and padding. The few which are using summary jffs2 in meta-handhels appear to be Zaurus and hx4700 (I'll send a patch to fix ipaq's too) and fwiw beagleboard used '-npl' so I think we cover the most common case when people are setting
EXTRA_IMAGECMD_jffs2= "-p -l --eraseblock=${ERASEBLOCKSIZE}"and for the rare case they add
IMAGE_FSTYPES+= "tar.gz jffs2 sum.jffs2":
EXTRA_IMAGECMD_sum.jffs2 = "${EXTRA_IMAGECMD_jffs2}"This happens to work just as intended, without adding another var for sumtool args.
mkfs.jffs2
--root=/oe/oe-core/build/tmp-eglibc/work/c7x0-oe-linux-gnueabi/core-image-sato-1.0-r0/rootfs --faketime --output=/oe/oe-core/build/tmp-eglibc/deploy/images/core-image-sato-c7x0-20111210181230.rootfs.jffs2 -n -p -l --eraseblock=0x4000
cd /oe/oe-core/build/tmp-eglibc/deploy/images/
rm -f /oe/oe-core/build/tmp-eglibc/deploy/images/core-image-sato-c7x0.jffs2
ln -s core-image-sato-c7x0-20111210181230.rootfs.jffs2
/oe/oe-core/build/tmp-eglibc/deploy/images/core-image-sato-c7x0.jffs2
# Image generation code for image type sum.jffs2
ROOTFS_SIZE=`du -ks
/oe/oe-core/build/tmp-eglibc/work/c7x0-oe-linux-gnueabi/core-image-sato-1.0-r0/rootfs|awk '{size = $1 * 1.3 + 0; OFMT = "%.0f" ; print (size > 65536 ? size :
65536) }'`
mkfs.jffs2
--root=/oe/oe-core/build/tmp-eglibc/work/c7x0-oe-linux-gnueabi/core-image-sato-1.0-r0/rootfs --faketime --output=/oe/oe-core/build/tmp-eglibc/deploy/images/core-image-sato-c7x0-20111210181230.rootfs.jffs2 -n -p -l --eraseblock=0x4000 && sumtool -i /oe/ oe-core/build/tmp-eglibc/deploy/images/core-image-sato-c7x0-20111210181230.rootfs.jffs2-o /oe/oe-core/build/tmp-eglibc/deploy/images/core-image-sato-c7x0-20111210181230.rootfs.sum.jffs2-n -p -l --eraseblock=0x4000
cd /oe/oe-core/build/tmp-eglibc/deploy/images/
rm -f /oe/oe-core/build/tmp-eglibc/deploy/images/core-image-sato-c7x0.sum.jffs2 ln -s core-image-sato-c7x0-20111210181230.rootfs.sum.jffs2
/oe/oe-core/build/tmp-eglibc/deploy/images/core-image-sato-c7x0.sum.jffs2
Quoted 4 lines
Being that IMAGE_CMD_sum.jffs2 cannot be overriden I adapted the
EXTRA_IMAGECMD_jffs2and simplified it in the way the string can be used by sumtool.
To have full customization you'd need a weak assignment in image_types.bbclass.
It can be overriden and that's how I have fixed this (imho wrong) behavior
because with
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}"
I think it's common sense to expect EXTRA_IMAGECMD_sum.jffs2 being applied to sumtool not mkfs.jffs2
Regards,
Quoted 168 lines
Quoted 7 lines
OE om-gta02@shr ~/shr-core $ bitbake -e shr-lite-image | tee -a image.log
OE om-gta02@shr ~/shr-core $ grep ^EXTRA_IMAGECMD image.log | grep jffs2
EXTRA_IMAGECMD_sum.jffs2="--eraseblock=0x20000 --no-cleanmarkers --littleendian --pad"
EXTRA_IMAGECMD_jffs2="--little-endian --eraseblock=0x20000 --pagesize=0x800 --no-cleanmarkers --pad; mv /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-lite-20111211-om-gta02.rootfs.jffs2 /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-lite-20111211-om-gta02.rootfs.jffs2.nosummary;"This looks right (notice that sumtool is using different --little-endian/--littleendian).
Pls use -l ;)
Quoted 141 lines
OE om-gta02@shr ~/shr-core $ grep
IMAGE_CMDimage.log | grep jffs2
# 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_sum.jffs2="mkfs.jffs2 --root=/OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/shr-lite-image/2.0-r20/rootfs --faketime --output=/OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-lite-20111211-om-gta02.rootfs.jffs2 -n && sumtool -i /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-lite-20111211-om-gta02.rootfs.jffs2 -o /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-lite-20111211-om-gta02.rootfs.sum.jffs2 -n" # IMAGE_CMD_jffs2=mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 -n ${EXTRA_IMAGECMD}
IMAGE_CMD_jffs2="mkfs.jffs2 --root=/OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/shr-lite-image/2.0-r20/rootfs --faketime --output=/OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-lite-20111211-om-gta02.rootfs.jffs2 -n"Here we can see that bitbake -e didn't expand
EXTRA_IMAGECMDright, but it seems likedo_rootfshave them not empty:shr-core/tmp/work/om_gta02-oe-linux-gnueabi/shr-image/2.0-r18/temp/run.do_rootfs.688:
# Image generation code for image type sum.jffs2
ROOTFS_SIZE=du -ks /OE/shr-core/tmp/work/om_gta02-oe-linux-gnueabi/shr-image/2.0-r18/rootfs|awk '{size = $1 * 1.3 + 0; OFMT = "%.0f" ; print (size > 65536 ? size : 65536) }'
mkfs.jffs2 --root=/OE/shr-core/tmp/work/om_gta02-oe-linux-gnueabi/shr-image/2.0-r18/rootfs --faketime --output=/OE/shr-core/tmp/deploy/images/om-gta02/shr-full-20111210-om-gta02.rootfs.jffs2 -n --eraseblock=0x20000 --no-cleanmarkers --littleendian --pad && sumtool -i /OE/shr-core/tmp/deploy/images/om-gta02/shr-full-20111210-om-gta02.rootfs.jffs2 -o /OE/shr-core/tmp/deploy/images/om-gta02/shr-full-20111210-om-gta02.rootfs.sum.jffs2 -n --eraseblock=0x20000 --no-cleanmarkers --littleendian --pad cd /OE/shr-core/tmp/deploy/images/om-gta02/
rm -f /OE/shr-core/tmp/deploy/images/om-gta02/full-om-gta02.sum.jffs2
ln -s shr-full-20111210-om-gta02.rootfs.sum.jffs2 /OE/shr-core/tmp/deploy/images/om-gta02/full-om-gta02.sum.jffs2Notice that
IMAGE_CMD_jffs2is using EXTRA_IMAGECMD_sum.jffs2 (so params for sumtool not mkfs.jffs2) when it's expanded inside IMAGE_CMD_sum.jffs2 variableopenembedded-core/meta/classes/image_types.bbclass:
IMAGE_CMD_jffs2= "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 -n ${EXTRA_IMAGECMD}" 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}"And causing
mkfs.jffs2: unrecognized option '--littleendian'
mkfs.jffs2: error!: Usage: mkfs.jffs2 [OPTIONS]And using
EXTRA_IMAGECMD_jffs2inIMAGE_CMD_jffs2breaks parsing..ERROR: Unable to parse /OE/shr-core/openembedded-core/meta/recipes-core/images/core-image-minimal-initramfs.bb | ETA: --:--:--
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/bb/codeparser.py", line 268, in ShellParser.parse_shell(value='\t#set -x\n\trm -rf /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs\n\trm -rf /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/multilib\n\tmkdir -p /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs\n\tmkdir -p /OE/shr-core/tmp-eglibc/deploy/images/om-gta02\n\n\tcp /OE/shr-core/openembedded-core/meta/files/deploydir_readme.txt /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt\n\n\tif [ "0" != "1" ]; then\n\t\tfor devtable in /OE/shr-core/meta-handheld/files/device_table-minimal.txt; do\n\t\t\tmakedevs -r /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs -D $devtable\n\t\tdone\n\tfi\n\n\trootfs_ipk_do_rootfs\n\n\tinsert_feed_uris\n\n\tif [ "xldconfig-native:do_populate_sysroot" != "x" ]; then\n\t\t# Run ldconfig on the image to create a valid cache\n\t\t# (new format for cross arch compatibility)\n\t\techo executing: ldconfig -r /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs -c new -v\n\t\tldconfig -r /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs -c new -v\n\tfi\n\n\t# (re)create kernel modules dependencies\n\t# This part is done by kernel-module-* postinstall scripts but if image do\n\t# not contains modules at all there are few moments in boot sequence with\n\t# "unable to open modules.dep" message.\n\tif [ -e /OE/shr-core/tmp-eglibc/sysroots/om-gta02/kernel/kernel-abiversion ]; then\n\t\tKERNEL_VERSION=cat /OE/shr-core/tmp-eglibc/sysroots/om-gta02/kernel/kernel-abiversion\n\n\t\tmkdir -p /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs/lib/modules/$KERNEL_VERSION\n\t\tarm-oe-linux-gnueabi-depmod -a -b /OE/shr-core/tmp- try:
> tokens, _ =pyshyacc.parse(value, eof=True, debug=False)
except pyshlex.NeedMore:
File "/usr/lib64/python2.7/site-packages/bb/pysh/pyshyacc.py", line 673, in parse(input='\t#set -x\n\trm -rf /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs\n\trm -rf /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/multilib\n\tmkdir -p /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs\n\tmkdir -p /OE/shr-core/tmp-eglibc/deploy/images/om-gta02\n\n\tcp /OE/shr-core/openembedded-core/meta/files/deploydir_readme.txt /OE/shr-core/tmp-eglibc/deploy/images/om-gta02/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt\n\n\tif [ "0" != "1" ]; then\n\t\tfor devtable in /OE/shr-core/meta-handheld/files/device_table-minimal.txt; do\n\t\t\tmakedevs -r /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs -D $devtable\n\t\tdone\n\tfi\n\n\trootfs_ipk_do_rootfs\n\n\tinsert_feed_uris\n\n\tif [ "xldconfig-native:do_populate_sysroot" != "x" ]; then\n\t\t# Run ldconfig on the image to create a valid cache\n\t\t# (new format for cross arch compatibility)\n\t\techo executing: ldconfig -r /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs -c new -v\n\t\tldconfig -r /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs -c new -v\n\tfi\n\n\t# (re)create kernel modules dependencies\n\t# This part is done by kernel-module-* postinstall scripts but if image do\n\t# not contains modules at all there are few moments in boot sequence with\n\t# "unable to open modules.dep" message.\n\tif [ -e /OE/shr-core/tmp-eglibc/sysroots/om-gta02/kernel/kernel-abiversion ]; then\n\t\tKERNEL_VERSION=cat /OE/shr-core/tmp-eglibc/sysroots/om-gta02/kernel/kernel-abiversion\n\n\t\tmkdir -p /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/rootfs/lib/modules/$KERNEL_VERSION\n\t\tarm-oe-linux-gnueabi-depmod -a -b /OE/shr-core/tmp-eglibc/work/om_ debug = 2
> returnyacc.parse(lexer=lexer, debug=debug), remainingFile "
/usr/lib64/python2.7/site-packages/ply/yacc.py", line 265, in LRParser.parse(input=None, lexer=<bb.pysh.pyshlex.PLYLexer instance at0x9638248>, debug=False, tracking=0, tokenfunc=None):
else:
> returnself.parseopt_notrack(input,lexer,debug,tracking,tokenfunc)File "
/usr/lib64/python2.7/site-packages/ply/yacc.py", line 1047, in LRParser.parseopt_notrack(input=None, lexer=<bb.pysh.pyshlex.PLYLexer instance at0x9638248>, debug=False, tracking=0, tokenfunc=None):
errtoken.lexer = lexer
> tok =self.errorfunc(errtoken)
del errok, token, restart # Delete special functions
File "/usr/lib64/python2.7/site-packages/bb/pysh/pyshyacc.py", line 646, in p_error(p=LexToken(AND_IF,'&&',0,0)):
w(' %r\n' % n)
> raise sherrors.ShellSyntaxError(''.join(msg))ShellSyntaxError:
LexToken(AND_IF,'&&',0,0)
followed by:
LexToken(TOKEN,'sumtool',0,0)
LexToken(TOKEN,'-i',0,0)LexToken(TOKEN,'/OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.jffs2',0,0)LexToken(TOKEN,'-o',0,0)LexToken(TOKEN,'/OE/shr-core/tmp-eglibc/deploy/images/om-gta02/shr-core-image-minimal-initramfs-20111211-om-gta02.rootfs.sum.jffs2',0,0)Quoted 73 lines
Cheers
Andrea
Quoted 59 lines
But other than that it looks fine and will make my
IMAGE_DEPENDS_jffs2a bit shorter.Regards,
Quoted 48 lines
Acked-by Tom Rini <[email protected]>Quoted 35 lines
---
meta/classes/image_types.bbclass | 5 ++++-1 files changed, 4 insertions(+), 1 deletions(-)meta/classes/image_types.bbclass +0
-0@@ -35,6 +35,8 @@ XZ_COMPRESSION_LEVEL ?= "-e -9"XZ_INTEGRITY_CHECK ?= "crc32"
IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 ${EXTRA_IMAGECMD}" +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 ${EXTRA_IMAGECMD}"IMAGE_CMD_cramfs = "mkcramfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cramfs ${EXTRA_IMAGECMD}"
meta/classes/image_types.bbclass +0
-0@@ -138,6 +140,7 @@ EXTRA_IMAGECMD_btrfs ?= ""IMAGE_DEPENDS = ""
IMAGE_DEPENDS_jffs2 = "mtd-utils-native"
+IMAGE_DEPENDS_sum.jffs2 = "mtd-utils-native"
IMAGE_DEPENDS_cramfs = "cramfs-native"
IMAGE_DEPENDS_ext2 = "genext2fs-native"
IMAGE_DEPENDS_ext2.gz = "genext2fs-native"meta/classes/image_types.bbclass +0
-0@@ -157,4 +160,4 @@ IMAGE_DEPENDS_ubi = "mtd-utils-native"IMAGE_DEPENDS_ubifs = "mtd-utils-native"
# This variable is available to request which values are suitable for
IMAGE_FSTYPESmeta/classes/image_types.bbclass +1
-2-IMAGE_TYPES = "jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma" +IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma" --1.7.3.4
Quoted 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core--
TomQuoted 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-coreQuoted 8 lines
--
Martin 'JaMa' Jansa jabber: [email protected]_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-coreQuoted 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-coreQuoted 8 lines
--
Martin 'JaMa' Jansa jabber: [email protected]_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-coreRegards
Andrea_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
PATCH 2/2 image_types.bbclass: disable cleanmarkers for jffs2 images
In reply to Andrea Adami* Add '-n' to suppress cleanmarker nodes since jffs2
* is usually used for NAND flash and the cleanmarkers are created in
* the OOB area by flash_eraseall -j
*
* From man pages: -n, --no-cleanmarkers
* Do not write cleanmarker nodes to the beginning of each erase block.
* This option can be useful for creating JFFS2 images for use on NAND flash,
* and for creating images which are to be used on a variety of hardware with differing eraseblock sizes.
--- meta/classes/image_types.bbclass | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
meta/classes/image_types.bbclass +2 -2
@@ -34,9 +34,9 @@ runimagecmd () { XZ_COMPRESSION_LEVEL ?= "-e -9" XZ_INTEGRITY_CHECK ?= "crc32" -IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 ${EXTRA_IMAGECMD}" +IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 -n ${EXTRA_IMAGECMD}" 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 ${EXTRA_IMAGECMD}" + -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}"
Signature · 1 line
1.7.3.4
Re: [PATCH 2/2] image_types.bbclass: disable cleanmarkers for jffs2 images
Quoted 10 lines · Andrea Adami
* Add '-n' to suppress cleanmarker nodes since jffs2
* is usually used for NAND flash and the cleanmarkers are created in
* the OOB area byflash_eraseall-j
*
* From man pages: -n, --no-cleanmarkers
* Do not write cleanmarker nodes to the beginning of each erase block.
* This option can be useful for creating JFFS2 images for use on NAND flash,
* and for creating images which are to be used on a variety of hardware with differing eraseblock sizes.Signed-off-by Andrea Adami <[email protected]>
Quoted 28 lines
---
meta/classes/image_types.bbclass | 4 ++--1 files changed, 2 insertions(+), 2 deletions(-)meta/classes/image_types.bbclass +0
-0@@ -34,9 +34,9 @@ runimagecmd () {XZ_COMPRESSION_LEVEL ?= "-e -9"
XZ_INTEGRITY_CHECK ?= "crc32"meta/classes/image_types.bbclass +1
-1-IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 ${EXTRA_IMAGECMD}" +IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 -n ${EXTRA_IMAGECMD}"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 ${EXTRA_IMAGECMD}"
+ -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}"
--
1.7.3.4_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Signature · 1 line
Tom
Saul Wold
AppliedQuoted 5 lines · Andrea Adami
* The first patch adds support for the creation of
* jffs2 summary images for a faster mount.
* The second patch forces the --no-cleanmarkers option
* to further improve boot time.
Quoted 7 lines
Andrea Adami (2):
image_types.bbclass: implement jffs2 summary images (sum.jffs2) image_types.bbclass: disable cleanmarkers for jffs2 imagesmeta/classes/image_types.bbclass | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
Merged to OE-Core
Thanks
Sau!