Building nandsim for Fedora

Bruno Vernay brunovern.a at gmail.com
Tue Dec 2 03:03:42 PST 2014


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??

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.

Regards

>
> --
> Thanks,
> //richard



-- 
Bruno VERNAY



More information about the linux-mtd mailing list