Package: mtd-utils
Version: 2.0.1
Severity: important

Dear Maintainer,

After stretch migration from jessie (mips architecture), ubiformat command is 
not working
any more.

ubiformat command output error:
#ubiformat /dev/mtd10
ubiformat: mtd10 (mlc-nand), size 4294967296 bytes (4.0 GiB), 2048
eraseblocks of 2097152 bytes (2.0 MiB), min. I/O size 8192 bytes
libscan: scanning eraseblock 1024 -- 50 % complete  libmtd: error!:
cannot seek mtd10 to offset 8612548850948015640
        error 22 (Invalid argument)
        ubiformat: error!: failed to scan mtd10 (/dev/mtd10)

The problem is that lseek function in mtd library (used by ubiformat
command) uses 32 bits signed offset except if the flag
'_FILE_OFFSET_BITS=64' is used. 
As flag is not included, this is the reason why bigger memories
than 2GB are not working.

For mtd-utils 1.5.1 (jessie) commented flag was added in defuald Makefile
structure (common.mk).
So, new mtd.utils needs to do the same or be generated like this example:
./configure --host=mips-linux-gnu- CC=/usr/bin/mips-linux-gnu-gcc
--prefix=`pwd`/__install CFLAGS='-D_FILE_OFFSET_BITS=64'

Thanks for your support
Regards

-- System Information:
Debian Release: 9.8
Architecture: amd64 (x86_64)
Foreign Architectures: mips

Kernel: Linux 4.15.0-54-generic (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968), LANGUAGE=C 
(charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Init: unable to detect

Versions of packages mtd-utils depends on:
ii  libc6      2.24-11+deb9u4
pn  liblzo2-2  <none>
ii  libuuid1   2.29.2-1+deb9u1
ii  zlib1g     1:1.2.8.dfsg-5

mtd-utils recommends no packages.

mtd-utils suggests no packages.

Reply via email to