Upgrading mtd-utils in uClinux.

Glen Johnson gjohnson at valcom.com
Thu Nov 30 07:58:10 EST 2006


Ricard Wanderlof wrote:
> Unless someone here has had this specific problem, some form of output
> from the compilation indicating what is going wrong would be helpful.
>
>   
Yes, of course.  I have a couple more direct question. First, I found
the mtd-utils code is not properly using zlib. 

m68k-elf-gcc -Wl,--fatal-warnings -Wl,-elf2flt -Wl,-move-rodata
-msep-data -o mkfs.jffs2 crc32.o compr_rtime.o mkfs.jffs2.o compr_zlib.o
compr.o -L/home/glen/src/c/linux/uClinux-dist-20060803/lib/zlib
warning: .rodata section contains relocations
mkfs.jffs2.elf2flt: In function `jffs2_zlib_decompress':
/home/glen/src/c/linux/uClinux-dist-20060803/user/mtd-utils/compr_zlib.c:118:
undefined reference to `inflateInit_'
/home/glen/src/c/linux/uClinux-dist-20060803/user/mtd-utils/compr_zlib.c:127:
undefined reference to `inflate'
/home/glen/src/c/linux/uClinux-dist-20060803/user/mtd-utils/compr_zlib.c:132:
undefined reference to `inflateEnd'
mkfs.jffs2.elf2flt: In function `jffs2_zlib_compress':
/home/glen/src/c/linux/uClinux-dist-20060803/user/mtd-utils/compr_zlib.c:73:
undefined reference to `deflateInit_'
/home/glen/src/c/linux/uClinux-dist-20060803/user/mtd-utils/compr_zlib.c:80:
undefined reference to `deflate'
/home/glen/src/c/linux/uClinux-dist-20060803/user/mtd-utils/compr_zlib.c:87:
undefined reference to `deflateEnd'
/home/glen/src/c/linux/uClinux-dist-20060803/user/mtd-utils/compr_zlib.c:98:
undefined reference to `deflateEnd'
collect2: ld returned 1 exit status
make[3]: *** [mkfs.jffs2] Error 1

The warning: .rodata section contains relocations is printed and it
appears all other attempts to use libz.a are dropped.  I Googled this
warning and there were a couple of places where it mentioned
configure.in.  Is this the real problem?  If so how can it be fixed, not
familiar with autoconf)?

Secondly, once I get the code to compile it appears I still need to add
a section to the Makefile to install the files into the romfs image. 
Can I just pull this out of the old mtd-utils/Makefile or what? 
Suggestion's/recommendations?
Thanks,
Glen Johnson




More information about the linux-mtd mailing list