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.

66AK2G12: U-Boot build failed for custom board

Part Number: 66AK2G12

Hi,

I have developed a cutom board with 66AK2G12ABYT100 and I am working on the porting of u-boot and kernel.

Before my board was finished, I have already built the u-boot and kernel using k2g-evm and k2g-ice evaluation board and in both case I am able to boot up Linux operating system correctly using Processor SDK Linux 06_01_00_08.

In order to execute the porting I am following the step described in Processor SDK Linux 06_03_00_106  chapter 6.3.1.2.1: "Creating an initial baseline by cloning and flattening TI EVM support". I am sure to execute these steps precisely but, when I do the u-boot build, several erros appears:

 CC      net/nfs.o
  CC      net/ping.o
  CC      net/tftp.o
  LD      net/built-in.o
  CC      examples/standalone/stubs.o
  LD      examples/standalone/libstubs.o
  CC      examples/standalone/hello_world.o
  LD      examples/standalone/hello_world
  OBJCOPY examples/standalone/hello_world.srec
  OBJCOPY examples/standalone/hello_world.bin
  LDS     u-boot.lds
  LD      u-boot
/home/rufolog/workspace/hpc/ti-processor-sdk-linux-rt-k2g-evm-06.01.00.08/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-ld.bfd: arch/arm/cpu/armv7/built-in.o: in function `timer_init':
/home/rufolog/workspace/hpc/ti-processor-sdk-linux-rt-k2g-evm-06.01.00.08/board-support/u-boot-2019.01+gitAUTOINC+029e4c009a-g029e4c009a/k2g_hpc/../arch/arm/cpu/armv7/arch_timer.c:30: undefined reference to `get_external_clk'
/home/rufolog/workspace/hpc/ti-processor-sdk-linux-rt-k2g-evm-06.01.00.08/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-ld.bfd: arch/arm/mach-keystone/built-in.o: in function `pll_freq_get':
/home/rufolog/workspace/hpc/ti-processor-sdk-linux-rt-k2g-evm-06.01.00.08/board-support/u-boot-2019.01+gitAUTOINC+029e4c009a-g029e4c009a/k2g_hpc/../arch/arm/mach-keystone/clock.c:304: undefined reference to `get_external_clk'
/home/rufolog/workspace/hpc/ti-processor-sdk-linux-rt-k2g-evm-06.01.00.08/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-ld.bfd: /home/rufolog/workspace/hpc/ti-processor-sdk-linux-rt-k2g-evm-06.01.00.08/board-support/u-boot-2019.01+gitAUTOINC+029e4c009a-g029e4c009a/k2g_hpc/../arch/arm/mach-keystone/clock.c:308: undefined reference to `get_external_clk'
/home/rufolog/workspace/hpc/ti-processor-sdk-linux-rt-k2g-evm-06.01.00.08/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-ld.bfd: /home/rufolog/workspace/hpc/ti-processor-sdk-linux-rt-k2g-evm-06.01.00.08/board-support/u-boot-2019.01+gitAUTOINC+029e4c009a-g029e4c009a/k2g_hpc/../arch/arm/mach-keystone/clock.c:312: undefined reference to `get_external_clk'
/home/rufolog/workspace/hpc/ti-processor-sdk-linux-rt-k2g-evm-06.01.00.08/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-ld.bfd: /home/rufolog/workspace/hpc/ti-processor-sdk-linux-rt-k2g-evm-06.01.00.08/board-support/u-boot-2019.01+gitAUTOINC+029e4c009a-g029e4c009a/k2g_hpc/../arch/arm/mach-keystone/clock.c:316: undefined reference to `get_external_clk'
/home/rufolog/workspace/hpc/ti-processor-sdk-linux-rt-k2g-evm-06.01.00.08/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-ld.bfd: arch/arm/mach-keystone/built-in.o:/home/rufolog/workspace/hpc/ti-processor-sdk-linux-rt-k2g-evm-06.01.00.08/board-support/u-boot-2019.01+gitAUTOINC+029e4c009a-g029e4c009a/k2g_hpc/../arch/arm/mach-keystone/clock.c:320: more undefined references to `get_external_clk' follow
/home/rufolog/workspace/hpc/ti-processor-sdk-linux-rt-k2g-evm-06.01.00.08/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-ld.bfd: arch/arm/mach-keystone/built-in.o: in function `bypass_main_pll':
/home/rufolog/workspace/hpc/ti-processor-sdk-linux-rt-k2g-evm-06.01.00.08/board-support/u-boot-2019.01+gitAUTOINC+029e4c009a-g029e4c009a/k2g_hpc/../arch/arm/mach-keystone/clock.c:57: undefined reference to `divn_val'
/home/rufolog/workspace/hpc/ti-processor-sdk-linux-rt-k2g-evm-06.01.00.08/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-ld.bfd: arch/arm/mach-keystone/built-in.o: in function `do_mon_install':
/home/rufolog/workspace/hpc/ti-processor-sdk-linux-rt-k2g-evm-06.01.00.08/board-support/u-boot-2019.01+gitAUTOINC+029e4c009a-g029e4c009a/k2g_hpc/../arch/arm/mach-keystone/cmd_mon.c:26: undefined reference to `get_external_clk'
/home/rufolog/workspace/hpc/ti-processor-sdk-linux-rt-k2g-evm-06.01.00.08/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-ld.bfd: board/hitachi/k2g_hpc/built-in.o: in function `dram_init':
/home/rufolog/workspace/hpc/ti-processor-sdk-linux-rt-k2g-evm-06.01.00.08/board-support/u-boot-2019.01+gitAUTOINC+029e4c009a-g029e4c009a/k2g_hpc/../board/hitachi/k2g_hpc/board.c:42: undefined reference to `ddr3_init'
/home/rufolog/workspace/hpc/ti-processor-sdk-linux-rt-k2g-evm-06.01.00.08/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-ld.bfd: board/hitachi/k2g_hpc/built-in.o: in function `ft_board_setup':
/home/rufolog/workspace/hpc/ti-processor-sdk-linux-rt-k2g-evm-06.01.00.08/board-support/u-boot-2019.01+gitAUTOINC+029e4c009a-g029e4c009a/k2g_hpc/../board/hitachi/k2g_hpc/board.c:112: undefined reference to `ddr3_get_size'
/home/rufolog/workspace/hpc/ti-processor-sdk-linux-rt-k2g-evm-06.01.00.08/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-ld.bfd: common/built-in.o: in function `fit_find_config_node':
/home/rufolog/workspace/hpc/ti-processor-sdk-linux-rt-k2g-evm-06.01.00.08/board-support/u-boot-2019.01+gitAUTOINC+029e4c009a-g029e4c009a/k2g_hpc/../common/common_fit.c:66: undefined reference to `board_fit_config_name_match'
/home/rufolog/workspace/hpc/ti-processor-sdk-linux-rt-k2g-evm-06.01.00.08/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-ld.bfd: common/built-in.o:(.rodata.init_sequence_f+0x2c): undefined reference to `board_early_init_f'
/home/rufolog/workspace/hpc/ti-processor-sdk-linux-rt-k2g-evm-06.01.00.08/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-ld.bfd: common/built-in.o:(.data.init_sequence_r+0x6c): undefined reference to `board_late_init'
/home/rufolog/workspace/hpc/ti-processor-sdk-linux-rt-k2g-evm-06.01.00.08/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-ld.bfd: drivers/i2c/built-in.o: in function `_davinci_i2c_setspeed':
/home/rufolog/workspace/hpc/ti-processor-sdk-linux-rt-k2g-evm-06.01.00.08/board-support/u-boot-2019.01+gitAUTOINC+029e4c009a-g029e4c009a/k2g_hpc/../drivers/i2c/davinci_i2c.c:94: undefined reference to `get_external_clk'
/home/rufolog/workspace/hpc/ti-processor-sdk-linux-rt-k2g-evm-06.01.00.08/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-ld.bfd: /home/rufolog/workspace/hpc/ti-processor-sdk-linux-rt-k2g-evm-06.01.00.08/board-support/u-boot-2019.01+gitAUTOINC+029e4c009a-g029e4c009a/k2g_hpc/../drivers/i2c/davinci_i2c.c:94: undefined reference to `get_external_clk'
/home/rufolog/workspace/hpc/ti-processor-sdk-linux-rt-k2g-evm-06.01.00.08/board-support/u-boot-2019.01+gitAUTOINC+029e4c009a-g029e4c009a/Makefile:1501: recipe for target 'u-boot' failed
make[1]: *** [u-boot] Error 1
make[1]: Leaving directory '/home/rufolog/workspace/hpc/ti-processor-sdk-linux-rt-k2g-evm-06.01.00.08/board-support/u-boot-2019.01+gitAUTOINC+029e4c009a-g029e4c009a/k2g_hpc'
Makefile:148: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2

It seems the build process does not recognize the functions defined in header files in u-boot-2019.01+gitAUTOINC+029e4c009a-g029e4c009a/arch/arm/mach-keystone/include/mach but looking in that directory all files are present and functions are defined.

Probably there is something not recognized/declared in Makefile, I am exploring in that direction. I hope you can help me.

Thanks

Graziano

 

 

  • Hi, 

    surfing on Internet I have found that also the Makefile in /u-boot-<ver>/board/<myvendor>/<myboard> shall be edited (not mentioned in SDK guide).

    I have added the following:

    obj-$(CONFIG_TARGET_K2G_<myboard>) += board_k2g.o
    obj-$(CONFIG_TARGET_K2G_<myboard>) += ddr3_k2g.o

    Then I have commented other dependecies of K2G EVM boards in /u-boot-<ver>/board/<myvendor>/<myboard>/board_k2g.c / ddr3_k2g.c and finally u-boot builds correctly without errors/warnings.

    It's time to load u-boot on custom board and verify if it works.

    Regards

    Graziano