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.

u-boot custom board files not compiling.



Hi All,

We have BBB based custom board where we trying to port SDK-2 OS. First we are trying to port u-boot on our custom board as below.

1. Copied board configuration of BBB board(configs/am335x_boneblack_defconfig) and created as configs/customboard_BBB_defconfig.

  

CONFIG_ARM=y
CONFIG_TARGET_AM335X_EVM=y
CONFIG_SPL=y
CONFIG_SPL_STACK_R=y
CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_SYS_EXTRA_OPTIONS="EMMC_BOOT"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_SETEXPR is not set
CONFIG_SPI_FLASH=y

2. Copied include/configs/am335x_evm.h header file and created as include/configs/customboard_bbb.h

3. Created my custom board files by copying board directory board/ti/am335x and created as board/ti/custombbb, then defined few NACROS in Kconfig as below in board directory.

if TARGET_AM335X_EVM
config SYS_BOARD
default "customboard"

config SYS_VENDOR
default "ti"

config SYS_SOC
default "am33xx"

config SYS_CONFIG_NAME
default "customboard_bbb"

When I do u-boot clean and build as below, my board files(board/ti/custombbb) are not compiling but board/ti/am335x files are compiling.

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- mrproper;

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- customboard_BBB_config

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-

After giving the below commands, my .config file is not updated as expected, it is updated with am335x board directory, who updates this .config file?

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- mrproper;

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- customboard_BBB_config

************* .config *******

------

------

CONFIG_SYS_ARCH="arm"
CONFIG_SYS_CPU="armv7"
CONFIG_SYS_SOC="am33xx"
CONFIG_SYS_VENDOR="ti"
CONFIG_SYS_BOARD="am335x"
CONFIG_SYS_CONFIG_NAME="am335x_evm"

------

------

Can any one please help me, what else I am missing to configure ?

  • Hello,

    I am assuming you are using the newer u-boot which has Kconfig, In that case you need to add the following line in arch/arm/Kconfig

    source "board/ti/custombbb/Kconfig"

    Cheers,
    --Prabhakar Lad
  • Prabhakar,

    Yes I am using latest SDK, I tried that by added my board files as you mentioned in arch/arm/Kconfig, but still it was not compiled. When I commented board/ti/am335x then it is compiled but with some errors. 

  • Hi,

    That means you haven’t changed the TARGET_AM335X_EVM in your file board/ti/custombbb/Kconfig

    In your configs/customboard_BBB_defconfig remove the line CONFIG_TARGET_AM335X_EVM=y and instead add

    CONFIG_TARGET_CUSTOM_BBB=y

    and in your board/ti/custombbb/Kconfig change 'if TARGET_AM335X_EVM' to 'if TARGET_CUSTOM_BBB'

    Cheers,
    --Prabhakar Lad
  • I got below errors, when I removed CONFIG_TARGET_AM335X_EVM and replaced. When I checked .config all my defines are lost.

    scripts/kconfig/conf --silentoldconfig Kconfig
    CHK include/config.h
    UPD include/config.h
    GEN include/autoconf.mk
    In file included from ./include/common.h:18:0:
    include/config.h:6:22: fatal error: configs/.h: No such file or directory
    compilation terminated.
    make[1]: *** [include/autoconf.mk] Error 1
    make: *** No rule to make target `include/config/auto.conf', needed by `include/config/uboot.release'. Stop.

    Before removing CONFIG_TARGET_AM335X_EVM, resulted .config file
    ==========================================================
    CONFIG_SYS_ARCH="arm"
    CONFIG_SYS_CPU="armv7"
    CONFIG_SYS_SOC="am33xx"
    CONFIG_SYS_VENDOR="ti"
    CONFIG_SYS_BOARD="am335x"
    CONFIG_SYS_CONFIG_NAME="am335x_evm"

    After removing CONFIG_TARGET_AM335X_EVM, resulted .config file
    ==========================================================
    CONFIG_SYS_ARCH="arm"
  • Prabhakar,

    I feel that something to do with arch/arm/Kconfig on below lines

    config TARGET_AM335X_EVM
    bool "Support am335x_evm"
    select CPU_V7
    select SUPPORT_SPL
    select DM
    select DM_SERIAL
    select DM_GPIO
    select CREATE_BOARD_SYMLINK



    What is CREATE_BOARD_SYMLINK ?
  • Finally made it to work!!!

    As like below for am335x, need to define for our custom board in arch/arm/Kconfig

    config TARGET_AM335X_EVM
    bool "Support am335x_evm"
    select CPU_V7
    select SUPPORT_SPL
    select DM
    select DM_SERIAL
    select DM_GPIO
    select CREATE_BOARD_SYMLINK

    *******Custom baord*******

    config TARGET_AM335X_EVM
    bool "Support custom_bbb" >>>>>>>>>>>>>> This is very important to change as per your target. 
    select CPU_V7
    select SUPPORT_SPL
    select DM
    select DM_SERIAL
    select DM_GPIO
    select CREATE_BOARD_SYMLINK