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.

Linux/AM3352: looking for best way to define new board for U-BOOT

Part Number: AM3352

Tool/software: Linux

Hi 

I am trying to add support for a board based on a BeagleBone black and am using the latest SDK 

I am looking for suggestions as to what is the expected (or best) way to include a new <BOARDDIR> (and BOARD) in the compilation of U-boot  

The README.Kconfig describes the steps I believe I need (or at least defines the MACROs I would expect to be involved)

I have created a new <myBoard>_defConfg  and have tried to define these in here

when I run make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- <myBoard>_defConfg it appears to write out to .config

but the CONFIG_SYS_xxx entries stay as they were for the evm

e.g.
CONFIG_SYS_SOC="am33xx"
CONFIG_SYS_BOARD="am335x"
CONFIG_SYS_CONFIG_NAME="am335x_evm"

I have got the board working via modifying the board.c within /ti/am335x/ but it would be easier to maintain if I could keep our board files apart from these 

Thanks for any help you can provide.

All the best,
Richard

  • Hi Richard,

    You could collect your board specific files, separate them in another directory & create a custom Makefile & Kconfig for your board.
    You can reference the existing Kconfig & Makefile for am335x and customize them to match your use case.
    Note that the build is not just from board/ti/am335x... You also have dts file (in the latest TI u-boots), you have arch/arm/cpu/armv7/am33xx/ for the spl/MLO part and so on..

    Best Regards,
    Yordan
  • Thanks Yordan

    Once I identified the required Kconfig files I was able to do pretty much what you suggested

    There is now a <myCompany>/<myBoard> directory and almost everything is defined in here (save for /configs, include/configs and device tree sources)

    This just  leaves me with references in:

     /arch/arm/Kconfig : defining the select options for my board and sourcing my new Kconfig)

    and

    arch/arm/dts/Makefile : defining the inclusion of the .dtb

    Ideally I would be able to do this without modifying any of the original source: but this at least has significantly reduced the surface area of the patching required.

    It would be great if there was a way to locate the .dts or configs in a different directory: do you know if this is easily achievable?

    Thanks for the help.

    All the best,

    Richard

  • Hi Richard,

    It would be great if there was a way to locate the .dts or configs in a different directory: do you know if this is easily achievable?


    I don't think it is a good idea to locate your dts in another directory different from the arch/arm/dts.. As you can see the arm devices that are dts compatible are located in that directory. I think, that moving your dts outside this path will complicate your build system..

    Best Regards,
    Yordan
  • Thanks Yordan 

    I can see how it would complicate things with the way the make files are currently configured.

    Thanks for the help.

    Best regards,

    Richard