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/LINUXSDK-OMAPL138: Build errors of u-boot-2018.01

Part Number: LINUXSDK-OMAPL138
Other Parts Discussed in Thread: OMAPL138

Tool/software: Linux

Build errors of u-boot-2018.01+gitAUTOINC+131dc82830-g131dc82830 of  linux-omapl138-lcdk-05.00.00.15/board-support

Hi All,

I am using omapl138 lcdk customized board. The above specified u-boot is built successfully with no changes in configuration. Currently I tried enabling Device Drivers->NAND Device support->Support for Freescale NFC for VF610 using make menuconfig. I'm seeing build time errors after these changes.

HOSTCC tools/mkimage.o
HOSTLD tools/mkimage
CC cmd/version.o
LD cmd/built-in.o
CC common/main.o
LD common/built-in.o
CC drivers/mtd/nand/davinci_nand.o
drivers/mtd/nand/davinci_nand.c:828:5: error: conflicting types for ‘board_nand_init’
int board_nand_init(struct nand_chip *chip) __attribute__((weak));
^~~~~~~~~~~~~~~
In file included from drivers/mtd/nand/davinci_nand.c:34:0:
include/nand.h:40:6: note: previous declaration of ‘board_nand_init’ was here
void board_nand_init(void);
^~~~~~~~~~~~~~~
drivers/mtd/nand/davinci_nand.c:830:5: error: conflicting types for ‘board_nand_init’
int board_nand_init(struct nand_chip *chip)
^~~~~~~~~~~~~~~
In file included from drivers/mtd/nand/davinci_nand.c:34:0:
include/nand.h:40:6: note: previous declaration of ‘board_nand_init’ was here
void board_nand_init(void);
^~~~~~~~~~~~~~~
scripts/Makefile.build:280: recipe for target 'drivers/mtd/nand/davinci_nand.o' failed
make[1]: *** [drivers/mtd/nand/davinci_nand.o] Error 1
Makefile:1284: recipe for target 'drivers/mtd/nand' failed
make: *** [drivers/mtd/nand] Error 2

There is two definitions for board_nand_init() with different prototype. 

Do I need to enable more configurations other than above changes?

Please, let me know anything is going wrong?

Thanks & Regards,

Bhargavi.

  • Hi,

    If you take a look at drivers/mtd/nand/Kconfig you will see:
    config MTD_NAND_VF610_NFC
    tristate "Support for Freescale NFC for VF610/MPC5125"
    depends on (SOC_VF610 || COMPILE_TEST)
    depends on HAS_IOMEM

    Thins means that you need to have CONFIG_SOC_VF610 or CONFIG_COMPILE_TEST and also CONFIG_HAS_IOMEM

    Best Regards,
    Yordan
  • Hi Yordan,

    Thanks for your response.

    What you mentioned above, it is not similar. It is different in this sdk. Instead of above macros I have added below symbols.

    CONFIG_SYS_NAND_SELF_INIT=y
    CONFIG_NAND_VF610_NFC=y
    CONFIG_SYS_NAND_VF610_NFC_45_ECC_BYTES=y. Then it is started giving link time errors as below.

    LDS spl/u-boot-spl.lds
    LD spl/u-boot-spl
    /home/ale.bhargavi/ti-processor-sdk-linux-omapl138-lcdk-05.00.00.15/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabi-ld.bfd: address 0x8000b6a8 of u-boot-spl section `.text' is not within region `.sram'
    /home/ale.bhargavi/ti-processor-sdk-linux-omapl138-lcdk-05.00.00.15/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabi-ld.bfd: u-boot-spl section `.rodata' will not fit in region `.sram'
    /home/ale.bhargavi/ti-processor-sdk-linux-omapl138-lcdk-05.00.00.15/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabi-ld.bfd: address 0x8000b6a8 of u-boot-spl section `.text' is not within region `.sram'
    /home/ale.bhargavi/ti-processor-sdk-linux-omapl138-lcdk-05.00.00.15/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabi-ld.bfd: region `.sram' overflowed by 34228 bytes
    drivers/built-in.o: In function `nand_set_defaults':
    /home/ale.bhargavi/ti-processor-sdk-linux-omapl138-lcdk-05.00.00.15/board-support/u-boot-2018.01+gitAUTOINC+131dc82830-g131dc82830/drivers/mtd/nand/nand_base.c:3132: undefined reference to `nand_default_bbt'
    drivers/built-in.o: In function `nand_block_checkbad':
    /home/ale.bhargavi/ti-processor-sdk-linux-omapl138-lcdk-05.00.00.15/board-support/u-boot-2018.01+gitAUTOINC+131dc82830-g131dc82830/drivers/mtd/nand/nand_base.c:537: undefined reference to `nand_isbad_bbt'
    drivers/built-in.o: In function `nand_block_isreserved':
    /home/ale.bhargavi/ti-processor-sdk-linux-omapl138-lcdk-05.00.00.15/board-support/u-boot-2018.01+gitAUTOINC+131dc82830-g131dc82830/drivers/mtd/nand/nand_base.c:511: undefined reference to `nand_isreserved_bbt'
    drivers/built-in.o: In function `nand_reset_data_interface':
    /home/ale.bhargavi/ti-processor-sdk-linux-omapl138-lcdk-05.00.00.15/board-support/u-boot-2018.01+gitAUTOINC+131dc82830-g131dc82830/drivers/mtd/nand/nand_base.c:934: undefined reference to `nand_get_default_data_interface'
    drivers/built-in.o: In function `nand_erase_nand':
    /home/ale.bhargavi/ti-processor-sdk-linux-omapl138-lcdk-05.00.00.15/board-support/u-boot-2018.01+gitAUTOINC+131dc82830-g131dc82830/drivers/mtd/nand/nand_base.c:2962: undefined reference to `mtd_erase_callback'
    drivers/built-in.o: In function `nand_block_markbad_lowlevel':
    /home/ale.bhargavi/ti-processor-sdk-linux-omapl138-lcdk-05.00.00.15/board-support/u-boot-2018.01+gitAUTOINC+131dc82830-g131dc82830/drivers/mtd/nand/nand_base.c:466: undefined reference to `nand_markbad_bbt'
    drivers/built-in.o: In function `nand_init_data_interface':
    /home/ale.bhargavi/ti-processor-sdk-linux-omapl138-lcdk-05.00.00.15/board-support/u-boot-2018.01+gitAUTOINC+131dc82830-g131dc82830/drivers/mtd/nand/nand_base.c:1025: undefined reference to `onfi_init_data_interface'
    drivers/built-in.o: In function `nand_id_len':
    /home/ale.bhargavi/ti-processor-sdk-linux-omapl138-lcdk-05.00.00.15/board-support/u-boot-2018.01+gitAUTOINC+131dc82830-g131dc82830/drivers/mtd/nand/nand_base.c:3505: undefined reference to `nand_flash_ids'
    drivers/built-in.o: In function `vf610_nfc_nand_init':
    /home/ale.bhargavi/ti-processor-sdk-linux-omapl138-lcdk-05.00.00.15/board-support/u-boot-2018.01+gitAUTOINC+131dc82830-g131dc82830/drivers/mtd/nand/vf610_nfc.c:754: undefined reference to `nand_register'
    scripts/Makefile.spl:345: recipe for target 'spl/u-boot-spl' failed
    make[1]: *** [spl/u-boot-spl] Error 1
    Makefile:1400: recipe for target 'spl/u-boot-spl' failed
    make: *** [spl/u-boot-spl] Error 2

    Thanks & Regards,

    Bhargavi Ale.

  • Hi,

    Not sure which Processor SDK Linux are you using. As I see you need to disable TI related nand drivers. This way you will avoid the conflicts listed in your first post & also will reduce the MLO size so that the image will fit in the SRAM.

    Best Regards,
    Yordan