Linux config options to support i.MX6Solo and i.MX6DualLite SoC

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

Linux config options to support i.MX6Solo and i.MX6DualLite SoC

2,306 Views
zandar
Contributor II

I would like to strip down as much as possible my configuration file for a single Linux kernel image that will be used on boards with the two mentioned SoCs.

The main question is:

Which SoC options are the bare minimum that I need to enable to fully support both i.MX6Solo and i.MX6DualLite SoCs?

The kernel version I am working with is 4.9-1.0.x-imx.

The problem is that I am not able to compile the v4.9 kernel with my current  configuration that worked for 4.1-2.0.x-imx.

Two main different configs I tried:

1. With almost all IMX SoCs enabled (used with my current 4.1-2.0.x-imx kernel)
#
# Cortex-A platforms
#
CONFIG_SOC_IMX5=y
CONFIG_SOC_IMX50=y
# CONFIG_SOC_IMX51 is not set
CONFIG_SOC_IMX53=y
CONFIG_SOC_IMX6=y
CONFIG_SOC_IMX6Q=y
CONFIG_SOC_IMX6SL=y
CONFIG_SOC_IMX6SX=y
CONFIG_SOC_IMX6UL=y
CONFIG_SOC_IMX6ULL=y
CONFIG_SOC_IMX7=y
CONFIG_SOC_IMX7D=y
# CONFIG_SOC_LS1021A is not set

#
# Cortex-A/Cortex-M asymmetric multiprocessing platforms
#
CONFIG_SOC_IMX6SLL=y
# CONFIG_SOC_IMX7ULP is not set
CONFIG_SOC_VF610=y
CONFIG_VF_USE_ARM_GLOBAL_TIMER=y
# CONFIG_VF_USE_PIT_TIMER is not set
# CONFIG_ARCH_MEDIATEK is not set
2. Only IMX6Q/DL and IMX6SL option enabled
#
# Cortex-A platforms
#
# CONFIG_SOC_IMX50 is not set
# CONFIG_SOC_IMX51 is not set
# CONFIG_SOC_IMX53 is not set
CONFIG_SOC_IMX6=y
CONFIG_SOC_IMX6Q=y
CONFIG_SOC_IMX6SL=y
# CONFIG_SOC_IMX6SX is not set
# CONFIG_SOC_IMX6UL is not set
# CONFIG_SOC_IMX6ULL is not set
# CONFIG_SOC_IMX7D is not set
# CONFIG_SOC_LS1021A is not set

#
# Cortex-A/Cortex-M asymmetric multiprocessing platforms
#
# CONFIG_SOC_IMX6SLL is not set
# CONFIG_SOC_IMX7ULP is not set
# CONFIG_SOC_VF610 is not set
# CONFIG_ARCH_MEDIATEK is not set

Both return:
  MODPOST vmlinux.o
  GEN     .version
  CHK     include/generated/compile.h
  UPD     include/generated/compile.h
  CC      init/version.o
  LD      init/built-in.o
arch/arm/mach-imx/built-in.o: In function `init_mmdc_lpddr2_settings':
platform-imx-dma.c:(.text+0x46c0): undefined reference to `imx6sll_lpddr2_freq_change'
platform-imx-dma.c:(.text+0x46c4): undefined reference to `imx6sll_lpddr2_freq_change'
arch/arm/mach-imx/built-in.o: In function `imx6sl_init_late':
platform-imx-dma.c:(.init.text+0x1944): undefined reference to `imx6sll_cpuidle_init'
/home/vokac/development/sources/linux-fslc/Makefile:976: recipe for target 'vmlinux' failed

I am able to compile the kernel only if I disable the CONFIG_SOC_IMX6SL=y option.

Seems like a bug in Kconfig or some #ifdef to me.

Thanks for any hints.

Michal

Labels (3)
3 Replies

1,399 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi Michal,

I will check it,

I assume you are able to build if you set

CONFIG_SOC_IMX6=y
CONFIG_SOC_IMX6Q=y
CONFIG_SOC_IMX6SL=y
CONFIG_SOC_IMX6SLL=y

Am I right?

Regards,

Carlos

0 Kudos

1,399 Views
zandar
Contributor II

Hi Carlos,

thanks for your response.

With the config options you proposed I am able to compile.

There were two issues i had to solve though:

1. Unselecting the CONFIG_SOC_IMX6SX throws:
  MODPOST vmlinux.o
  GEN     .version
  CHK     include/generated/compile.h
  UPD     include/generated/compile.h
  CC      init/version.o
  LD      init/built-in.o
drivers/built-in.o: In function `imx_rpmsg_notify':
core.c:(.text+0x54e020): undefined reference to `MU_SendMessage'
drivers/built-in.o: In function `imx_rpmsg_probe':
core.c:(.text+0x54e270): undefined reference to `MU_EnableRxFullInt'
core.c:(.text+0x54e41c): undefined reference to `MU_EnableRxFullInt'
core.c:(.text+0x54e428): undefined reference to `MU_SetFn'
drivers/built-in.o: In function `imx_mu_rpmsg_isr':
core.c:(.text+0x54e50c): undefined reference to `MU_ReadStatus'
core.c:(.text+0x54e53c): undefined reference to `MU_ReceiveMsg'
/home/vokac/development/sources/linux-fslc/Makefile:976: recipe for target 'vmlinux' failed

This is because CONFIG_HAVE_IMX_MU is now not defined and CONFIG_HAVE_IMX_RPMSG was selected in my config. The issue is that HAVE_IMX_MU option is selected only when SOC_IMX6SX or SOC_IMX7 is selected but HAVE_IMX_RPMSG does not have this dependency check.

Manually disabling CONFIG_HAVE_IMX_RPMSG solved that but I think it should be done automagically in Kconfig.

As well as the error with the CONFIG_SOC_IMX6SLL and imx6sll_lpddr2_freq_change function.

2.  Selecting CONFIG_SOC_IMX6SLL=y throws this warning when saving configuration:
warning: (SOC_IMX6SX && SOC_IMX6UL && SOC_IMX7D && SOC_IMX6SLL) selects KEYBOARD_SNVS_PWRKEY which has unmet direct dependencies (!UML && INPUT && INPUT_KEYBOARD && (SOC_IMX6SX || SOC_IMX6UL || SOC_IMX7) && OF)

I am not sure how to interpret this warning.

I read it as if ALL OF (SOC_IMX6SX && SOC_IMX6UL && SOC_IMX7D && SOC_IMX6SLL) is selected then it selects KEYBOARD_SNVS_PWRKEY. Which is not my case.

But it acts as if ANY OF (SOC_IMX6SX || SOC_IMX6UL || SOC_IMX7D || SOC_IMX6SLL) is selected then it selects KEYBOARD_SNVS_PWRKEY. That is my case - only SOC_IMX6SLL is enabled.

Anyway I am not able to get rid of this warning.

I think the dependencies in Kconfig are wrongly set for KEYBOARD_SNVS_PWRKEY.

On one hand it is auto selected by SOC_IMX6SLL and on the other hand one of (SOC_IMX6SX || SOC_IMX6UL || SOC_IMX7) must be selected to make it work.

Finaly just to confirm the main idea of my question

- To fully support the i.MX6DualLite SoC, only the following is needed?

CONFIG_SOC_IMX6=y
CONFIG_SOC_IMX6Q=y

- To fully support i.MX6Solo, only the following is needed?

CONFIG_SOC_IMX6SL=y
CONFIG_SOC_IMX6SLL=y

Many thanks,
Michal

1,399 Views
csoapy
Contributor III

I have the same issue on imx-4.14.98-2.0.1_patch

And CONFIG_SND_SOC_IMX_RPMSG should depend on rpmsg driver too.

0 Kudos