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.

AM35xx and linux-omap kernel

Hi,

I have two very newbie questions about the "tmlind" linux-omap kernel.  If I have a custom board that I want to be supported by that tree.

My questions:
a) Do you think it's possible for the maintainers of that tree to accept any code for my custom board?
b) If yes, should I use a boardfile (eg. arch/arm/mach-omap2/board-xxxx.c) or using the new Device Tree Blob system?

I'm too afraid to ask on the mailing list, because it seems they are discussing actual code and very technical things.

Andrew

  • Hi Andrew,

    About your questions:

    a) Yes, it is possible.

    b) It is good practice to use board file name something like board-xxxx.c, where xxxx could contain part of the name of processor which you are using and name of the board (for example: board-omap3evm.c) or only the name of the board (for example: board-devkit8000.c). You can choose one of both naming.  The arch/arm/mach-omap2/ folder is the right place if you are using omapxxx, DMxxxx or AMxxxx processor in your board.

    BR

    Tsvetolin Shulev

  • Hi Cvetolin,

    Thanks a lot for your reply.  :).  I really appreciate it.

    My question was more; which one should I use if I want to submit code to the linux-omap tree?
    Would the linux-omap maintainers prefer that I use the Flat Device Tree (Device Tree Blob) system, or the board file system you mentioned?

    Thanks a lot!
    Andrew

  • I tried posting my question to the linux-omap mailing list, but I didn't get a response from anybody :(.

  • Hi everyone,

    I tried transporting my boardfile (which could work) to the DTB system.  I can't boot and I'm getting these errors:

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

    ## Booting kernel from Legacy Image at 80008000 ...
    Image Name: Linux-3.8.0-rc7-12303-g3fb4e4b
    Image Type: ARM Linux Kernel Image (uncompressed)
    Data Size: 3101920 Bytes = 3 MiB
    Load Address: 80008000
    Entry Point: 80008000
    Verifying Checksum ... OK
    ## Flattened Device Tree blob at 84000000
    Booting using the fdt blob at 0x84000000
    XIP Kernel Image ... OK
    OK
    Loading Device Tree to 8ff10000, end 8ff14888 ... OK

    Starting kernel ...

    data abort

    MAYBE you should read doc/README.arm-unaligned-accesses

    pc : [<80008008>] lr : [<8ff78d80>]
    sp : 8ff15db8 ip : 00000007 fp : 00000000
    r10: 8ffb2300 r9 : 00000000 r8 : 8ff15f60
    r7 : 8ffb1d28 r6 : 00000000 r5 : 80008000 r4 : 8ffb2300
    r3 : 00001889 r2 : 8ff10000 r1 : 0000104d r0 : 00000000
    Flags: nzCv IRQs off FIQs off Mode SVC_32
    Resetting CPU ...

    resetting ...

  • Hi Andrew,

    I found some description about how to boot uImage with device tree blob:

    http://processors.wiki.ti.com/index.php/AM335x_Android_Device_Tree_Integration#Booting_AM335x_EVM_with_uImage_and_device_tree_blob

    BTW how you create the DTB configuration? Is it possible to admit an error while make this configuration?

    BR

    Tsvetolin Shulev

  • Hi Cvetolin,

    I followed the instructions at the link you gave me, and I'm still getting the same problem.  My blob loads OK, and I can inspect all the individual nodes with 'fdt list' in Uboot.

    To answer your question about the DTB, I am currently just using the AM3517-evm blob, since the custom board I'm working with is very similar to that.

    I suspect it has something to do with the way I'm compiling uImage.  I forgot to mention a piece of information before.  When using a boardfile, it can work, but I need to manually specify a LOADADDR when making uImage.  If I don't specify LOADADDR=, it comes up with:

        Load Address: fffffff2
        Entry Point: fffffff2

    I found something which discusses it here: https://patchwork.kernel.org/patch/1971651/ 

  • Ok, so now I can finally start booting the kernel.  But I don't know why it works.

    I cloned the latest linux-omap kernel and compiled that.  This kernel is two months newer.  Now I noticed it prompts me to enter LOADADDR if I haven't.

    So here's what I did:
        make -j4 ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- omap2plus_defconfig
        make -j4 LOADADDR=82000000 ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- am3517-evm.dtb
        make -j4 LOADADDR=82000000 ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- uImage

    Copied to across to an SD card, and then, from u-boot:
        fatload mmc 0 80000000 am3517-evm.dtb
        fatload mmc 0 83000000 uImage
        bootm 83000000 - 80000000

    Then it can start booting the kernel.  I get the data abort again if I use 'fatload' to load uImage into the same location as LOADADDR.