AnsweredAssumed Answered

issue with uboot include/config.h

Question asked by tsung li wang on Aug 10, 2018
Latest reply on Aug 12, 2018 by tsung li wang

Hi Community,

 

I'm working on i.MX6 sabresd Quad and build Android 6.0.

 

While I build u-boot I follow below commands.

  1. make distclean
  2. make mx6Qandoid_defconfig
  3. make -j8 2>&1 | tee uboot_err.log

 

While the build process I get the error here.

In file included from board/freescale/FM10A/FM10A.c:12:0:
./arch/arm/include/asm/arch/mx6-pins.h:46:2: error: #error "Please select cpu"
#error "Please select cpu"
^
AS arch/arm/lib/vectors.o
CC arch/arm/imx-common/iomux-v3.o
In file included from board/freescale/FM10A/FM10A.c:38:0:
./arch/arm/include/asm/arch/mx6-ddr.h:19:2: error: #error "Please select cpu"
#error "Please select cpu"
^
AS arch/arm/lib/crt0.o
board/freescale/FM10A/FM10A.c:98:2: error: 'MX6_PAD_CSI0_DAT10__UART1_TX_DATA' undeclared here (not in a function)
MX6_PAD_CSI0_DAT10__UART1_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL),

so I trace the code I find out that my include/config.h did not defined some parameter.

Below is my config.h

/* Automatically generated - do not edit */
#define CONFIG_BOARDDIR board/freescale/FM10A
#include <config_defaults.h>
#include <config_uncmd_spl.h>
#include <configs/FM10A.h>
#include <asm/config.h>
#include <config_fallbacks.h>

What I miss are below define.

#define CONFIG_IMX_CONFIG board/freescale/FM10A/mx6q_4x_mt41j128.cfg
#define CONFIG_MX6Q 1
#define CONFIG_ANDROID_SUPPORT 1

 

I had check board/freescal/FM10A/MAINTAINER and Kconfig, two files is as below.

MAINTAINER

MX6SABRESD BOARD
M: Fabio Estevam <fabio.estevam@freescale.com>
S: Maintained
F: board/freescale/FM10A/
F: include/configs/FM10A.h
F: configs/mx6DLandroid_defconfig
F: configs/mx6Qandroid_defconfig

Kconfig

if TARGET_FM10A

config SYS_BOARD
default "FM10A"

config SYS_VENDOR
default "freescale"

config SYS_SOC
default "mx6"

config SYS_CONFIG_NAME
default "FM10A"

endif

Also I had check arch/arm/Kconfig, I did add a new target like below.

config TARGET_FM10A
bool "Support FM10A"
select CPU_V7
select SUPPORT_SPL

 

 

source "board/freescale/FM10A/Kconfig"

 

Also I had check /configs/mx6Qandroid_defconfig, below is what I defined.

ONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/FM10A/mx6q_1G.cfg,MX6Q,SYS_USE_SPINOR,ANDROID_SUPPORT"
CONFIG_ARM=y
CONFIG_TARGET_FM10A=y
CONFIG_SYS_MALLOC_F=y
CONFIG_SYS_MALLOC_F_LEN=0x400
CONFIG_DM=y
CONFIG_DM_THERMAL=y

Outcomes