i.MX Processors Knowledge Base

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

i.MX Processors Knowledge Base

Discussions

Sort by:
This is an example of QR code encoding using i.MX28. The encoded QR image can show on the LCD display directly using frame buffer and the image saved as a BMP file. Board : i.MX28EVK BSP : L2.6.35_1.1.0_130130_source QR Code Lib:  qrencode-3.4.4.tar.gz Download from https://fukuchi.org/works/qrencode/ Libqrencode is a C library for encoding data in a QR Code symbol. This library is a free software made by Kentaro Fukuchi. Build the QR Code Lib source code into rootfs. 1. Create a new folder in <ltib>/dist/lfs-5.1/.     e.g. <ltib>/dist/lfs-5.1/qrencode 2. Copy the qrencode.spec to this new created folder 3. Build the source code    ./ltib –p qrencode.spec –m prep    ./ltib –p qrencode.spec –m scbuild    ./ltib –p qrencode.spec –m scdeploy Create and build the application in unit_test: - I use the existing unit_test package to build my application code. 1. Extract the source code of unit_test    ./ltib –p imx-test –m prep 2. cd <ltib>/rpm/BUILD/imx-test-2.6.35.3-1.1.0/test 3. mkdir qr_test 4. copy the Makefile and qr_test.c to qr_test folder 5. Build the unit_test     ./ltib –p imx-test  –m scbuild     ./ltib –p imx-test  –m scdeploy After built the code successfully, the qr_test.out will be generated in the unit_test folder. I start the board with NFS, so I can run the qr_test.out on the board directly. The command is : ./qr_test.out   (the default QR encode text is “http://www.freescale.com”) Or input the new text like this : ./qr_test.out –t https://community.freescale.com/community/imx The QR code  show on the display: And the BMP files will be generated in the unit_test folder.
View full article
It is based on 3.0.35 GA 4.1.0 BSP.   0001-Correct-mipi-camera-virtual-channel-setting-in-ipu_c.patch It is the updated IPU code for MIPI ID and SMFC setting in ipu_capture.c. These setting should not be combined with MIPI virtual channel value, they shoule be fixed with ID 0.   0002-Use-virtual-channel-3-for-ov5640-mipi-camera-on-iMX6.patch The sample code to modify ov5640_mipi camera to use virtual channel 3 on SabreSD board.   The followed command can be used to verify the mipi camera function after booted into Linux: $ gst-launch mfw_v4lsrc capture-mode=1 device=/dev/video1 ! mfw_v4lsink     2014-09-30 update: Added the patch for 3.10.17_GA1.0.0 BSP. "L3.10.17_1.0.0_mipi_camera_virtual_channel_3.zip"  
View full article
Here is a quick summary at booting a Linux system on the i.MX 6 Sabre SD platform, through USB. This assumes you have a "working" Linux development environment at hand (e.g. Debian), and that your are able to build a working Linux system with buildroot already, as explained in this post. You will also need libusb-1.0 development files (headers and libraries), as well as root/sudo permissions to access USB peripherals. Also, we will use the fine imx_usb_loader tool that the nice folks at Boundary Devices have developed for their i.MX 5/6 boards, as it works fine for Sabre sd as well. Get buildroot sources We will use git to fetch buildroot sources: $ git clone git://git.busybox.net/buildroot This should create a buildroot directory with all the latest sources (after a while). Note that for more stability you might want to checkout a release instead of the latest version; to do so, list the available release tags with e.g. git tag -l '201*', and git checkout <the-desired-tag>. Compile buildroot The beauty of buildroot is that it will take care of everything for you, including preparing a cross compiler. You can configure buildroot for Sabre SD by doing: $ cd buildroot $ make freescale_imx6sabresd_defconfig By default this would generate binaries suitable for booting with an SD card, so we need to tweak a few settings to obtain a ramdisk, which u-boot will like. Summon the configuration menu with the following command: $ make menuconfig Descend into the "Filesystem images" submenu, and select the following buildroot options: cpio the root filesystem (for use as an initial RAM filesystem) Compression method (gzip) Create U-Boot image of the root filesystem Exit, saving your configuration. You might want to verify that you have indeed the the correct options in your .config: $ grep '^BR2_TARGET_ROOTFS_CPIO' .config This should return the following: BR2_TARGET_ROOTFS_CPIO=y BR2_TARGET_ROOTFS_CPIO_GZIP=y BR2_TARGET_ROOTFS_CPIO_UIMAGE=y You may then proceed with the build: $ make This should download and build everything, so it will take a while. Note that, as bryanthomas pointed out, there are no files for the sabre sd in the boards folder. This is because no patches or custom kernel configurations are needed outside of what is defined in the defconfig. So the only place the sabre sd board lives in buildroot is in the configs directory. At the time of writing we still need a small final hack to have Linux boot on /init instead of its default /linuxrc for proper boot on ramdisk, though. Hopefully this should be addressed in a future buildroot version, and a patch is on his way, but for now we change the boot script in our target filesystem with: $ cd output/target $ ln -svf init linuxrc $ cd ../.. $ make All build results will fall under the output/images folder. We are most interested in the following pieces: output/images/ +- imx6q-sabresq.dtb +- rootfs.cpio.uboot +- u-boot.imx `- uImage Get imx_usb_loader sources We will use git to fetch imx_usb_loader sources: $ git clone git://github.com/boundarydevices/imx_usb_loader.git This should create an imx_usb_loader directory with all the latest sources. Compile imx_usb_loader Assuming your Linux development environment has the necessary libusb-1.0 headers and libraries, you can simply build by doing: $ cd imx_usb_loader $ make This should compile an imx_usb tool in the current folder. Prepare your payload and configuration First, copy all the necessary buildroot generated items to the imx_usb_loader directory. You will need: u-boot.imx uImage imx6q-sabresd.dtb rootfs.cpio.uboot Now we need to explain to imx_usb what we want to download to the i.MX romcode through USB. Add the following lines in the end of the mx6_usb_work.conf: ... u-boot.imx:dcd,plug uImage:load 0x12000000 rootfs.cpio.uboot:load 0x12C00000 imx6q-sabresd.dtb:load 0x18000000 u-boot.imx:clear_dcd,jump header The first line with dcd, plug uses u-boot header to configure the DDR3 memory, allowing us to download contents to the Sabre SD memory. This is exactly what the three subsequent lines with load directives do. The last line re-uses u-boot one more time to find out the address where to jump (jump header directive), but not touching the DDR configuration any more thanks to the clear_dcd directive (thanks jeanmariepons-b46892 for the tips) . Look at the comments in mx6_usb_work.conf for (a bit) more details on the various directives available. Also, note that all the absolute addresses mentioned above are what u-boot needed at the time of writing. Hopefully this should be fairly stable. Boot through USB! We are all set for booting now. Connect to the USB to UART port with a serial terminal set to 115200 baud, no parity, 8bit data. Connect also your PC to the USB OTG port of the Sabre SD, and make sure you have no SD card inserted and power up the platform. The Sabre SD should not boot into an operating system, but rather wait for a payload to download through USB. You might want to verify that it is indeed waiting with the following command: $ lsusb In the resulting output, there should be a line like the following: Bus 001 Device 098: ID 15a2:0054 Freescale Semiconductor, Inc. i.MX 6Dual/6Quad SystemOnChip in RecoveryMode On your PC, start the download of our "payload" to your Sabre SD with: $ sudo ./imx_usb (Note that you need proper permissions to do that.) After download of all the pieces, u-boot should start in its "mfgtools mode", as reflected by the following messages on UART: ... Boot from USB for mfgtools Use default environment for mfgtools Run bootcmd_mfg: run mfgtool_args;bootm ${loadaddr} ${initrd_addr} ${fdt_addr}; ... The Linux kernel should then start, and your buildroot system should reach a prompt: ... Welcome to Buildroot buildroot login: From there you may login as root. Enjoy! See also... This post details the buildroot steps a bit more. This post explains how to build a ramdisk for i.MX6 with busybox directly. AdeneoEmbedded - Whitepaper on USB loader for i.MX6 platforms imx_usb_loader README on github Buildroot: making embedded Linux easy
View full article
The i.MX 6 D/Q/DL/S/SL Linux 3.10.17_1.0.0 GA release is now available on www.freescale.com Files available Name Description L3.10.17_1.0.0_LINUX_DOCS i.MX 6 D/Q/DL/S/SL Linux 3.10.17_1.0.0 GA BSP documentation. y L3.10.17_1.0.0_iMX6QDLS_Bundle i.MX 6 D/Q/DL/S  Linux 3.10.17_1.0.0 GA BSP Binary Demo Files L3.10.17_1.0.0_iMX6SL_Bundle i.MX 6 SL  Linux 3.10.17_1.0.0 GA BSP Binary Demo Files i.MX_6_Vivante_VDK_150_Tools Vivante VTK 1.5 Codec for the i.MX 6 D/Q/DL/S/SL Linux 3.10.17_1.0.0 GA BSP    y L3.10.17_1.0.0_AACP_CODECS AAC Plus Codec for the i.MX 6 D/Q/DL/S/SL Linux 3.10.17_1.0.0 GA BSP y IMX_6_MFG_L3.10.17_1.0.0_TOOL Manufacturing Tool and Documentation for Linux 3.10.17_1.0.0 GA BSP y Target HW boards o   i.MX6DL  SABRE SD board o   i.MX6Q  SABRE SD board o   i.MX6DQ SABRE AI board o   i.MX6DL SABRE AI board o   i.MX6SL EVK board New  Features o   Main BSP New Features on MX6DQ, MX6DL and MX6SL from L3.10.9_1.0.0 GA: SD3.0 reset USB HSIC HWRNG security feature on MX6SL VIIM OTP Fuse in uboot Battery charge LED U-boot USB mass storage support USB Camera on host mode X backend: Adaptive HDMI display support backed by XRandR Main Codec New Features on MX6DQ, MX6DL and MX6SL from L3.10.17_1.0.0 Beta: Bug fix Main Codec New Features on MX6DQ, MX6DL and MX6SL from L3.10.17_1.0.0 Beta: Bug fix Other features not supported found during testing: UART: only support some baud rates like 9600, 115200, can't support high to 4000000 Known issues For known issues and limitations please consult the release notes located in the BSP documentation package.
View full article
This is a How-To documentation for OpenCL on i.MX6 using LTIB, there are all necessary steps and sample code to create,  build and run a HelloWorld application.
View full article
1. Description     1) Support HDMI interlaced display mode, the followed format had been verified.         CEA format 5: 1920x1080i @60Hz         CEA format 6&7: 720(1440)x480i @60Hz         CEA format 20: 1920x1080i @50Hz         CEA format 21&22: 720(1440)x576i @50Hz     2) Support LCD interface for interlaced display mode, 1920x1080i @50Hz(CEA format 20)        had been verified. 2. File List -- 0001-IPUv3-support-interlaced-display-mode.patch    Patch to support interlaced display output for iMX6 ipuv3. -- 0002-iMX6-HDMI-support-interlaced-display-mode.patch    Patch to support interlaced display mode for iMX6 HDMI driver. -- 0003-iMX6-LCD-interface-supports-1920x1080i50-mode.patch    Patch to support interlaced display mode for iMX6 LCD interface driver.    -- readme.txt    this file, please refer to it before use the patches 3. Requirement - iMX6 SabreSD board. - L3.0.35_4.1.0_GA_iMX6DQ kernel. 4. How to use -- Copy the patch files to kernel folder.     $ cd ~/ltib/rpm/BUILD/linux-3.0.35/     $ git apply ./0001-IPUv3-support-interlaced-display-mode.patch     $ git apply ./0002-iMX6-HDMI-support-interlaced-display-mode.patch     $ git apply ./0003-iMX6-LCD-interface-supports-1920x1080i50-mode.patch -- Build the new kernel image:     $ cd ~/ltib/rpm/BUILD/linux-3.0.35     $ export CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi-     $ export ARCH=arm     $ make imx6_defconfig     $ make uImage -- Uboot parameters for video mode    Output 1080i50 display mode on HDMI:       "video=mxcfb0:dev=hdmi,1920x1080Mi@25,if=RGB24,bpp=32"    Output 1080i60 display mode on HDMI:       "video=mxcfb0:dev=hdmi,1920x1080Mi@30,if=RGB24,bpp=32"    Output 576i50 display mode on HDMI:       "video=mxcfb0:dev=hdmi,1440x576Mi@25,if=RGB24,bpp=32"    Output 480i60 display mode on HDMI:       "video=mxcfb0:dev=hdmi,1440x480Mi@30,if=RGB24,bpp=32"    Output 1080i50 display mode on LCD interface:       "video=mxcfb0:dev=lcd,LCD-1080I50,if=RGB565,bpp=32"       -- Switch HDMI interlaced mode    $ echo S:1920x1080i-50 > /sys/class/graphics/fb0/mode    $ echo S:1920x1080i-60 > /sys/class/graphics/fb0/mode    $ echo S:1440x480i-50 > /sys/class/graphics/fb0/mode    $ echo S:1440x576i-60 > /sys/class/graphics/fb0/mode 5. Know issue     1) When the interlaced display and another display work on same IPU,        blank and unblank the interlaced display will get the followed IPU        warning, but the display still works due to IPU can revover from the error.     imx-ipuv3 imx-ipuv3.0: IPU Warning - IPU_INT_STAT_5 = 0x00800000     imx-ipuv3 imx-ipuv3.0: IPU Warning - IPU_INT_STAT_10 = 0x00080000 2015-05-13 update: Replace the fourth patch to make interlace display mode follow CEA-861-specification The patch "0004-IPU-fine-tuning-the-interlace-display-timing-for-CEA.patch" was fine tuned for CEA-861-D specification on interlaced mode display. Please use this patch to replace the old 0004 patch. 2016-05-20 Update: For 3.0.35 BSP, add patch 0005-IPU-update-interlaced-video-mode-parameters-to-align.patch      Align the interlaced video mode parameters to progressive mode. 0006-IPU-update-IDMAC-setting-for-interlaced-display-mode.patch      Udate the IDMAC setting for interlaced display mode, output odd field data from memory first, it aligns with IPU DI timing, odd field first. For 3.14.52 BSP, created the new patch L3.14.52_1.1.0_GA_HDMI_Interlaced_Mode_Patch_2016_05_20.zip.
View full article
When working with IPU applications, sometimes image format converter is needed to check images generated by IPU that are not readable by PC (e.g. RGB565, common i.MX framebuffer format -> png or jpg) or generate a RGB picture from an encoded file to be read by IPU (e.g. png -> RGB565 framebuffer). There are some useful tools on Linux and some also available on Windows that can perform these conversions. I listed 5 tools with some usage examples below. IMAGEMAGICK // Display a 800x600 rgb image display -size 800x600 -depth 8 rgb:output.rgb // Show information of output.rgb identify -size 1296x972 -depth 8 output.rgb // Convert a 640x480 grayscale raw rgb file to png convert -size 640x480 -depth 8 imagefile.rgb image.png // To list all available color formats identify -list format For more information about Imagemagick and its format support. access: http://www.imagemagick.org/script/formats.php FFMPEG // List available formats for ffmpeg ffmpeg -pix_fmts // Convert raw rgb565 image to png ffmpeg -vcodec rawvideo -f rawvideo -pix_fmt rgb565 -s 1024x768 -i freescale_1024x768.raw -f image2 -vcodec png screen.png // Convert png to raw rgb565 ffmpeg -vcodec png -i image.png -vcodec rawvideo -f rawvideo -pix_fmt rgb565 image.raw // Convert a 720x480 NV12 (YUV 420 semi-planar) image to png ffmpeg -s 720x480 -pix_fmt nv12 -i image-nv12.yuv -f image2 -pix_fmt rgb24 image-png.png // Convert a 640x480 uyvy422 image to png ffmpeg -s 640x480 -pix_fmt uyvy422 -i image-uyvy422.yuv -f image2 -pix_fmt rgb24 image-uyvy422.png MENCODER http://www.mplayerhq.hu/DOCS/HTML/en/encoding-guide.html TRANSCODING http://www.transcoding.org/cgi-bin/transcode?Examples GRAPHICSMAGICK http://www.graphicsmagick.org/
View full article
Here is a quick summary at building a bootloader, a kernel and a root filesystem for the i.MX 6 sabre sd platform, using buildroot. This assumes you have a "working" Linux development environment at hand (e.g. Debian). Buildroot is a fine build system, which makes deploying Linux on embedded platforms really easy. It is comparable to Yocto in spirit, but much simpler. Thanks to my colleague gillestalis, buildroot now has builtin support for the i.MX6 sabre sd platform. Get buildroot sources We will use git to fetch buildroot sources: $ git clone git://git.busybox.net/buildroot This should create a buildroot directory with all the latest sources (after a while). Note that for more stability you might want to checkout a release instead of the latest version; to do so, list the available release tags with e.g. git tag -l '201*', and git checkout <the-desired-tag>. Compile The beauty of buildroot is that it will take care of everything for you, including preparing a cross compiler. You can download and build everything by doing: $ cd buildroot $ make freescale_imx6sabresd_defconfig $ make This should download and build everything, so it will take a while. buildroot detects the number of CPUs you have in your machine and builds with parallel jobs automatically; no need to specify any -j argument to make here. All build results fall under the output/images folder: output/images/ +- rootfs.ext2 +- rootfs.tar +- u-boot.bin `- uImage Format the SD card As for Debian, we need to format the SD card with two partitions; one small FAT partition to contain the Linux kernel, and one large ext4 partition, which will contain the root filesystem with the buildroot generated userspace. Also, we need to make sure we leave some space for u-boot starting from offset 1024B. Here is an example SD card layout: +-----+------+--------+-----+---------------+----------------- | MBR |  ... | u-boot | ... | FAT partition | Linux partition ... +-----+------+--------+-----+---------------+----------------- 0     512    1024           1M              ~257M (offsets in bytes) Here is an example SD card layout, as displayed by fdisk: Device    Boot      Start         End      Blocks   Id  System /dev/sdc1            2048      526335      262144    c  W95 FAT32 (LBA) /dev/sdc2          526336     8054783     3764224   83  Linux (units: 512B sectors) You can format the FAT boot partition with: # mkfs.vfat /dev/<your-sd-card-first-partition> Your SD card first partition is typically something in /dev/sd<X>1 or/dev/mmcblk<X>p1. You can format the Linux partition with: # mkfs.ext4 /dev/<your-sd-card-second-partition> Your SD card second partition is typically something in /dev/sd<X>2 or/dev/mmcblk<X>p2. Put on SD As explained here, u-boot should reside at offset 1024B of your SD card. Also, as buildroot generates an u-boot.bin (and not an u-boot.imx) we should skip its first KB, too. In summary, to put u-boot on your SD, do:   # dd if=output/images/u-boot.bin of=/dev/<your-sd-card> bs=1k seek=1 skip=1   # sync Your SD card device is typically something in /dev/sd<X> or /dev/mmcblk<X>. Note that you need write permissions on the SD card for the command to succeed, so you might need to su - as root, or use sudo, or do a chmod a+w as root on the SD card device node to grant permissions to users. Similarly to what this post describes, you can copy the kernel to the FAT boot partition with: # mount /dev/<your-sd-card-second-partition> /mnt # cp output/images/uImage /mnt/ # umount /mnt Your SD card first partition is typically something in /dev/sd<X>1 or/dev/mmcblk<X>p1. And not unlike what is done in this post, You can install your generated root filesystem to the Linux partition with: # mount /dev/<your-sd-card-second-partition> /mnt # tar -C /mnt -xvf output/images/rootfs.tar # umount /mnt Your SD card second partition is typically something in /dev/sd<X>2 or/dev/mmcblk<X>p2. Boot! Your SD card is ready for booting. Insert it in the SD card slot of your i.MX6 sabre sd platform, connect to the USB to UART port with a serial terminal set to 115200 baud, no parity, 8bit data and power up the platform. Like with Debian, u-boot default settings will not allow it to boot from the SD card, so we need to interrupt it by pressing enter at u-boot prompt for the first boot and setup u-boot environment to fix this: MX6Q SABRESD U-Boot > setenv bootargs_mmc 'setenv bootargs ${bootargs} root=/dev/mmcblk1p2 rootwait' MX6Q SABRESD U-Boot > setenv bootcmd_mmc 'run bootargs_base bootargs_mmc; mmc dev 2; fatload mmc 2:1 ${loadaddr} ${kernel}; bootm' MX6Q SABRESD U-Boot > setenv bootcmd 'run bootcmd_mmc' MX6Q SABRESD U-Boot > saveenv Saving Environment to MMC... Writing to MMC(2)... done As this is saved in the SD card it need only to be done once at first boot. You can reboot your board or type boot; your buildroot system should boot to a prompt: (...) Welcome to Buildroot buildroot login: From there you may login as root. Enjoy! Tweak buildroot uses Linux kernel kconfig to handle its configuration. So, as for the Linux kernel, changes to the configuration can be done with e.g.: $ make menuconfig Most of the options can be tuned from there, including (most importantly) which packages get installed into the generated root filesystem. This is configuration section 'Filesystem images'. Further details are documented in buildroot manual. Tips ccache is natively supported by buildroot and can be easily enabled with configuration option BR2_CCACHE. If you only use the generated rootfs.tar as described in this post and do not care about the rootfs.ext2, you might as well save a few seconds of build by disabling its generation. This is done with configuration option BR2_TARGET_ROOTFS_EXT2. It is recommended to install an ssh server inside the target for further development. This is conveniently done with configuration option BR2_PACKAGE_OPENSSH. See also... Other root filesystems may make more sense for you; see this post for a Debian root filesystem, and this post for a minimal busybox filesystem. Freescale Yocto Project main page
View full article
This is the procedure and patch to set up Ubuntu 13.10 64bit Linux Host PC and building i.MX6x L3.0.35_4.1.0. It has been tested to build GNOME profile and with FSL Standard MM Codec for i.MX6Q SDB board. A) Basic Requirement: Set up the Linux Host PC using ubuntu-13.10-desktop-amd64.iso Make sure the previous LTIB installation and the /opt/freescale have been removed B) Installed the needed packages to the Linux Host PC $ sudo apt-get update $ sudo apt-get install gettext libgtk2.0-dev rpm bison m4 libfreetype6-dev $ sudo apt-get install libdbus-glib-1-dev liborbit2-dev intltool $ sudo apt-get install ccache ncurses-dev zlib1g zlib1g-dev gcc g++ libtool $ sudo apt-get install uuid-dev liblzo2-dev $ sudo apt-get install tcl dpkg $ sudo apt-get install asciidoc texlive-latex-base dblatex xutils-dev $ sudo apt-get install texlive texinfo $ sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 $ sudo apt-get install libc6-dev-i386 $ sudo apt-get install u-boot-tools $ sudo apt-get install scrollkeeper $ sudo apt-get install gparted $ sudo apt-get install nfs-common nfs-kernel-server $ sudo apt-get install git-core git-doc git-email git-gui gitk $ sudo apt-get install meld atftpd $ sudo ln -s /usr/lib/x86_64-linux-gnu/librt.so   /usr/lib/librt.so C) Unpack and install the LTIB source package and assume done on the home directory: $ cd ~ $ tar -zxvf L3.0.35_4.1.0_130816_source. tar.gz $ ./L3.0.35_4.1.0_130816_source/install      After that, you will find ~/ltib directory created D) Apply the patch to make L3.0.35_4.1.0 could be installed and compiled on Ubuntu 13.10 64bit OS $ cd ~/ltib $ git apply 0001_make_L3.0.35_4.1.0_compile_on_Ubuntu_13.10_64bit_OS.patch What the patch is doing: a) The patch modifies the following files:    dist/lfs-5.1/base_libs/base_libs.spec    dist/lfs-5.1/m4/m4.spec    dist/lfs-5.1/ncurses/ncurses.spec b) Add the following files to the pkgs directory:    pkgs/m4-1.4.16-1383761043.patch    pkgs/m4-1.4.16-1383761043.patch.md5 E) Then, it is ready to proceed the rest of the LTIB env setup process: $ cd ~/ltib $ ./ltib -m config $ ./ltib Reference: L3.0.35_4.1.0_130816_docs/doc/mx6/Setting_Up_LTIB_host.pdf https://community.freescale.com/message/332385#332385 https://community.freescale.com/thread/271675 https://community.freescale.com/message/360556#360556 m4 compilation issue: 1. https://github.com/hashdist/hashstack/commit/f6be2a58de62327d05e052d89c9aa931d4c926b3 2. https://github.com/hashdist/hashstack/issues/81 rpm-fs package failed to build issue: https://community.freescale.com/message/355771#355771 scrollkeeper is for the gnome-desktop compilation NOTE: When compiling gstreamer, this warning was pop up.  Just ignore it seems okay.
View full article
This is the procedure and patch to set up Ubuntu 13.10 64bit Linux Host PC and building i.MX28 L2.6.35_1.1.0_130130. It has been tested to build GNOME profile and with FSL Standard MM codec. A) Basic Requirement: Set up the Linux Host PC using ubuntu-13.10-desktop-amd64.iso Make sure the previous LTIB installation and the /opt/freescale have been removed B) Installed the needed packages to the Linux Host PC $ sudo apt-get update $ sudo apt-get install gettext libgtk2.0-dev rpm bison m4 libfreetype6-dev $ sudo apt-get install libdbus-glib-1-dev liborbit2-dev intltool $ sudo apt-get install ccache ncurses-dev zlib1g zlib1g-dev gcc g++ libtool $ sudo apt-get install uuid-dev liblzo2-dev $ sudo apt-get install tcl dpkg $ sudo apt-get install asciidoc texlive-latex-base dblatex xutils-dev $ sudo apt-get install texlive texinfo $ sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 $ sudo apt-get install libc6-dev-i386 $ sudo apt-get install u-boot-tools $ sudo apt-get install scrollkeeper $ sudo apt-get install gparted $ sudo apt-get install nfs-common nfs-kernel-server $ sudo apt-get install git-core git-doc git-email git-gui gitk $ sudo apt-get install meld atftpd $ sudo ln -s /usr/lib/x86_64-linux-gnu/librt.so   /usr/lib/librt.so C) Unpack and install the LTIB source package and assume done on the home directory: $ cd ~ $ tar -zxvf L2.6.35_1.1.0_130130_source.tar.gz $ ./L2.6.35_1.1.0_130130_source/install After that, you will find ~/ltib directory created D) Apply the patch to make L2.6.35_1.1.0_130130 could be installed and compiled on Ubuntu 13.10 64bit OS $ cd ~/ltib $ git apply 0001_make_L2.6.35_1.1.0_130130_compile_on_ubuntu_13.10_64bit_OS.patch What the patch is doing: a) The patch modifies the following files: dist/lfs-5.1/base_libs/base_libs.spec dist/lfs-5.1/elftosb/elftosb.spec dist/lfs-5.1/lkc/lkc.spec dist/lfs-5.1/mux_server/mux_server.spec dist/lfs-5.1/ncurses/ncurses.spec b) Add the following files to the pkgs directory: pkgs/elftosb-2.6.35.3-1385779630.patch pkgs/elftosb-2.6.35.3-1385779630.patch.md5 pkgs/lkc-1.4-lib.patch pkgs/lkc-1.4-lib.patch.md5 E) Then, it is ready to proceed the rest of the LTIB env setup process: $ cd ~/ltib $ ./ltib -m config $ ./ltib Reference: L2.6.35_1.1.0_130130_docs/doc/mx28/Setting_Up_LTIB_Host_on_Ubuntu_9_04.pdf https://community.freescale.com/docs/DOC-93394 https://community.freescale.com/message/332385#332385 https://community.freescale.com/thread/271675 https://community.freescale.com/message/360556#360556 scrollkeeper is for the gnome-desktop compilation elftosb compilation issue fixed by added -lm to LIBS in the elftosb-2.6.35.3-1.1.0/makefile.rules NOTE: When compiling gstreamer, this warning was pop up.  Just ignore it seems okay.
View full article
This is the procedure and patch to set up Ubuntu 12.04 64bit Linux Host PC and building i.MX28 L2.6.35_1.1.0_130130.  It has been tested to build GNOME profile and with FSL Standard MM codec. A) Basic Requirement: Set up the Linux Host PC using ubuntu-12.04.3-desktop-amd64.iso Make sure the previous LTIB installation and the /opt/freescale have been removed B) Installed the needed packages to the Linux Host PC $ sudo apt-get update $ sudo apt-get install gettext libgtk2.0-dev rpm bison m4 libfreetype6-dev $ sudo apt-get install libdbus-glib-1-dev liborbit2-dev intltool $ sudo apt-get install ccache ncurses-dev zlib1g zlib1g-dev gcc g++ libtool $ sudo apt-get install uuid-dev liblzo2-dev $ sudo apt-get install tcl dpkg $ sudo apt-get install asciidoc texlive-latex-base dblatex xutils-dev $ sudo apt-get install texlive texinfo $ sudo apt-get install ia32-libs libc6-dev-i386 lib32z1 $ sudo apt-get install uboot-mkimage $ sudo apt-get install scrollkeeper $ sudo apt-get install gparted $ sudo apt-get install nfs-common nfs-kernel-server $ sudo apt-get install git-core git-doc git-email git-gui gitk $ sudo apt-get install meld atftpd C) Unpack and install the LTIB source package and assume done on the home directory: $ cd ~ $ tar -zxvf L2.6.35_1.1.0_130130_source.tar.gz $ ./L2.6.35_1.1.0_130130_source/install After that, you will find ~/ltib directory created D) Apply the patch to make L2.6.35_1.1.0 could be installed and compiled on Ubuntu 12.04 64bit OS $ cd ~/ltib $ git apply 0001_make_L2.6.35_1.1.0_130130_compile_on_ubuntu_12.04_64bit_OS.patch a) The patch modifies the following files:    dist/lfs-5.1/base_libs/base_libs.spec    dist/lfs-5.1/lkc/lkc.spec    dist/lfs-5.1/mux_server/mux_server.spec    dist/lfs-5.1/ncurses/ncurses.spec b) Add the following files to the pkgs directory:    pkgs/lkc-1.4-lib.patch    pkgs/lkc-1.4-lib.patch.md5 E) Then, it is ready to proceed the rest of the LTIB env setup process: $ cd ~/ltib $ ./ltib -m config $ ./ltib Reference: L2.6.35_1.1.0_130130_docs/doc/mx28/Setting_Up_LTIB_Host_on_Ubuntu_9_04.pdf https://community.freescale.com/docs/DOC-93394 https://community.freescale.com/message/332385#332385 https://community.freescale.com/thread/271675 https://community.freescale.com/message/360556#360556 scrollkeeper is for the gnome-desktop compilation NOTE: When compiling gstreamer, this warning was pop up.  Just ignore it seems okay.
View full article
This is the procedure and patch to set up Ubuntu 12.04 64bit Linux Host PC and building i.MX6x L3.0.35_4.1.0.  It has been tested to build GNOME profile and with FSL Standard MM Codec for i.MX6Q SDB board. A) Basic Requirement: Set up the Linux Host PC using ubuntu-12.04.3-desktop-amd64.iso Make sure the previous LTIB installation and the /opt/freescale have been removed B) Installed the needed packages to the Linux Host PC $ sudo apt-get update $ sudo apt-get install gettext libgtk2.0-dev rpm bison m4 libfreetype6-dev $ sudo apt-get install libdbus-glib-1-dev liborbit2-dev intltool $ sudo apt-get install ccache ncurses-dev zlib1g zlib1g-dev gcc g++ libtool $ sudo apt-get install uuid-dev liblzo2-dev $ sudo apt-get install tcl dpkg $ sudo apt-get install asciidoc texlive-latex-base dblatex xutils-dev $ sudo apt-get install texlive texinfo $ sudo apt-get install ia32-libs libc6-dev-i386 lib32z1 $ sudo apt-get install uboot-mkimage $ sudo apt-get install scrollkeeper $ sudo apt-get install gparted $ sudo apt-get install nfs-common nfs-kernel-server $ sudo apt-get install git-core git-doc git-email git-gui gitk $ sudo apt-get install meld atftpd C) Unpack and install the LTIB source package and assume done on the home directory: $ cd ~ $ tar -zxvf L3.0.35_4.1.0_130816_source.tar.gz $ ./L3.0.35_4.1.0_130816_source/install After that, you will find ~/ltib directory created D) Apply the patch to make L3.0.35_4.1.0 could be installed and compiled on Ubuntu 12.04 64bit OS $ cd ~/ltib $ git apply 0001_make_L3.0.35_4.1.0_compile_on_Ubuntu_12.04_64bit_OS.patch The patch modifies the following files: dist/lfs-5.1/base_libs/base_libs.spec dist/lfs-5.1/ncurses/ncurses.spec E) Then, it is ready to proceed the rest of the LTIB env setup process: $ cd ~/ltib $ ./ltib -m config $ ./ltib Reference: L3.0.35_4.1.0_130816_docs/doc/mx6/Setting_Up_LTIB_host.pdf https://community.freescale.com/message/332385#332385 https://community.freescale.com/thread/271675 https://community.freescale.com/message/360556#360556 scrollkeeper is for the gnome-desktop compilation NOTE: When compiling gstreamer, this warning was pop up.  Just ignore it seems okay.
View full article
Notes: + Run the pipelines in the presented order + The above example streams H263 video. + the gl command is equal to 'gst-launch' (two instead of 'gst-launch'.size() chars ) + Pending work: H264 test cases and other scenarios. Scenario Shell variables and pipelines # Export always these variables on the i.MX export VSALPHA=1 export WIDTH=320 export HEIGHT=240 export SEP=20 # decoded and displayed Uni-directional: from PC to i.MX. PC is streaming 4 H.263 streams and i.MX displays all in the screen. # On i.MX (Target) gl udpsrc caps='application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H263' port=8890 ! rtph263depay ! vpudec ! mfw_isink sync=false axis-top=0 axis-left=0 disp-width=$WIDTH disp-height=$HEIGHT & gl udpsrc caps='application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H263' port=8891 ! rtph263depay ! vpudec ! mfw_isink sync=false axis-top=0 axis-left=`expr $WIDTH + $SEP` disp-width=$WIDTH disp-height=$HEIGHT & gl udpsrc caps='application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H263' port=8892 ! rtph263depay ! vpudec ! mfw_isink sync=false axis-top=`expr $HEIGHT + $SEP` axis-left=0   disp-width=$WIDTH disp-height=$HEIGHT & gl udpsrc caps='application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H263' port=8893 ! rtph263depay ! vpudec ! mfw_isink sync=false axis-top=`expr $HEIGHT + $SEP` axis-left=`expr $WIDTH + $SEP` disp-width=$WIDTH disp-height=$HEIGHT & # On PC (Source) export IP_iMX= # Place the IP address of the i.MX board gst-launch -v videotestsrc ! ffenc_h263 ! rtph263pay ! multiudpsink clients=IP_iMX:8890,IP_iMX:8891,IP_iMX:8892,$IP_iMX:8893 Uni-directional: from PC to i.MX. PC is streaming one H.264 stream and i.MX displays it on the screen # On i.MX (Target) # Make sure you set the caps correctly, specially the sprop-parameter-sets cap. The one show below is just an example and works with the source file sintel_trailer-1080p.mp4 export VSALPHA=1 GST_DEBUG=*:2 gst-launch -v udpsrc caps='application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, sprop-parameter-sets=(string)\"Z2QAMqw05gHgCJ+WEAAAAwAQAAADAwDxgxmg\\,aOl4TLIs\", payload=(int)96' port=8890 ! rtph264depay ! vpudec ! mfw_isink sync=false # On PC (Source) gst-launch -v filesrc location=sintel_trailer-1080p.mp4 typefind=true ! qtdemux ! rtph264pay ! multiudpsink clients=10.112.102.168:8890 Bi-directional: PC is streaming 4 H.263 streams to i.MX, iMX displays it and sends the four back to PC # On i.MX export IP_PC= # Place the IP address of the PC host machine gl -v udpsrc caps='application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H263' port=8890 ! rtph263depay ! vpudec ! tee name=t ! queue ! mfw_isink sync=false axis-top=0 axis-left=0 disp-width=$WIDTH disp-height=$HEIGHT t. ! queue ! vpuenc codec=5 ! rtph263pay ! udpsink host=$IP_PC port=9990 & gl -v udpsrc caps='application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H263' port=8891 ! rtph263depay ! vpudec ! tee name=t ! queue ! mfw_isink sync=false axis-top=0 axis-left=`expr $WIDTH + $SEP` disp-width=$WIDTH disp-height=$HEIGHT t. ! queue ! vpuenc codec=5 ! rtph263pay ! udpsink host=$IP_PC port=9991 & gl -v udpsrc caps='application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H263' port=8892 ! rtph263depay ! vpudec ! tee name=t ! queue ! mfw_isink sync=false axis-top=`expr $HEIGHT + $SEP` axis-left=0   disp-width=$WIDTH disp-height=$HEIGHT t. ! queue ! vpuenc codec=5 ! rtph263pay ! udpsink host=$IP_PC port=9992 & gl -v udpsrc caps='application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H263' port=8893 ! rtph263depay ! vpudec ! tee name=t ! queue ! mfw_isink sync=false axis-top=`expr $HEIGHT + $SEP` axis-left=`expr $WIDTH + $SEP` disp-width=$WIDTH disp-height=$HEIGHT t. ! queue ! vpuenc codec=5 ! rtph263pay ! udpsink host=$IP_PC port=9993 & # On PC ## Stream received from iMX export IP_iMX= # Place the IP address of the i.MX board gl -v udpsrc caps='application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H263' port=9990 ! rtph263depay ! ffdec_h263 ! xvimagesink & gl -v udpsrc caps='application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H263' port=9991 ! rtph263depay ! ffdec_h263 ! xvimagesink & gl -v udpsrc caps='application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H263' port=9992 ! rtph263depay ! ffdec_h263 ! xvimagesink & gl -v udpsrc caps='application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H263' port=9993 ! rtph263depay ! ffdec_h263 ! xvimagesink & ## Stream sent to iMX gl -v videotestsrc ! videoscale ! video/x-raw-yuv,width=\(int\)1408,height=\(int\)1152 !  ffenc_h263 ! rtph263pay ! udpsink host=$IP_iMX port=8890 & gl -v videotestsrc ! videoscale ! video/x-raw-yuv,width=\(int\)1408,height=\(int\)1152 ! ffenc_h263 ! rtph263pay ! udpsink host=$IP_iMX port=8891 & gl -v videotestsrc ! videoscale ! video/x-raw-yuv,width=\(int\)1408,height=\(int\)1152 ! ffenc_h263 ! rtph263pay ! udpsink host=$IP_iMX port=8892 & gl -v videotestsrc ! videoscale ! video/x-raw-yuv,width=\(int\)1408,height=\(int\)1152 ! ffenc_h263 ! rtph263pay ! udpsink host=$IP_iMX port=8893 &
View full article
Kernel provides mtdoops to dump kmsg to MTD device, but MMC card is not a MTD device. We can let user-space program to execute the write operation to dump kmsg into block storage. The sample code is below. kernel space -- #include <linux/kernel.h> #include <linux/module.h> #include <linux/console.h> #include <linux/vmalloc.h> #include <linux/seq_file.h> #include <linux/workqueue.h> #include <linux/sched.h> #include <linux/wait.h> #include <linux/delay.h> #include <linux/interrupt.h> #include <linux/kmsg_dump.h> #include <linux/proc_fs.h> static struct kmsg_dumper dump; static struct proc_dir_entry *my_proc; static int is_panic = 0; static int my_proc_show(struct seq_file *m, void *v) {     seq_printf(m, "%d", is_panic);     return 0; } static int my_proc_open(struct inode *inode, struct file *file) {     return single_open(file, my_proc_show, NULL); } static const struct file_operations my_proc_ops = {     .open        = my_proc_open,     .read        = seq_read,     .llseek        = seq_lseek,     .release    = single_release, }; static void oops_do_dump(struct kmsg_dumper *dumper,         enum kmsg_dump_reason reason, const char *s1, unsigned long l1,         const char *s2, unsigned long l2) {     int i;     printk("### [%s:%d] reason = %d\n", __func__, __LINE__, reason);     is_panic = 1;     for (i = 0;i < 10; i++)         msleep(1000);     printk("### [%s:%d] should be done\n", __func__, __LINE__); } static int __init my_oops_init(void) {     int err;     dump.dump = oops_do_dump;     err = kmsg_dump_register(&dump);     if (err) {         printk(KERN_ERR "oops: registering kmsg dumper failed, error %d\n", err);         return -EINVAL;     }     my_proc = proc_create("dump_tester", 0, NULL, &my_proc_ops);     return 0; } static void __exit my_oops_exit(void) {     printk("### [%s:%d]\n", __func__, __LINE__);     if (my_proc)         remove_proc_entry( "dump_tester", NULL);     kmsg_dump_unregister(&dump); } module_init(my_oops_init); module_exit(my_oops_exit); MODULE_LICENSE("GPL"); User space -- #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <fcntl.h> #include <poll.h> #define BUF_LEN 40960 void main(int argc, char **argv) {     char tmp = 'X';     char buf[BUF_LEN];     int fd_src, fd_trg;     int fd = open("/proc/dump_tester", O_RDONLY, 0);     while(1) {         lseek(fd, 0, SEEK_SET);         read(fd, &tmp, 1);         //printf("### [%s:%d] ==> '%c'\n", __FUNCTION__, __LINE__, tmp);         if (tmp == '1') {             fd_src = open("/proc/kmsg", O_RDONLY, 0);             fd_trg = open("/dev/block/mmcblk0p6",  O_RDWR, 0);             memset(buf, 0, BUF_LEN);             write(fd_trg, buf, BUF_LEN);             lseek(fd_trg, 0, SEEK_SET);             read(fd_src, buf, BUF_LEN);             write(fd_trg, buf, BUF_LEN);             close(fd_src);             close(fd_trg);             sleep(1);             printf("### dump panic log into %s\n", "/dev/block/mmcblk0p6");             break;         }         sleep(1);     }     close(fd); }
View full article
Question: Using Linux SDK 4.1.0, with CAAM drivers enabled, there is little noticeable difference in the performance of openssd compared to a kernel without the CAAM drivers. Tests were done using openssd. Test image AES-128 8192 byte block (M Bytes/sec) “openssl speed –evp aes-128-cbc” AES-128 8192 byte block (M Bytes/sec) With /dev/crypto “openssl speed –evp aes-128-cbc -engine cryptodev”  Ubuntu 11.04 Image 19.010 N/A Timesys 20.518 N/A SDK 4.1.0 LTIB 22.013 21.984 (errors reported) One can see that with SDK 4.1.0, performance is worse with crypto enabled.  This is probably due to the overhead of a faulty driver or incorrect implementation. The lowest number is for Ubuntu which could be attributed to the Unity GUI. Conclusion:  CAAM driver is not functional or I am using an improper testing procedure. Test Procedure: Board used is iMX6Q Sabre SDP Openssl was used for testing. Two command line commands were used, with and without the cryptodev engine. openssl speed –evp aes-128-cbc openssl speed –evp aes-128-cbc -engine cryptodev Openssl versions used in each build are slightly different: Ubuntu:              openssl 1.0.0e Timesys:              openssl  1.0.1e SDK 4.1.0:            openssl  1.0.1c Three versions of Linux were tested. Default kernel  4.0.0 with Ubuntu rootfs form image tarballs. Timesys kernel and root file system Kernel built with SDK 4.1.0 using LTIB with hardware crypto enabled Both 1 and 2 above did not have CRYPTODEV set in .config which contains the line “# CONFIG_CRYPTO_CRYPTODEV is not set” Option 3 had the line in .config as, “CONFIG_CRYPTO_CRYPTODEV=y” All three builds generate “/proc/crypto”  whose contents are attached.  A partial listing of /proc/crypto lists “caam” as a driver for all encryption methods supported.  Example printout for aes shown below: ame         : cbc(aes) driver       : cbc-aes-caam module       : kernel priority     : 3000 refcnt       : 1 selftest     : passed type         : ablkcipher async        : yes blocksize    : 16 min keysize  : 16 max keysize  : 32 ivsize       : 16 geniv        : eseqiv All three builds have “caam” and “enable_wait_mode=off” in the kernel command line in u-boot. Only option #3 contains both device file in “/dev/crypto” and an entry in “/proc/crypto” root@freescale ~$ cd / root@freescale /$ ls /proc/cr* /proc/crypto root@freescale /$ ls /dev/cr* /dev/crypto root@freescale /$ Test #1—Kernel build 4.1.0 openssl speed test without caam engine root@freescale ~$ openssl speed -evp aes-128-cbc                    Doing aes-128-cbc for 3s on 16 size blocks: 3471184 aes-128-cbc's in 2.94s Doing aes-128-cbc for 3s on 64 size blocks: 986286 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 256 size blocks: 249743 aes-128-cbc's in 2.93s Doing aes-128-cbc for 3s on 1024 size blocks: 64343 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 8192 size blocks: 7954 aes-128-cbc's in 2.96s OpenSSL 1.0.1c 10 May 2012 built on: Sat Sep 7 18:47:34 PDT 2013 options:bn(64,32) rc4(ptr,char) des(idx,cisc,16,long) aes(partial) idea(int) blowfish(ptr) compiler: gcc -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall The 'numbers' are in 1000s of bytes per second processed. type 16 bytes     64 bytes    256 bytes 1024 bytes   8192 bytes aes-128-cbc 18890.80k    21040.77k    21820.55k 21962.41k    22013.23k root@freescale ~$ Test #2—Timesys kernel build of openssd without /dev/crypto # openssl speed -evp aes-128-cbc Doing aes-128-cbc for 3s on 16 size blocks: 3361305 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 64 size blocks: 924423 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 256 size blocks: 236623 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 1024 size blocks: 59967 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 8192 size blocks: 7514 aes-128-cbc's in 3.00s OpenSSL 1.0.1e 11 Feb 2013 built on: Thu Sep 5 21:54:37 EDT 2013 options:bn(64,32) rc4(ptr,char) des(idx,cisc,16,long) aes(partial) blowfish(ptr) compiler: armv7l-timesys-linux-gnueabi-gcc -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -I/here/workdir/factory/build_armv7l-times ys-linux-gnueabi/toolchain/usr/include -DL_ENDIAN -DTERMIO -DOPENSSL_NO_KRB5 -DOPENSSL_NO_IDEA -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5 -Os -pipe -Wa,--noexecstack -Wall The 'numbers' are in 1000s of bytes per second processed. type 16 bytes     64 bytes    256 bytes 1024 bytes   8192 bytes aes-128-cbc 17926.96k    19721.02k    20191.83k 20468.74k    20518.23k #  Test #3—Ubuntu rootfs and kernel image root@linaro-ubuntu-desktop:/# openssl speed -evp aes-128-cbc Doing aes-128-cbc for 3s on 16 size blocks: 3030128 aes-128-cbc's in 2.98s Doing aes-128-cbc for 3s on 64 size blocks: 852897 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 256 size blocks: 220572 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 1024 size blocks: 55534 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 8192 size blocks: 6846 aes-128-cbc's in 2.95s OpenSSL 1.0.0e 6 Sep 2011 built on: Wed Oct 5 01:45:02 UTC 2011 options:bn(64,32) rc4(ptr,char) des(idx,cisc,16,long) aes(partial) blowfish(ptr) compiler: cc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DTERMIO -O2 -Wa,--noexecstack -g -Wall The 'numbers' are in 1000s of bytes per second processed. type             16 bytes     64 bytes 256 bytes   1024 bytes   8192 bytes aes-128-cbc 16269.14k    18195.14k    18822.14k 18955.61k    19010.99k root@linaro-ubuntu-desktop:/# Test #4—SDK 4.1.0 openssl speed test with “/dev/crypto” .  Note errors. root@freescale ~$ openssl speed -evp aes-128-cbc -engine cryptodev  invalid engine "cryptodev" 716715216:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:187:filename(/usr/lib/engines/libcryptodev.so): /usr/lib/eng ines/libcryptodev.so: cannot open shared object file: No such file or directory 716715216:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244: 716715216:error:260B6084:engine routines:DYNAMIC_LOAD:dso not found:eng_dyn.c:450: 716715216:error:2606A074:engine routines:ENGINE_by_id:no such engine:eng_list.c:417:id=cryptodev 716715216:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:187:filename(libcryptodev.so): libcryptodev.so: cannot open shared object file: No such file or directory 716715216:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244: 716715216:error:260B6084:engine routines:DYNAMIC_LOAD:dso not found:eng_dyn.c:450: Doing aes-128-cbc for 3s on 16 size blocks: 3572980 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 64 size blocks: 966002 aes-128-cbc's in 2.94s Doing aes-128-cbc for 3s on 256 size blocks: 255307 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 1024 size blocks: 62967 aes-128-cbc's in 2.93s Doing aes-128-cbc for 3s on 8192 size blocks: 7890 aes-128-cbc's in 2.94s OpenSSL 1.0.1c 10 May 2012 built on: Sat Sep 7 18:47:34 PDT 2013 options:bn(64,32) rc4(ptr,char) des(idx,cisc,16,long) aes(partial) idea(int) blowfish(ptr) compiler: gcc -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall The 'numbers' are in 1000s of bytes per second processed. type 16 bytes     64 bytes    256 bytes 1024 bytes   8192 bytes aes-128-cbc 19055.89k    21028.61k    21786.20k 22006.21k    21984.65k root@freescale ~$ Answer: I do not know what is recent state of official Freescale BSP regarding CAAM, but to get OpenSSL working under CAAM support with reasonable acceleration  : https://community.freescale.com/message/318188#318188 The patches was used below : http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/log/?h=imx_3.0.35_4.0.0 Direct link to the patches: http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/commit/?h=imx_3.0.35_4.0.0&id=6068d7a77b2101c172fc2f003f90b1febbf99505 http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/commit/?h=imx_3.0.35_4.0.0&id=b30237c79003223c6e8035d5be183cd4f0b469f9
View full article
Question: What’s the best way to rotate a MX6 image 90 degrees, thought the IPU correct? IPU is limited to 1024x1024. Apparently we don’t support frame buffer rotation in the IPU, so we have to use some middleware. I know that Android’s surface flinger uses the GPU but do you know what we can use in Linux that uses H/W acceleration also? It looks look like X-server can rotate only when the Vivante driver is not  loaded, which means the hardware is not implementing rotations. Answer: it should be possible to split the picture into two halves and rotate them separately. Well, two halves if you can reduce the line count to 1024 … otherwise it would be 4 rotates. X11 Xrandr will be implemented on GPU sometime this year. It's in the R&D queue but as low priority. They could use GC320 low level API to rotate (if they use linux frame buffer). It implies a blit but it would be done by GC320 they will probably need to use virtualFB too. The API documentation is the BSP documentation (iMX6.2D.API.pdf) Attached a simple source using the 2D low level API. VirtualFB: https://community.freescale.com/message/289198
View full article
Hi All, The new i.MX 6 Q/D/DL/S/SL L3.0.35_4.1.0 GA release is now available on the http://www.freescale.com/site. ·         Files available                                   # Name Description 1 L3.0.35_4.1.0_LINUX_DOCS i.MX   6Quad, i.MX 6Dual, i.MX 6DualLite, i.MX 6Solo and i.MX 6Sololite Linux BSP   Documentation. Includes Release Notes, Reference Manual, User guide. API   Documentation 2 L3.0.35_4.1.0_LINUX_MMDOCS i.MX   6Quad, i.MX 6Dual, i.MX 6DualLite, i.MX 6Solo and i.MX 6Sololite  Linux Multimedia Codecs Documentation.   Includes CODECs Release Notes and User's Guide 3 L3.0.35_4.1.0_SOURCE_BSP i.MX   6Quad, i.MX 6Dual, i.MX 6DualLite, i.MX 6Solo and i.MX 6Sololite Linux BSP   Source Code Files 4 L3.0.35_4.1.0_MM_CODECS i.MX   6Quad, i.MX 6Dual, i.MX 6DualLite, i.MX 6Solo and i.MX 6Sololite  Linux Multimedia Codecs Sources 5 L3.0.35_4.1.0_AACP_CODECS i.MX   6Quad, i.MX 6Dual, i.MX 6DualLite, i.MX 6Solo and i.MX 6Sololite  Linux AAC Plus Codec 6 L3.0.35_4.1.0_DEMO_IMAGE_BSP i.MX   6Quad, i.MX 6Dual, i.MX 6DualLite, i.MX 6Solo and i.MX 6Sololite  Linux Binary Demo Files 7 L3.0.35_4.1.0_UBUNTU_RFS_BSP i.MX   6Quad, i.MX 6Dual, i.MX 6DualLite, i.MX 6Solo and i.MX 6Sololite  Linux File System for the Ubuntu Images 8 i.MX_6D/Q_Vivante_VDK_146_Tools Set   of applications for the Linux L3.0.35_4.1.0 BSP, designed to be used by   graphics application developers to rapidly develop and port graphics   applications. Includes applications, GPU Driver with vprofiler enabled and   documentation. 9 IMX_6DL_6S_MFG_TOOL Tool   and documentation for downloading OS images to the i.MX 6DualLite and i.MX   6Solo. 10 IMX_6DQ_MFG_TOOL Tool   and documentation for downloading OS images to the i.MX 6Quad and i.MX 6Dual. 11 IMX_6SL_MFG_TOOL Tool   and documentation for downloading OS images to the i.MX 6Sololite. ·         Target HW boards o   i.MX 6Quad SABRE-SDP o   i.MX 6Quad SABRE-SDB o   i.MX 6Quad SABRE-AI o   i.MX 6DualLite SABRE-SDP o   i.MX 6DualLite SABRE-AI o   i.MX 6SL EVK ·         New features o   BSP New Features on i.MX 6D/Q, i.MX 6DL/S and MX 6SL: §  HDCP §  CEC §  GPU4.6.9p12 §  Audio playback IRAM/SDMA §  V4L capture resize on MX6SL §  MX6DQ disable the double line fill feature of PL310 ·         Known issues o   For known issues and limitations please consult the release notes.
View full article
This document provide an overall guide how to get started with i.MX6 development. There are several chapters: 1. how to get necessary docs from freescale website; 2. how to setup environment and build your own images;3. Hardware design consideration;4. How to get help. I hope the doc will bring you in i.MX world more easily, and hope you all have a fun in it.
View full article
Q: What is latency figures for the VPU to decode Device: i.MX6Q OS: Linux Resolution:                         1920x1080(HD) Frame rate:                        30 FPS Function:                             Overlay messages. Input/Output:                   8 bit / YUV 4:2:0 / NAL stream Profile level:                      4.1. Constrained Baseline. I and P frames support. A: It depend on the syntax in H.264, includes num_reorder_frames,max_dec_frame_buffering,num_ref_frames,MaxDpbSize,etc. for start latency: it cover vpu driver loading, allocate buffers, init, decoding the first frame less than 100ms on iMX6/Linux. This document was generated from the following discussion: VPU Latency i.MX6
View full article
Q: When trying to mount his SDIO WiFi module (an Azurewave module containing a Marvel 88W8790)  in 4 bit mode, and got error wifi module on iMX6 Smart SD dev board using the alpha kernel (3.5.7+3285970). mwifiex_sdio mmc0:0001:1: WLAN FW is active mwifiex_sdio mmc0:0001:1: mwifiex_cmd_timeout_func: Timeout cmd id (2004.239824) = 0xa9, act = 0x0 mwifiex_sdio mmc0:0001:1: num_data_h2c_failure = 0 mwifiex_sdio mmc0:0001:1: num_cmd_h2c_failure = 0 mwifiex_sdio mmc0:0001:1: num_cmd_timeout = 1 mwifiex_sdio mmc0:0001:1: num_tx_timeout = 0 mwifiex_sdio mmc0:0001:1: last_cmd_index = 1 mwifiex_sdio mmc0:0001:1: last_cmd_resp_index = 0 mwifiex_sdio mmc0:0001:1: last_event_index = 0 mwifiex_sdio mmc0:0001:1: data_sent=1 cmd_sent=1 mwifiex_sdio mmc0:0001:1: ps_mode=1 ps_state=0 +++++++++++++++++++++++ There are only two known issues with the SDHC driver as noted in the release notes and these don't seem to match.  The Linux Reference Manual states the operation of the SDIO was veriifed usign the AR6003.  My assumption is that this is the Silex module we have standardized on.  Was 4 bit mode verified using this module? Does anyone have any idea what could be happening here? A: L3.5.7 is an alpha release, and WiFi function is not stable. The test report shows that open WiFi issue exists. Wifi module sometime can't work on mx6q_smd. After insmod ath, ath6kl_core and ath6kl_sdio. Insert the wifi card, sometime(50%) will display -------------------------- ath6kl: unable to read RX_LOOKAHEAD_VALID                                      ath6kl: Unable to recv target info: -84                                        ath6kl: Failed to init ath6kl core                                             ath6kl_sdio: probe of mmc0:0001:1 failed with error -84    -------------------------- reinsert the wifi card may solve the problem. when execute "udhcpc -i wlan0", sometime (30%) will cause program exception. Sometime can't get the wlan0 ip(program hang). Environment(OS,Platform,Driver, etc): HW: MX6Q_SMD Num014 and Num017 MX6Q_ARD don't have this problem SW: Kernel 3.5.7-1.0.0 GNU/Linux Case ID: TGE-LV-WIFI-0043 Reproduce Steps: #modprobe ath #modprobe ath6kl_core #modprobe ath6kl_sdio insert the wifi card # iwconfig wlan0 mode managed # iwlist wlan0 scanning | grep MAD-wifi #iwconfig wlan0 key 00112233445566778899123456 #iwconfig wlan0 essid MAD-wifi #udhcpc -i wlan0 Attached MX6 ARD WiFi issue also. [Kernel3.5.7_MX6QARD]Wifi:wifi card can't work during suspend and resume. 100% -- Bug detailed description: With wifi card inserted in the board. doing system suspend and resume test. wifi card can't work well after the system suspend and resume. Always report : ath6kl: Unable to decrement the command credit count register: -84             ath6kl: Unable to write to the device: -84                                     ath6kl: bmi_write_memory for uart debug failed                                 ath6kl: Failed to boot hw in resume: -5          Environment(OS,Platform,Driver, etc): HW: MX6QARD -023 Only tried on this platform SW: root@imx6qsabreauto:~# uname -a                                                Linux imx6qsabreauto 3.5.7-1.0.0+3285970 #1 SMP PREEMPT Sat Jun 29 10:20:45 CDT 2013 armv7l GNU/Linux Case ID:  TGE-LV-WIFI-1060 and TGE-LV-WIFI-1062 Reproduce Steps: 1. boot the kernel with wif card inserted 2. doing wifi stress test 3. doing suspend and resume
View full article