BSP Porting Guide -Errors while compiling uboot-sh

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

BSP Porting Guide -Errors while compiling uboot-sh

2,933 Views
srinivasaporam
Contributor II

Hi,

We have got a customized board which has been designed based Wandboard -dual.

 

While porting the BSP we are follwoinf the Yocto project's "BSP porting guide.pdf" according to which we have done the following steps:

 

1. We came to know that working directory for uboot is:

 

/home/srinivas/fsl-community-bsp/build/tmp/work/wandboard_dual-poky-linux-gnueabi/u-boot-fslc/v2013.10-r0/git

 

2. We have prepared the code for uboot by

 

2.1 Copy the board directory, as shown below:

$cp -R board/wandboard board/wandboard_dual_lpddr2

 

2.2 copy the existing configuration file (.h file) for the custom board

 

$cp include/configs/wandboard.h include/configs/wandboard_dual_lpddr2.h

 

2.3 Create one entry in <UBOOT_DIR>/boards.cfg for the new -based configuration.

 

We have created following entry :

 

Active  arm     armv7      mx6     -           wandboard       wandboard_dual_lpddr2
wandboard:IMX_CONFIG=board/wandboard_dual_lpddr2/wandboard_dual_lpddr2.cfg,MX6DL,DDR_MB=1024

 

2.4 Renamed the file /board/wandboard_dual_lpddr2/wandboard.c to /board/wandboard_dual_lpddr2/wandboard_dual_lpddr2.c

 

2.5 Changed the line

COBJS:= wandboard.o    to

 

obj-y := wandboard_dual_lpddr2.o

 

3. Created a shell script under <UBOOT_DIR> named build_u-boot.sh.

 

The file contents are as follows:

#!/bin/bash

export ARCH=arm

export CROSS_COMPILE=/home/srinivas/fsl-community-bsp/build/tmp/sysroots/x86_64-linux/usr/bin/cortexa9hf-vfp-neon-poky-linux-gnueabi/arm-poky-linux-gnueabi-

make distclean;

make wandboard_dual_lpddr2_config

make

 

4. Compiled U-Boot by using $bash ./build_u-boot.sh which is giving so many errors

 

 

the errors are as follows:

 

/home/srinivas/fsl-community-bsp/build/tmp/work/wandboard_dual-poky-linux-gnueabi/u-boot-fslc/v2013.10-r0/git/include/configs/wandboard_dual_lpddr2.h:115:13: error: expected '}' before 'CONFIG_DEFAULT_FDT_FILE'

  "fdt_file="CONFIG_DEFAULT_FDT_FILE"\0" \

             ^

/home/srinivas/fsl-community-bsp/build/tmp/work/wandboard_dual-poky-linux-gnueabi/u-boot-fslc/v2013.10-r0/git/include/env_default.h:122:2: note: in expansion of macro 'CONFIG_EXTRA_ENV_SETTINGS'

  CONFIG_EXTRA_ENV_SETTINGS

  ^

make[1]: *** [env_common.o] Error 1

make[1]: Leaving directory `/home/srinivas/fsl-community-bsp/build/tmp/work/wandboard_dual-poky-linux-gnueabi/u-boot-fslc/v2013.10-r0/git/common'

make: *** [common/libcommon.o] Error 2

 

 

 

So after going through errors i have modified the /git/include/configs/wandboard_dual_lpddr2.h where "fdt_file="CONFIG_DEFAULT_FDT_FILE"\0" \ is been changed to "fdt_file=CONFIG_DEFAULT_FDT_FILE\0" \ the same way same variable is changed in /git/board/wandboard_dual_lpddr2/wandboard_dual_lpddr2.cfg

 

now when i run the command for compiling uboot: $bash ./build_u-boot.sh following errors are coming

 

/home/srinivas/fsl-community-bsp/build/tmp/work/wandboard_dual-poky-linux-gnueabi/u-boot-fslc/v2013.10-r0/git/include/asm/arch/mx6-pins.h:18:2: error: #error "Please select cpu"

#error "Please select cpu"

  ^

make[1]: *** No rule to make target `.depend', needed by `libwandboard.o'.  Stop.

make[1]: Leaving directory `/home/srinivas/fsl-community-bsp/build/tmp/work/wandboard_dual-poky-linux-gnueabi/u-boot-fslc/v2013.10-r0/git/board/wandboard'

make: *** [board/wandboard/libwandboard.o] Error 2

 

what is problem. Why uboot is not compiling. after compilation only, we can customize it. how to resolve this issue.

 

Original Attachment has been moved to: wandboard_dual_lpddr2.cfg.zip

Original Attachment has been moved to: wandboard_dual_lpddr2.h.zip

Original Attachment has been moved to: mx6-pins.h.zip

Labels (5)
0 Kudos
3 Replies

790 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

Please try the next configuration:

Active  arm     armv7      mx6     -           wandboard_dual_lpddr2     wandboard_dual_lpddr2
wandboard:IMX_CONFIG=board/wandboard_dual_lpddr2/wandboard_dual_lpddr2.cfg,MX6DL,DDR_MB=1024

Best Regards,

Alejandro

0 Kudos

790 Views
srinivasaporam
Contributor II

Hi,

after trying your suggestions also, we have got the following errors:

arch/arm/imx-common/built-in.o: In function `arch_preboot_os':

/home/srinivas/fsl-release-bsp/build/tmp/work/wandboard_dual-poky-linux-gnueabi/u-boot-imx/2014.04-r0/git/arch/arm/imx-common/cpu.c:203: undefined reference to `ldo_mode_set'

/home/srinivas/fsl-release-bsp/build/tmp/sysroots/x86_64-linux/usr/bin/cortexa9hf-vfp-neon-poky-linux-gnueabi/arm-poky-linux-gnueabi-ld.bfd: BFD (GNU Binutils) 2.24 assertion fail /home/srinivas/fsl-release-bsp/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/binutils-cross/2.24-r0/binutils-2.24/bfd/elf32-arm.c:7696

/home/srinivas/fsl-release-bsp/build/tmp/sysroots/x86_64-linux/usr/bin/cortexa9hf-vfp-neon-poky-linux-gnueabi/arm-poky-linux-gnueabi-ld.bfd: error: required section '.rel.plt' not found in the linker script

/home/srinivas/fsl-release-bsp/build/tmp/sysroots/x86_64-linux/usr/bin/cortexa9hf-vfp-neon-poky-linux-gnueabi/arm-poky-linux-gnueabi-ld.bfd: final link failed: Invalid operation

make: *** [u-boot] Error 1

0 Kudos

790 Views
alejandrolozan1
NXP Employee
NXP Employee

Did you try to build the original target reference first?

Please try that first and make sure do not moidfy the functionality of the code when porting U-boot first.  Just make sure that you are including the correct .h files in the .c ones.

/Alejnadro

0 Kudos