Bug 13826

Summary: Default EXTRA_IMAGECMD_jffs2 drops JFFS2_ENDIANNESS
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Andreas Dröscher <yocto>
Component: coreAssignee: Unassigned <unassigned>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: Undecided CC: meta.mr.watcher, meta.watcher
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Andreas Dröscher 2020-03-10 21:46:12 UTC
I think ${JFFS2_ENDIANNESS} has no effect (jffs2 will always be generated as big endian, the default of mkfs.jffs2).

meta/classes/image_types.bbclass defines default arguments for mkfs.jffs2:

EXTRA_IMAGECMD_jffs2 ?= "--pad ${JFFS2_ENDIANNESS} --eraseblock=${JFFS2_ERASEBLOCK} --no-cleanmarkers"

Those are inserted into 
IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.jffs2 ${EXTRA_IMAGECMD}" 

According to "man mkfs.jffs2":

-p, --pad[=SIZE]
 Pad output to SIZE bytes with 0xFF.  If SIZE is not specified, the output is padded to the end of the final erase block.

pad expects a size argument.

mkfs.jffs2 now silently accepts -b or -l and converts it to 0. Hence the argument is already consumed and will not have the intended effect.

Workaround: Overwrite EXTRA_IMAGECMD_jffs2 in image-recipe
Comment 1 Andreas Dröscher 2020-03-10 21:56:05 UTC
Sorry for opening the ticket. I just noticed size should be optional. Therefore my issue must have different source.