Building nandsim for Fedora

Richard Weinberger richard at nod.at
Tue Dec 2 03:14:02 PST 2014


Am 02.12.2014 um 12:03 schrieb Bruno Vernay:
> On Mon, Dec 1, 2014 at 8:16 PM, Richard Weinberger
> <richard.weinberger at gmail.com> wrote:
>> On Mon, Dec 1, 2014 at 6:23 PM, Bruno Vernay <brunovern.a at gmail.com> wrote:
>>> Hi,
>>>
>>> I would like to mount a UBI  image, and for this I need "nandsim", but
>>> it is not available on Fedora.
>>> I can't even find a RPM for the sources.
>>>
>>> I would like to get the sources for nandsim, it seems that the repository is
>>> http://git.infradead.org/linux-mtd.git/tree/HEAD:/drivers/mtd/nand
>>>
>>> But I am not even sure, if it is the right place to start ???
>>
>> nandsim is a Linux kernel module.
> 
> So ... it means that this list is not the right place and I should go
> to the kernel sources to find this module??

The list is kind of correct. :-)

> I tried to download
> http://git.infradead.org/linux-mtd.git/blob_plain/HEAD:/drivers/mtd/nand/nandsim.c
>  and used
> This Makefile (http://www.cyberciti.biz/tips/compiling-linux-kernel-module.html):
> obj-m = nandsim.o
> KVERSION = $(shell uname -r)
> all:
> make -C /lib/modules/$(KVERSION)/build M=$(PWD) modules
> clean:
> make -C /lib/modules/$(KVERSION)/build M=$(PWD) clean
> 
> make -C /lib/modules/3.17.3-200.fc20.x86_64/build
> M=/home/bruno/dev/mtd-utils/reb modules
> make[1]: Entering directory `/usr/src/kernels/3.17.3-200.fc20.x86_64'
>   CC [M]  /home/bruno/dev/mtd-utils/reb/nandsim.o
>   Building modules, stage 2.
>   MODPOST 1 modules
> WARNING: "nand_release" [/home/bruno/dev/mtd-utils/reb/nandsim.ko] undefined!
> WARNING: "nand_scan_tail" [/home/bruno/dev/mtd-utils/reb/nandsim.ko] undefined!
> WARNING: "nand_scan_ident" [/home/bruno/dev/mtd-utils/reb/nandsim.ko] undefined!
>   CC      /home/bruno/dev/mtd-utils/reb/nandsim.mod.o
>   LD [M]  /home/bruno/dev/mtd-utils/reb/nandsim.ko
> make[1]: Leaving directory `/usr/src/kernels/3.17.3-200.fc20.x86_64'
> 
> 
> But then:
> sudo insmod nandsim.ko first_id_byte=0x20 second_id_byte=0x33
> insmod: ERROR: could not insert module nandsim.ko: Unknown symbol in module
> 
> I am stuck here.

On Linux you can only use/load kernel modules which match *exactly* you kernel.
IOW if you use the Fedora kernel you'll have to use their nandsim.ko.
In case they don't build it you have to rebuild the kernel.

Thanks,
//richard



More information about the linux-mtd mailing list