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
Solved! Go to Solution.
Hello,
I have found the LOADADDR value for SLEVK and it should be 0x80008000. For other boards it can be found by considering 'UBOOT_ENTRYPOINT' variable from "<source directory>/meta-fsl-arm/conf/machine/include/imx-base.inc" file.
Hope this helps!
Thank you all for helping me!
Dhaval
Please configure correctly Yocto environment, as described in
section 5.2 (Machine configurations) of "Freescale_Yocto_Project_User's_Guide.pdf"
Have a great day,
Yuri
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Yuri,
Thanks for your quick reply!
I have followed all the steps mentioned in the Yocto Project User's Guide.pdf. As I mentioned in my previous email I was able to build the *.sdcard image and able to boot the board using that image. Even using that filesystem and kernel I was able to boot the board using NFS.
After this I download the toolchain using 'bitbake meta-toolchain' and install it at default directory '/opt/poky/1.7' path. Using this toolchain I am able to build the sample driver module 'Hello World!' and able to run it on the board. Now I would like to build the kernel using the toolchain and where I am getting above mentioned errors.
Please help me to resolve the same. Appreciate your quick reply!
Thanks,
Dhaval
Hi Dhaval
make imx_v7_defconfig ARCH=arm CROSS_COMPILE=/opt/poky/1.5.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi- -j16 uImage LOADADDR=0x10008000
Correct your poky tool-chain path in above command.
Hi Saurabh,
Thanks for your quick reply!
The environment variables were set for ARCH and CROSS_COMPILE by command 'source /opt/poky/1.7/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi'. And after that I ran 'make imx_v7_defconfig;make uImage' commands to build the kernel.
Thanks,
Dhaval
Hi Saurabh/Yuri,
Now I am able to build the kernel!! Though I don't know, how that happen. I haven't done anything special. Just freshly checkout the linux kernel using 'bitbake' command and try one more time today with same commands. But now I am getting errors for the load address. Can you please help me with that for i.MX6 SLEVK?
BTW how one can decide the load address? I mean, what if I shift from SLEVK to some other board, how can I decide the load address.
Thanks,
Dhaval
Hello,
I have found the LOADADDR value for SLEVK and it should be 0x80008000. For other boards it can be found by considering 'UBOOT_ENTRYPOINT' variable from "<source directory>/meta-fsl-arm/conf/machine/include/imx-base.inc" file.
Hope this helps!
Thank you all for helping me!
Dhaval