* Upgrading mtd-utils in uClinux.
@ 2006-11-28 14:09 Glen Johnson
2006-11-29 7:43 ` Ricard Wanderlof
0 siblings, 1 reply; 5+ messages in thread
From: Glen Johnson @ 2006-11-28 14:09 UTC (permalink / raw)
To: linux-mtd
Linux-mtd,
I am attempting to compile the latest mtd-utils into uClinux's distribution dated 2006-08-03. After some unsuccessful attempts I found the new mtd-utils needed an updated zlib. I successfully upgraded to zlib version 1.2.3 inside uClinux-dist/lib/zlib. I now have that compiling and still am not getting anywhere with compiling the mtd-utils.
I dropped the latest mtd-utils code into the directory uClinux-dist/user/mtd-utils. I have observed the Makefiles between the new updated mtd-utils and the old uClinux-dist/user/mtd-utils/Makefile are VERY different. I tried to use the old Makefile as a template to build the new code and it still is not compiling.
What is the correct method of upgrading mtd-utils? It shouldn't be as difficult to upgrade some code in user space as I am making it. I feel like I must be going about this the wrong way. Are there any pointers, tips, or recommendations to get me going in the right direction?
Thanks,
Glen Johnson
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Upgrading mtd-utils in uClinux.
2006-11-28 14:09 Upgrading mtd-utils in uClinux Glen Johnson
@ 2006-11-29 7:43 ` Ricard Wanderlof
2006-11-30 12:58 ` Glen Johnson
0 siblings, 1 reply; 5+ messages in thread
From: Ricard Wanderlof @ 2006-11-29 7:43 UTC (permalink / raw)
To: Linux mtd
On Tue, 28 Nov 2006, Glen Johnson wrote:
> I am attempting to compile the latest mtd-utils into uClinux's
> distribution dated 2006-08-03. After some unsuccessful attempts I found
> the new mtd-utils needed an updated zlib. I successfully upgraded to
> zlib version 1.2.3 inside uClinux-dist/lib/zlib. I now have that
> compiling and still am not getting anywhere with compiling the
> mtd-utils. I dropped the latest mtd-utils code into the directory
> uClinux-dist/user/mtd-utils. I have observed the Makefiles between the
> new updated mtd-utils and the old uClinux-dist/user/mtd-utils/Makefile
> are VERY different. I tried to use the old Makefile as a template to
> build the new code and it still is not compiling. What is the correct
> method of upgrading mtd-utils? It shouldn't be as difficult to upgrade
> some code in user space as I am making it. I feel like I must be going
> about this the wrong way. Are there any pointers, tips, or
> recommendations to get me going in the right direction?
Unless someone here has had this specific problem, some form of output
from the compilation indicating what is going wrong would be helpful.
/Ricard
--
Ricard Wolf Wanderlöf ricardw(at)axis.com
Axis Communications AB, Lund, Sweden www.axis.com
Phone +46 46 272 2016 Fax +46 46 13 61 30
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Upgrading mtd-utils in uClinux.
2006-11-29 7:43 ` Ricard Wanderlof
@ 2006-11-30 12:58 ` Glen Johnson
2006-12-01 11:21 ` David Woodhouse
0 siblings, 1 reply; 5+ messages in thread
From: Glen Johnson @ 2006-11-30 12:58 UTC (permalink / raw)
To: Ricard Wanderlof; +Cc: Linux mtd
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Upgrading mtd-utils in uClinux.
2006-11-30 12:58 ` Glen Johnson
@ 2006-12-01 11:21 ` David Woodhouse
2006-12-05 13:30 ` Glen Johnson
0 siblings, 1 reply; 5+ messages in thread
From: David Woodhouse @ 2006-12-01 11:21 UTC (permalink / raw)
To: Glen Johnson; +Cc: Linux mtd, Ricard Wanderlof
On Thu, 2006-11-30 at 07:58 -0500, Glen Johnson wrote:
> 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
No '-lz' on this command line -- you're not actually asking it to link
against zlib. Thus is doesn't find any of zlib's symbols.
> warning: .rodata section contains relocations
I've no idea what this is about. Perhaps the function pointers in the
jffs2_zlib_comp compressor structure?
mkfs.jffs2 builds fine for me for FR-V uClinux, although that's
ELF-FDPIC not flat. Are the relocations in .rodata actually a problem?
Doesn't m68k have ELF-FDPIC yet?
> 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?
Something wrong with 'make DESTDIR=/foo install' ?
--
dwmw2
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Upgrading mtd-utils in uClinux.
2006-12-01 11:21 ` David Woodhouse
@ 2006-12-05 13:30 ` Glen Johnson
0 siblings, 0 replies; 5+ messages in thread
From: Glen Johnson @ 2006-12-05 13:30 UTC (permalink / raw)
To: David Woodhouse; +Cc: Ricard Wanderlof, Linux mtd
David Woodhouse wrote:
> On Thu, 2006-11-30 at 07:58 -0500, Glen Johnson wrote:
>
>
> mkfs.jffs2 builds fine for me for FR-V uClinux, although that's
> ELF-FDPIC not flat. Are the relocations in .rodata actually a problem?
>
Yes, it appears to. When I try to execute mkfs.jffs2 on the host
system I get the following error.
BINFMT_FLAT: reloc outside program 0x54e20000 (0 - 0xf57f4/0x11ec0),
killing mkfs.jffs2!
SIGSEGV
> Doesn't m68k have ELF-FDPIC yet?
>
I have the uClinux distribution dated 2006-08-03. I did a grep -r
ELF-FDPID ./ and found it mentioned in the code for the Fujitsu FRV
processor and nothing else. Someone told me he thought it did. But I
do not see it in the code. The compiler does appear to have elf
support according to this line in the output of make, ARCH=m68knommu
CROSS_COMPILE=m68k-elf- this however is Not ELF-FDPIC.
Is there a better way to tell if m68knommu supports ELF-FDPIC?
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-12-05 13:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-28 14:09 Upgrading mtd-utils in uClinux Glen Johnson
2006-11-29 7:43 ` Ricard Wanderlof
2006-11-30 12:58 ` Glen Johnson
2006-12-01 11:21 ` David Woodhouse
2006-12-05 13:30 ` Glen Johnson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).