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:
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
   Some of Chinese customer couldn’t normally download android source code from google site, here give a way to download android source from Mirror site of University of Science and Technology of China. Preparations Installing Ubuntu16.04.2 LTS Customer can download ubuntu-16.04.2-desktop-amd64.iso from https://www.ubuntu.com/download/desktop        Then install it to VMware workstation player v12 or PC, after finishing installation, use “Software Update” to update system. In order to compile android8.0.0-1.0.0 BSP, necessary packages should also be installed on Ubuntu 16.04. $ sudo apt-get install gnupg $ sudo apt-get install flex $ sudo apt-get install bison $ sudo apt-get install gperf $ sudo apt-get install build-essential $ sudo apt-get install zip $ sudo apt-get install zlib1g-dev $ sudo apt-get install libc6-dev $ sudo apt-get install lib32ncurses5-dev   $ sudo apt-get install x11proto-core-dev $ sudo apt-get install libx11-dev $ sudo apt-get install lib32z1-dev   $ sudo apt-get install libgl1-mesa-dev $ sudo apt-get install tofrodos $ sudo apt-get install python-markdown $ sudo apt-get install libxml2-utils $ sudo apt-get install xsltproc $ sudo apt-get install uuid-dev:i386 liblzo2-dev:i386   $ sudo apt-get install gcc-multilib g++-multilib $ sudo apt-get install subversion $ sudo apt-get install openssh-server openssh-client $ sudo apt-get install uuid uuid-dev $ sudo apt-get install zlib1g-dev liblz-dev $ sudo apt-get install liblzo2-2 liblzo2-dev $ sudo apt-get install lzop $ sudo apt-get install git-core curl $ sudo apt-get install u-boot-tools $ sudo apt-get install mtd-utils $ sudo apt-get install android-tools-fsutils $ sudo apt-get install openjdk-8-jdk More detail, see Android_User’s_Guide.pdf ( android 8.0.0-1.0.0 BSP documents) Downloading and unpacking Android release package https://www.nxp.com/products/processors-and-microcontrollers/applications-processors/i.mx-applications-processors/android-os-for-i.mx-applications-processors:IMXANDROID?tab=Design_Tools_Tab --IMX_O8.0.0_1.0.0_ANDROID_SOURCE File name is mx-o8.0.0_1.0.0_ga.tar.gz # cd ~ # tar xzvf mx-o8.0.0_1.0.0_ga.tar Downloading Android 8.0.0-1.0.0 source code Getting repo # cd ~ # mkdir bin # cd bin # curl https://storage-googleapis.proxy.ustclug.org/git-repo-downloads/repo > ~/bin/repo # chmod a+x ~/bin/repo # export PATH=${PATH}:~/bin Modifying repo File Open ~/bin/repo file with 'gedit' and Change google address From            REPO_URL = 'https://gerrit.googlesource.com/git-repo' To REPO_URL ='git-repo - Git at Google ' 3、Setting email address # git config --global user.email "[email protected]" # git config --global user.name "xxxx"  [ Email & Name should be yours]   4、Modifying android setup script and Running it          Open ~/imx-o8.0.0_1.0.0_ga/imx_android_setup.sh and add a line like below: ......       if [ "$rc" != 0 ]; then          echo "---------------------------------------------------"          echo "-----Repo Init failure"          echo "---------------------------------------------------"          return 1       fi find -name 'aosp-O8.0.0-1.0.0.xml'| xargs perl -pi -e 's|https://android.googlesource.com/|git://mirrors.ustc.edu.cn/aosp/|g' fi   # Don't Delete .repo directory and hidden files #rm -rf $android_builddir/.??*    Then save it and exit. # cd ~/ # source ~/imx-o8.0.0_1.0.0_ga/imx_android_setup.sh Then android_build directory is created at ~/ # export MY_ANDROID=~/android_build [Note] imx_android_setup.sh will be in charge of downloading all android source code. 5.Begin to compile android 8.0.0 BSP $ export ARCH=arm $ export CROSS_COMPILE=${MY_ANDROID}/prebuilts/gcc/linux-x86/arm/arm-linuxandroideabi-4.9/bin/arm-linux-androideabi- $ cd ~/android_build $ source build/envsetup.sh $ lunch sabreauto_6q-userdebug $ make –j4 Errors: ...... “Try increasing heap size with java option '-Xmx<size>'.” ...... Logs for compiling     weidong@ubuntu:~/android_build$ lunch sabreauto_6q-userdebug   ============================================ PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=8.0.0 TARGET_PRODUCT=sabreauto_6q TARGET_BUILD_VARIANT=userdebug TARGET_BUILD_TYPE=release TARGET_PLATFORM_VERSION=OPD1 TARGET_BUILD_APPS= TARGET_ARCH=arm TARGET_ARCH_VARIANT=armv7-a-neon TARGET_CPU_VARIANT=cortex-a9 TARGET_2ND_ARCH= TARGET_2ND_ARCH_VARIANT= TARGET_2ND_CPU_VARIANT= HOST_ARCH=x86_64 HOST_2ND_ARCH=x86 HOST_OS=linux HOST_OS_EXTRA=Linux-4.4.0-116-generic-x86_64-with-Ubuntu-16.04-xenial HOST_CROSS_OS=windows HOST_CROSS_ARCH=x86 HOST_CROSS_2ND_ARCH=x86_64 HOST_BUILD_TYPE=release BUILD_ID=1.0.0-rfp-rc4 OUT_DIR=out AUX_OS_VARIANT_LIST= ============================================ weidong@ubuntu:~/android_build$ make -j4 ============================================     ============================================ PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=8.0.0 TARGET_PRODUCT=sabreauto_6q TARGET_BUILD_VARIANT=userdebug TARGET_BUILD_TYPE=release TARGET_ARCH=arm TARGET_ARCH_VARIANT=armv7-a-neon TARGET_CPU_VARIANT=cortex-a9 HOST_ARCH=x86_64 HOST_2ND_ARCH=x86 HOST_OS=linux HOST_OS_EXTRA=Linux-4.4.0-116-generic-x86_64-with-Ubuntu-16.04-xenial HOST_CROSS_OS=windows HOST_CROSS_ARCH=x86 HOST_CROSS_2ND_ARCH=x86_64 HOST_BUILD_TYPE=release BUILD_ID=1.0.0-rfp-rc4 OUT_DIR=out ============================================ [38/38] bootstrap out/soong/.minibootstrap/build.ninja.in [1/2] out/soong/.bootstrap/bin/minibp out/soong/.minibootstrap/build.ninja.in [4/4] out/soong/.bootstrap/bin/minibp out/soong/.bootstrap/build.ninja [791/792] glob vendor/*/*/Android.bp [47/47] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja out/build-sabreauto_6q.ninja is missing, regenerating... [9/1005] including ./cts/Android.mk ... cts/hostsidetests/os/test-apps/StaticSharedNativeLibProvider/Android.mk:23: warning: FindEmulator: find: `cts/hostsidetests/os/test-apps/StaticSharedNativeLibProvider/src': No such file or directory cts/hostsidetests/os/test-apps/StaticSharedNativeLibProvider1/Android.mk:23: warning: FindEmulator: find: `cts/hostsidetests/os/test-apps/StaticSharedNativeLibProvider1/src': No such file or directory [690/1005] including ./system/sepolicy/Android.mk ... ./system/sepolicy/Android.mk:107: warning: BOARD_SEPOLICY_VERS not specified, assuming current platform version [1005/1005] including ./vendor/nxp/linux-firmware-imx/firmware/Android.mk ... No private recovery resources for TARGET_DEVICE sabreauto_6q platform_testing/build/tasks/tests/instrumentation_metric_test_list.mk: warning: continuous_instrumentation_metric_tests: Unknown installed file for module perf-setup.sh platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module RecyclerViewTests platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module SettingsFunctionalTests platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module LauncherFunctionalTests platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module EmergencyInfoTests platform_testing/build/tasks/tests/native_metric_test_list.mk: warning: continuous_native_metric_tests: Unknown installed file for module perf-setup.sh test/vts/tools/build/tasks/vts_package.mk:222: warning: FindEmulator: cd: vendor/google_vts/testcases: No such file or directory test/vts/tools/build/tasks/vts_package.mk:222: warning: FindEmulator: cd: vendor/google_vts/testcases: No such file or directory test/vts/tools/build/tasks/vts_package.mk:222: warning: FindEmulator: cd: vendor/google_vts/testcases: No such file or directory ./test/vts/utils/python/archive/Android.mk:28: warning: overriding commands for target `default' ./test/vts/runners/host/tcp_server/Android.mk:19: warning: ignoring old commands for target `default' build/core/Makefile:34: warning: overriding commands for target `out/target/product/sabreauto_6q/root/init.rc' build/core/base_rules.mk:378: warning: ignoring old commands for target `out/target/product/sabreauto_6q/root/init.rc' ...... ......  CC      lib/vsprintf.o   CC      lib/panic.o   CC      lib/strto.o   CC      lib/strmhz.o   LD      lib/built-in.o   CC      examples/standalone/hello_world.o   CC      examples/standalone/stubs.o   LD      examples/standalone/libstubs.o   LD      examples/standalone/hello_world   OBJCOPY examples/standalone/hello_world.bin   OBJCOPY examples/standalone/hello_world.srec   LD      u-boot   OBJCOPY u-boot-nodtb.bin   OBJCOPY u-boot.srec   SHIPPED dts/dt.dtb   SYM     u-boot.sym   COPY    u-boot.dtb   CAT     u-boot-dtb.bin   COPY    u-boot.bin   CFGS    board/freescale/mx6qsabreauto/mx6qp.cfg.cfgtmp   MKIMAGE u-boot-dtb.imx   CFGCHK  u-boot.cfg make[1]: Leaving directory '/home/weidong/android_build/out/target/product/sabreauto_6q/obj/BOOTLOADER_OBJ' make: Leaving directory '/home/weidong/android_build/vendor/nxp-opensource/uboot-imx' /bin/bash: line 0: [: =: unary operator expected [  3% 2129/63758] Check module type: out/target/common/obj/APPS/Browser2_intermediates/link_type packages/apps/Browser2/Android.mk: warning: Browser2 (java:sdk) should not link to legacy-android-test (java:platform) [  3% 2171/63758] Ensuring Jack server is installed and started Jack server already installed in "/home/weidong/.jack-server" Launching Jack server java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=/tmp -Dfile.encoding=UTF-8 -XX:+TieredCompilation -cp /home/weidong/.jack-server/launcher.jar com.android.jack.launcher.ServerLauncher Server updated, waiting for restart ...... ...... D [M]  drivers/rpmsg/imx_rpmsg_tty.ko   LD [M]  drivers/video/backlight/l4f00242t03.ko   CC      arch/arm/boot/compressed/misc.o   LD [M]  drivers/video/backlight/platform_lcd.ko   LD [M]  drivers/video/backlight/lcd.ko   CC      arch/arm/boot/compressed/decompress.o   CC      arch/arm/boot/compressed/string.o   SHIPPED arch/arm/boot/compressed/hyp-stub.S   SHIPPED arch/arm/boot/compressed/lib1funcs.S   SHIPPED arch/arm/boot/compressed/ashldi3.S   SHIPPED arch/arm/boot/compressed/bswapsdi2.S   AS      arch/arm/boot/compressed/hyp-stub.o   AS      arch/arm/boot/compressed/lib1funcs.o   AS      arch/arm/boot/compressed/ashldi3.o   AS      arch/arm/boot/compressed/bswapsdi2.o   AS      arch/arm/boot/compressed/piggy.o   LD      arch/arm/boot/compressed/vmlinux   OBJCOPY arch/arm/boot/zImage   Kernel: arch/arm/boot/zImage is ready make[1]: Leaving directory '/home/weidong/android_build/out/target/product/sabreauto_6q/obj/KERNEL_OBJ' make: Leaving directory '/home/weidong/android_build/vendor/nxp-opensource/kernel_imx' make: Entering directory '/home/weidong/android_build/vendor/nxp-opensource/kernel_imx' make[1]: Entering directory '/home/weidong/android_build/out/target/product/sabreauto_6q/obj/KERNEL_OBJ'   CHK     include/config/kernel.release   GEN     ./Makefile   CHK     include/generated/uapi/linux/version.h   Using /home/weidong/android_build/vendor/nxp-opensource/kernel_imx as source for kernel   CHK     include/generated/utsrelease.h   CHK     include/generated/timeconst.h   CHK     include/generated/bounds.h   CHK     include/generated/asm-offsets.h   CALL    /home/weidong/android_build/vendor/nxp-opensource/kernel_imx/scripts/checksyscalls.sh make[1]: Leaving directory '/home/weidong/android_build/out/target/product/sabreauto_6q/obj/KERNEL_OBJ' make: Leaving directory '/home/weidong/android_build/vendor/nxp-opensource/kernel_imx'   ...... ...... [ 83% 53244/63758] Building with Jack: out/target/co...ARIES/framework_intermediates/with-local/classes.dex FAILED: out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/with-local/classes.dex /bin/bash out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/with-local/classes.dex.rsp Out of memory error (version 1.3-rc7 'Douarn' (445000 d7be3910514558d6715ce455ce0861ae2f56925a by [email protected])). GC overhead limit exceeded. Try increasing heap size with java option '-Xmx<size>'. Warning: This may have produced partial or corrupted output. [ 83% 53247/63758] //external/llvm/lib/CodeGen/SelectionDAG:libLLVMSelectionDAG clang++ DAGCombiner.cpp ninja: build stopped: subcommand failed. 19:17:25 ninja failed with: exit status 1 build/core/main.mk:21: recipe for target 'run_soong_ui' failed make: *** [run_soong_ui] Error 1   ******************************************************* solve the issue: Try increasing heap size with java option '-Xmx<size>'. -- run commands below on command line #export JACK_SERVER_VM_ARGUMENTS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4g" #./prebuilts/sdk/tools/jack-admin kill-server #./prebuilts/sdk/tools/jack-admin start-server ******************************************************* #make -j4   //continue compiling   ...... ...... [ 50% 1/2] glob vendor/*/*/Android.bp [  0% 1/10515] Ensuring Jack server is installed and started Jack server already installed in "/home/weidong/.jack-server" Server is already running ...... ...... Creating filesystem with parameters:     Size: 1585446912     Block size: 4096     Blocks per group: 32768     Inodes per group: 8064     Inode size: 256     Journal blocks: 6048     Label: system     Blocks: 387072     Block groups: 12     Reserved block group size: 95 Created filesystem with 2216/96768 inodes and 171147/387072 blocks Running:  build_verity_tree -A aee087a5be3b982978c923f566a94613496b417f2af592639bc80d141e34dfe7 out/target/product/sabreauto_6q/obj/PACKAGING/systemimage_intermediates/system.img /tmp/tmpPnRk1H_verity_images/verity.img f26a84a2c66d866f5322986e7a093812329d87579e5859aa32a2cf4c21f69661 aee087a5be3b982978c923f566a94613496b417f2af592639bc80d141e34dfe7 Running:  system/extras/verity/build_verity_metadata.py build 1585446912 /tmp/tmpPnRk1H_verity_images/verity_metadata.img f26a84a2c66d866f5322986e7a093812329d87579e5859aa32a2cf4c21f69661 aee087a5be3b982978c923f566a94613496b417f2af592639bc80d141e34dfe7 /dev/block/by-name/system verity_signer build/target/product/security/verity.pk8 ['verity_signer', '/tmp/tmpvXftO2.table', 'build/target/product/security/verity.pk8', '/tmp/tmpbfl4fq.sig'] appending /tmp/tmpPnRk1H_verity_images/verity_metadata.img to /tmp/tmpPnRk1H_verity_images/verity.img Running:  fec -e -p 0 out/target/product/sabreauto_6q/obj/PACKAGING/systemimage_intermediates/system.img /tmp/tmpPnRk1H_verity_images/verity.img /tmp/tmpPnRk1H_verity_images/verity_fec.img encoding RS(255, 253) to '/tmp/tmpPnRk1H_verity_images/verity_fec.img' for input files:        1: 'out/target/product/sabreauto_6q/obj/PACKAGING/systemimage_intermediates/system.img'        2: '/tmp/tmpPnRk1H_verity_images/verity.img' appending /tmp/tmpPnRk1H_verity_images/verity_fec.img to /tmp/tmpPnRk1H_verity_images/verity.img Running:  append2simg out/target/product/sabreauto_6q/obj/PACKAGING/systemimage_intermediates/system.img /tmp/tmpPnRk1H_verity_images/verity.img   [100% 10515/10515] Install system fs image: out/target/product/sabreauto_6q/system.img out/target/product/sabreauto_6q/system.img+out/target/product/sabreauto_6q/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p maxsize=1644331392 blocksize=4224 total=704129669 reserve=16612992   #### make completed successfully (01:21:12 (hh:mm:ss)) ####   NXP TIC team Weidong sun 2018-06-01
View full article
GTK+ GTK is a graphic library developed initially by Gimp (Gimp ToolKit). GTK was selected as default GUI to create the Gnome Desktop and currently it is used on many desktop environment (XFCE, LXDE, etc). When GTK was developed it was depending on X Server (X11) but currently it can run over DirectFB. In order to add GTK+ support on i.MX board you need first to choice DirectFB or X11 to be it's default graphic infrastructure. The following pages contain informations and instruction of how to compile and use them. If you want to compile GTK over DirectFB: All Boards DirectFB If you want to compile GTK over X11: All Boards X11 All Boards GTK Manually All Boards GTK Glade GTK Demo GTK2 package comes with "gtk-demo". It's a demo executable to demonstrate some GTK gadgets. In order to use it with DirectFB, compile the following packages using LTIB: [*] GTK2 [*] DirectFB [*]  configure for use with touchscreen [*]  DirectFB-examples "if you would like to test DirectFB" [*] Liberation fonts [*] Tslib After starting Linux on i.MX, load the following modules: mx# /etc/rc.d/init.d/gtk2 start gtk: creating gdk-pixbuf.loaders mx# /etc/rc.d/init.d/pango start pango: creating module list Execute gtk-demo: mx# /usr/bin/gtk-demo GTK Demo with X If you would like to test the gtk-demo application over X, start X first (tested on i.MX25 PDK): mx# Xfbdev -screen 480×640 -mouse tslib,,device=/dev/input/event1 & mx# export DISPLAY=:0.0 mx# /usr/bin/gtk-demo
View full article
Changing the storage for U-boot environment variables   U-Boot on Freescale BSP has a compiling option that allows you to choose the storage for environment variables.   1 - Extract the u-boot source using LTIB: ./ltib -m prep -p u-boot   2 - The source will be extracted to <ltib path>/rpm/BUILD/u-boot-2009.08   3 - On u-Boot source locate the i.MXEVK config file, <ltib path>/rpm/BUILD/u-boot-2009.08/include/configs/mx51_bbg.h   4 - To change the storage of variables environment to SD card, on this file, comment out CONFIG_FSL_ENV_IN_SF and define CONFIG_FSL_ENV_IN_MMC:   //#define CONFIG_FSL_ENV_IN_SF   #define CONFIG_FSL_ENV_IN_MMC 5 - Adjust CONFIG_ENV_SECT_SIZE and CONFIG_ENV_OFFSET accordingly. Recall that sd card read block size is 512B.   For example:   #define CONFIG_ENV_SECT_SIZE (256 * 512)   #define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE   #if defined(CONFIG_FSL_ENV_IN_MMC)   #define CONFIG_ENV_IS_IN_MMC 1 #define CONFIG_ENV_OFFSET (1023 * 512)   6 - Save the file.   7 - Recompile u-boot: ./ltib -m scbuild -p u-boot   8 - Your new compiled u-boot image will be saved at: <ltib path>/rpm/BUILD/u-boot-2009.08/u-boot.bin
View full article
Question: What does it means by depending on load? Is there a value? This is  related with i.MX6D Answer: The comment about the "load" means the total system load on the 2.5V rail. We understand that people design systems, not just MX6 devices. The documentation confusion stems from the design team changing from allowing customers to use the LDOs to power system devices back to just using the LDOs to power the MX6. Reasons - thermals, and also concern for uncontrolled system noise injection into the MX6 and causing failures.
View full article
One of the features that many users have asked about but still is a work in progress for android, is the extended desktop capabilities. Currently android allows you to mirror your desktop in two displays, but you are still unable to extend your desktop like you would with any other OS like Linux or Windows. This tutorial is intended to show you how to use a special object that allows you to control what should appear on a secondary or external display, replacing the screen mirroring. So how do we do this? A presentation is a container to display a user interface, in the form of a view hierarchy on an external display. This is pretty much like a Dialog since it displays its UI separated from its activity, but the difference is that the presentation shows in an external display while the dialog displays it in the primary screen. Now, because of this, the resources that are to be used by the UI on an external display are different then the resources used in the primary screen, the context of the presentation is NOT the activity. How do we choose where to send this presentation? The easiest way to do this is to use the MediaRouter API. What the mediarouter does is it keeps track of which audio and video routes are available on the system. The MediaRouter sends notifications whenever routes are selected or unselected. An application can simple watch for these notifications and show or dismiss a presentation on the preferred presentation display automatically. The preferred presentation display is the display that the mediarouter recommends that the application should use if it wants to show content on the secondary display. IF there is not a preferred presentation display, the application should show its content locally without using a presentation. Using the Mediarouter The MediaRouter is a system service obtained by calling getSystemService() and asking for the MEDIA_ROUTER_SERVICE. We should use the mediarouter to create and show a presentation on the preferred presentation display: MediaRouter mediaRouter = (MediaRouter) context.getSystemService(Context.MEDIA_ROUTER_SERVICE); MediaRouter.RouteInfo route = mediaRouter.getSelectedRoute(); if (route != null) { Display presentationDisplay = route.getPresentationDisplay(); if (presentationDisplay != null) { Presentation presentation = new MyPresentation(context, presentationDisplay); presentation.show(); } } In order to use this framework in your app, you need to get an instance of the MediaRouter framework object and attach a MediaRouter.Callback object to listen for event in available media routes. The android apps that implement the media router API need to include a Cast button to allow users to select a media route to play media on a secondary output device. The recommended way to implement the Cast button  is to extend your activity from ActionBarActivity() and use the onCreateOptionMenu() method to add an options menu. The Cast button must use the MediaRouteActionProvider class as its action: <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" > <item android:id="@+id/media_route_menu_item" android:title="@string/media_route_menu_title" app:actionProviderClass="android.support.v7.app.MediaRouteActionProvider" app:showAsAction="always" /> </menu> The media router framework communicates with an app through a callback object that you attach to the mediarouter framework object.  Its necessary to extend the callback object in order to receive messages when a media route is connected. Once your callback is defined for the media router,  you need to attach it to the media router object.  The following sample demonstrates how to use the lifecycle methos to appropriately add and remove your app’s media router callback object. You need to add and remove it because it needs to be free for whenever you close the app or have it in the background so other apps use it if necessary. public class MediaRouterPlaybackActivity extends ActionBarActivity { private MediaRouter mMediaRouter; private MediaRouteSelector mSelector; private Callback mMediaRouterCallback; // your app works with so the framework can discover them. @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // Get the media router service. mMediaRouter = MediaRouter.getInstance(this); ... } // Add the callback on start to tell the media router what kinds of routes // your app works with so the framework can discover them. @Override public void onStart() { mMediaRouter.addCallback(mSelector, mMediaRouterCallback, MediaRouter.CALLBACK_FLAG_REQUEST_DISCOVERY); super.onStart(); } // Remove the selector on stop to tell the media router that it no longer // needs to discover routes for your app. @Override public void onStop() { mMediaRouter.removeCallback(mMediaRouterCallback); super.onStop(); } ... } Remote playback This approach sends control commands to a secondary device to initiate playback and to control the playback that is in progress (play, stop, fast-forward, rewind, etc). When your app supports this type of media route, you must need to create a RemotePlaybackClient boject using a remote playback MediaRoute.RouteInfo object received through your app’s MediaRouter.Callback object. The following sample code demonstrates a controller method that creates a new remote playback cliente and sends it a video for playback. private void updateRemotePlayer(RouteInfo route) { // Changed route: tear down previous client if (mRoute != null && mRemotePlaybackClient != null) { mRemotePlaybackClient.release(); mRemotePlaybackClient = null; } // Save new route mRoute = route; // Attach new playback client mRemotePlaybackClient = new RemotePlaybackClient(this, mRoute); // Send file for playback mRemotePlaybackClient.play(Uri.parse( "http://archive.org/download/Sintel/sintel-2048-stereo_512kb.mp4"), "video/mp4", null, 0, null, new ItemActionCallback() { @Override public void onResult(Bundle data, String sessionId, MediaSessionStatus sessionStatus, String itemId, MediaItemStatus itemStatus) { logStatus("play: succeeded for item " + itemId); } @Override public void onError(String error, int code, Bundle data) { logStatus("play: failed - error:"+ code +" - "+ error); } }); } } For more information on how to use the media router, you can visit developer.android.com
View full article
Download ATK from Freescale Extract ATK: # unzip ATK_1_41_STD_installer.zip Get the wine-tricks script and install MFC-4.2 and VisualC++-6.0. ./winetricks  vcrun6sp6 Execute the default install process: # wine SETUP.EXE Edit the file /etc/udev/rules.d/50-udev-default.rules to set permission for everyone: KERNEL=="tty[A-Z]*|pppox*|ircomm*|noz*", GROUP="uucp", MODE="0666" Run ATK: # wine ADSToolkit_std.exe
View full article
Freescale's ARM11™-based i.MX 35 processor family provides the perfect balance of performance, power consumption, connectivity, and media capabilities necessary to drive today's multimedia applications. i.MX35 Family Comparison i.MX Family Comparison Product Information on Freescale.com i.MX351 Multimedia Applications Processor i.MX353 Multimedia Applications Processor i.MX355 Multimedia Applications Processor i.MX356 Multimedia Applications Processor i.MX357 Multimedia Applications Processor Evaluation/Development Boards and Systems IMX35PDK: i.MX35 Product Development Kit (PDK) Embedded Software and Tools Android OS for i.MX Applications Processors i.MX35 Current Software Updates and Releases Additional Resources Develop a Simple OpenVG Application Under Linux: Tutorial i.MX35 PDK i.MX35 PDK Linux Booting SD I.MX35 PDK Board Flashing SD Card i.MX35 PDK Board Flashing NAND i.MX35 PDK NAND Flashing Kernel and Root File System Using RedBoot i.MX35 PDK NAND Creating and Flashing UBIFS image
View full article
Change ambient graphic - Ambient Grafic:      Fluxbox (low memory and fast initialization) - Install (root):      apt-get update      apt-get install fluxbox - After instalation, edit file /etc/lightdm/lightdm.conf and change line:      "greeter-session=unity-grreter"  for  "greeter-session=fluxbox"   if, preference auto login comment this line:      "autologin-user=user"  for  "#autologin-user=user" - Reboot and try fluxbox  🙂
View full article
[中文翻译版] 见附件   原文链接: https://community.nxp.com/docs/DOC-344473 
View full article
Following docs(English or Chinese version) are also can be referred as a hand on guide. Freescale i.MX6 DRAM Port Application Guide-DDR3 飞思卡尔i.MX6平台DRAM接口高阶应用指导-DDR3篇 Please find i.Mx6DQSDL LPDDR2 Script Aid through below link. i.Mx6DQSDL LPDDR2 Script Aid Please find i.Mx6DQSDL DDR3 Script Aid through below link. i.Mx6DQSDL DDR3 Script Aid Please find i.MX6SX DDR3 Script Aid through below link. i.MX6SX DDR3 Script Aid Please find i.MX6UL DDR3 Script Aid through below link. I.MX6UL DDR3 Script Aid Please find i.MX6SL LPDDR2 Script Aid through below link.. i.Mx6SL LPDDR2 Script Aid History: 0.03 1. update ZQ_LP2_HW_ZQCS         2. add MMDC SW reset         3. add disable DQS gating and reset read FIFO Any questions are welcome!
View full article
This link contains the scripts, U-boot commands, and patch code shown on the application note AN5409 titled 'i.MX6 Dual/6 Quad Power Consumption Measurement'.
View full article
In our default release , the eboot logo only can be show on WVGA panel. Attached patch file can let the eboot logo show both on DVI XGA and RGB WVGA panel.
View full article
Hi all, I'm using this patch to get BT656 output on my i.MX6Q: Patch to Support BT656 and BT1120 Output For i.MX6 BSP Now I am looking for a way to clamp the pixel values between 16 to 240. Based on the i.MX6Q Reference Manual (37.4.5.6 IC Task Parameter Memory), this can be done by setting a IC task parameter called SAT_MODE from 0 to 1, but I'm not sure how it should be done. I've inspected the ipu_disp.c code and I guess the right way to do this is calling ipu_dp_write inside __ipu_dp_csc_setup function to set SAT_MODE to 1, but know I don't know which address to give toipu_dp_write since SAT_MODE is not defined in the ipu_regs.h. Looking at other parameters addresses (e.g. DP_CSC_0) and comparing their counterpart in the Reference Manual doesn't get my anywhere either. Bests, Isaac Hi Isaac, the default BSP code doesn't support DP_CSC_YUV_SAT_MODE modification, just used the default value 0. You can reference to the ioctl "MXCFB_SET_GAMMA" to add it into mxcfb_ioctl() of file mxc_ipuv3_fb.c. Bit 11 in IPUx_DP_COM_CONF_SYNC is for DP_CSC_YUV_SAT_MODE. So you can add it in ipu_regs.h: DP_COM_CONF_CSC_DEF_BOTH = 0x00000100, + DP_COM_CONF_CSC_YUV_SAT_MODE = 0x00000800, DP_COM_CONF_GAMMA_EN = 0x00001000, For BT656 display, IC CSC was not used, it used DP CSC. This document was generated from the following discussion: How to change SAT_MODE in BT656 display output for i.MX6
View full article
Attached is a chunk of the filesystem for the Linux Image https://community.freescale.com/docs/DOC-93887
View full article
Q: To do a triple display demo based on imx6 SDP. The 3 channel are 1 lvds & 1hdmi & 1 lcd  and the OS is Android JB4.3. The dual display works and those 2 screens can all display the Android desktop. The setting as below. setenv bootargs console=ttymxc0,115200 init=/init rw video=mxcfb0:dev=ldb,LDB-XGA,if=RGB666 video=mxcfb1:dev=lcd,CLAAWVGA,if=RGB565 video=mxcfb2:off video=mxcfb3:dev=hdmi,1920x1080M60,if=RGB24 fbmem=10M fb0base=0x27b00000 vmalloc=400M androidboot.console=ttymxc0 androidboot.hardware=freescale static struct ipuv3_fb_platform_data sabresd_fb_data[] = {         { /*fb0*/         .disp_dev = "lcd",         .interface_pix_fmt = IPU_PIX_FMT_RGB565,         .mode_str = "CLAA-WVGA",         .default_bpp = 16,         .int_clk = true,         .late_init = false,         }, {         .disp_dev = "ldb",         .interface_pix_fmt = IPU_PIX_FMT_RGB666,         .mode_str = "LDB-XGA",         .default_bpp = 16,         .int_clk = false,         .late_init = false,             }, {         .disp_dev = "ldb",         .interface_pix_fmt = IPU_PIX_FMT_RGB666,         .mode_str = "LDB-XGA",         .default_bpp = 16,         .int_clk = false,         .late_init = false,         }, {         .disp_dev = "hdmi",         .interface_pix_fmt = IPU_PIX_FMT_RGB24,         .mode_str = "1920x1080M60",         .default_bpp = 16,         .int_clk = true,         .late_init = false,             }, }; static struct fsl_mxc_hdmi_core_platform_data hdmi_core_data = {         .ipu_id = 1,          .disp_id = 1, }; static struct fsl_mxc_lcd_platform_data lcdif_data = {         .ipu_id = 0,         .disp_id = 0,         .default_ifmt = IPU_PIX_FMT_RGB565, }; static struct fsl_mxc_ldb_platform_data ldb_data = {         .ipu_id = 0,         .disp_id = 1,         .ext_ref = 1,         .mode = LDB_SEP1,         .sec_ipu_id = 1,         .sec_disp_id = 0, }; A: Android BSP doesn't support triple display, and so the change in kernel would not make the 3rd display work.
View full article
Hi all, Cortex-M4 for i.MX6SoloX that is new to i.MX6SX customers. They concerns GPIO ISRs response time are not real time and hugh latency while Android/Linux is running on Cortex-A9 in i.MX6SoloX. I shared my test steps, report and image for your reference. Best regards, Carl
View full article
Connectivity - Using a Bluetooth Dongle Network Connection A simple way to set up a network connection using a Bluetooth dongle is using the Personal Area Networking (PAN) profile. Load the following modules on i.MX platform: # modprobe ehci-hcd # modprobe hci_usb # modprobe bnep Set hci0 up: # hciconfig hci0 up Check if the hci0 is set by typing: root@freescale ~$ hciconfig hci0:  Type: USB         BD Address: 00:1E:58:3F:4D:09 ACL MTU: 384:8 SCO MTU: 64:8         UP RUNNING PSCAN ISCAN         RX bytes:4813491 acl:53228 sco:0 events:208901 errors:0         TX bytes:156025160 acl:410140 sco:0 commands:83 errors:0 root@freescale ~$ hciconfig hci0 piscan Start the Bluetooth service: root@freescale ~$ /etc/rc.d/init.d/bluetooth start Start the pand service as Pan User (PANU): root@freescale ~$ pand -s -r PANU On Host (PC), load bnep module: $ modprobe bnep Start the pand service as Group Ad-hoc Network (GN): $ sudo pand --connect 00:1E:58:3F:4D:09 --service GN -n The target address (in this case 00:1E:58:3F:4D:09) can be found using hciconfig command on target A BNEP0 network should be created on host (PC) and target (i.MX): Configure BNEP0 IP on PC: $ sudo ifconfig bnep0 192.168.0.11 Configure BNEP0 IP on i.MX: $ ifconfig bnep0 192.168.0.10 Now the PAN network is set. You can test using ping: root@freescale ~$ ping 192.168.0.11 PING 192.168.0.11 (192.168.0.11): 56 data bytes 64 bytes from 192.168.0.11: icmp_seq=0 ttl=64 time=12.305 ms 64 bytes from 192.168.0.11: icmp_seq=1 ttl=64 time=27.782 ms 64 bytes from 192.168.0.11: icmp_seq=2 ttl=64 time=16.701 ms 64 bytes from 192.168.0.11: icmp_seq=3 ttl=64 time=36.732 ms 192.168.0.11 ping statistics --- 4 packets transmitted, 4 packets received, 0% packet loss round-trip min/avg/max/stddev = 12.305/23.380/36.732/9.551 ms
View full article
The Android O8.1.0_2.0.0 GA (4.14.98 kernel) is now available on IMX software landing page. Overview -> i.MX BSP Updates and Releases -> Android -> Android O8.1.0_2.0.0   Files available:   # Name Description 1 android_o8.1.0_2.0.0-GA_docs.zip Android O8.1.0_2.0.0  Documentation 2 imx-o8.1.0_2.0.0-ga.tar.gz i.MX Android Automotive proprietary source code for Android O8.1.0_2.0.0 3 android_o8.1.0_2.0.0-ga_image_8qmek.tar.gz Prebuilt images with NXP extended features for the i.MX8QMax and 8QXPlus MEK   Supported boards: i.MX 8QuadMax MEK i.MX 8QuadXPlus MEK   Features and Known issues For features and known issues, please consult the Release Notes in detail.  ============================================================= The Android O8.1.0_2.1.0_AUTO GA (4.14.98 kernel) is now available on IMX software landing page. Overview -> i.MX BSP Updates and Releases -> Android AUTO-> Android O8.1.0_2.1.0_AUTO   Files available:   # Name Description 1 android_o8.1.0_2.1.0-auto-GA_docs.zip Android O8.1.0_2.1.0_AUTO Documentation 2 imx-o8.1.0_2.1.0-auto-ga.tar.gz i.MX Android Automotive proprietary source code for Android O8.1.0_2.1.0_AUTO 3 android_o8.1.0_2.1.0-auto-ga_image_8qmek.tar.gz Prebuilt images with NXP extended features with the EVS function enabled in the Cortex-M4 CPU core for the i.MX 8QuadMax/8QuadXPlus MEK 4 android_o8.1.0_2.1.0-auto-ga_image_8qmek2.tar.gz Prebuilt images with NXP extended features for the i.MX8QMax and 8QXPlus MEK, without the EVS in M4 Core. Supported boards: i.MX 8QuadMax MEK i.MX 8QuadXPlus MEK   Features and Known issues For features and known issues, please consult the Release Notes in detail. 
View full article