and tried to build an ubifs image using this definition. I get a crash:
support/scripts/genimage.sh: line 40: 6959 Floating point exception(core dumped) genimage --rootpath "${TARGET_DIR}" --tmppath "${GENIMAGE_TMP}" --inputpath "${BINARIES_DIR}" --outputpath "${BINARIES_DIR}" --config "${GENIMAGE_CFG}"
Analyzing the coredump suggests a div-by-zero problem:
Program terminated with signal SIGFPE, Arithmetic exception.
#0 0x000055f0b21195f2 in ubifs_generate (image=0x55f0b2ab4b30) at image-ubifs.c:33
33 max_leb_cnt = max_size / image->flash_type->lebsize;
(gdb) bt
#0 0x000055f0b21195f2 in ubifs_generate (image=0x55f0b2ab4b30) at image-ubifs.c:33
#1 0x000055f0b2110bb4 in image_generate (image=0x55f0b2ab4b30) at genimage.c:233
#2 0x000055f0b2110a9e in image_generate (image=0x55f0b2ab4c50) at genimage.c:219
#3 0x000055f0b2110a9e in image_generate (image=0x55f0b2ab46d0) at genimage.c:219
#4 0x000055f0b211235f in main (argc=11, argv=0x7fffccf1d1e8) at genimage.c:749
Probably, genimage should check that lebsize is specified if ubifs is expecting to use it (and give an error if not).
For what it's worth, a plain ubi image worked fine without lebsize.
I mistakenly specified my flash without a
lebsize
:and tried to build an ubifs image using this definition. I get a crash:
Analyzing the coredump suggests a div-by-zero problem:
Probably, genimage should check that
lebsize
is specified if ubifs is expecting to use it (and give an error if not).For what it's worth, a plain
ubi
image worked fine withoutlebsize
.