Hi all,
I am new to IMX6, I am working on the IPU now.
I got examples from https://github.com/rogeriorps/ipu-examples
My system build is from yocto dora_3.10.17-1.0.0_GA fsl-image-fb.
I tried to cross compile the resizing example based on this build. I saw this message:
-----------------------------------------
res_ex1.c: In function 'fmt_to_bpp':
res_ex1.c:49:22: error: 'IPU_PIX_FMT_YUV444P' undeclared (first use in this function)
case IPU_PIX_FMT_YUV444P:
^
res_ex1.c:49:22: note: each undeclared identifier is reported only once for each function it appears in
res_ex1.c: In function 'main':
res_ex1.c:76:18: error: storage size of 'task' isn't known
struct ipu_task task;
^
res_ex1.c:129:22: error: 'IPU_ALLOC' undeclared (first use in this function)
ret = ioctl(fd_ipu, IPU_ALLOC, &task.input.paddr);
^
res_ex1.c:181:22: error: 'IPU_QUEUE_TASK' undeclared (first use in this function)
ret = ioctl(fd_ipu, IPU_QUEUE_TASK, &task);
^
res_ex1.c:212:17: error: 'IPU_FREE' undeclared (first use in this function)
ioctl(fd_ipu, IPU_FREE, &task.output.paddr);
--------------------------------------------
Are those examples compatible with the latest yocto build?
If not, are there some examples for latest build?
Thanks!
Solved! Go to Solution.
Hi haizhouli
I just updated the repository with 2 patches to fix the Makefile and configure files and also to update the Readme file. It's now building with kernel 3.10.17 + Yocto.
If you have problems to build or in some example code, please let me know.
Best Regards,
Rogerio
Hi haizhouli,
These examples was made with kernel 3.0.35.
I'll test (and fix if needed) with kernel 3.10.17 and let you know.
Rgds
Rogerio
Thank you so much for the reply!
Based on the location of toolchain in the the README.md file, it seems you build the example based on LTIB, is that right?
Since these examples were tested on 3.0.35, I do have one yocto build is based on 3.0.35-4.1.0. I just did another test, here are my steps:
This yocto build is based on fsl-image-gui
I went to my virtual machine which has LTIB build, based on Ubuntu 10.4. I copied the linaro toolchain from LTIB to the exact location required in your README.md
I downloaded automake 1.11 and installed it into the /usr/share/
~$ ./configure --host=arm-none-linux-gnueabi --target=mx6 --prefix=/home/hli/fsl-community-bsp/build/tmp/work/imx6qsabresd-poky-linux-gnueabi/fsl-tp-image/1.0-r0/rootfs
./configure: line 2197: S: command not found
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-none-linux-gnueabi-strip... arm-none-linux-gnueabi-strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for arm-none-linux-gnueabi-gcc... arm-none-linux-gnueabi-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether arm-none-linux-gnueabi-gcc accepts -g... yes
checking for arm-none-linux-gnueabi-gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of arm-none-linux-gnueabi-gcc... gcc3
checking how to run the C preprocessor... arm-none-linux-gnueabi-gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking for unistd.h... (cached) yes
checking for size_t... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/param.h... yes
checking for getpagesize... yes
checking for working mmap... no
checking for gettimeofday... yes
checking for memset... yes
checking for munmap... yes
configure: ==> Used target i.MX6!
configure: creating ./config.status
config.status: creating Makefile
config.status: creating mx5/basic/example1/Makefile
config.status: creating mx5/rotation/example1/Makefile
config.status: creating mx6/alphablending/example1/Makefile
config.status: creating mx6/alphablending/example2/Makefile
config.status: creating mx6/cropping/example1/Makefile
config.status: creating mx6/csc/example1/Makefile
config.status: creating mx6/deinterlacing/example1/Makefile
config.status: creating mx6/resizing/example1/Makefile
config.status: creating mx6/rotation/example1/Makefile
config.status: creating mx6/basic/example1/Makefile
config.status: executing depfiles commands
---------------------------------
~$ make
Making all in mx6/basic/example1
make[1]: Entering directory `/home/hli/codetest/ipu-examples/mx6/basic/example1'
arm-none-linux-gnueabi-gcc -DPACKAGE_NAME=\"ipu-examples\" -DPACKAGE_TARNAME=\"ipu-examples\" -DPACKAGE_VERSION=\"0.1\" -DPACKAGE_STRING=\"ipu-examples\ 0.1\" -DPACKAGE_BUGREPORT=\"rpimentel.silva@gmail.com\" -DPACKAGE_URL=\"\" -DPACKAGE=\"ipu-examples\" -DVERSION=\"0.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_STDINT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDLIB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_GETPAGESIZE=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_MEMSET=1 -DHAVE_MUNMAP=1 -I. -Wall -I /home/hli/fsl-community-bsp/build/tmp/work/imx6qsabresd-poky-linux-gnueabi/fsl-tp-image/1.0-r0/rootfs/usr/include -I /home/hli/fsl-community-bsp/build/tmp/work/imx6qsabresd-poky-linux-gnueabi/fsl-tp-image/1.0-r0/rootfs/usr/src/linux/include -MT basic_ex1.o -MD -MP -MF .deps/basic_ex1.Tpo -c -o basic_ex1.o basic_ex1.c
basic_ex1.c:32:25: fatal error: linux/mxcfb.h: No such file or directory
compilation terminated.
make[1]: *** [basic_ex1.o] Error 1
make[1]: Leaving directory `/home/hli/codetest/ipu-examples/mx6/basic/example1'
make: *** [all-recursive] Error 1
I showed that the compiler cannot find linux/mxcfb.h
I do not know this is due to the yocto or my yocto recipe setup. Do i need extra steps to make it work in yocto?
the build i tried to make yesterday is based on dora_3.10.17-1.0.0_GA, actually I saw the same problems. it cannot find either linux/ipu.h or linux/mxcfb.h. During this build, I did not use the LTIB toochain and rootfs; I used yocto built-in toolchain and target sysroot to build it.
In order to make the compile find these two library files,
i switched the <linux/ipu.h> to <mxc_ipu_hl_lib.h> which is showed in IPUV3 library user guide.
and copied two mxcfb.h files to sysroot folder.
Of course, it still does not work.
Thanks a lot!
Haizhou
Hi haizhouli,
Yes, it was based on LTIB. It's time to move to Yocto... (I'm doing it right now)
I got the same error. I'm working to fix it and make it compatible to Yocto. It's a Makefile and configure problem.
The missing mxcfb.h error is because these demos require kernel headers that Yocto doesn't add by default on root file system.
mxc_ipu_hl_lib.h is the header from IPUv3 library used only on i.MX53. i.MX6 doesn't use this library.
I hope to have this fixed till the beginning of the next week. I'll keep you informed.
Rgds
Rogerio
Thanks for the update!
I have already made your examples working on yocto based on 3.0.35 using yocto built-in toolchain and target sysroot. But still show errors on 3.10.17.
I will begin to work on IPU coding on 3.0.35 currently and waiting for your update.
Thanks!
Hi haizhouli
I just updated the repository with 2 patches to fix the Makefile and configure files and also to update the Readme file. It's now building with kernel 3.10.17 + Yocto.
If you have problems to build or in some example code, please let me know.
Best Regards,
Rogerio
Hi,
I am glad to hear that it is fixable, could you send me info, which 2 patches you applied ?
Thank you
Best regards
Miroslav Kopecek