How do I build the 4.1.15 kernel with FrameBuffer support?

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

How do I build the 4.1.15 kernel with FrameBuffer support?

Jump to solution
2,131 Views
michaelworster
Contributor IV

I was using the latest imx_4.1.15_1.0.0_ga kernel branch and attempting to do a build using the imx_v6_v7_defconfig. Once I attempted to build the zImage target the build broke due to missing FB references. Below is a snippet of the process I used to get the code and build the defconfig/kernel

mike@mike-VirtualBox:~/fsl_test/kernel4$ git clone git://git.freescale.com/imx/linux-2.6-imx.git --branch imx_4.1.15_1.0.0_ga

mike@mike-VirtualBox:~/fsl_test/kernel4$ make O=/home/mike/fsl_test/k4_output/ imx_v6_v7_defconfig
make[1]: Entering directory `/home/mike/fsl_test/k4_output'
  HOSTCC  scripts/basic/fixdep
  GEN     ./Makefile
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#
make[1]: Leaving directory `/home/mike/fsl_test/k4_output'
mike@mike-VirtualBox:~/fsl_test/kernel4$ make O=/home/mike/fsl_test/k4_output/ zImage LOADADDR=0x10008000
make[1]: Entering directory `/home/mike/fsl_test/k4_output'
  GEN     ./Makefile
scripts/kconfig/conf  --silentoldconfig Kconfig
make[1]: Leaving directory `/home/mike/fsl_test/k4_output'
make[1]: Entering directory `/home/mike/fsl_test/k4_output'
  CHK     include/config/kernel.release

...

  UPD     include/generated/compile.h
  CC      init/version.o
  LD      init/built-in.o

drivers/built-in.o: In function `mxsfb_probe':
:(.text+0x45f4c): undefined reference to `mxc_dispdrv_gethandle'
make[1]: *** [vmlinux] Error 1

I've found that the missing reference comes from drivers/video/fbdev/mxc/mxc_dispdrv.c and can be added in by including:

CONFIG_FB_MXC_SYNC_PANEL=y

to the defconfig, once that is in place there are additional build issues that show up:

drivers/built-in.o: In function `mxcfb_blank':
:(.text+0x43674): undefined reference to `ipu_disable_channel'
:(.text+0x43688): undefined reference to `ipu_uninit_sync_panel'
:(.text+0x43694): undefined reference to `ipu_uninit_channel'
...

Which can be fixed by adding in:
CONFIG_MXC_IPU_V3=y

Once that is added there is a new problem, as both drivers/mxc/ipu3/ipu_capture.c and drivers/gpu/ipu-v3/ipu-csi.c include the same "exports" and thus there is a multiple definition issue:

drivers/mxc/built-in.o: In function `ipu_csi_init_interface':
:(.text+0x12f18): multiple definition of `ipu_csi_init_interface'
drivers/gpu/built-in.o::(.text+0x3a4fc): first defined here
drivers/mxc/built-in.o:(___ksymtab+ipu_csi_init_interface+0x0): multiple definition of `__ksymtab_ipu_csi_init_interface'
drivers/gpu/built-in.o:(___ksymtab_gpl+ipu_csi_init_interface+0x0): first defined here
drivers/mxc/built-in.o: In function `__crc_ipu_csi_init_interface':

... (A number of these)

(One example:)

drivers/mxc/ipu3/ipu_capture.c:ipu_csi_init_interface(struct ipu_soc *ipu, uint16_t width, uint16_t height,
drivers/mxc/ipu3/ipu_capture.c:EXPORT_SYMBOL(ipu_csi_init_interface);
drivers/gpu/ipu-v3/ipu-csi.c:int ipu_csi_init_interface(struct ipu_csi *csi,
drivers/gpu/ipu-v3/ipu-csi.c:EXPORT_SYMBOL_GPL(ipu_csi_init_interface);

So my question becomes:

How can I do a standard Linux Kernel 4.1.15 build with the imx_v6_v7_defconfig which includes Framebuffer support? Seems either I'm missing something, or there is something wrong with this config.

Labels (2)
1 Solution
987 Views
michaelworster
Contributor IV

gusarambula‌ - Thanks for your reply. I was indeed attempting to build on the 4.1.15_1.0.0_ga branch, and previously building the 3.14.38 kernel both in and without OpenEmbedded. The OpenEmbedded build takes more space and time so I try to avoid it for initial development. Your answer, however, did lead me to a thought which solved the problem.

It turns out that the answer to my question is that imx_v6_v7_defconfig doesn't work correctly with the Linux 4.1.15 kernel. When I built with OpenEmbedded the kernel succeeded but checking the logs for the kernel it was obvious what the difference was:

run.do_copy_defconfig.31634:    cp /home/mike/sandbox/nxp_linux_4.15/build_k4_linux/tmp/work/imx6dlsabresd-poky-linux-gnueabi/linux-imx/4.1.15-r0/git/arch/arm/configs/imx_v7_defconfig /home/mike/sandbox/nxp_linux_4.15/build_k4_linux/tmp/work/imx6dlsabresd-poky-linux-gnueabi/linux-imx/4.1.15-r0/build/.config

imx_v6_v7_defconfig, which I was using for a imx6dlsabresd build on the 3.14.38 kernel is no longer used, it is now replaced with the imx_v7_defconfig. When I replace my build steps with the same set but this different defconfig everything works.

View solution in original post

2 Replies
988 Views
michaelworster
Contributor IV

gusarambula‌ - Thanks for your reply. I was indeed attempting to build on the 4.1.15_1.0.0_ga branch, and previously building the 3.14.38 kernel both in and without OpenEmbedded. The OpenEmbedded build takes more space and time so I try to avoid it for initial development. Your answer, however, did lead me to a thought which solved the problem.

It turns out that the answer to my question is that imx_v6_v7_defconfig doesn't work correctly with the Linux 4.1.15 kernel. When I built with OpenEmbedded the kernel succeeded but checking the logs for the kernel it was obvious what the difference was:

run.do_copy_defconfig.31634:    cp /home/mike/sandbox/nxp_linux_4.15/build_k4_linux/tmp/work/imx6dlsabresd-poky-linux-gnueabi/linux-imx/4.1.15-r0/git/arch/arm/configs/imx_v7_defconfig /home/mike/sandbox/nxp_linux_4.15/build_k4_linux/tmp/work/imx6dlsabresd-poky-linux-gnueabi/linux-imx/4.1.15-r0/build/.config

imx_v6_v7_defconfig, which I was using for a imx6dlsabresd build on the 3.14.38 kernel is no longer used, it is now replaced with the imx_v7_defconfig. When I replace my build steps with the same set but this different defconfig everything works.

987 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Michael Worster,

The easiest way to achieve this would be trough Yocto.

Have you used the 4.1.15_1.0.0_ga BSP Release? You can find the documentation on the link below (please note that you may need to login in order to download this file).

https://www.nxp.com/webapp/Download?colCode=L4.1.15_1.0.0_LINUX_DOCS&Parent_nodeId=13376371545356958...

Please look at the Yocto Project User’s Guide to install the required packages to run Yocto.

On Step 5 you can see how to setup for your board and also for the distro you would like to use. In your case fsl-imx-fb, which would be frame buffer graphics with no X11 or Wayland.

If you wish to build only the kernel you may also do to from within Yocto using the linux-imx recipe:

$ bitbake linux-imx

I hope this information helps!

Regards,

0 Kudos