undefined reference to 'crc32' ?
Hi there,
I am using linux 2.4.20 on a powerpc platform.
I just pulled the recent CVS, run patchin.sh on it and tried to build a new kernel image.
But I get load of these:
ppc_8xx-ld -T arch/ppc/vmlinux.lds -Ttext 0xc0000000 -Bstatic arch/ppc/kernel/head_8xx.o init/main.o init/version.o init/do_mounts.o \
--start-group \
arch/ppc/kernel/kernel.o arch/ppc/platforms/platform.o arch/ppc/mm/mm.oarch/ppc/lib/lib.o kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o arch/ppc/math-emu/math-emu.o \
drivers/char/char.o drivers/block/block.o drivers/misc/misc.odrivers/net/net.o drivers/media/media.o drivers/ide/idedriver.o drivers/mtd/mtdlink.o drivers/pcmcia/pcmcia.o drivers/macintosh/macintosh.o
arch/ppc/8xx_io/8xx_io.o \
net/network.o \
/home/scholz/Projekte/linuxppc-2.4.20/lib/lib.a \
--end-group \
-o vmlinuxfs/fs.o: In function `jffs2_symlink':
fs/fs.o(.text+0x69194): undefined reference to crc32' fs/fs.o(.text+0x69194): relocation truncated to fit: R_PPC_REL24 crc32 fs/fs.o(.text+0x691b4): undefined reference to crc32' fs/fs.o(.text+0x691b4): relocation truncated to fit: R_PPC_REL24 crc32 fs/fs.o(.text+0x691c8): undefined reference to crc32' fs/fs.o(.text+0x691c8): relocation truncated to fit: R_PPC_REL24 crc32 fs/fs.o(.text+0x6933c): undefined reference to crc32' fs/fs.o(.text+0x6933c): relocation truncated to fit: R_PPC_REL24 crc32 fs/fs.o(.text+0x69388): undefined reference to crc32' fs/fs.o(.text+0x69388): relocation truncated to fit: R_PPC_REL24 crc32 fs/fs.o(.text+0x6939c): more undefined references to crc32' follow fs/fs.o: In function `jffs2_symlink':
....
What could that be?
crc32.o got build...
Quoted 1 line
ls -l
fs/jffs2/crc32.o
-rw-r--r-- 1 scholz devel 1736 Nov 29 21:07 fs/jffs2/crc32.o
Thanks,
Steven
Quoted 7 lines · Steven Scholz
Hi there,
I am using linux 2.4.20 on a powerpc platform.
I just pulled the recent CVS, run
patchin.shon it and tried to build a new kernel image.
But I get load of these:
patchin.sh was overhauled. Did you use patchin.sh with the -j option to include jffs(2) filesystems ?
Signature · 5 lines
Thomas ____________________________________________________ linutronix - competence in embedded & realtime linux http://www.linutronix.de mail: [email protected]
CVS JFFS2 assumes that crc32() is avialable as a generic function. You need my crc32 backport from 2.5 to 2.4. It's somewhere in the MTD archives(I think). I don't have it handy ATM.
Jocke
Quoted 51 lines
Hi there,
I am using linux 2.4.20 on a powerpc platform.
I just pulled the recent CVS, run
patchin.shon it and tried to build a new kernel image.
But I get load of these:ppc_8xx-ld -T
arch/ppc/vmlinux.lds-Ttext0xc0000000-Bstaticarch/ppc/kernel/head_8xx.oinit/main.oinit/version.oinit/do_mounts.o\
--start-group \
arch/ppc/kernel/kernel.oarch/ppc/platforms/platform.oarch/ppc/mm/mm.oarch/ppc/lib/lib.okernel/kernel.omm/mm.ofs/fs.oipc/ipc.oarch/ppc/math-emu/math-emu.o\
drivers/char/char.odrivers/block/block.odrivers/misc/misc.odrivers/net/net.odrivers/media/media.odrivers/ide/idedriver.odrivers/mtd/mtdlink.odrivers/pcmcia/pcmcia.odrivers/macintosh/macintosh.oarch/ppc/8xx_io/8xx_io.o \ net/network.o \ /home/scholz/Projekte/linuxppc-2.4.20/lib/lib.a \ --end-group \ -o vmlinux
fs/fs.o: In function `jffs2_symlink':
fs/fs.o(.text+0x69194): undefined reference tocrc32' fs/fs.o(.text+0x69194): relocation truncated to fit: R_PPC_REL24 crc32 fs/fs.o(.text+0x691b4): undefined reference tocrc32' fs/fs.o(.text+0x691b4): relocation truncated to fit:R_PPC_REL24crc32 fs/fs.o(.text+0x691c8): undefined reference tocrc32' fs/fs.o(.text+0x691c8): relocation truncated to fit: R_PPC_REL24 crc32 fs/fs.o(.text+0x6933c): undefined reference tocrc32' fs/fs.o(.text+0x6933c): relocation truncated to fit:R_PPC_REL24crc32 fs/fs.o(.text+0x69388): undefined reference tocrc32' fs/fs.o(.text+0x69388): relocation truncated to fit: R_PPC_REL24 crc32 fs/fs.o(.text+0x6939c): more undefined references tocrc32' followfs/fs.o: In function `jffs2_symlink':
....What could that be?
crc32.o got build...Quoted 1 line
ls -l
fs/jffs2/crc32.o-rw-r--r-- 1 scholz devel 1736 Nov 29 21:07
fs/jffs2/crc32.oThanks,
Steven
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Quoted 2 lines
CVS JFFS2 assumes that
crc32()is avialable as a generic function. You need my crc32 backport from 2.5 to 2.4. It's somewhere in the MTD archives(I think). I don't have it handy ATM.
Oops, don't think I ever sent it to this list. I grabbed it again from my CVS. I hope it still applies.
Jocke
Index: kernel/linuxppc/drivers/net/Makefile.lib
linuxppc/drivers/net/Makefile.lib Fri Nov 15 17:37:58 2002 renamed from dev/null Sun Dec 1 00:10:51 2002 +69 -0
@@ -0,0 +1,69 @@ +# These drivers all require crc32.o +obj-$(CONFIG_8139CP) += crc32.o +obj-$(CONFIG_8139TOO) += crc32.o +obj-$(CONFIG_A2065) += crc32.o +obj-$(CONFIG_ARM_AM79C961A) += crc32.o +obj-$(CONFIG_AT1700) += crc32.o +obj-$(CONFIG_ATP) += crc32.o +obj-$(CONFIG_DE2104X) += crc32.o +obj-$(CONFIG_DE4X5) += crc32.o +obj-$(CONFIG_DECLANCE) += crc32.o +obj-$(CONFIG_DEPCA) += crc32.o +obj-$(CONFIG_DL2K) += crc32.o +obj-$(CONFIG_DM9102) += crc32.o +obj-$(CONFIG_EPIC100) += crc32.o +obj-$(CONFIG_EWRK3) += crc32.o +obj-$(CONFIG_FEALNX) += crc32.o +obj-$(CONFIG_HAPPYMEAL) += crc32.o +obj-$(CONFIG_MACE) += crc32.o +obj-$(CONFIG_MACMACE) += crc32.o +obj-$(CONFIG_MIPS_AU1000_ENET) += crc32.o +obj-$(CONFIG_NATSEMI) += crc32.o +obj-$(CONFIG_PCMCIA_FMVJ18X) += crc32.o +obj-$(CONFIG_PCMCIA_SMC91C92) += crc32.o +obj-$(CONFIG_PCMCIA_XIRTULIP) += crc32.o +obj-$(CONFIG_PCNET32) += crc32.o +obj-$(CONFIG_SIS900) += crc32.o +obj-$(CONFIG_SMC9194) += crc32.o +obj-$(CONFIG_ADAPTEC_STARFIRE) += crc32.o +obj-$(CONFIG_SUNBMAC) += crc32.o +obj-$(CONFIG_SUNDANCE) += crc32.o +obj-$(CONFIG_SUNGEM) += crc32.o +obj-$(CONFIG_SUNGEM) += crc32.o +obj-$(CONFIG_SUNLANCE) += crc32.o +obj-$(CONFIG_SUNQE) += crc32.o +obj-$(CONFIG_TULIP) += crc32.o +obj-$(CONFIG_VIA_RHINE) += crc32.o +obj-$(CONFIG_YELLOWFIN) += crc32.o +obj-$(CONFIG_WINBOND_840) += crc32.o + + +# These rely on drivers/net/7990.o which requires crc32.o +obj-$(CONFIG_HPLANCE) += crc32.o +obj-$(CONFIG_MVME147_NET) += crc32.o + + +# These rely on drivers/net/8390.o which requires crc32.o +obj-$(CONFIG_OAKNET) += crc32.o +obj-$(CONFIG_NE2K_PCI) += crc32.o +obj-$(CONFIG_STNIC) += crc32.o +obj-$(CONFIG_MAC8390) += crc32.o +obj-$(CONFIG_APNE) += crc32.o +obj-$(CONFIG_PCMCIA_PCNET) += crc32.o +obj-$(CONFIG_ARM_ETHERH) += crc32.o +obj-$(CONFIG_WD80x3) += crc32.o +obj-$(CONFIG_EL2) += crc32.o +obj-$(CONFIG_NE2000) += crc32.o +obj-$(CONFIG_NE2_MCA) += crc32.o +obj-$(CONFIG_HPLAN) += crc32.o +obj-$(CONFIG_HPLAN_PLUS) += crc32.o +obj-$(CONFIG_ULTRA) += crc32.o +obj-$(CONFIG_ULTRAMCA) += crc32.o +obj-$(CONFIG_ULTRA32) += crc32.o +obj-$(CONFIG_E2100) += crc32.o +obj-$(CONFIG_ES3210) += crc32.o +obj-$(CONFIG_LNE390) += crc32.o +obj-$(CONFIG_NE3210) += crc32.o +obj-$(CONFIG_AC3200) += crc32.o +obj-$(CONFIG_ARIADNE2) += crc32.o +obj-$(CONFIG_HYDRA) += crc32.o
Index: kernel/linuxppc/drivers/usb/Makefile.lib
linuxppc/drivers/usb/Makefile.lib Fri Nov 15 17:37:58 2002 renamed from dev/null Sun Dec 1 00:10:52 2002 +1 -0
@@ -0,0 +1 @@ +obj-$(CONFIG_USB_CATC) += crc32.o
Index: kernel/linuxppc/fs/Makefile.lib
linuxppc/fs/Makefile.lib Fri Nov 15 17:37:58 2002 renamed from dev/null Sun Dec 1 00:10:52 2002 +2 -0
@@ -0,0 +1,2 @@ +obj-$(CONFIG_JFFS2_FS) += crc32.o +obj-$(CONFIG_EFI_PARTITION) += crc32.o
Index: kernel/linuxppc/include/linux/crc32.h
linuxppc/include/linux/crc32.h Fri Nov 15 17:37:58 2002 renamed from linuxppc/include/linux/crc32.h:1.1.1.1 Fri Nov 1 14:44:27 2002 +7 -39
56 lines not on this page · raw message
Index: kernel/linuxppc/lib/Config.in
linuxppc/lib/Config.in Fri Nov 15 17:37:59 2002 renamed from linuxppc/lib/Config.in:1.1.1.1 Fri Nov 1 14:44:56 2002 +2 -0
@@ -4,6 +4,8 @@ mainmenu_option next_comment comment 'Library routines' +tristate 'CRC32 functions' CONFIG_CRC32 + # # Do we need the compression support? #
Index: kernel/linuxppc/lib/Makefile
linuxppc/lib/Makefile Fri Nov 15 17:37:59 2002 renamed from linuxppc/lib/Makefile:1.1.1.1 Fri Nov 1 14:44:56 2002 +9 -0
@@ -20,8 +20,17 @@ obj-y += dec_and_lock.o endif +obj-$(CONFIG_CRC32) += crc32.o +# make sure to always unroll the crc32 loops. It's a major +# performance advantage and it only costs 600-700 bytes in extra size +CFLAGS_crc32.o := -funroll-loops + subdir-$(CONFIG_ZLIB_INFLATE) += zlib_inflate subdir-$(CONFIG_ZLIB_DEFLATE) += zlib_deflate + +include $(TOPDIR)/drivers/net/Makefile.lib +include $(TOPDIR)/drivers/usb/Makefile.lib +include $(TOPDIR)/fs/Makefile.lib # Include the subdirs, if necessary. obj-y += $(join $(subdir-y),$(subdir-y:%=/%.o))
Index: kernel/linuxppc/lib/crc32.c
linuxppc/lib/crc32.c Mon Nov 25 13:16:51 2002 renamed from dev/null Sun Dec 1 00:10:52 2002 +683 -0
683 lines not on this page · raw message
Quoted 3 lines · Joakim Tjernlund
CVS JFFS2 assumes that
crc32()is avialable as a generic function. You need my crc32 backport from 2.5 to 2.4. It's somewhere in the MTD archives(I think). I don't have it handy ATM.
I had no 2.4.20 kernel available, when I overhauled patchin.sh. I did not realize that 2.4.19 had include/linux/crc32.h also available.
I changed patchin.sh so it supports those kernels too.
cvs up
Signature · 5 lines
Thomas ____________________________________________________ linutronix - competence in embedded & realtime linux http://www.linutronix.de mail: [email protected]
Thomas, Jocke,
Thanks for you replies!
I was away from keyboard for a few days. Back now. I'll try it again later today.
Cheers,
Steven
Quoted 9 lines · Thomas Gleixner
Quoted 3 lines · Joakim Tjernlund
CVS JFFS2 assumes that
crc32()is avialable as a generic function. You need my crc32 backport from 2.5 to 2.4. It's somewhere in the MTD archives(I think). I don't have it handy ATM.I had no 2.4.20 kernel available, when I overhauled
patchin.sh. I did not realize that 2.4.19 hadinclude/linux/crc32.halso available.I changed
patchin.shso it supports those kernels too.
Hi,
I updated to the latest CVS this morning.
The problem with include/linux/crc32.h is solved. Thanks very much!
But, now I am having trouble with the new (rebuilt) mkfs.jffs2!!! It looks like a endian problem:
I invoked mkfs.jffs2 as usual from within a script with:
mkfs.jffs2 -d $TMP -o flashdisk.jffs2 -b -p
But now I get loads of
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010000: 0x8519 insteadjffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010004: 0x0709 insteadjffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010008: 0x4137 insteadjffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0001000c: 0x1600 insteadjffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010010: 0x1c00 insteadjffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010014: 0xed81 instead
So "-b" seems not to be working... ???
My old version of mkfs.jffs2 is still wotking correctly!!!
Any ideas?
Thanks,
Steven