This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Very basic questions concerning linux kernel and file system

Other Parts Discussed in Thread: OMAP3530

Hello,
Well, I already spent some hours with my Omap3EVM and the beagleboard but I still do not have a complete overview.
I dont know whether this is the right place to post my basic understandings/misunderstandings but I will give it a try anyway.

So, what I am actually worrying about are things like uImage,Kernel,NFS,Ramdisk,JFFS2...

When I turn on my OMAP3EVM a little program which is stored in a boot-rom (thus it can never be deleted) calls the x-loader (which is located in the NAND-FLASH, we have flashed it there using the Download-Utility). Thereafter, the x-loader is copied to RAM and gets executed which then calls the boot-loader (which is also stored in NAND-Flash). So far so, good.

The boot-loader can do a lot of different things and it knows what to do by looking at the boot arguments which we set and modify with commands like setenv and so on. I suppose that these boot-arguments are also stored in NAND Flash.

I guess I'm right when I say that we can tell the bootloader how and from where to boot the linux-kernel?!
By the way: uImage is the compiled and compressed linux-kernel, right?!

I think that there are two possibilities to get the uImage:
Either it is located on a SD-Card and must be copied to RAM or it is stored directly in the NAND-Flash and is copied from there to RAM, right?

Once uncompressed and copied to RAM the kernel starts to boot. When using my OMAP3EVM I prepared a directory on my host to be used as NFS file-system on the target. I'm sorry to ask such a basic question but what actually is a file-system? Simply the structure of all directories and folders(home,dev,usr,lib,...)?
I guess so, but dont hesitate to correct me if I'm wrong. So in my case, the kernel comes from NAND, and the files and folders are located on my host computer (and thus still exist after i restart the whole system). That is what we call a NFS file-system right?
Am I right, when claiming that our whole system consists of the kernel and that file-system?

Next, I dont really have a detailed idea on what the Ramdisk Image is. I would assume that it is the same file-system, but this time it is located in the OMAP3EVM's RAM instead on my host machine, am I right? If so, how does it work. Do we flash the RAMDISK into the NAND and the bootloader copies it to RAM?
Then I would conclude that changes (like new files, folders, etc...) would be discarded when we restart the whole system, because the filesystem is nested in RAM which looses its data on power down. Furthermore, what is the difference between full/minimal ramdisk?

The last thing I'm worrying about is the JFFS2 File System. Does that mean that using JFFS2 File system, the file system itself remains in NAND Flash?!
Then I would assume that I access the NAND-Flash each time I create/delete file/folders ?!


I would really appreciate if you could confirm/correct my statements here.
Regards,
Maik

  • Maik,

    It sounds like you pretty much have the big picture here. There are actually two different bootloaders, x-loader and u-boot.  x-loader is copied to RAM first and then it will load u-boot into RAM and execute it.  From u-boot you can load your uImage and start Linux running. Typing help from the u-boot prompt will list all the capabilities of u-boot.

    As you mention the uImage and the root file system go hand in hand. You need both to do any real work. The file system is a collection of files and directories which an operating system operates on to move data between different types of memory. In the case of Linux, there is an expected directory tree structure with root level files such as you mention, (home, dev, usr, lib, etc, ...)

    There are different ways to get the uImage into the fast SDRAM of the OMAP3530. You mentioned putting the uImage an SD card, then you can use the (mmcinit, and fatload) capabilities of u-boot to load the image into RAM. You can also flash the uImage into NAND, another possible method is to use TFTP to copy the uImage from your host Linux computer via ethernet into SDRAM. You can have both your uImage and file system located on your linux host.  That setup can be a quick way to compile an application and put it in to your file system and test.

    A ramdisk is a compressed root file system which is volatile (lost on power down), and loaded directly in to RAM.  The big benfit here is that it will be fast, the downside is you are limited by the size of RAM on your system and the fact you lose data on power down. Since there is usually limited RAM on any system, both a minimal and a full ramdisk are provided.  The minimal ramdisk would be a subset of the full ramdisk.  If you build your own root file system, you can add as many or as little features as you require. Here is a wiki page with a bunch of file system information: http://wiki.davincidsp.com/index.php/Category:File_system

    There is a "Getting Started Guide" that comes with the OMAP3EVM SDK that describes how to download your uImage or ramdisk.gz into FLASH.  This guide also will tell you how to setup your NFS file system and show the necessary u-boot commands needed to boot up in the various configurations.

    jffs2 is a particular type of file system designed particularly for FLASH memory. Unlike ramdisk, it would be non-volatile. Here is a better description: http://tiexpressdsp.com/index.php/Create_a_JFFS2_Target_Image

    I hope this explanation helps to make things more clear.

    Regards,

    Jeff

  • Thank you very much, things are clear now [:)]

    Regards,

    Maik

  • Hey Jeff,

    Hopefully, you wouldn't mind if i ask a further question about another unclear thing that just crossed my mind.
    Up to now, I have that uImage and my filesystem. Thus, i can power on the board, linux boots and i can work on the standard console. However, there is absolutely no Graphical User Interface. Am I right with the assumption that linux-distributions like Angstrom, Android, etc... are just let's say "Graphical layers"?

    Thus, is it possible that I create my own kernel with menuconfig as explained in the OMAP35x EVM User's Guide V0.9.7
    (i asked about that issue in another thread: http://e2e.ti.com/forums/p/6652/26718.aspx#26718 ) and use this specific kernel with Android or any other distro?

    or does any distribution always comes with it's own specific kernel?

     

    Thanks again in advance!

    Best regards,

    Maik

  • Hi Maik,

    Menuconfig is a graphical tool that runs on your host machine that allows you to set kernel configurations. The output of menuconfig is a file - (.config). The (.config) file is used while building the kernel.  With any Linux distribution you can modify the kernel to meet your needs using menuconfig.  You can include drivers or different variation of drivers, you can make drivers either compiled directly into your kernel (uImage) or build them as modules that can be linked in later to the specific kernel they were built with.

    The Linux distributions which support OMAP3530 should contain Graphics drivers.  However, generally you will boot up and use a standard console. You can build your own applications that utilize a graphical user interface. It is also possible to automatically start these application after boot up, so it would appear your EVM is running a graphical user interface.

    Again I hope this answer is what you were looking for.

    Best Regards,

    Jeff

  • Yep, that's clear again. [:)]

     

    A bit off-topic by now but interesting for me:

    Jeff L said:
    You can build your own applications that utilize a graphical user interface. It is also possible to automatically start these application after boot up, so it would appear your EVM is running a graphical user interface.

    If that's exactly what I would like to do, that means no extra distro at all, just the kernel and the standard console, where or on what should I have a look at? What I actually have in mind are some possibilities to draw lines, pixels, textboxes, use the touchscreen,...
    I guess there are some libraries available ?

     

    thanks for your great help!

    Maik

     

     

  • Maik,

    I have heard about a free software called QT.  It is suppose to be platform independent. I downloaded it and looked at it and it looks pretty easy to program and possibly what you are looking for; text boxes, some graphics.  It is a windows gui builder type tool, it actually comes with web browser support.  I have not ported over to OMAP, however, so that may be challenging.  You would have to map over the touch screen driver over to the QT software. If I ever do that I will let you know. If you can get it to work, please let me know. [;)]

    Regards,

    Jeff Lance

  • Hey Jeff,

    Thanks for that tip again. I successully got it working

    [:)]

    You might want to have a look at

     

     

    Regards,
    Maik

  • Maik,

    Thanks for your feedback and notes.  This will definately help others to get a better first time OMAP experience.

    Best Regards,

    Jeff