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.

Creating a new rootfs and kernel Image

Other Parts Discussed in Thread: AM1808, OMAPL138

Hi all,

I am currently working on Logic PD AM1808 Experimenter Kit and I have successfully created u-boot, UBL and I am also able to boot the kernel and root file system from SDCARD, SDRAM and also from NFS server.

Later on I will be switching to a custom board and for that I have completely understood how to rebuild u-boot and ubl for a custom board.

My question are:

1) will I also have to make modifications to the kernel image and root file system ? what will happen if I use the same kernel Image and root file system on my custom board (apologies for such basic question but I am pretty new to all this)

2) I have read the document: http://processors.wiki.ti.com/index.php/GSG:_Building_Software_Components_for_OMAP-L1#Rebuilding_the_Linux_kernel
which gives us information on how to build a kernel and how I can select and deselect a feature of kernel, Is this the only thing I have to do for my kernel Image or are there some other changes too for custom boards

3) main confusion lie with the root file system. I have no idea how to build a new rootfs and while doing all the search from ti community and other pages I have found this link:
http://arago-project.org/wiki/index.php/Setting_Up_Build_Environment
but I have a lot of confusions here as well. i have a different tool chain which I installed from the mentor graphics page and it is "Sourcery_CodeBench_Lite_for_ARM_GNU_Linux"
I have used this to build the U-Boot as well as the default kernel image. this is the the folder contains:

will there be any difference in implementation if I am using this toolchain ?

I have read several wikis to finally create uboot,ubl and kernel image but in this link I think it creates all at once without needing any other work. am I right.? i am getting this idea because of this line : 

"Once the build finishes, the resulting artifacts are stored in the deploy/ directory under arago-tmp-[toolchain]/. The images (bootloaders, kernel and rootfs) go into deploy/images/, binary packages go into deploy/ipk/ and devkits go into deploy/sdk/ directories. You should be able to flash those images or write them to an SD card and boot your target board."

So now I am confused what to do !! please remove my confusion and give me the direction. should I install the tool chain mentioned in the link http://arago-project.org/wiki/index.php/Setting_Up_Build_Environment , or should I keep going like this and create my root fs seperately by some other method.

Regards

Mohsin

  • Hi Moshin,

    I am currently working on Logic PD AM1808 Experimenter Kit and I have successfully created u-boot, UBL and I am also able to boot the kernel and root file system from SDCARD, SDRAM and also from NFS server.

    For toolchain related questions,

    Any way you have already exported toolchain on your host machine for above mentioned build.

    1) will I also have to make modifications to the kernel image and root file system ? what will happen if I use the same kernel Image and root file system on my custom board (apologies for such basic question but I am pretty new to all this)

    You can maintain & use the same TI EVM rootfs for custom boards.

    which gives us information on how to build a kernel and how I can select and deselect a feature of kernel, Is this the only thing I have to do for my kernel Image or are there some other changes too for custom boards

    It depends on custom board changes compare to EVM.

    What is your reference board for your custom board ?

  • Hi Moshin,

    For building kernel image for your custom board, board file may require modification. Rootfs can be used as is.

     

    Regards,

    Shankari

  • Sir

    reference board is the LogicPD AM1808 Experiementer kit 

    http://www.logicpd.com/products/system-on-modules/zoom-am1808/

    so you mean to say that the current root file system working on the board will also work on my custom board?

    for kernel I will deselect the interfaces that I am not using on the custom board and thats it ??

    please also address the second part of my question as I am confused about how to generate the root file system. You also made a root file system for the board which you sent me on 1 of my previous posts.

    http://e2e.ti.com/support/dsp/omap_applications_processors/f/42/p/349298/1230886.aspx#1230886

    can you please guide me how you made the new root file system with smaller size? 

    thanks 

  • Hi Shankari

    Shankari G said:
    For building kernel image for your custom board, board file may require modification

    sorry can you please further explain it? what is a board file ? is it the u-boot ? what about the kernel image itself? will it also work as is ? 

    Regards

    Mohsin

  • Hi Mohsin,

    Shankari point was correct.

    In Linux,

    arch/arm/mach-davinci/board-da850-evm.c  (This is the board file)

    so you mean to say that the current root file system working on the board will also work on my custom board?

    Sure.

    for kernel I will deselect the interfaces that I am not using on the custom board and thats it ??

    Exactly, Also you should remove that peripheral init codes in board file.

  • Hi Mohsin,

    You can follow up this link to create a new root filesystem ( arago ).

    http://processors.wiki.ti.com/index.php/Arago_build_recipe_for_OMAPL1

    You will be able to build them successfully with few modifications given below.

    1. Before building, export the path of your local directory ( where "oe" folder is present) in "OEBASE" of setenv file.

    >vi arago/setenv
    >export OEBASE=/home/shankari/oe

    Build

    cd ~/oe
    >MACHINE=da850-omapl138-evm bitbake u-boot arago-base-image

    3. Once build is complete, you will find the built images at path :

    u-boot image : /oe/arago-tmp/deploy/glibc/images/da850-omapl138-evm/u-boot-da850-omapl138-evm.bin

    8231.gnu-config_git.bb

    Regards,

    Shankari

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------

  • Hi Shankari

    Shankari G said:
    Replace the file, /oe/arago-oe-dev/recipes/gnu-config/gnu-config_git.bb with the one uploaded here

    sorry I don't know which file are you referring to. also at what stage will I have to change the board file and what is its location ?

  • Hi Mohsin,

    What do you want to do first ?

    kernel building or filesystem building ?

    If filesystem,

    Have you followed the steps from TI wiki which Shankari gave to you ?

    Ex: git stuffs

  • Hi Stalin

    I had a query about the 2nd step so I was asking about that !! 

    apparently there was some problem in the browser. After reloading the page, I can see the uploaded file

  • Hi Stalin

    What I want to do first is that I want to get my custom board running.

    I know how to rebuild the u-boot and UBL for my custom board

    after that I will have to boot the kernel. for that I need the kernel image as well as the rootfs.

    according to you the rootfs working on the evm will also work on the custom board.

    so lets first focus on creating a kernel image for my custom board. I have already generated the kernel with default settings. you mentioned some changes in the board file. I cannot locate the board file in the directory you mentioned earlier

  • sorry 

    I have located the board file !! I was looking in a wrong directory

  • Hi Mohsin,

    Understood.

    Please read our replies carefully.

  • Hi

    I have read your replies carefully and sorry I still have confusion.

    the link provided by shanaki is this: http://processors.wiki.ti.com/index.php/Arago_build_recipe_for_OMAPL1

    and there is nothing mentioned about generating the images for any particular EVM so I am taking it as a method by which I can create the images for my own custom board as well.

    but from your replies I am getting an idea that I should only follow this link if I want to create a rootfs. do let me know if I am wrong

    now for kernel building I should follow this wiki:
    http://processors.wiki.ti.com/index.php/GSG:_Building_Software_Components_for_OMAP-L1#Rebuilding_the_Linux_kernel

    and for custom board I will have to select and deselect the features.

    another thing that you mentioned was to edit the board file. You said I should remove that peripheral init codes in board file.

    so this is what I have to do now:

    1.. edit the board file

    2.. rebuild the kernel using 
    http://processors.wiki.ti.com/index.php/GSG:_Building_Software_Components_for_OMAP-L1#Rebuilding_the_Linux_kernel

    is that it ?? please tell me if i am moving in the right direction. tell me if there are some more steps required

    regards

    Mohsin

  • Hi Mohsin,

    For kernel,

    You understanding is correct.

    What about your console UART ?

    Are you using the same UART2 for console or changed to some other ?

    Some times kernel files may vary to hardware changes present in custom board than TI EVM board.

    For filesystem,

    As we told,

    You can use OMAPL138 generic rootfs for custom or any armv5t architectur boards.

    If you wish to modify the rootfs components then you have configure the .bb appropriately.

  • Hi Stalin

    Titusrathinaraj Stalin said:
    Are you using the same UART2 for console or changed to some other ?

    I am using same UART2 for console

    right now my custom board isn't ready. once it is ready can I try the same kernel running on the EVM? what are the chance it will work ?

  • Hi Mohsin,

    Probably I hope it should work.

    If we port u-boot then maximum work will be easy in case console UART is same.

    Please close the thread if you don't have further questions.