Skip to contentSkip to conversation

2.4.18-howto?

DISCUSSION Robert Schwebel 2 participants 5 messages May 3, 2002 – May 7, 2002

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi,

can somebody give me a short pointer what has to be done to patch 2.4.18 with the mtd stuff from cvs? I tried to checkout the main branch and the jffs2-2_4-branch and run patches/patchin.sh, but the kernel breaks. Is there some kind of a howto? I searched in the repository and the mailing list but didn't find anything.

Thanks,

Robert

Signature · 6 lines
 +--------------------------------------------------------+
 | Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de |
 | Pengutronix - Linux Solutions for Science and Industry |
 |   Braunschweiger Str. 79,  31134 Hildesheim, Germany   |
 |    Phone: +49-5121-28619-0 |  Fax: +49-5121-28619-4    |
 +--------------------------------------------------------+
#1 lore raw
Quoted 5 lines · Robert Schwebel

can somebody give me a short pointer what has to be done to patch 2.4.18 with the mtd stuff from cvs? I tried to checkout the main branch and the jffs2-2_4-branch and run patches/patchin.sh, but the kernel breaks. Is there some kind of a howto? I searched in the repository and the mailing list but didn't find anything.

Somehow today the main branch seems to work (yesterday I got lots of warnings and the kernel compilation broke...), so I could compile a kernel with the latest CVS stuff.

Now, I want to compile the utilities. Is it really necessary to copy the utils to the kernel directory? I tried it with the below patch against util/Makefile and 'make KERNELDIR=/path/to/my/kernel', but it breaks here:

----------8<----------
ln -sf /home/robert/embedded/ptxdist-0.1.1/build/linux-2.4.18-rthal5-jffs2/fs/jffs2/compr.c compr.c
cc -I/home/robert/embedded/ptxdist-0.1.1/build/linux-2.4.18-rthal5-jffs2/include -O2 -Wall -Dprintk=printf -DKERN_NOTICE= -c -o compr.o compr.c compr.c: In function `jffs2_decompress':
compr.c:135: warning: implicit declaration of function printf' compr.c:135: KERN_WARNING' undeclared (first use in this function) compr.c:135: (Each undeclared identifier is reported only once compr.c:135: for each function it appears in.)
compr.c:135: parse error before string constant
make: *** [compr.o] Error 1
----------8<----------

... which comes because in compr.c there is no #include <stdio.h> in case of non-kernel code. The whole thing with -Dprintk=printf looks a little bit like a hack, so is there a better way to compile the utilities?

Robert

----------8<----------

Makefile Sat May 4 14:42:12 2002 renamed from Makefile-orig Sat May 4 15:06:34 2002 +2 -2
@@ -3,7 +3,7 @@
 
 # $Id: Makefile,v 1.23 2002/03/03 16:14:24 dwmw2 Exp $
 
-CFLAGS += -I../include -O2 -Wall
+CFLAGS += -I$(KERNELDIR)/include -O2 -Wall
 
 TARGETS = ftl_format erase eraseall nftldump nanddump doc_loadbios \
 nftl_format mkfs.jffs ftl_check nandtest nandwrite mkfs.jffs2 lock unlock
\
@@ -20,7 +20,7 @@
 compr_rubin.o: pushpull.h histo_mips.h compr_rubin.h
 
 $(SYMLINKS):
-       ln -sf ../fs/jffs2/$@ $@
+       ln -sf $(KERNELDIR)/fs/jffs2/$@ $@
 
 mkfs.jffs2: crc32.o compr_rtime.o compr_rubin.o compr.o mkfs.jffs2.o

compr_zlib.o

        $(CC) -o $@ $^ -lz

----------8<----------

Signature · 6 lines
 +--------------------------------------------------------+
 | Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de |
 | Pengutronix - Linux Solutions for Science and Industry |
 |   Braunschweiger Str. 79,  31134 Hildesheim, Germany   |
 |    Phone: +49-5121-28619-0 |  Fax: +49-5121-28619-4    |
 +--------------------------------------------------------+
#2 lore raw
Quoted 3 lines · Robert Schwebel

... which comes because in compr.c there is no #include <stdio.h> in case of non-kernel code. The whole thing with -Dprintk=printf looks a little bit like a hack, so is there a better way to compile the utilities?

... meaning that at the moment they do not compile at all. At the moment I seem to have resolved some of the problem, but I'm stuck here:

----------8<---------- robert@callisto:~/embedded/cvs/mtd/util ! make KERNELDIR=~/embedded/ptxdist-0.1.1/build/linux-2.4.18-rthal5-jffs2 cc -o mkfs.jffs2 crc32.o compr_rtime.o compr_rubin.o compr.o mkfs.jffs2.o compr_zlib.o -lz
compr_rubin.o: In function `encode':
compr_rubin.o(.text+0x88): undefined reference to pushbit' compr_rubin.o: In function end_rubin':
compr_rubin.o(.text+0x124): undefined reference to pushbit' compr_rubin.o: In function rubin_do_compress':
compr_rubin.o(.text+0x3ee): undefined reference to init_pushpull' compr_rubin.o(.text+0x447): undefined reference to pushedbits' compr_rubin.o: In function `rubin_do_decompress':
compr_rubin.o(.text+0x695): undefined reference to init_pushpull' compr.o: In function jffs2_compress':
compr.o(.text+0x1a): undefined reference to zlib_compress' compr.o: In function jffs2_decompress':
compr.o(.text+0xa8): undefined reference to `zlib_decompress'
collect2: ld returned 1 exit status
make: *** [mkfs.jffs2] Error 1
---------->8----------

Where comes pushbit() from? I cannot avoid the impression that I'm doing something significantly wrong...

Robert

Signature · 6 lines
 +--------------------------------------------------------+
 | Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de |
 | Pengutronix - Linux Solutions for Science and Industry |
 |   Braunschweiger Str. 79,  31134 Hildesheim, Germany   |
 |    Phone: +49-5121-28619-0 |  Fax: +49-5121-28619-4    |
 +--------------------------------------------------------+
#3 lore raw
In reply to Robert Schwebel
Quoted 2 lines · Robert Schwebel

can somebody give me a short pointer what has to be done to patch 2.4.18 with the mtd stuff from cvs?

Too trivial...? Should it just work? If I missed a HOWTO please excuse, I've tried hard to find one :) A short pointer would be great.

Is anybody currently able to compile the utilities?

Robert

Signature · 6 lines
 +--------------------------------------------------------+
 | Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de |
 | Pengutronix - Linux Solutions for Science and Industry |
 |   Braunschweiger Str. 79,  31134 Hildesheim, Germany   |
 |    Phone: +49-5121-28619-0 |  Fax: +49-5121-28619-4    |
 +--------------------------------------------------------+
#4 lore raw
Quoted 8 lines · Robert Schwebel
Quoted 2 lines · Robert Schwebel

can somebody give me a short pointer what has to be done to patch 2.4.18 with the mtd stuff from cvs?

Too trivial...? Should it just work? If I missed a HOWTO please excuse, I've tried hard to find one :) A short pointer would be great.

Is anybody currently able to compile the utilities?

Yep, I just type make in the util directory and they compile without complains. I get the code out of CVS enter the directory patches, do .patchin.sh with my kernel directory as argument, then change to util, type make and that's it.

Signature · 4 lines
Thomas
___________________________________
autronix automation GmbH
http://www.autronix.de [email protected]