Skip to contentSkip to conversation

Problems making jffs2 utils

DISCUSSION John Burch 7 participants 10 messages Apr 7, 2003 – Apr 10, 2003 Memory technology devices (MTD)

lore
Share & tools
lore

John Burch

author
#0 lore raw

I'm running into compiler errors when trying to build the jffs2 utilities for a 2.4.17/mips target. I've checked out the latest mtd code according to www.linux-mtd.infradead.org, then have followed the instructions in the mtd/util/README file (copied mtd/util contents to directory under linux root and changed $CROSS as necessary since I'm cross-compiling to mips). I cd to <mips-kernel-path>/linux/utils and do a make, but get errors immediately, which typically include the following (depending on which util I'm trying to make)...

.../libc.so.6: undefined reference to 'no symbol'
.../mips-linux-ld: cannot find -lz

I'm really only after 'erase' and maybe 'jffs2reader' for use on my mips embedded target; I already have mkfs.jffs2 as an x86 binary for my x86 development platform. Any ideas, or better place for me to post this question?

John

#1 lore raw

Hi John,

I have a similar system, embedded mips based, and here is the changed Makefile for the util directory that I used. I hope this helps.

Earl Manning

Quoted 23 lines · On Mon, 7 Apr 2003 14:50:49 -0400 "John Burch" <[email protected]> wrote:

I'm running into compiler errors when trying to build the jffs2 utilities for a 2.4.17/mips target. I've checked out the latest mtd code according to www.linux-mtd.infradead.org, then have followed the instructions in the mtd/util/README file (copied mtd/util contents to directory under linux root and changed $CROSS as necessary since I'm cross-compiling to mips). I cd to <mips-kernel-path>/linux/utils and do a make, but get errors immediately, which typically include the following (depending on which util I'm trying to make)...

.../libc.so.6: undefined reference to 'no symbol'
.../mips-linux-ld: cannot find -lz

I'm really only after 'erase' and maybe 'jffs2reader' for use on my mips embedded target; I already have mkfs.jffs2 as an x86 binary for my x86 development platform. Any ideas, or better place for me to post this question?

John

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

#4 lore raw
In reply to John Burch
Quoted 10 lines · John Burch

I'm running into compiler errors when trying to build the jffs2 utilities for a 2.4.17/mips target. I've checked out the latest mtd code according to www.linux-mtd.infradead.org, then have followed the instructions in the mtd/util/README file (copied mtd/util contents to directory under linux root and changed $CROSS as necessary since I'm cross-compiling to mips). I cd to <mips-kernel-path>/linux/utils and do a make, but get errors immediately, which typically include the following (depending on which util I'm trying to make)...

Quoted 2 lines

.../libc.so.6: undefined reference to 'no symbol'
.../mips-linux-ld: cannot find -lz

You need the common zlib patch, it should be on www.kernel.org somewhere under people/dwmw2.

Jörn

Signature · 2 lines
Data expands to fill the space available for storage.
-- Parkinson's Law
#5 lore raw

Re: mtd irc

Has this moved?

I can no longer connect to irc.openprojects.net

Thanx

-- CHarles

#6 lore raw

Re: mtd irc

Hi Charles,

The server "irc.openprojects.net" is no more. Most if not all irc channels there moved to this server "irc.freenode.net"

Quoted 4 lines · Charles Manning

Has this moved?

I can no longer connect to irc.openprojects.net

Quoted 9 lines

Thanx

-- CHarles

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

Have fun,

Conn Clark

Signature · 16 lines
*****************************************************************
  If you live at home long enough, your parents will move out.
 (Warning they may try to sell their house out from under you.)
*****************************************************************

Conn Clark
Engineering Stooge				[email protected]
Electronic Systems Technology Inc.		www.esteem.com

Stock Ticker Symbol				ELST

"[email protected]" Copyright 2000 By Electronic Systems Technology
 This email address may be used to communicate to Conn Clark
 provided it is not being used for advertisement purposes, unless
 prior written consent is given. This email address may not be
 sold under any circumstances. All other rights reserved.
#9 lore raw
In reply to John Burch
Quoted 1 line · John Burch

.../mips-linux-ld: cannot find -lz

You need zlib compiled for the target and available in the toolchain sys-root.

Signature · 1 line
dwmw2
author
#7 lore raw
In reply to Jörn Engel

Several questions...

1. Even to build 'erase' only, one still needs zlib?
2. I can't seem to track down the 'common zlib patch' you refer to. Is this a special patch in support of mtd, or a general patch for zlib (such that if I get the latest zlib I wouldn't need the patch)?
3. Is the patch particular to a specific version of zlib?
4. Can my target zlib version differ from the host zlib version without causing problems?

Thanks,
John

Quoted 21 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Jörn Engel
Sent: Monday, April 07, 2003 2:53 PM
To: John Burch
Cc: 'Mtd'
Subject: Re: Problems making jffs2 utils

Quoted 3 lines · John Burch

I'm running into compiler errors when trying to build the jffs2 utilities for a 2.4.17/mips target. I've checked out the

latest mtd

Quoted 1 line

code according to www.linux-mtd.infradead.org, then have

followed the

Quoted 1 line

instructions in the mtd/util/README file (copied mtd/util

contents to

Quoted 1 line

directory under linux root and changed $CROSS as necessary

since I'm

Quoted 1 line

cross-compiling to mips). I cd to

Quoted 8 lines

<mips-kernel-path>/linux/utils and

Quoted 5 lines

do a make, but get errors immediately, which typically include the following (depending on which util I'm trying to make)...

.../libc.so.6: undefined reference to 'no symbol'
.../mips-linux-ld: cannot find -lz

You need the common zlib patch, it should be on

www.kernel.org somewhere under people/dwmw2.

Jörn

Signature · 6 lines
Data expands to fill the space available for storage.
-- Parkinson's Law

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
#8 lore raw
Quoted 2 lines · John Burch

1. Even to build 'erase' only, one still needs zlib?

No, that shouldn't be the case.

Quoted 3 lines

2. I can't seem to track down the 'common zlib patch' you refer to. Is this a special patch in support of mtd, or a general patch for zlib (such that if I get the latest zlib I wouldn't need the patch)?

Dammit! I was stupid, confused or worse and didn't read the work "utils" in your mail. Others got it right, so I hoped this would go unnoticed. You didn't have to rub it in.

Forget the common zlib, you only need it for the kernel.

Quoted 3 lines

3. Is the patch particular to a specific version of zlib?
4. Can my target zlib version differ from the host zlib version without causing problems?

see above. Sorry about that.

Jörn

Signature · 2 lines
And spam is a useful source of entropy for /dev/random too!
-- Jasmine Strong
author
#2 lore raw
In reply to Earl Manning
Quoted 6 lines

I have a similar system, embedded mips based, and here is the changed Makefile for the util directory that I used. I hope this helps.

Earl Manning

Two things...

1. Your makefile helped, but the static 'erase' binary is nearly 2MB (0.5MB stripped); I need this for the target and can't afford that much space. When I add '-shared' to CFLAGS, 'erase' is down to a manageable size, but then I see that the libc.so.6 (libc-2.2.5.so) that it needs is over 5MB (1.6M stripped). Still too big. Are there other solutions for erasing or for library?

2. Also, I'm still getting...

"undefined reference to: 'cpu_to_je16'" and
"undefined reference to: 'cpu_to_je32'"

errors when building eraseall.c. It seems it uses these, but the only place I see them defined (as macros) is in mkfs.jffs2.c. I could always just duplicate those from mkfs.jffs2 and put them into eraseall, but I'm wondering if there are other issues involved.

John

Quoted 34 lines
Quoted 2 lines · On Mon, 7 Apr 2003 14:50:49 -0400 "John Burch" <[email protected]> wrote:

I'm running into compiler errors when trying to build the jffs2 utilities for a 2.4.17/mips target. I've checked out the

latest mtd

Quoted 1 line

code according to www.linux-mtd.infradead.org, then have

followed the

Quoted 1 line

instructions in the mtd/util/README file (copied mtd/util

contents to

Quoted 1 line

directory under linux root and changed $CROSS as necessary

since I'm

Quoted 1 line

cross-compiling to mips). I cd to

<mips-kernel-path>/linux/utils and

Quoted 8 lines

do a make, but get errors immediately, which typically include the following (depending on which util I'm trying to make)...

.../libc.so.6: undefined reference to 'no symbol'
.../mips-linux-ld: cannot find -lz

I'm really only after 'erase' and maybe 'jffs2reader' for use on my mips embedded target; I already have mkfs.jffs2 as an x86

binary for

Quoted 9 lines

my x86 development platform. Any ideas, or better place for me to post this question?

John

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

#3 lore raw
Quoted 2 lines

over 5MB (1.6M stripped). Still too big. Are there other solutions for erasing or for library?

Try another library but glibc, e.g. uclibc