LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   Is it needed to build target kernel with MTD when i am having these for my board? (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/is-it-needed-to-build-target-kernel-with-mtd-when-i-am-having-these-for-my-board-4175526081/)

ayyasprings 11-21-2014 08:11 AM

Is it needed to build target kernel with MTD when i am having these for my board?
 
Hi,

For my board if I am having the following:

1) Uboot bootloader with that I can partition the NAND memory, required for kernel,root filesystem, filesystem for user data.
2) If I can erase the memory using boot loader commands and write data/image files using boot loader commands specifying the address.
3) If I can use serial port to transfer any files in user filesystem using terminal emulators like Kermit-C, cu, minicom.
4) If I can flash the bootloader used for these tasks with Jtag Flasher provided with the vendor.
5) If I have udev/mdev in installed in target board's root filesystem.

things provided above,

a) do I have to build my target kernel for my board with MTD support?
b) do I have to create device entries in /dev folder of target root filesystem with names /dev/mtdX (char device entries),or /dev/nftlLN ( Nand Flash Translation Layer device entries)?

Please reply!

eSelix 11-25-2014 11:29 AM

Kernel needs access to data stored in NAND memory for example root file system to load "init", so obviously it needs driver for that: "mtd". You do not create /dev/mtd* nodes. Kernel should create it automatically during creation of MTD partitions.

ayyasprings 11-26-2014 02:17 AM

As you mentioned like this

Code:

You do not create /dev/mtd* nodes. Kernel should create it automatically during creation of MTD partitions.
I am referring the Building Embedded Linux Systems book by Karim Yaghmour.In that it shows some scripts to create nodes to populate root filesystem unless we are using udev/mdev.

Please clarify that.

And also when will the NAND flash translation layer nodes will be required. Is it mandatory like /dev/mtd* ?

Please reply!

eSelix 11-26-2014 09:36 AM

Yes, if your system does not use udev or mdev, etc. then you need to create it that way. Nodes in /dev need to be created somehow. You can create it staticaly by mknod and scripts or it could be created dynamically using udev/mdev or kernel can create it by itself using devtmpfs or other method. NFTL as the name suggest is a transation layer for flash memory, it is not needed if you do not need access flash like regular hard disk, "mtd" is sufficient to read data by system.

ayyasprings 11-27-2014 03:44 AM

Hi,

Do the uboot's nand flash related commands like nandinfo,nandbad, nandwrite, nanderase,etc,.. use Nand Flash Translation Layer driver to access the flash memory, ie) will those commands see flash memory as /dev/nftlLN devices?

Please reply!

eSelix 11-28-2014 04:27 AM

No, these are special tools to write memory and use mtd. You most probably do not want or need NFTL.

ayyasprings 11-28-2014 05:58 AM

Hi,

If there any source of reference to check where NFTL,INFTL, FTL, RFD FTL, and SmartMedia FTL are applicable please share that.

I could not find those details in the following link dedicated for MTD:

http://www.linux-mtd.infradead.org/source.html

I want to have ideas about that by exploring where they are applicable.

Please reply!

eSelix 12-05-2014 04:27 AM

It depends on what you want to do with flash memory. If you want to store there bootloader, kernel and system and not need to very often change contents that cannot be cached in RAM then you do not need any FTL.


All times are GMT -5. The time now is 05:54 PM.