On Mon, 1 Jul 2019 07:29:42 +0000
=?iso-8859-1?Q?Jose_Ignacio_Tornos_Mart=EDnez?= <jitor...@teldat.com> wrote:
> 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'

Is this still true for buster, bullseye, and sid versions?

Reply via email to