Skip to contentSkip to conversation

latest MTD snapshot

DISCUSSION Luca Contini 3 participants 8 messages Aug 29, 2003 – Sep 1, 2003 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

Hi,
I've downloaded the latest snapshot from the CVS:
mtd-snapshot-20030828.tar.bz2
Since I need only the mtdblock device working I've just copied the snapshot /drivers/mtd content to my /linux/drivers/mtd directory, and the blktrans.h to /include/linux/mtd/.
When I try to compile (using arm-linux-gcc) mtdblock.c I get this warning:
"mtdblock.c:251: warning: implicit declaration of function `unlikely'" and when I try to insert the mtdblock.o module I get:

[arm@Botolo2 mtd]$insmod mtdblock.o mtdblock.o: unresolved symbol unlikely mtdblock.o: unresolved symbol register_mtd_blktrans mtdblock.o: unresolved symbol add_mtd_blktrans_dev mtdblock.o: unresolved symbol deregister_mtd_blktrans mtdblock.o: unresolved symbol del_mtd_blktrans_dev [arm@Botolo2 mtd]$

What Am I missing?

Regards

Luca

#1 lore raw
Quoted 18 lines · Luca Contini

Hi,
I've downloaded the latest snapshot from the CVS:
mtd-snapshot-20030828.tar.bz2
Since I need only the mtdblock device working I've just copied the snapshot /drivers/mtd content to my /linux/drivers/mtd directory, and the blktrans.h to /include/linux/mtd/.
When I try to compile (using arm-linux-gcc) mtdblock.c I get this warning:
"mtdblock.c:251: warning: implicit declaration of function `unlikely'" and when I try to insert the mtdblock.o module I get:

[arm@Botolo2 mtd]$insmod mtdblock.o mtdblock.o: unresolved symbol unlikely mtdblock.o: unresolved symbol register_mtd_blktrans mtdblock.o: unresolved symbol add_mtd_blktrans_dev mtdblock.o: unresolved symbol deregister_mtd_blktrans mtdblock.o: unresolved symbol del_mtd_blktrans_dev [arm@Botolo2 mtd]$

Quoted 1 line

What Am I missing?

1) Which kernel version ?
2) Which compiler version (arm-linux-gcc -v) ?
3) Any particular reason why you don't use the patchin.sh script ? I know, you 'only' need mtdblock, but partial installs tend to create no end of trouble.

HTH,

JDB.

Signature · 2 lines
LART. 250 MIPS under one Watt. Free hardware design files.
http://www.lart.tudelft.nl/
#2 lore raw
Quoted 5 lines
Quoted 4 lines · Luca Contini

Hi,
I've downloaded the latest snapshot from the CVS:
mtd-snapshot-20030828.tar.bz2
Since I need only the mtdblock device working I've just copied the

snapshot

Quoted 1 line
Quoted 1 line

/drivers/mtd content to my /linux/drivers/mtd directory, and the

blktrans.h

Quoted 2 lines
Quoted 2 lines

to /include/linux/mtd/.
When I try to compile (using arm-linux-gcc) mtdblock.c I get this

warning:

Quoted 11 lines
Quoted 11 lines

"mtdblock.c:251: warning: implicit declaration of function `unlikely'" and when I try to insert the mtdblock.o module I get:

[arm@Botolo2 mtd]$insmod mtdblock.o mtdblock.o: unresolved symbol unlikely mtdblock.o: unresolved symbol register_mtd_blktrans mtdblock.o: unresolved symbol add_mtd_blktrans_dev mtdblock.o: unresolved symbol deregister_mtd_blktrans mtdblock.o: unresolved symbol del_mtd_blktrans_dev [arm@Botolo2 mtd]$

Quoted 3 lines
Quoted 1 line

What Am I missing?

1) Which kernel version ?

2.4.18-rmk6-swl6

Quoted 1 line

2) Which compiler version (arm-linux-gcc -v) ?

2.95.2

Quoted 3 lines

3) Any particular reason why you don't use the patchin.sh script ? I know, you 'only' need mtdblock, but partial installs tend to create no end of trouble.

I just thought it was easiest to do it manually just for mtdblock device. I've copied the snapshot to ../linux/drivers/mtd/util/snapshot and tried the patchin.sh:
[root@Lab patches]# patchin.sh
Directory does not exist or is not a kernel source directory

this is the result

May be the location I copied the snapshot to is wrong.

Regards

Quoted 9 lines

HTH,

JDB.

Signature · 2 lines
LART. 250 MIPS under one Watt. Free hardware design files.
http://www.lart.tudelft.nl/
#3 lore raw
Quoted 6 lines · Luca Contini
Quoted 4 lines
Quoted 1 line · Luca Contini

What Am I missing?

1) Which kernel version ?

2.4.18-rmk6-swl6

That's a pretty ancient kernel (almost 18 months old). You may want to retry with 2.4.21-rmk1 (works fine on the LART, which is also arm-based).

Quoted 9 lines
Quoted 3 lines

3) Any particular reason why you don't use the patchin.sh script ? I know, you 'only' need mtdblock, but partial installs tend to create no end of trouble.

I just thought it was easiest to do it manually just for mtdblock device. I've copied the snapshot to ../linux/drivers/mtd/util/snapshot and tried the patchin.sh:
[root@Lab patches]# patchin.sh
Directory does not exist or is not a kernel source directory

You must give it the path to your kernel tree as an argument (as documented on http://www.linux-mtd.infradead.org/).

HTH,

JDB.

Signature · 2 lines
LART. 250 MIPS under one Watt. Free hardware design files.
http://www.lart.tudelft.nl/
#4 lore raw
Quoted 3 lines · J.D. Bakker

That's a pretty ancient kernel (almost 18 months old). You may want to retry with 2.4.21-rmk1 (works fine on the LART, which is also arm-based).

Just "#define unlikely(x) (x)" will suffice, although you may find other problems with a kernel that old.

Quoted 5 lines
Quoted 2 lines

[root@Lab patches]# patchin.sh
Directory does not exist or is not a kernel source directory

You must give it the path to your kernel tree as an argument (as documented on http://www.linux-mtd.infradead.org/).

Urgh. It'll also _tell_ you that for itself now...

hades /home/dwmw2/working/mtd/patches $ ./patchin.sh
usage: ./patchin.sh [-c] [-j] kernelpath
-c -- copy files to kernel tree instead of building links -j -- include jffs2 filesystem

Signature · 1 line
dwmw2
#5 lore raw
In reply to J.D. Bakker
Quoted 6 lines
Quoted 3 lines · Luca Contini
Quoted 3 lines
Quoted 1 line · Luca Contini

What Am I missing?

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

1) Which kernel version ?

2.4.18-rmk6-swl6

That's a pretty ancient kernel (almost 18 months old). You may want to retry with 2.4.21-rmk1 (works fine on the LART, which is also arm-based).

I'll try. But I need a patch from samsung (my board is Samsung SMDK2410 with ARM920T) and I don't know whether the current patch works fine with a newer kernel.

Quoted 7 lines
Quoted 7 lines
Quoted 4 lines

3) Any particular reason why you don't use the patchin.sh script ? I know, you 'only' need mtdblock, but partial installs tend to create no end of trouble.

I just thought it was easiest to do it manually just for mtdblock device. I've copied the snapshot to ../linux/drivers/mtd/util/snapshot and tried

the

Quoted 6 lines
Quoted 3 lines

patchin.sh:
[root@Lab patches]# patchin.sh
Directory does not exist or is not a kernel source directory

You must give it the path to your kernel tree as an argument (as documented on http://www.linux-mtd.infradead.org/).

You are right. It was my mistake. I've correctly (I believe) patched the kernel.
But next, I tried to recompile the kernel and got this message:

drivers/mtd/mtdlink.o: In function `put_mtd_device':
drivers/mtd/mtdlink.o(.text+0x4b8): undefined reference to `BUG_ON' drivers/mtd/mtdlink.o(.text+0x4b8): relocation truncated to fit: R_ARM_PC24 BUG_ON
drivers/mtd/mtdlink.o: In function `nand_scan':
drivers/mtd/mtdlink.o(.text+0x406c): undefined reference to nand_flash_ids' drivers/mtd/mtdlink.o(.text+0x4070): undefined reference to nand_manuf_ids'
make: *** [vmlinux] Error 1
[root@Lab linux]#

Moreover after the patchin.sh was applied, the menuconfig has changed. I cannot see anymore the s3c2410 nand driver. What happened to it?

Regards

Luca

Quoted 9 lines

HTH,

JDB.

Signature · 2 lines
LART. 250 MIPS under one Watt. Free hardware design files.
http://www.lart.tudelft.nl/
#6 lore raw
In reply to J.D. Bakker
Quoted 11 lines
Quoted 6 lines · Luca Contini
Quoted 4 lines
Quoted 1 line · Luca Contini

What Am I missing?

1) Which kernel version ?

2.4.18-rmk6-swl6

That's a pretty ancient kernel (almost 18 months old). You may want to retry with 2.4.21-rmk1 (works fine on the LART, which is also arm-based).

I've tried kernel 2.4.21, but the patch I have from samsung didn't work. So the point is: to make the new MTD subsystem work with my old 2.4.18 kernel. Is it possible and how?

Quoted 7 lines
Quoted 7 lines
Quoted 4 lines

3) Any particular reason why you don't use the patchin.sh script ? I know, you 'only' need mtdblock, but partial installs tend to create no end of trouble.

I just thought it was easiest to do it manually just for mtdblock device. I've copied the snapshot to ../linux/drivers/mtd/util/snapshot and tried

the

Quoted 15 lines
Quoted 3 lines

patchin.sh:
[root@Lab patches]# patchin.sh
Directory does not exist or is not a kernel source directory

You must give it the path to your kernel tree as an argument (as documented on http://www.linux-mtd.infradead.org/).

HTH,

JDB.

Signature · 2 lines
LART. 250 MIPS under one Watt. Free hardware design files.
http://www.lart.tudelft.nl/
#7 lore raw
In reply to Luca Contini
Quoted 2 lines · Luca Contini

[arm@Botolo2 mtd]$insmod mtdblock.o
mtdblock.o: unresolved symbol unlikely

Should be in linux/compiler.h, which should be included from linux/kernel.h. Ancient kernel?

Quoted 4 lines

mtdblock.o: unresolved symbol register_mtd_blktrans mtdblock.o: unresolved symbol add_mtd_blktrans_dev mtdblock.o: unresolved symbol deregister_mtd_blktrans mtdblock.o: unresolved symbol del_mtd_blktrans_dev

insmod mtd_blkdevs.o

Signature · 1 line
dwmw2