AnsweredAssumed Answered

Build linux kernel(3.14.28) for i.MX 6 without yocto

Question asked by Dhaval Vadhar on Jul 29, 2015
Latest reply on Jul 30, 2015 by Dhaval Vadhar

Hi,

 

I was able to build the images using Yocto build system. I have done that using command 'bitbake core-image-minimal'. Now during reading some document I found that the downloaded kernel source is available at location '<build dir>/tmp/work/imx6slevk-poky-linux-gnueabi/linux-imx/3.14.28-r0/git'. And I can compile it and boot the device using it.

 

To compile the kernel, I followed steps mentioned here. From this I am following steps for 'Building Kernel without BSP', without downloading the source from git. As the source is already available in the Yocto project. The Linux Kernel version is 3.14.28.

 

First I tried to build using 'make imx_v6_v7_defconfig' configuration. But for that I am getting following errors:

***************************************************************************************************************************

arch/arm/mach-imx/built-in.o: In function `clk_pllv3_do_shared_clks':

:(.text+0x1780): undefined reference to `imx_sema4_mutex_lock'

:(.text+0x17a8): undefined reference to `imx_sema4_mutex_unlock'

:(.text+0x17e0): undefined reference to `imx_update_shared_mem'

:(.text+0x17fc): undefined reference to `amp_power_mutex'

:(.text+0x1800): undefined reference to `shared_mem'

arch/arm/mach-imx/built-in.o: In function `clk_gate2_do_shared_clks':

:(.text+0x1a30): undefined reference to `imx_sema4_mutex_lock'

:(.text+0x1a58): undefined reference to `imx_sema4_mutex_unlock'

:(.text+0x1a98): undefined reference to `imx_update_shared_mem'

:(.text+0x1ab8): undefined reference to `amp_power_mutex'

:(.text+0x1abc): undefined reference to `shared_mem'

arch/arm/mach-imx/built-in.o: In function `clk_pfd_do_shared_clks':

:(.text+0x1e24): undefined reference to `imx_sema4_mutex_lock'

:(.text+0x1e4c): undefined reference to `imx_sema4_mutex_unlock'

:(.text+0x1e8c): undefined reference to `imx_update_shared_mem'

:(.text+0x1eac): undefined reference to `amp_power_mutex'

:(.text+0x1eb0): undefined reference to `shared_mem'

arch/arm/mach-imx/built-in.o: In function `imx6sl_set_wait_clk':

:(.text+0x61f8): undefined reference to `low_bus_freq_mode'

arch/arm/mach-imx/built-in.o: In function `imx6q_pm_enter':

:(.text+0x6d64): undefined reference to `imx_mu_enable_m4_irqs_in_gic'

:(.text+0x6de0): undefined reference to `imx_mu_is_m4_in_low_freq'

:(.text+0x6df4): undefined reference to `imx_mu_enable_m4_irqs_in_gic'

arch/arm/mach-imx/built-in.o: In function `imx6q_map_io':

:(.init.text+0xe7a4): undefined reference to `imx6_busfreq_map_io'

arch/arm/mach-imx/built-in.o: In function `imx6sl_map_io':

:(.init.text+0x115e0): undefined reference to `imx6_busfreq_map_io'

drivers/built-in.o: In function `fec_runtime_resume':

:(.text+0x119f00): undefined reference to `request_bus_freq'

drivers/built-in.o: In function `fec_runtime_suspend':

:(.text+0x119f1c): undefined reference to `release_bus_freq'

drivers/built-in.o: In function `imx_controller_resume':

:(.text+0x1666d4): undefined reference to `request_bus_freq'

:(.text+0x1666f4): undefined reference to `release_bus_freq'

:(.text+0x166788): undefined reference to `release_bus_freq'

drivers/built-in.o: In function `imx_controller_suspend':

:(.text+0x16685c): undefined reference to `release_bus_freq'

drivers/built-in.o: In function `ci_hdrc_imx_remove':

:(.text+0x166954): undefined reference to `release_bus_freq'

drivers/built-in.o: In function `ci_hdrc_imx_probe':

:(.text+0x166d10): undefined reference to `request_bus_freq'

:(.text+0x166d30): undefined reference to `release_bus_freq'

:(.text+0x166e1c): undefined reference to `release_bus_freq'

drivers/built-in.o: In function `sdhci_esdhc_runtime_resume':

:(.text+0x1c82d0): undefined reference to `request_bus_freq'

drivers/built-in.o: In function `sdhci_esdhc_runtime_suspend':

:(.text+0x1c8344): undefined reference to `release_bus_freq'

drivers/built-in.o: In function `sdhci_esdhc_imx_probe':

:(.text+0x1c8fdc): undefined reference to `release_bus_freq'

:(.text+0x1c9004): undefined reference to `request_bus_freq'

drivers/built-in.o: In function `vpu_runtime_resume':

:(.text+0x1c949c): undefined reference to `request_bus_freq'

drivers/built-in.o: In function `vpu_runtime_suspend':

:(.text+0x1c94b8): undefined reference to `release_bus_freq'

sound/built-in.o: In function `fsl_ssi_runtime_resume':

:(.text+0x2f160): undefined reference to `request_bus_freq'

sound/built-in.o: In function `fsl_ssi_runtime_suspend':

:(.text+0x2f17c): undefined reference to `release_bus_freq'

sound/built-in.o: In function `fsl_spdif_runtime_resume':

:(.text+0x30e08): undefined reference to `request_bus_freq'

sound/built-in.o: In function `fsl_spdif_runtime_suspend':

:(.text+0x30e24): undefined reference to `release_bus_freq'

make: *** [vmlinux] Error 1

***************************************************************************************************************************

 

After this I have tried with imx_v7_defconfig. And for this I am getting following errors:

 

***************************************************************************************************************************

drivers/usb/chipidea/ci_hdrc_imx.c: In function 'ci_hdrc_imx_notify_event':

drivers/usb/chipidea/ci_hdrc_imx.c:226:4: error: implicit declaration of function 'pinctrl_select_state' [-Werror=implicit-function-declaration]

    ret = pinctrl_select_state(data->pinctrl,

    ^

drivers/usb/chipidea/ci_hdrc_imx.c: In function 'ci_hdrc_imx_probe':

drivers/usb/chipidea/ci_hdrc_imx.c:278:2: error: implicit declaration of function 'devm_pinctrl_get' [-Werror=implicit-function-declaration]

  data->pinctrl = devm_pinctrl_get(&pdev->dev);

  ^

drivers/usb/chipidea/ci_hdrc_imx.c:278:16: warning: assignment makes pointer from integer without a cast

  data->pinctrl = devm_pinctrl_get(&pdev->dev);

                ^

drivers/usb/chipidea/ci_hdrc_imx.c:283:3: error: implicit declaration of function 'pinctrl_lookup_state' [-Werror=implicit-function-declaration]

   pinctrl_hsic_idle = pinctrl_lookup_state(data->pinctrl, "idle");

   ^

drivers/usb/chipidea/ci_hdrc_imx.c:283:21: warning: assignment makes pointer from integer without a cast

   pinctrl_hsic_idle = pinctrl_lookup_state(data->pinctrl, "idle");

                     ^

drivers/usb/chipidea/ci_hdrc_imx.c:299:29: warning: assignment makes pointer from integer without a cast

   data->pinctrl_hsic_active = pinctrl_lookup_state(data->pinctrl,

                             ^

cc1: some warnings being treated as errors

make[3]: *** [drivers/usb/chipidea/ci_hdrc_imx.o] Error 1

make[2]: *** [drivers/usb/chipidea] Error 2

make[1]: *** [drivers/usb] Error 2

make: *** [drivers] Error 2

***************************************************************************************************************************

 

I have exported all the necessary environment variables to build the kernel. At the moment I am using i.MX6 Sololite EVK.

 

Please guide me resolve these errors. Appreciate your quick help.

 

Thanks,

Dhaval

Outcomes