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/AM4378: port u-boot to my board,errors were occur.

Part Number: AM4378

Tool/software: Linux

include/asm/arch/hardware_am43xx.h:23:0: note: this is the location of the previous definition
drivers/usb/phy/omap_usb_phy.c: In function ‘usb_phy_power’:
drivers/usb/phy/omap_usb_phy.c:226:2: warning: "/*" within comment [-Wcomment]
drivers/usb/phy/omap_usb_phy.c:229:3: warning: "/*" within comment [-Wcomment]
LD spl/drivers/usb/phy/built-in.o
LD spl/arch/arm/cpu/built-in.o
LDS spl/u-boot-spl.lds
LD spl/u-boot-spl
common/built-in.o: In function `env_relocate_spec':
/home/yangyongsheng/Public/ti-u-boot/common/env_sf.c:152: undefined reference to `spi_flash_probe'
/home/yangyongsheng/Public/ti-u-boot/common/env_sf.c:213: undefined reference to `spi_flash_free'
make[1]: *** [spl/u-boot-spl] Error 1
make: *** [spl/u-boot-spl] Error 2

but i definede spi_flash_probe and spi_flash_free in drivers/mtd/spi/sf_probe.c

and the file has complied:

7 struct spi_flash *spi_flash_probe(unsigned int bus, unsigned int cs,
368                 unsigned int max_hz, unsigned int spi_mode)
369 {
370         struct spi_slave *spi;
371 
372         spi = spi_setup_slave(bus, cs, max_hz, spi_mode);
373         return spi_flash_probe_slave(spi);
374 }
87 void spi_flash_free(struct spi_flash *flash)
388 {
389         spi_free_slave(flash->spi);
390         free(flash);
391 }

and sf_probe.c  head file is spi_flash.h,in the file i can see

struct spi_flash *spi_flash_probe(unsigned int bus, unsigned int cs,
126                 unsigned int max_hz, unsigned int spi_mode);
void spi_flash_free(struct spi_flash *flash);

in env_sf.c,i can see

so why these errors occur??

  • Dear IYsheng,

    I think that your problem comes from missed stepps for SPL configurations. 

    Would it be possible to check if SPL configuration is set in your makefile?

    Please take a look on suggestion in the post: e2e.ti.com/.../1611946

      cd ~/ti-processor-sdk-linux-am335x-evm-01.00.00.00/board-support/u-boot-2014.07-g7e537bf  

         git branch emmc

         git checkout emmc

         export PATH="~/ti-processor-sdk-linux-am335x-evm-01.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin":$PATH

         make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=emmc am335x_boneblack_config a

    Please check the procedures for using SPL in the wiki processors.wiki.ti.com/.../Linux_Core_U-Boot_User's_Guide

    Best regards,