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 a simple step by step guide on how to change the Android boot animation which is shown when the system is loading.   Requirements   - Android L5.1.1_2.1.0 BSP. The basics of the boot animation may also apply to older and upcoming releases but L5.1.1_2.1.0 BSP was used for this document. File names, settings or paths may be changed in older or newer releases.   - i.MX6Q Sabre SD Board or any other i.MX board supported by the BSP release, for testing.   - 7-Zip. This is a free compression tool and has the necessary settings for preparing the boot animation file. It is important that the boot animation file is in Zip format with no compression, otherwise the file won’t be read and the animation will not be shown. Zip tools integrated on some Operating Systems may not always allow for these configurations. You may download this utility from the link below: http://www.7-zip.org/   - Android adb tool. This tool is part of the Android SDK. You may download the SDK as part of Android Studio or the SDK as Stand Alone on the following link. Only the adb is required to follow up this document. http://developer.android.com/sdk/installing/index.html   Understanding the boot animation format.   The animations used by Android when booting are actually a series of images in either jpg or png format in a zip file with no compression (storage mode) and a text file (desc.txt) with the specified resolution, framerate and loops to be played by the animation. Each folder containing a part of the animation must contain the images numbered from 000 onwards.  This file is always called bootanimation.zip An example of a boot animarion can be found attached to this document.   The contents of the desc.txt file on the attached example are as follow: 480 292 30 p 1 0 part0 p 0 0 part1 (please note that there should be an empty line at the end of the document).   Line 1: Screen resolution followed by FPS (Frames per Second) of the animation.   Lines 3-5: The p serves to describe that the line contains a part of the animation; followed by the number of times the section of the animation will play (with zero being an infinite loop); followed by a delay in frames before moving to the next line. Finally, the folder containing the files of that specific part of the animation (this is why most animations use “part” for the folder name).   Line 6: A blank line. This is important as without it the animation may not run as it will consider the description file incomplete. There are some animations available around the web as well as some free tools or apps that allow you to create your own animations. You may find an example animation attached to this document which you may use as reference.   It is important that no other files are included on the bootanimation.zip file. This includes the thumbnails created automatically by Windows. Please delete them from your fule before loading it to the board.   Please note that the animation may be repeated in a loop if it’s shorter than the actual time it takes for the system to load. However, the animation will play complete regardless of the loading time so very long boot animations may give the appearance of a longer booting time.   The location of the boot animation file is given on the bootanimation_main.cpp file, which is located on the following path: <MYANDROID_DIR>/frameworks/base/cmds/bootanimation/bootanimation_main.cpp   There are two definitions that give the file location. We’re focusing on the default image for this document (unencrypted). #define SYSTEM_BOOTANIMATION_FILE "/system/media/bootanimation.zip" #define SYSTEM_ENCRYPTED_BOOTANIMATION_FILE "/system/media/bootanimation-encrypted.zip"   Note: These definitions may be different from those in third party BSPs. It is common to find BSPs using the "/data/local/” folder as USER_BOOTANIMATION. This is not supported by default on NXP’s BSP.   Loading the new boot animation file.   - Building a User Debug image Android protects certain folders to avoid tampering, so in order to change the boot animation we will use adb in order to access the file system. However, it is necessary to use a image with root access so we will be using a user debug image.   In order to compile as user debug use the following lunch command after following the instructions in the Android User's Guide: $ lunch sabresd_6dq-userdebug   After configuring the build for user debug you can then build using make. (This process may take several hours)   - Enabling USB Debug mode Your board should be running android and then be connected to the computer using the USB OTG port. In order for adb to work you have to enable USB debugging by opening Settings and scrolling down to the “About” option clicking the "About" option 7 times.   - Using adb to load the new boot animation We’ll connect to the SABRE board using the Android SDK for Windows adb tool available at the path below: android-sdk-windows\platform-tools   Open a command promt in windows and go to the adb path. Then start the adb server with the following command: $ adb start-server   This will initialize the adb daemon. In order to connect to the device permission must be granted. A pop up will appear asking whether to trust or not the computer host. Since we will be changing the system partition we must initialize adb as root: $ adb root   This will restart the adb daemon in root mode. You will need to grant access from your device. You may see the list of connected with: $ adb devices   If you wish to see the contents of the filesystem you may enter the shell with the following command: $ adb shell   However, we will be using the pull/push commands from adb in order to change the bootanimation.   If you wish to download the current bootanimation for backup you may do so with the following command: $ adb pull /system/media/bootanimation.zip C:\ This will download the bootanimation.zip file to C:   Since the system partition is read only you will need to remount with the adb prior to pushing the replacing boot animarion $ adb remount $ adb root push C:\BootAni\bootanimation.zip /system/media   After this you may reboot your board and you should see the new boot animation. Original Attachment has been moved to: bootanimation.zip
View full article
This document provides the steps to patch and build a fastboot Linux System. This document assumes the BSP 3.0.35_1.1.0 and a  i.MX6Q platform. For more information about what the patches do, please check this link. Install LTIB and move to the ltib folder Download the ltib patch from this document and patch it (patch -p1 < 0001-set-imx6_ssd_lite_defconfig-as-default-kernel-config.patch) Go to the LTIB configuration menu (./ltib -m config), select mx6q platform and min profile Select mx6q_sabresd as u-boot board Fetch and Patch: u-boot: Prepare u-boot source code (./ltib -m prep -p u-boot) Move to u-boot folder (cd rpm/BUILD/u-boot-2009.08) Download u-boot attached patches Patch code (for p in *.patch; do patch -p1 < $p;done) kernel: Prepare kernel source code (./ltib -m prep -p kernel) Move to kernel folder (cd rpm/BUILD/linux) Download attached kernel patches Patch code (for p in *.patch; do patch -p1 < $p;done) Build  (./ltib) Add  an application to run first after boot in rootfs/etc/inittab (see example inittab file, it captures data from the MIPI Camera) Create necessary devices nodes under rootfs/dev. For example terminal: sudo mknod ttymxc0 c 207 16 video capture nodes: sudo mknod video0 c 81 5; sudo mknod video1 c 81 6 video display nodes: sudo mknod video16 c 81 0; sudo mknod video17 c 81 1 frame-buffers: for i in 0 1 2 3 4; do sudo mknod fb$i c 29 $i; done Package rootfs (cd rootfs; sudo tar --numeric-owner -cvfj ../rootfs.tar.bz2 *; cd ..) On a windows machine, download latest Manufacturing tool and uncompress it. Move rootfs.tar.bz2, rootfs/boot/uImage and rootfs/boot/u-boot.bin into the corresponding Manufacturing folder (Profiles\MX6Q Linux Update\OS Firmware\files) Choose a sabresd-eMMC profile and flash the board Boot the board using the eMMC
View full article
Overview AVB/TSN Wikipedia: Audio Video Bridging (AVB) is a common name for the set of technical standards which provide improved synchronization, low-latency, and reliability for switched Ethernet networks. AVB was initially developed by the Institute of Electrical and Electronics Engineers (IEEE) Audio Video Bridging task group of the IEEE 802.1 standards committee. In November 2012, Audio Video Bridging task group was renamed to Time-Sensitive Networking (TSN) task group to reflect the expanded scope of its work, which is to "provide the specifications that will allow time-synchronized low latency streaming services through IEEE 802 networks". Further standardization efforts are ongoing in IEEE 802.1 TSN task group.   AVB and TSN technologies and standards: Standard Area of Definition Title of Standard AVB/TSN IEEE 802.1AS Timing and synchronization Timing and Synchronization for Time-Sensitive Applications (gPTP) AVB TSN IEEE 802.1Qav Forwarding and queuing Forwarding and Queuing for Time-Sensitive Streams (FQTSS) AVB IEEE 802.1Qat Path control and reservation Stream Reservation Protocol (SRP) AVB IEEE 802.1BA Bridging Audio Video Bridging (AVB) Systems AVB IEEE 1722 AVTP AV transport Layer 2 Transport Protocol for Time Sensitive Applications AVB IEEE 1722 AVDECC Device manage and control Device Discovery, Enumeration, Connection Management and Control Protocol AVB IEEE 802.1Qbu and IEEE 802.3br Forwarding and queuing Frame preemption TSN IEEE 802.1Qbv Forwarding and queuing Enhancements for scheduled traffic TSN IEEE 802.1Qca Path control and reservation Path control and reservation TSN IEEE 802.1Qcc Central configuration method Enhancements and performance improvements TSN IEEE 802.1Qci Time-based ingress policing Per-stream filtering and policing TSN IEEE 802.1CB Seamless redundancy Frame replication and elimination for reliability TSN   Since many of the standards are only for TSN switch/bridges and i.MX8MP is design to be a TSN/AVB endpoint, this demo does not implement a full stack or full standards. It only demonstrates the basic end-to-end point (talker to listener) A/V streaming without bridge or switch.   Below table shows what this demo supports: Standard Software Hardware IEEE 802.1AS Linuxptp ENET_QoS IP IEEE 802.1Qav/Qbu/Qbv TC qdisc (taprio, mqprio, etf, cbs) ENET_QoS IP (multi queue + EST, FPE, CBS) IEEE 1722 AVTP Libavtp N/A   Demo introduction Two i.MX8MP EVK boards are used for this demo, one act as a AVB talker to send A/V streams, the other one act as a AVB listener to receive A/V streams who can be playback to audio codec and sink video to screen. The two boards are connected by a RJ45 ethernet cable on each ENET2 port (only ENET2 port has TSN features). Three streams’ type and SR (Stream Reservation) class are defined as below to grantee time sensitive (sub-microsecond synchronization), low latency and bandwidth on the ethernet: Stream A: SR class A, AVTP Compressed Video Format, H.264 profile High, 1920x1080, 30 fps. Stream B: SR class B, AVTP Audio Format, PCM 16-bit sample, 48 kHz, stereo, 12 frames per AVTPDU. Other stream: Best-effort streams These three TSN streams would be allocated into different traffic control (TC) class for egress in Linux. Different TC class would be mapped to different hardware queues with dedicated DMA channel, thanks to the multi-queue support by ENET_QoS IP. Then the traffic control apply different scheduling policy on each queues for different types of streams egress, to make sure highest priority or critical packet can be sent in the correct time slot. The TSN streams are transmitted over Virtual LANs (VLANs). Bridges use the VLAN priority information (PCP) to identify Stream Reservation (SR) traffic classes which are handled according to the Forward and Queuing Enhancements for Time-Sensitive Streams (FQTSS) mechanisms described in Chapter 34 of the IEEE 802.1Q standard.   The demo is built up by following blocks: Linux TC (traffic control): streams egress control to meet AVB/TSN requirements, which take advantage of the i.MX8MP TSN ENET IP. Linux PTP: clock sync in network, which take advantage of the i.MX8MP TSN ENET IP. Libavtp: Time Sensitive Applications AV Transport protocol. ALSA: AVTP audio format plugin uses the libavtp to transmit and receive AVTP audio PCM streams. Gstreamer: avtp plugin uses the libavtp to transmit and receive AVTP audio/video streams (video should be encoded as H264, audio PCM). x264enc and libav is a software H.264 video encoder/decoder, which alternative to the on chip VPU acceleration plugin, due to the VPU plugin is not supported in the latest Gstreamer version (1.17.x).     Traffic control This demo can use two different traffic control qdisc settings: mqprio + cbs: use CBS features taprio + pfifo: use EST and FPE features (802.1Qbu/bv). The pfifo is the default traffic control class, which use FIFO schedule policy for egress packets. The CBS class is actually handled by hardware IP to select which queue for transmit in a certain time slot.   Credit Base Shaper (CBS) CBS parameters come straight from the IEEE 802.1Q-2018 specification. They are the following: idleSlope: rate credits are accumulated when queue isn’t transmitting; sendSlope: rate credits are spent when queue is transmitting; hiCredit: maximum amount of credits the queue is allowed to have; loCredit: minimum amount of credits the queue is allowed to have;     Enhancements to Scheduled Traffic (EST) The IEEE 802.1Qbv defines the schedule for each of the queues on every egress port which makes the implementation aware of traffic arrival schedule. This information can be used to block the lower priority traffic from transmission in this time window/slot. This ensures that scheduled traffic is forwarded from sender to receiver through all the network nodes with a deterministic delay. The i.MX8MP uses the gate control list with configurable time slot and frame preempt (IEEE 802.1Qbu) features to support EST. Other than the CBS, the gate control list control the egress transmission by a fixed open interval for that queue.   Build demo Build L5.4.24_2.1.0 $MACHINE=imx8mpevk DISTRO=fsl-imx-xwayland source imx-setup-release.sh -b build-8mp $bitbake  fsl-image-validation-imx Prepare a SD card and burn it with the built out images. To add tc/tcpdump command in iproute2 package, please add package into IMAGE_INSTALL_append variable into conf/local.conf: IMAGE_INSTALL_append = " iproute2 iproute2-tc tcpdump Rebuild kernel Rebuild the kernel after applying the 0001-qenet-add-queue-avoid-panic.patch (attached), and overwrite the Image and imx8mp-evk.dtb on the boot partition of the SD card.   Install the toolchain $bitbake -f fsl-image-validation-imx -c populate_sdk $sh tmp/deploy/sdk/fsl-imx-xwayland-glibc-x86_64-fsl-image-validation-imx-aarch64-imx8mpevk-toolchain-5.4-zeus.sh The toolchain would be installed into /opt/fsl-imx-xwayland/5.4-zeus/   Create a install folder $mkdir <your install folder> Create a folder to install all of the shared libraries, binaries and configure files which built out manually in this doc. After built done, you should copy all of the contents in this folder to target board root.   Build libavtp $source /opt/fsl-imx-xwayland/5.4-zeus/environment-setup-aarch64-poky-linux $git clone https://github.com/Avnu/libavtp.git $cd libavtp $meson build $ninja -C build Copy the built out .so and .pc into the toolchain rootfs: $sudo cp build/libavtp.so* /opt/fsl-imx-xwayland/5.4-zeus/sysroots/aarch64-poky-linux/usr/lib/ $sudo cp build/meson-private/*.pc /opt/fsl-imx-xwayland/5.4-zeus/sysroots/aarch64-poky-linux/usr/lib/pkgconfig/ To make sure you have avtp package installed correctly: $pkg-config --list-all | grep avtp Copy the .so into the install folder: $cp build/libavtp.so* <install folder>/usr/lib/ Copy header files: $cp libavtp/include/* files <toolchain_path>/sysroots/aarch64-poky-linux/usr/lib Build ALSA aaf plugin The AAF (ALSA AVTP Audio Format) plugin is a PCM plugin that uses Audio Video Transport Protocol (AVTP) to transmit/receive audio samples through a Time-Sensitive Network (TSN) capable network. The plugin enables media applications to easily implement AVTP Talker and Listener functionalities.   $cd <yocto build>/tmp/work/aarch64-mx8mp-poky-linux/alsa-plugins/1.1.9-r0/alsa-plugins-1.1.9 $./configure --build=x86_64-linux --host=aarch64-poky-linux --target=aarch64-poky-linux --prefix=<your install folder>/usr --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot=/opt/samba/nxa23059/jailhouse/yocto-5.x/build-8mp/tmp/work/aarch64-mx8mp-poky-linux/alsa-plugins/1.1.9-r0/recipe-sysroot  --disable-static  --enable-aaf --disable-jack --disable-libav --disable-maemo-plugin --disable-maemo-resource-manager --enable-pulseaudio --enable-samplerate --with-speex=lib $make $make install   Build Gstreamer AVTP plugins Build Gstreamer 1.17.x (commit e4f7cdb0df7b) $git clone https://gitlab.freedesktop.org/gstreamer/gstreamer.git $cd gstreamer $patch -p1 < gstreamer-1.0-pass-build.patch $meson build --prefix=<your install folder>/usr $ninja -C build $ninja -C build install After Gstreamer is installed into <your install folder>, please fix the “prefix” path in the .pc files by, and copy to the toolchain folders: $cd <your install folder> $grep -lR <your install folder> ./lib/pkgconfig/ | xargs sed -i 's/<your install folder>/\/usr/g' NOTE: Make sure you use the ‘\’ for ‘/’ convert in your path. $cp -rf ./usr/* /opt/fsl-imx-xwayland/5.4-zeus/sysroots/aarch64-poky-linux/usr/   Build gst-plugins-base (commit 22827e8f) $git clone https://gitlab.freedesktop.org/gstreamer/gst-plugins-base.git $cd gst-plugins-base $patch -p1 < gst-plugins-base-pass-build.patch $meson build --prefix=<your install folder>/usr $ninja -C build $ninja -C build install   Build gst-plugins-bad (commit ed14e0d5a) $git clone https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad.git $cd gst-plugins-bad $meson build --prefix=<your install folder>/usr $ninja -C build $ninja -C build install If you met gdbus-codegen issue, please remove the “--c-generate-autocleanup” and “--output-directory” parameters in the build/build.ninja If you met issue of include file like: “…/gst/gl/gstglapi.h:24:10: fatal error: gst/gl/gstglconfig.h: No such file or directory.” Please modify the build/build.ninja to correct the -I header file parameter of the build. After gst-plugins-base and gst-plugins-bad installed into <your install folder>, please fix the “prefix” path in the .pc files and copy them into the toolchain folders: $cd <your install folder> $grep -lR <your install folder> ./lib/pkgconfig/ | xargs sed -i 's/<your install folder>/\/usr/g' NOTE: Make sure you use the ‘\’ for ‘/’ convert in your path. $cp -rf ./usr/* /opt/fsl-imx-xwayland/5.4-zeus/sysroots/aarch64-poky-linux/usr/   Build H.264 SW plugins AVTPDU uses H.264 as payload for streaming, this requires H.264 encoder/decoder plugins, either software or hardware accelerations. Since we upgrade the Gstreamer and its plugins to a new version, the VPU plugins cannot be used anymore. So software H.264 plugins are required: x264 for encoder, libav for decoder.   Build x264 As the yocto actually has the x264 recipes, but not included in our bblayers, we need to copy the x264 source into our bblayers path under <yocto>/source to build: $cp -rf ./poky/meta/recipes-multimedia/x264 ./meta-openembedded/meta-multimedia/recipes-multimedia/ $vi ./meta-openembedded/meta-multimedia/recipes-multimedia/x264_git.bb Remove the LICENSE_FLAGS line $bitbake -f x264 -c do_install $sudo cp -rf tmp/work/aarch64-poky-linux/x264/r2917+gitAUTOINC+72db437770-r0/image/usr/* /opt/fsl-imx-xwayland/5.4-zeus/sysroots/aarch64-poky-linux/usr/ Build gst-plugins-ugly (commit 995a135d) $git clone https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly.git $cd gst-plugins-ugly$meson build --prefix=<your install folder>/usr $ninja -C build $ninja -C build install If you met build issue, please remove "if have_cxx" from meson.build Build libav As the yocto actually has the libav recipes, but not included in our bblayers, we need to copy the its source into our bblayers path under <yocto>/source: $cp -rf ./poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav ./meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer $vi ./meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.16.1.bb Remove the LICENSE_FLAGS line $bitbake -f gstreamer1.0-libav -c do_install $cp tmp/work/aarch64-mx8mp-poky-linux/gstreamer1.0-libav/1.14.0-r0/image/usr/lib/gstreamer-1.0/libgstlibav.so <your install folder>/usr/lib/gstreamer-1.0 Now you have all of the Gstreamer plugins which required for AVB/TSN audio/video demo: avtpsrc, avtpsink, avtpaafpay, avtpaafdepay, avtpcvfpay, avtpcvfdepay x264_enc (encoder), avdec_h264 (decoder)   Install binaries Final step is to copy all of your built out files from <your install folder> into your board / root, and boot up the board. Verify the Gstreamer plugins install correctly or not: $export GST_PLUGIN_PATH= /usr/lib/gstreamer-1.0/ $gst-inspect-1.0 Check if the above Gstreamer plugins we built out can be found by gst-instpect.   System Setup VLAN The ENTE_QoS is assigned to eth1 instance. So create eth1.5 for vlan id 5: $ip link add link eth1 name eth1.5 type vlan id 5 \         egress-qos-map 2:2 3:3 $ip link set eth1.5 up Qdiscs The TSN control plane is implemented through the Linux Traffic Control (TC) System. The transmission algorithms specified in the Forwarding and Queuing for Time-Sensitive Streams (FQTSS) chapter of IEEE 802.1Q-2018 are supported via TC Queuing Disciplines (qdiscs). Linux currently provides the following qdiscs relating to TSN: Multiply queue qdiscs (These two qdiscs are mutually exclusive, select one for your demo): MQPRIO: Mapping the TC class into different hardware queue in IP. TAPRIO: Implements the Enhancements for Scheduled Traffic introduced by IEEE 1Qbv/Qbu. This is supported by i.MX8MP ENET_QoS IP through EST features: Qbv – Time aware shaper Qbu - frame preemption. CBS qdisc: Implements the Credit-Based Shaper introduced by the IEEE 802.1Qav This is supported by i.MX8MP ENET_QoS IP through EST (Enhancements to Scheduled Traffic) features. It works with mqprio qdisc together. ETF qdisc: While not an FQTSS feature, Linux also provides the Earliest TxTime First (ETF) qdisc which enables the LaunchTime Since the i.MX8MP ENET_QoS IP does not support LaunchTime feature, this qdisc configurations would be ignored.   MQPRIO qdisc $tc qdisc add dev eth1 parent root handle 100 mqprio \         num_tc 3 \         map 0 0 2 1 0 0 0 0 0 0 0 0 0 0 0 0 \         queues 1@0 1@1 1@2 \         hw 1 NOTE, since ENET_QoS Q0 does not support hardware CBS, we have to avoid using Q0 for AVB streaming. Here’s the mapping: socket SO_PRIORITY 2 -> TC CLASS 2 -> Q2 socket SO_PRIORITY 3 -> TC CLASS 1 -> Q1 Other socket priority -> TC CLASS 0 -> Q0   TAPRIO qdisc Create a root qdisc handle to map the different CLASS streams to hardware queues w/ GCL (gate control list). This root handle maps the CLASS A stream to queue Q1, CLASS B stream to Q2, and others to Q0 by the “map” and “queues” parameters, same as mqprio above. The Q1/Q2(CLASS1/2) gates are open in the first 300us interval, then only Q1(CLASS1) gate is open in the next 300us with all other CLASS gated. The last sched-entry defines in after Q1 is open after 300us, all of the CLASS gates are open for next 200us. Then loopback to the first sched-entry for gate control. Please note in this demo, we only enable features to support the 802.1Qbv, the Qbu (Frame preempt) requires patches for iproute2. $tc qdisc add dev eth1 parent root handle 100 taprio \         num_tc 3 \         map 0 0 2 1 0 0 0 0 0 0 0 0 0 0 0 0 \         queues 1@0 1@1 1@2 \         base-time 1000000000 \         sched-entry S 0x6 300000 \         sched-entry S 0x2 300000 \         sched-entry S 0x7 200000 \         flags 0x2   CBS qdisc Q1 CBS for video, Q2 CBS for audio: $tc qdisc replace dev eth1 parent 100:2 handle 777 cbs \         idleslope 98688 sendslope -901312 hicredit 153 locredit -1389 \         offload 1 $tc qdisc replace dev eth1 parent 100:3 handle 888 cbs \         idleslope 3648 sendslope -996352 hicredit 12 locredit -113 \        offload 1 NOTE: By default, the Q0 will be allocated for pfifo qdisc class if we do not define them.   ETF qdisc As ENET_QOS does not support hardware launch time in IP, the ETF qdisc would not be used here.   TimeSync Run the ptp4l and phc2sys in background, and use check_clocks to check the ptp sync works. $ptp4l -i eth1 -f ./gPTP.cfg --step_threshold=1 & $pmc -u -b 0 -t 1 "SET GRANDMASTER_SETTINGS_NP clockClass 248 \         clockAccuracy 0xfe offsetScaledLogVariance 0xffff \         currentUtcOffset 37 leap61 0 leap59 0 currentUtcOffsetValid 1 \         ptpTimescale 1 timeTraceable 1 frequencyTraceable 0 \         timeSource 0xa0" $phc2sys -s eth1 -c CLOCK_REALTIME --step_threshold=1 \         --transportSpecific=1 -w &  $./check_clocks -d eth1 The PTP Hardware Clock (PHC)  synced between PTP master/slave means the RMS offset between PHC and GM (master clock) is < 100ns. PHC and system clock (CLOCK_REALTIME) synced means the clock offset < 100ns   NOTE: The check_clocks source code can be downloaded from here. cfg is described below, if you want to identify which is master and which is slave, use “masterOnly 1” or “slaveOnly 1” in this configuration file. #                                                                 # 802.1AS example configuration containing those attributes which # differ from the defaults.  See the file, default.cfg, for the   # complete list of available options.                              #                                                                 [global]                                                          gmCapable               1                                         priority1               248                                        priority2               248                                       logAnnounceInterval     0                                         logSyncInterval         -3                                        syncReceiptTimeout      3                                          neighborPropDelayThresh 800                                       min_neighbor_prop_delay -20000000                                 assume_two_step         1                                         path_trace_enabled      1                                         follow_up_info          1                                         transportSpecific       0x1                                        ptp_dst_mac             01:80:C2:00:00:0E                         network_transport       L2                                        delay_mechanism         P2P                                        Run demo ALSA AAF audio To run the alsa AAF demo, please add aaf0 and converter0 plugin device into /etc/asound.conf: pcm.aaf0 {         type aaf         ifname eth1.5         addr 01:AA:AA:AA:AA:AA         prio 2         streamid AA:BB:CC:DD:EE:FF:000B         mtt 50000         time_uncertainty 1000         frames_per_pdu 12         ptime_tolerance 100 }    pcm.converter0 {         type linear         slave {                 pcm "hw:2,0"                 format S16_LE         } }   The “aaf0” plugin device defines the ethernet interface which AAF runs on, the socket priority which mapping to Traffic Class in kernel TC, the stream-id for the aaf streaming. The “converter0” plugin device is used for convert the S16_BE format to S16_LE for the wm8960 PCM audio.   Select one device as AVB talker, and run: $speaker-test -p 25000 -F S16_BE -c 2 -r 48000 -D aaf0 Select one device as AVB talker, and run: $arecord -F 25000 -t raw -f S16_BE -c 2 -r 48000 -D aaf0 | aplay -F 25000 -t raw -f S16_BE -c 2 -r 48000 -D converter0 You can hear the sound on the listener device. You can also check which qdisc queue is used for AAF by: $tc -s qdisc   Gstreamer AAF audio Select one device as AVB talker, and run: $gst-launch-1.0 clockselect. \( clock-id=realtime \     audiotestsrc samplesperbuffer=12 is-live=true ! \     audio/x-raw,format=S16BE,channels=2,rate=48000 ! \     avtpaafpay mtt=50000000 tu=1000000 streamid=0xAABBCCDDEEFF000B processing-deadline=0 ! \     avtpsink ifname=eth1.5 address=01:AA:AA:AA:AA:AA priority=2 processing-deadline=0 \)   Select one device as AVB listener, and run: $gst-launch-1.0 clockselect. \( clock-id=realtime \     avtpsrc ifname=eth1.5 ! avtpaafdepay streamid=0xAABBCCDDEEFF000B ! \     queue max-size-bytes=0 max-size-buffers=0 max-size-time=0 ! \     audioconvert ! audioresample !  alsasink device="hw:2,0" \)   Gstreamer CVF video Select one device as AVB talker, and run: $gst-launch-1.0 clockselect. \( clock-id=realtime \     videotestsrc is-live=true ! video/x-raw,width=480,height=320,framerate=15/1 ! \     clockoverlay ! x264enc bframes=0  key-int-max=1 speed-preset=1 tune=4 ! h264parse config-interval=-1 ! \     avtpcvfpay processing-deadline=20000000 mtu=1400 mtt=2000000 tu=125000 streamid=0xAABBCCDDEEFF000A ! \     avtpsink ifname=eth1.5 priority=3 processing-deadline=20000000 \) NOTE: To eliminate the h.264 software encoding/decoding overhead with acceptable latency for this demo, we use several parameters for x264enc element: bframes: x264enc and avdec_h264 together was found to have issues, remove bframes in the stream would help. key-int-max: decoder can only decode the frame when a keyframe is present on stream to make sure decoder can work as faster as it can, the distance between two keyframes must be set to closest. speed-preset: to low down the CPU loading for encoding, we use the option to make encoding as faster as we can. (=1 means ultrafast) tune: 4 means zero latency ‘mtu=1400’ parameters for avtpcvfpay element is very important, if using the default mtu=1500, the listener cannot get the AVTPDUs package correctly from VLAN. The reason is unknown yet.   Select one device as AVB listener, and run: $gst-launch-1.0 clockselect. \( clock-id=realtime \     avtpsrc ifname=eth1.5 ! avtpcvfdepay streamid=0xAABBCCDDEEFF000A ! \     queue max-size-bytes=0 max-size-buffers=0 max-size-time=0 ! \     avdec_h264 ! videoconvert ! clockoverlay halignment=right ! waylandsink \)   The demo screenshot below: there are two clocks show on the videotestsrc stream: left one is the timestamp recorded before x264enc encoding on the AVB talker side, right one is the timestamp recorded after avdec_h265 decoding and do video convert to YUV frames on AVB listener side. You can see the timestamp is sync in seconds.     Deep dive Packet sniffer Use tcpdump on board to dump the L2 ethernet packet: ./tcpdump -i eth1 ether proto 0x22f0 -w dump.pcap The AVTP ether protocol code is 0x22f0 embedded inside the ether frame, or you can use "vlan 5" VLAN id for tcpdump parameters to dump. Then open this dump.pcap in the windows/Linux PC by the wireshark tool, it will automatically show the protocol inside the package, it can also parser the IEEE1722 (AVTP) CVF/AFF package header as below:   Precise latency measurement The clockoverlay plugin used in the above talker/listener is actually seconds level precision, which can not reflect the latency from talker videotestsrc -> listener avdec_h264 decoding finish. Here need a little hack to the clockoverlay element in the gst-plugins-base to get the millisecond precision. The patch is attached (gst-plugins-base-clockoverlay-us.patch), please apply and rebuild the gst-plugins-base, then replace the libgstpango.so on the board /usr/lib/gstreamer-1.0/. When doing CVF demo, you can take a picture of the screen, and check the two clock's diff. During my test, the latency is about 50ms, which include all the cost of encoding, AVTP packaging, streaming, ethernet transmit, ethernet receive, AVTP unpack and frame decoding. To measure the package latency from transmit port (talker) to receive port (listener), you can use the tcpdump on both end-points. And compare the Epoch Time the packet dumped: "Epoch Time: 1596252905.688243000 seconds". The delta of the epoch time of the same packet is around 100us~500us. This latency actually includes the AF_PACKET clone cost in kernel netfilter, also the tcpdump application schedule latency.   References Getting started with AVB on Linux: https://tsn.readthedocs.io/avb.html TSN vs AVB: https://dornerworks.com/blog/avb-vs-tsn-choose-the-best-deterministic-ethernet-solution-for-your-networked-devices/ ALSA aaf: https://fossies.org/linux/alsa-plugins/doc/aaf.txt Gstreamer avtp: https://gstreamer.freedesktop.org/documentation/avtp/index.html AVTP: https://avnu.org/wp-content/uploads/2014/05/AVnu-AAA2C_Audio-Video-Transport-Protocol-AVTP_Dave-Olsen.pdf MX8MP RM
View full article
This is a copy of the currently posted i.MX 6DQ reference manual, revision 2, published Jun 2014.  This is part 2 of 2, and includes chapters 44-71, Appendix A and Appendix B.  Go here for part 1: i.MX 6DQ Reference Manual (IMX6DQRM R2, Part 1) This document is to be used to enter community comments.  Please feel free to add inline comments in this reference manual. You can point out where more information is needed or where existing information is incorrect.  You can also enter information in your comment that expands on existing information in the document, based on your experience with the device.  If you are pointing out that more information is needed in a paragraph or a section, please be very specific, not “needs more information”.  Your comments in this manual may help other members and will drive improvements in this and future documentation. Note: The doc viewer does not support going directly to a specified page.  Instead of manually paging through one page at a time, you can do a search on a string on a page such as "types of resets", or you can go to chapter links listed in the inline comments.  To do this, page down to the comments below the doc view, select "Inline Comments", sort the comments by "page", and then select the chapter you want to view.  You may find it easier to use this manual by downloading and viewing it in your local Adobe Reader.  Then when you have a comment/question to add to this review copy, navigate to the chapter as described above and then do a search on the text for which you want to add a comment.  This will take you to that page the quickest.
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.MX6SL LPDDR2 Script Aid through below link.. i.MX6SL LPDDR2 Script Aid  Please find i.MX6UL DDR3 Script Aid through below link. I.MX6UL DDR3 Script Aid  Please find i.MX6UL LPDDR2 Script Aid through below link. i.MX6UL_LPDDR2_Script_Aid  Please find i.MX6ULL LPDDR2 Script Aid through below link. i.MX6ULL_LPDDR2_Script_Aid 
View full article
Revisions Revisions Description Details V1.0 Initial version   V1.2 Make a little update 1. Modify the path of the toolchain 2. Remove the command: make menuconfig 3. Modify the path of folder "out" in some commands   Hardware Requirement PC Host: Ubuntu for compiling, Windows for downloading and debugging Target: i.MX6ULL 14x14 EVK with LCD or HDMI TF card USB cables for console and download Power adapter Overview Ubuntu uses the same packaging management system (deb and apt) and with each development cycle pulls in the latest packages from Debian and then adapts them to Ubuntu specifics and adds more features and patches where necessary. They also push changes back to Debian and often developers are Ubuntu and Debian developers. Both of them have a nice UI and can install softwares easier than Yocto. The purpose of this doc is to install the Debian 8 Jessie Rootfs on NXP i.MX6ULL EVK Board. The doc contains several steps as following:    1. Download and compile the u-boot, kernel and dtb.    2. Get and modify the linaro rootfs.    3. Download all things to the SD card via MfgTool.    4. Run the Debian 8 Jessie in the board. Download and compile the u-boot, kernel and dtb.    a. Download the toolchain cd ~/ wget -c https://releases.linaro.org/components/toolchain/binaries/6.3-2017.02/arm-linux-gnueabihf/gcc-linaro-6.3.1-2017.02-i686_arm-linux-gnueabihf.tar.xz mkdir toolchain tar xvf gcc-linaro-6.3.1-2017.02-i686_arm-linux-gnueabihf.tar.xz -C toolchain/ --strip-components 1 export ARCH=arm export CROSS_COMPILE=../toolchain/bin/arm-linux-gnueabihf- mkdir out    b. Download and make the u-boot cd ~/ wget -c http://git.freescale.com/git/cgit.cgi/imx/uboot-imx.git/snapshot/uboot-imx-imx_v2016.03_4.1.15_2.0.0_ga.tar.bz2 mkdir uboot-imx tar jxvf uboot-imx-imx_v2016.03_4.1.15_2.0.0_ga.tar.bz2 -C uboot-imx/ --strip-components 1 cd uboot-imx make mx6ull_14x14_evk_defconfig make    c. Download and make the kernel and dtb cd ~/ wget -c http://git.freescale.com/git/cgit.cgi/imx/linux-imx.git/snapshot/linux-imx-imx_4.1.15_2.0.0_ga.tar.bz2 mkdir linux-imx tar jxvf linux-imx-imx_4.1.15_2.0.0_ga.tar.bz2 -C linux-imx/ --strip-components 1 cd linux-imx vi arch/arm/configs/imx_v7_defconfig Add a line “CONFIG_FHANDLE=y” in the file to prevent the error when boot into rootfs. ****************************************************************************** Note: If you want to use the HDMI port instead of LCD to output the screen, you should modify the file /arch/arm/boot/dts/imx6ull-14x14-evk.dts to add a child node in &i2c2 : sii902x: sii902x@39 {         compatible = "SiI,sii902x";         pinctrl-names = "default";         interrupt-parent = <&gpio2>;         interrupts = <13 IRQ_TYPE_EDGE_FALLING>;         mode_str ="1280x720M@60";         bits-per-pixel = <16>;         reg = <0x39>;         status = "okay"; }; ****************************************************************************** make imx_v7_defconfig make -j4 zImage dtbs    d. Copy the u-boot, kernel and dtb to a folder cd ~/ sudo cp uboot-imx/u-boot.imx  out/ sudo cp linux-imx/arch/arm/boot/zImage  out/ sudo cp linux-imx/arch/arm/boot/dts/imx6ull-14x14-evk.dtb  out/ Get and modify the linaro rootfs. cd ~/ wget -c https://releases.linaro.org/debian/images/alip-armhf/16.04/linaro-jessie-alip-20160428-22.tar.gz mkdir rootfs tar xvf linaro-jessie-alip-20160428-22.tar.gz -C rootfs/ --strip-components 1 cd rootfs tar jcvf linaro-jessie-alip-20160428-22.tar.bz2 ./* sudo mv linaro-jessie-alip-20160428-22.tar.bz2  ../out Now the uboot, kernel, dtb and rootfs are ready in folder ~/out/!   Download all things to the SD card via MfgTool. Download the MfgTool in: http://www.nxp.com/products/automotive-products/microcontrollers-and-processors/arm-mcus-and-mpus/i.mx-application-processors/i.mx-6-processors/sabre-board-for-smart-devices-based-on-the-i.mx-6quad-applications-processors:RD-IMX6Q-SABRE?tab=Design_Tools_Tab Select the “IMX6_L4.1.15_2.0.0_MFG-TOOL” and download. Extract “L4.1.15_2.0.0-ga_mfg-tools.tar.gz” to Windows, and then extract again the “mfgtools-with-rootfs.tar.gz” to <your path>/mfgtools/. You should rename the files in the folder ~/out/ and copy to the path <your path>/mfgtools/Profiles/Linux/OS Firmware/files/ to replace the original files: u-boot.imx -> u-boot-imx6ull14x14evk_sd.imx zImage -> zImage imx6ull-14x14-evk.dtb -> zImage-imx6ull-14x14-evk.dtb linaro-jessie-alip-20160428-22.tar.bz2 -> rootfs_nogpu.tar.bz2 Switch the SW602 in i.MX6ULL EVK board to D1: off, D2: on, insert the TF card in slot SD2 and power on the board. Connect the board with PC by two micro-USB to USB cables(one is for downloading and another is for watching log) Finally, open the script “mfgtool2-yocto-mx-evk-sdcard-sd2.vbs” in the <your path>/mfgtools/. When the “HID-compliant device” shows then click “Start”.   If the processing is done, all things have been download to the board and you can go to the next step. Run the Debian 8 Jessie in the board. The following table shows the DIP switch settings for booting from the TF slot. Switch D1 D2 D3 D4 SW601 OFF OFF ON OFF SW602 ON OFF - -   Then power on the board and the logs will show in the serial console. Debian 8 will automatic login to root. ****************************************************************************** Note: If you want to use the HDMI port instead of LCD to output the screen, you should press any key when the log: Hit any key to stop autoboot shows and change the bootargs like following example: setenv bootargs console=ttymxc0,115200 init=/init video=mxcfb0:dev=hdmi,1280x720M@60,if=RGB24,bpp=32 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off vmalloc=256M androidboot.console=ttymxc0 consoleblank=0 androidboot.hardware=freescale cma=384M saveenv ****************************************************************************** When inputting “startx &” in serial console, the alip GUI will appear in the screen.   You can also use command ”apt-get” to install softwares(E.g. Firefox as following). ****************************************************************************** Note: If you have issues with “sudo” on user UID, need to execute the following commands: root@linaro-alip:~# chown root:root /usr/bin/sudo root@linaro-alip:~# chmod 4755 /usr/bin/sudo root@linaro-alip:~# chown root:root /usr/lib/sudo/sudoers.so root@linaro-alip:~# chown root:root /etc/sudoers root@linaro-alip:~# chown root:root /etc/sudoers.d/ root@linaro-alip:~# chown root:root /etc/sudoers.d/README   Note: If you have issues with “su” from user to root, need to execute the following commands: root@linaro-alip:~# chown root:root /bin/su root@linaro-alip:~# chmod 4755 /bin/su   Note: If you want to disable the warning window “Failed to apply network settings” after executing command “startx &”, you should deactive the Bluetooth: root@linaro-alip:~# sudo systemctl stop bluetooth.service root@linaro-alip:~# sudo systemctl disable bluetooth.service ******************************************************************************
View full article
This document describes the steps to create your own out-of-tree kernel module recipe for Yocto.
View full article
HDMI Dongle SW: The attachment is an HDMI dongle patch based on R13.4 GA. The patches include r13.4-ga-add-on-patches. You can patch it after applying R13.4 GA patch such as add-on patches. You can run script to revb_dongle_patch_install.sh to apply these patches. How to apply the hdmidongle_REVB_R13.4_patch-20121115.tgz: 1. Suppose your android source top is ~/myandroid 2. tar zfvx hdmidongle_REVB_R13.4_patch-20121115.tgz -C ~/ 3. copy revb_dongle_patch_install.sh to ~/ 4. cd hdmidongle_REVB_R13.4_patch 5. ~/revb_dongle_patch_install.sh 6. The  revb_dongle_patch_install.sh will take ~/myandroid as default directory to do patch 7. If your android source tree top is not ~/myandroid. For example, ~/myandroid_ICS, please run ~/revb_dongle_patch_install.sh ~/myandroid_ICS   The following is the release notes for  hdmidongle_REVB_R13.4_patch-20130118.tgz 1. New features:    a. uboot fastboot    b. ldo bypass    c. ntfs support    d. bluetooth A2DP   2. Bug fix    a. WifiDirect connect issue    b. realtek throughput issue with TPLink AP   3. File list:    README.TXT                                      --- this file    0001-uboot_fastboot.patch                       --- uboot fastboot  patch    0002-LDOBYPASS.patch                            --- enable ldo bypass  patch    0003-WifiDirect.patch                           --- wifi direct connect patch    0004-ntfs_support.patch                         --- ntfs support patch    0005-BT_enable.patch                            --- enable bluetooth A2DP    0006-1G_boot_stable.patch                       --- make 1G bootup stable    ntfs-3g.tar.gz                                  --- open source ntfs-3g for ntfs support    rtl8192ce_v4.0.0_6239.20121226_TPIOT1.tgz       --- realtek new driver for TPLink AP throughput issue    MD5SUM.TXT                                      --- md5 check sum   4. Patch guide    Please run md5sum -c MD5SUM.TXT first to confirm all the files received are ok.    All these patches are based on the patch release hdmidongle_REVB_R13.4_patch-20121115.tgz    You need to do as following: R13.4 GA--->patch hdmidongle_REVB_R13.4_patch-20121115.tgz --> patch hdmidongle_REVB_R13.4_patch-20130118.tgz    Supposed the ~/myandroid is your top directory of the android source tree.    Please run the following command to apply the patches .    $tar zfvx hdmidongle_REVB_R13.4_patch-20130118.tgz -C ~/    $cd ~/myandroid    $git apply  ~/hdmidongle_REVB_R13.4_patch-20130118/0001-uboot_fastboot.patch --verbose    $git apply  ~/hdmidongle_REVB_R13.4_patch-20130118/0002-LDOBYPASS.patch --verbose    $git apply  ~/hdmidongle_REVB_R13.4_patch-20130118/0003-WifiDirect.patch --verbose    $git apply  ~/hdmidongle_REVB_R13.4_patch-20130118/0004-ntfs_support.patch --verbose    $git apply  ~/hdmidongle_REVB_R13.4_patch-20130118/0005-BT_enable.patch --verbose    $git apply  ~/hdmidongle_REVB_R13.4_patch-20130118/0006-1G_boot_stable.patch --verbose    $rm -rf kernel_imx/drivers/net/wireless/rtl8192ce    $tar zfvx ~/hdmidongle_REVB_R13.4_patch-20130118/rtl8192ce_v4.0.0_6239.20121226_TPIOT1.tgz    $tar zfvx ~/hdmidongle_REVB_R13.4_patch-20130118/ntfs-3g.tar.gz -C external   5. Build and run     new patch 0007-battery_always_full.patch:   Some games check the battery capacity to determine, it could run or not. But on the hdmi dongle we have no real battery, it makes some games can not run on the hdmi dongle.  We enable the fake battery let the andorid feel it has battery and it is 100% full. 1. Please use this patch after patch hdmidongle_REVB_R13.4_patch-20130118.tgz 2. suppose your android top directory is ~/myandroid and you put he 0007-battery_always_full.patch in your home directory ~ 3. cd ~/myandroid 4. git apply --verbose ~/0007-battery_always_full.patch 5. please rebuild bootimage and run   patch   0008-boot_unlock_screen.patch: When bootup, it goes into desktop rather than screen locker.   1. suppose your android top directory is ~/myandroid and you put the 0008-boot_unlock_screen.patch in your home directory ~ 2. cd ~/myandroid 3. git apply --verbose ~/0008-boot_unlock_screen.patch 4. please rebuild systemtimage and run 2. cd ~/myandroid 3. git apply --verbose ~/0008-boot_unlock_screen.patch patch 0009-uboot-enable-mmu-fix.patch: This patch is for some issue in mmu enable. It will improve all the modules in uboot.   1. suppose your android top directory is ~/myandroid and you put the 0009-uboot-enable-mmu-fix.patch in your home directory ~ 2. cd ~/myandroid 3. git apply --verbose ~/0009-uboot-enable-mmu-fix.patch 4. please rebuild uboot  and rub     patch tarball   hdmidongle_REVB_R13.4_patch-20130123.tgz:   hdmidongle_REVB_R13.4_patch-20130123.tgz contains 0007-battery_always_full.patch  0008-boot_unlock_screen.patch 0009-uboot-enable-mmu-fix.patch remove attached files here: 0007-battery_always_full.patch  0008-boot_unlock_screen.patch 0009-uboot-enable-mmu-fix.patch     Remove hdmidongle_REVB_R13.4_patch-20130123.tgz, hdmidongle_REVB_R13.4_patch-20130118.tgz and upload hdmidongle_REVB_R13.4_patch-20130124.tgz   hdmidongle_REVB_R13.4_patch-20130124.tgz  contains all patches in hdmidongle_REVB_R13.4_patch-20130123.tgz, hdmidongle_REVB_R13.4_patch-20130118.tgz. Please use the  hdmidongle_REVB_R13.4_patch-20130124.tgz.   hdmidongle_REVB_R13.4_patch-20130131.tgz: Besides all the patches released before. Three more patches are added in this patch tar ball.     0010-boot_disable_screenlocker.patch                     --- For fix  0008-boot_unlock_screen.patch 0011-wm8326-DC_CONTROL_RATE.patch                        --- Change the wm8326 pmic rate to immediate voltage change 0012-Added-default-video-mode-check-make-sur.patch       --- Video mode check   hdmidongle_REVB_R13.4_patch-20130201.tgz:   Just change the readme  to place emphasis on   the 0006-1G_boot_stable.patch reverse   Reverse patch 0008-boot_unlock_screen.patch and 0006-1G_boot_stable.patch   0008-boot_unlock_screen.patch: it has some problem but doesn't do any harm to the hdmi dongle.                                                  Please use 0010-boot_disable_screenlocker.patch, instead. 0006-1G_boot_stable.patch:  The patch take more cpu delay to adapt the pmic, we change the pmic setting                                             in  0010-boot_disable_screenlocker.patch. This patch is no needed. And it will lower                                            the performance. Please reverse it.                                            cd ~/myandroid                                            git apply --verbose ~/0006-1G_boot_stable.patch                                                                                           hdmidongle_REVB_R13.4_patch-20130221.tgz: There are three important fixes include in this release. They make the dongle stable. 1. lowmem killer issue fix 2. Update realtek wifi driver to fix the soft ap issue 3. Wifi p2p framework fix to resovle wifi direct only one side work issue   Please read the README.TXT for detail and the other changes.   hdmidongle_REVB_R13.4_patch-20130308.tgz: This patch tar ball include all the patches in hdmidongle_REVB_R13.4_patch-20130221.tgz. Besides, it has a new patches 0020-DL_WifiDirect_Concunrrent_crash_fix.patch to fix the crash issue on DL board.   HDMI Dongle HW:   HDMI Dongle schematic, pcb, gerber and BOM have been attached, the detailed hardware feature has been list below:   Android 4.x HDMI Dongle SPECIFICATION Core Configure Operating System Android 4.x Operating System Based on Micro-PC Platform CPU Processor Freescale i.MX6x DualLite/Quad Core DRAM Storage DDR3 1GigaByte Size, Data rate 1066MT/s Flash Storage 4GigaByte NAND flash ROM Power System Power Supply DC JACK / Micro USB : 5V/2A LED Status Green: Power ON; Red: System Run Socket/Connector MicroSD Socket SDXC Support, Up to 32GB size USB HOST 2.0 USB 2.0 HOST Support USB OTG 2.0 USB 2.0 OTG Support Display/Audio HDMI Output HDMI TypeA Plug connector, 1080p@60Hz output Video Decoder Support Variety of Video Format: MPEG4/H.263/H.264/MJPEG/Xvid/VC-1/WMV/MPEG2/VP8... Audio Decoder Support Variety of Audio Format: MP3/AAC/LPCM/FLAC/AMR/AC3/WMA/Vorbis GPU Support GC2000 GPU core,2D/3D engine support,OpenGL support Wireless Network WiFi Network IEEE 802.11b/g/n,Up to 300Mbps,AP/P2P/Sta Mode Support Others Key Recovery key support RevB2     OTT TV BOX LINK: https://community.freescale.com/docs/DOC-94561   JB4.2 patches link : Patches for HDMI Dongle JB4.2.2_1.0.0-GA Release
View full article
    Below mentioned are the step to enable secure boot in imx8m nano board. Mentioned each step log and address for imx8m nano board tested with LPDDR4.   secure boot feature uses digital signatures to prevent unauthorized software execution during the device boot sequence. In case a malware takes control of the boot sequence, sensitive data, services and network can be impacted. Download the CST(code signing tool) from the below mentioned link https://www.nxp.com/webapp/sps/download/preDownload.jsp?render=true 1. Generating a PKI tree The Code Signing Tools package contains an OpenSSL based key generation script under keys/ directory. The hab4_pki_tree.sh script is able to generate a PKI tree containing up to 4 Super Root Keys (SRK) as well as their subordinated IMG and CSF keys. $ ./hab4_pki_tree.sh ... Do you want to use an existing CA key (y/n)?: n Do you want to use Elliptic Curve Cryptography (y/n)?: n Enter key length in bits for PKI tree: 2048 Enter PKI tree duration (years): 5 How many Super Root Keys should be generated? 4 Do you want the SRK certificates to have the CA flag set? (y/n)?: y 2. Generating a SRK Table and SRK Hash The next step is to generated the SRK Table and its respective SRK Table Hash from the SRK public key certificates created in one of the steps above. The srktool can be used for generating the SRK Table and its respective SRK Table Hash. - Generating SRK Table and SRK Hash in Linux 64-bit machines: $ ../linux64/bin/srktool -h 4 -t SRK_1_2_3_4_table.bin -e \ SRK_1_2_3_4_fuse.bin -d sha256 -c \ SRK1_sha256_2048_65537_v3_ca_crt.pem,\ SRK2_sha256_2048_65537_v3_ca_crt.pem,\ SRK3_sha256_2048_65537_v3_ca_crt.pem,\ SRK4_sha256_2048_65537_v3_ca_crt.pem The SRK_1_2_3_4_table.bin and SRK_1_2_3_4_fuse.bin files can be used in further steps as explained in HAB guides available under doc/imx/habv4/guides/ directory. 3. step-by-step procedure on how to sign and securely boot a bootloader image on i.MX8M Nano devices 3.1 Enabling the secure boot support in U-Boot clone the u-boot from the git link https://source.codeaurora.org/external/imx/uboot-imx Enable the secure boot support in u-boot - Defconfig: CONFIG_SECURE_BOOT=y CONFIG_IMX_HAB=y from 2020.04 u-boot Build images $ make imx8mn_evk_defconfig $ make Output images $(UBOOT_SRC)/u-boot-nodtb.bin $(UBOOT_SRC)/spl/u-boot-spl.bin $(UBOOT_SRC)/arch/arm/dts/fsl-imx8mm-evk.dtb‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ 3.2 ARM Trusted Firmware Get the ATF from the below mentioned source link https://source.codeaurora.org/external/imx/imx-atf Build images $ make PLAT=imx8mn bl31 Output images $(ATF_SRC)/build/imx8mn/release/bl31.bin‍‍‍‍‍‍‍‍‍‍‍‍ 3.3 Get DDR FW images $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.0.bin $ chmod 777 firmware-imx-8.0.bin $ ./firmware-imx-8.0.bin Accept the LICENSE AGREEMENT $ cd firmware-imx-8.0.bin‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍/firmware/ddr/synopsys‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ Output images $(DDRFW_SRC)/lpddr4_* 3.4 Get IMX-MKIMAGE source https://source.codeaurora.org/external/imx/imx-mkimage Below mentioned are the steps to generate bootloder using mkimage Gather necessary images SPL and U-boot images - u-boot-nodtb.bin - u-boot-spl.bin - fsl-imx8mm-evk.dtb‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ ATF image - bl31.bin DDR firmware images - lpddr4_pmu_train_1d_dmem.bin - lpddr4_pmu_train_1d_imem.bin - lpddr4_pmu_train_2d_dmem.bin - lpddr4_pmu_train_2d_imem.bin Copy these files to imx-mkimage/iMX8M directory 3.5 Build i.MX8MN boot image flash.bin $ make SOC=iMX8MN flash_evk ========= OFFSET dump ========= Loader IMAGE: header_image_off 0x0 dcd_off 0x0 image_off 0x40 csf_off 0x24a00 spl hab block: 0x911fc0 0x0 0x24a00 Second Loader IMAGE: sld_header_off 0x58000 sld_csf_off 0x59020 sld hab block: 0x401fcdc0 0x58000 0x1020 $ make SOC=iMX8MN print_fit_hab ./print_fit_hab.sh 0x60000 evk.dtb 0x40200000 0x5B000 0xC3AB0 0x402C3AB0 0x11EAB0 0x78F0 0x960000 0x1263A0 0xA1B0 0xBE000000 0x130550 0x10 3.6 Creating the CSF description file The build log provided by imx-mkimage can be used to define the "Authenticate Data" parameter in CSF. - SPL "Authenticate Data" addresses in flash.bin build log: spl hab block: 0x911fc0 0x0 0x24a00 - "Authenticate Data" command in csf_spl.txt file: Blocks = 0x911fc0 0x0 0x24a00 "flash.bin" - FIT image "Authenticate Data" addresses in flash.bin build log: sld hab block: 0x401fcdc0 0x57c00 0x1020 - FIT image "Authenticate Data" addresses in print_fit_hab build log: 0x40200000 0x5B000 0xC3AB0 0x402C3AB0 0x11EAB0 0x78F0 0x960000 0x1263A0 0xA1B0 0xBE000000 0x130550 0x10 - "Authenticate Data" command in csf_fit.txt file: Blocks = 0x401fcdc0 0x57c00 0x1020 "flash.bin", \ 0x40200000 0x5B000 0xC3AB0 "flash.bin", \ 0x402C3AB0 0x11EAB0 0x78F0 "flash.bin", \ 0x960000 0x1263A0 0xA1B0 "flash.bin", \ 0xBE000000 0x130550 0x10 "flash.bin"   3.7 Avoiding Kernel crash in closed devices - Add Unlock MID command in csf_spl.txt: [Unlock] Engine = CAAM Features = MID 3.8 Signing the flash.bin binary The CST tool is used for singing the flash.bin image and generating the CSF binary. Users should input the CSF description file created in the step above and receive a CSF binary, which contains the CSF commands, SRK table, signatures and certificates. - Create SPL CSF binary file: $ ./cst -i csf_spl.txt -o csf_spl.bin - Create FIT CSF binary file: $ ./cst -i csf_fit.txt -o csf_fit.bin 3.8 Assembling the CSF in flash.bin binary ------------------------------------------- The CSF binaries generated in the step above have to be inserted into the flash.bin image. The CSF offsets can be obtained from the flash.bin build log: - SPL CSF offset: csf_off 0x24a00 - FIT CSF offset: sld_csf_off 0x59020 The signed flash.bin image can be then assembled: - Create a flash.bin copy: $ cp flash.bin signed_flash.bin - Insert csf_spl.bin in signed_flash.bin at 0x24a00 offset: $ dd if=csf_spl.bin of=signed_flash.bin seek=$((0x24a00)) bs=1 conv=notrunc - Insert csf_fit.bin in signed_flash.bin at 0x59020 offset: $ dd if=csf_fit.bin of=signed_flash.bin seek=$((0x59020)) bs=1 conv=notrunc - Flash signed flash.bin image: $ sudo dd if=signed_flash.bin of=/dev/sd<x> bs=1K seek=33 && sync 3.9 Verifying HAB events ------------------------ The next step is to verify that the signatures included in flash.bin image is successfully processed without errors. HAB generates events when processing the commands if it encounters issues. Prior to closing the device users should ensure no HAB events were found, as the example below: - Verify HAB events: => hab_status Secure boot disabled HAB Configuration: 0xf0, HAB State: 0x66 3.10 Programming SRK Hash ------------------------- The U-Boot fuse tool can be used for programming eFuses on i.MX SoCs. - Dump SRK Hash fuses values in host machine: $ hexdump -e '/4 "0x"' -e '/4 "%X""\n"' SRK_1_2_3_4_fuse.bin 0x20593752 0x6ACE6962 0x26E0D06C 0xFC600661 0x1240E88F 0x1209F144 0x831C8117 0x1190FD4D - Program SRK_HASH[255:0] fuses on i.MX8MN devices: => fuse prog 6 0 0x20593752 => fuse prog 6 1 0x6ACE6962 => fuse prog 6 2 0x26E0D06C => fuse prog 6 3 0xFC600661 => fuse prog 7 0 0x1240E88F => fuse prog 7 1 0x1209F144 => fuse prog 7 2 0x831C8117 => fuse prog 7 3 0x1190FD4D 3.10 Completely secure the device ---------------------------------- Additional fuses can be programmed for completely secure the device, more details about these fuses and their possible impact can be found at AN4581[1]. - Program SRK_LOCK: => fuse prog 0 0 0x200 - Program DIR_BT_DIS: => fuse prog 1 3 0x8000000 - Program SJC_DISABLE: => fuse prog 1 3 0x200000 - JTAG_SMODE: => fuse prog 1 3 0xC00000
View full article
Hi All, The new Android JB4.2.2_1.0.0-GA release is now available on www.freescale.com ·         Files available Name Description IMX6_JB422_100_ANDROID_DOCS i.MX 6Quad, i.MX 6Dual, and   i.MX 6DualLite Android jb4.2.2_1.0.0 BSP Documentation. Includes Release   Notes, User's Guide, QSG and FAQ Sheet. IMX6_JB422_100_ANDROID_SOURCE i.MX 6Quad, i.MX 6Dual, and   i.MX 6DualLite Android jb4.2.2_1.0.0 BSP, Documentation and Source Code for   BSP and Codecs. IMX6_JB422_100_ANDROID_DEMO i.MX 6Quad, i.MX 6Dual, and   i.MX 6DualLite Android jb4.2.2_1.0.0 BSP Binary Demo Files ·         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 ·         Release Description i.MX Android jb4.2.2_1.0.0-ga is GA release for Android 4.2.2 Jelly Bean(JB) on i.MX6Q SABRE SD, i.MX6DL SABRE SD and i.MX6Q/DL SABRE AI platform with key features integrated. i.MX Android jb4.2.2_1.0.0-ga release includes all necessary codes, documents and tools to assist users in building and running Android 4.2.2 on i.MX6Q and i.MX6DL hardware board from the scratch. The prebuilt images are also included for a quick trial on Freescale i.MX6Q, i.MX6DL SABRE SD and i.MX6Q/DL SABRE AI boards. Most of deliveries in this release are provided in source code with the exception of some proprietary modules/libraries from third parties. ·         Features Feature i.MX6Q   SABRE SD i.MX6DL   SABRE SD i.MX6   SABRE AI Comments Linux 3.0.35  kernel Y Y Y Based on Linux BSP   L3.0.35_4.0.0 GA release Google JellyBean   4.2.2 release Y Y Y Based on   android-4.2.2_r1 release Bootup with Android Y Y Y Boot source eMMC& External SD eMMC& External SD SD&Nand Default Nand chip   been support is Micron MT29F8G08ABABAWP Splash Screen for   LVDS Y Y N UI (input) Multi-touch on LVDS   panel Multi-touch on LVDS panel Multi-touch on LVDS   panel UI (display) LVDS panel, HDMI   display LVDS panel, HDMI   display LVDS panel, HDMI   display UI (dual display,   LVDS+HDMI, UI mirror displayed on second device) Y Y Y UI (brightness   control) Y Y Y UI (LiveWallpaper) Y Y Y Storage - External   Media Y Y Y SD, External SD and   UDisk Storage - MTP   (Media Transfer Protocol) Y Y Y Connectivity -   Ethernet Y Y Y Connectivity - BT     Y Y     N Hardware: ·           Atheros AR3001 ·           Atheros AR3002 Profiles: ·           A2DP ·           HID ·           OPP ·           PBAP Connectivity - WiFi Y Y     Y Hardware: ·           Atheros AR6103 SDIO card Features: ·           AP mode ·           Wake on Wireless Connectivity -   3G Y Y   N Hardware: ·           HUAWEI EM770W modem ·           Infinion Amazon 1 modem ·           ZTE FM210 modem Connectivity -   GPS Y Y N Connectivity - USB Tethering Y Y Y Support WIFI and   Ethernet as upstream Internet - SIP   voice call N N N Internet - VPN Y Y Y Power - Battery   status report Y Y N/A Known limitations   about the accuracy in some use cases Power - CPU Freq Y Y Y Power - Bus Freq Y Y Y Media - Music Play Y Y Y Media - Sound Record Y Y Y Media - Video Play Y Y Y Media - Camera Y Y N Media - TVIN N/A N/A Y PAL/NTSC Media - Dual Camera Y Y Y Hardware for SABRE SD: ·           Front Camera: OV5642 CSI camera ·           Rear Camera: OV5640 MIPI camera Hardware   for SABRE AI: ·           Front Camera: UVC camera ·           Rear Camera: TV IN Media - Camcorder Y Y N Media - USB Camera Y Y Y Logitech: ·           C250 ·           E3500 Media - USB Micro Y Y Y Media - Movie   Studio Y Y Y Media - HDMI audio output Y Y Y Graphic - HW 3D   acceleration Y Y Y OpenGLES 1.1/2.0   via GC2000 or GC800 3D core Graphic - HW   accelerated UI surface composition Y Y Y Misc - ADB over USB Y Y Y Misc - Fastboot   utility Y Y Y Misc - SW update   and factory reset Y Y Y Sensor - Magmatic Y Y N Sensor -   Accelerometer Y Y N Sensor - Light Y Y N NTFS-3G File System Y Y Y For external   Storage NAND N N Y Tested NAND chip: - Micro 29F8G08ABABA ·         Change List The below section lists the big changes in JellyBean which need the user’s attention when comparing to Freescale ICS version: o   Default Android multiple display implementation in JellyBean o   Display resolution change in Setting is not been supported o   New camera hal implementation based on JellyBean libcamera2 o   Add NTFS file system support for external storage ·         Known issues For known issues and limitations please consult the release notes
View full article
This is the prototype demo to enable surround view demo on SabreSD.   The attached Files are HW&SW guides and demo video. Updating Notes: Add miniPCIE Surround View_Rev A design file (include schematic and layout) as attachement. Add Gerber file   i.MX6Q Surround view patch https://community.freescale.com/docs/DOC-95143 Original Attachment has been moved to: Gerber-file.zip Original Attachment has been moved to: miniPCIe-Surround-View_Rev-A.zip
View full article
This is the procedure and patch to set up Ubuntu 14.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 SDP with LVDS display. Add suggestion about compiling "gstreamer-plugins-good" when selecting "Min profile" rootfs.  Please refer to the Note session. A) Basic Requirement: Set up the Linux Host PC using ubuntu-14.04-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      Needed packages: $ 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 ln -s /usr/lib/x86_64-linux-gnu/librt.so   /usr/lib/librt.so      Useful tools: $ 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      Note: this operation "$ sudo ln -s /usr/lib/x86_64-linux-gnu/librt.so /usr/lib/librt.so" is used to fix rpm-fs build issue; which is taking reference from: LTIB - Strange problem building IMX6 Linux BSP from fresh on Ubuntu 13.10 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 D) Apply the patch to make L3.0.35_4.1.0 could be installed and compiled on Ubuntu 14.04 64bit OS $ cd ~/ltib $ git apply 0001_make_L3.0.35_4.1.0_compile_on_Ubuntu_14.04_64bit_OS What the patch is doing: a) The patch modifies the following files: bin/Ltibutils.pm dist/lfs-5.1/base_libs/base_libs.spec dist/lfs-5.1/m4/m4.spec dist/lfs-5.1/ncurses/ncurses.spec dist/lfs-5.1/openssl/openssl.spec dist/lfs-5.1/xorg-server/xorg-server.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 pkgs/openssl-1.0.1c-1398677566.patch pkgs/openssl-1.0.1c-1398677566.patch.md5 pkgs/xorg-server-1.6.1-1398785267.patch pkgs/xorg-server-1.6.1-1398785267.patch.md5 E) Then, it is ready to proceed the rest of the LTIB env setup process: $ cd ~/ltib $ ./ltib -m config $ ./ltib F) about the patch: LTIB script warning when running with Perl v5.18.2 associated change: bin/Ltibutils.pm description: It prints out the following warning when doing package unpack, the patch is used to remove the warning. defined(@array) is deprecated at bin/Ltibutils.pm line 259         (Maybe you should just omit the defined()?) busybox compilation issue: associated change: dist/lfs-5.1/base_libs/base_libs.spec reference: Re: LTIB on Ubuntu 13.04 m4 compilation issue: associated change: dist/lfs-5.1/m4/m4.spec pkgs/m4-1.4.16-1383761043.patch pkgs/m4-1.4.16-1383761043.patch.md5 reference: http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-devel/m4/files/m4-1.4.16-no-gets.patch alsa-utils compilation issue: associated change: dist/lfs-5.1/ncurses/ncurses.spec reference: Re: Android and LTIB build error in ubuntu 12.04 x86_64 openssl compilation issue due to Perl v5.18.2: associated change: dist/lfs-5.1/openssl/openssl.spec pkgs/openssl-1.0.1c-1398677566.patch pkgs/openssl-1.0.1c-1398677566.patch.md5 description: the build fails in pod2man while trying to generate man pages from the pod files reference: https://forums.freebsd.org/viewtopic.php?&t=41478 https://gist.github.com/martensms/10107481 xorg-server configuration fail: associated change: dist/lfs-5.1/xorg-server/xorg-server.spec pkgs/xorg-server-1.6.1-1398785267.patch pkgs/xorg-server-1.6.1-1398785267.patch.md5 description: When doing configuration, it stops at saying tslib not found.  It could be fixed by adding -dl when doing tslib test in configuration stage. NOTE: A) During the LTIB setup and compilation, these warnings were pop up.  Just ignore them and it seems okay. B) the dist/lfs-5.1/gst-plugins-good.spec is used to configurate/compile/install the "gstreamer-plugins-good" package.  It set up the environment variables pointing to libcairo but disable it when doing configuration. Thus, libcairo is actually not being used.           In Gnome profile, cario has been selected by default.  Thus, it does not experience the problem when compiling "gstreamer-plugins-good". However, in Min profile, if you select gstreamer-plugins-good to compile and install to your rootfs but without selecting cario as well, you will experience the error described in this thread: Re: gst-fsl-plugins build failed Thus, you could follow the solution provide in the Re: gst-fsl-plugins build failed or simply select cairo in your package list.          
View full article
This document is a user guide for the GStreamer version 1.0 based accelerated solution included in all the i.MX 8 family SoCs supported by NXP BSP L5.4.24_1.1.0. Some instructions assume a host machine running a Linux distribution, such as Ubuntu, connected to i.MX 8 device. These commands were tested using Ubuntu 18.04 LTD, and while Ubuntu is not required on the host machine, other distributions have not been tested. These instructions are targeted for use with the following hardware: • i.MX 8MQ EVK • i.MX 8MN EVK • i.MX 8MN EVK • i.MX 8QXP MEK B0 • i.MX 8QM MEK B0   Release History v1.0 - Mar 2020 - Initial release. v2.0 - Sep 2020: Added the following content: - Mux/Demux Examples - Audio Examples - Image Examples - Transcode Examples - Streaming Examples - Multi-Display Examples - Scaling and Rotation Examples - Zero-copy Examples - Debug Examples Maintainers: . Marco Franchi . Pedro Jardim
View full article
Ubuntu distro uses dash instead of bash as shell, then change it to bash: # cd /bin # sudo rm sh # sudo ln -s bash sh Install all necessary packages by typing: sudo apt-get install patch g++ rpm zlib1g-dev m4 bison libncurses5-dev libglib2.0-dev gettext \ build-essential tcl intltool libxml2-dev liborbit2-dev libx11-dev ccache flex uuid-dev liblzo2-dev If under Ubuntu 64bit, install ia32-libs package: sudo apt-get install ia32-libs If you will install Xorg in your ltib, you will need to install this package: sudo apt-get install x11proto-core-dev If you will install gtk+ in your ltib, you will need to install the following packages: sudo apt-get install libdbus-glib-1-dev libgtk2.0-dev libdbus-glib-1-dev Configure visudo file, as root using the command "/usr/sbin/visudo", and add the following line in the User privilege section: username ALL = NOPASSWD: /usr/bin/rpm, /opt/freescale/ltib/usr/bin/rpm Where username is your user name, the name you use to do logon in your system. Classic Error messages and solutions under Ubuntu Can't exec "mconf": No such file or directory at /home/tic/ltib/bin/Ltibutils.pm line 972. exec: mconf /home/tic/ltib/config/main.lkc: No such file or directory at /home/tic/ltib/bin/Ltibutils.pm line 972. traceback:   Ltibutils::system_nb:972   main::get_plat_dir:2947     main:548 Started: Tue Feb 16 18:01:38 2010 Ended:  Tue Feb 16 18:59:26 2010 Elapsed: 3468 seconds Build Failed Solution: edit the ltib script line 925:                   # install the new package           $cmd  = "$cf->{sudo} $cf->{rpm} ";           $cmd .= "--root $cf->{rpmroot} ";           $cmd .= "--dbpath $cf->{rpmdb} ";           $cmd .= "--prefix $cf->{rpmipfx} " if $cf->{rpmipfx};           $cmd .= "--ignorearch -ivh ";           $cmd .= "--force "  unless $cf->{conflicts} || $cf->{hostinst};           $cmd .= "--replacepkgs --replacefiles " if $cf->{hostinst};           $cmd .= "--nodeps " if $cf->{nodeps};           $cmd .= "--excludedocs "; +        $cmd .= "--force-debian " if $rpm =~ m/rpm-fs/ && `uname -a` =~ m/ubuntu/i;           $cmd .= "--define '_tmppath $cf->{tmppath}' ";           $cmd .= "$rpm"; error: cannot open Name index using db3 - No such file or directory (2) error: cannot open Name index using db3 - No such file or directory (2) sudo rpm --root / --dbpath /tmp/rpm-tic/rpmdb -e --allmatches --nodeps --define '_tmppath /home/tic/ltib/tmp' rpm-fs 2>/dev/null sudo rpm --root / --dbpath /tmp/rpm-tic/rpmdb --ignorearch -ivh --force --nodeps --excludedocs --define '_tmppath /home/tic/ltib/tmp'  /tmp/rpm-tic/RPMS/i686/rpm-fs-4.0.4-1.i686.rpm rpm: please use alien to install rpm packages on Debian, if you are really sure use --force-debian switch. See README.Debian for more details. sudo /opt/freescale/ltib/usr/bin/rpm --root / --dbpath /opt/freescale/ltib/var/lib/rpm -Uv --justdb --notriggers --noscripts --nodeps  /tmp/rpm-tic/RPMS/i686/rpm-fs-4.0.4-1.i686.rpm sudo: /opt/freescale/ltib/usr/bin/rpm: command not found mkdir: cannot create directory `/opt/freescale': Permission denied Cannot create the download directory:   /opt/freescale/pkgs Either change to a global directory you have write permissions to, or create it as root.  Please set the permissions to 777 traceback:   main::check_dirs:2469   main::host_checks:1426     main:542 Started: Wed Nov 25 01:56:53 2009 Ended:  Wed Nov 25 02:07:42 2009 Elapsed: 649 seconds Build Failed solution : sudo chmod 777 /opt make[1]: Entering directory `/opt/freescale/ltib/usr/src/rpm/BUILD/texinfo-4.8' Making all in tools make[2]: Entering directory `/opt/freescale/ltib/usr/src/rpm/BUILD/texinfo-4.8/tools' make[2]: *** No rule to make target `all'.  Stop. make[2]: Leaving directory `/opt/freescale/ltib/usr/src/rpm/BUILD/texinfo-4.8/tools' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/opt/freescale/ltib/usr/src/rpm/BUILD/texinfo-4.8' make: *** [all] Error 2 error: Bad exit status from /home/tic/ltib/tmp/rpm-tmp.U8vEdX (%build) RPM build errors:     Bad exit status from /home/tic/ltib/tmp/rpm-tmp.U8vEdX (%build) Build time for texinfo: 55 seconds Failed building texinfo Died at ./ltib line 1380. traceback:   main::build_host_rpms:1380   main::host_checks:1435     main:542 Started: Wed Nov 25 20:10:43 2009 Ended:  Wed Nov 25 20:31:42 2009 Elapsed: 1259 seconds These packages failed to build: texinfo Build Failed solution : install ccache package in host + cd /opt/freescale/ltib/usr/src/rpm/BUILD + cd lkc-1.4 + make -j1 conf mconf gcc -O0 -Wall -g -fPIC -c conf.c -o conf.o bison -l -b zconf -p zconf zconf.y flex -L -Pzconf zconf.l make: flex: Command not found make: *** [lex.zconf.c] Error 127 error: Bad exit status from /home/tic/ltib/tmp/rpm-tmp.010CjL (%build) RPM build errors:     Bad exit status from /home/tic/ltib/tmp/rpm-tmp.010CjL (%build) Build time for lkc: 2 seconds Failed building lkc Died at ./ltib line 1380. traceback:   main::build_host_rpms:1380   main::host_checks:1435     main:542 Started: Thu Nov 26 00:33:46 2009 Ended:  Thu Nov 26 01:19:39 2009 Elapsed: 2753 seconds These packages failed to build: lkc Build Failed solution : install flex package in host Making all in po make[2]: Entering directory `/home/tic/ltib/rpm/BUILD/alsa-utils-1.0.11rc2/alsaconf/po' mv: cannot stat `t-ja.gmo': No such file or directory make[2]: *** [ja.gmo] Error 1 make[2]: *** Waiting for unfinished jobs.... mv: cannot stat `t-ru.gmo': No such file or directory make[2]: *** [ru.gmo] Error 1 make[2]: Leaving directory `/home/tic/ltib/rpm/BUILD/alsa-utils-1.0.11rc2/alsaconf/po' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/tic/ltib/rpm/BUILD/alsa-utils-1.0.11rc2/alsaconf' make: *** [all-recursive] Error 1 error: Bad exit status from /home/tic/ltib/tmp/rpm-tmp.93730 (%build) RPM build errors:     Bad exit status from /home/tic/ltib/tmp/rpm-tmp.93730 (%build) Build time for alsa-utils: 84 seconds Failed building alsa-utils f_buildrpms() returned an error, exiting traceback:   main:560 Started: Sat Nov 28 07:39:40 2009 Ended:  Sat Nov 28 08:17:18 2009 Elapsed: 2258 seconds These packages failed to build: alsa-utils Build Failed Exiting on error or interrupt solution : install package gettext and ja-trans checking for glib-genmarshal... no configure: error: Could not find a glib-genmarshal in your PATH error: Bad exit status from /home/tic/ltib/tmp/rpm-tmp.13030 (%build) RPM build errors:     Bad exit status from /home/tic/ltib/tmp/rpm-tmp.13030 (%build) Build time for glib2: 107 seconds Failed building glib2 f_buildrpms() returned an error, exiting traceback:   main:560 Started: Sat Dec  5 03:19:36 2009 Ended:  Sat Dec  5 03:29:46 2009 Elapsed: 610 seconds These packages failed to build: glib2 Build Failed Exiting on error or interrupt solution : install the package libglib2.0-dev
View full article
To build Android version earlier than Lollipop from source code, you need the Sun's 1.6 SDK to be installed for ubuntu as the link Initializing a Build Environment | Android Developers. You may still cannot get the Sun's JDK  with below instruction: $ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner" $ sudo apt-get update $ sudo apt-get install sun-java6-jdk    There are below options to help install the Sun's JDK  if you cannot find a valid source through apt-get commands: $ wget --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F" http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin $ chmod u+x jdk-6u45-linux-x64.bin $ ./jdk-6u45-linux-x64.bin $ sudo mv jdk1.6.0_45 /opt $ sudo update-alternatives --install /usr/bin/java java /opt/java/64/jdk1.6.0_45/bin/java 1 $ sudo update-alternatives --install /usr/bin/javac javac /opt/java/64/jdk1.6.0_45/bin/javac 1 $ sudo update-alternatives --install /usr/bin/jar jar /opt/java/64/jdk1.6.0_45/bin/jar 1 # if you have already install some other version of JDK, please export the JAVA_HOME env before your android build every time $ export JAVA_HOME=/opt/jdk1.6.0_45/ #or you can directly link the java binary to the sdk version you need as below: sudo ln -s /opt/java/64/jdk1.6.0_45/bin/jar /bin/jar sudo ln -s/opt/java/64/jdk1.6.0_45/java /bin/java sudo ln -s/opt/java/64/jdk1.6.0_45/javac /bin/javac sudo ln -s/opt/java/64/jdk1.6.0_45/javah /bin/javah sudo ln -s/opt/java/64/jdk1.6.0_45/javadoc /bin/javadoc sudo ln -s/opt/java/64/jdk1.6.0_45/javaws /bin/javaws    To built the Android version Lollipop and Marshmallow from source code, you need the OpenJDK 7 to be installed for ubuntu as the link Initializing a Build Environment | Android Developers. $ sudo apt-get update $ sudo apt-get install openjdk-7-jdk You may have both openjdk7 and SUN JDK 1.6 intalled in your ubuntu to build different Android version. If you have default java SDK to be Sun's JDK 1.6, you can just use below commands to make android build system use the openjdk7 for Lollipop built $ export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/ $ cd myandroid $ . ./build/envsetup.sh           //be sure to resetup the envsetup, and pick the platform to be built $ lunch
View full article
There are two format system image(ext4): raw and sparse. The raw image is  larger, you can mount it to ext4 directly(mount -t ext4 system.img system). The sparse image is supported lp5.0, it is a bit smaller. The below part will take IMX7D SDB board as example. You can change the setting according your platform hardware.   1 generate sparse image   In Lollipop 5.0 and 5.1, both raw image and sparse image will be generated by default. sparse system image is located in: out/target/product/sabresd_7d/system_sparse.img raw system image is located in:out/target/product/sabresd_7d/system.img Below are the steps used in android build system to generate system.img build out sparse image(-s means the building system image is sparse)           make_ext4fs -s -T -1 -S out/target/product/sabresd_7d/root/file_contexts -l 374476800 -a system           out/target/product/sabresd_7d/obj/PACKAGING/systemimage_intermediates/system.img out/target/product/sabresd_7d/system transform sparse image to raw image           simg2img out/target/product/sabresd_7d/system_sparse.img out/target/product/sabresd_7d/system.img   2 burn sparse image to sd/emmc      There are two ways to program the sparse image into android boot storage Transform the sparse image into raw image in host Linux PC. And use the commands dd commands to program the raw image into the boot storage. Program the sparse image with MFG Tool in i.MX Android release package.                Steps: copy system_sparse.img to files/android/sabresd/. copy simg2img binary (in simg2img.zip) to files/android/. You also need update mfgtools-without-rootfs.tar\mfgtools\Profiles\Linux\OS Firmware\ucl2.xml        diff --git a/Profiles/Linux/OS Firmware/ucl2.xml b/Profiles/Linux/OS Firmware/ucl2.xml      index 3b15ddd..3c3d2ae 100755      --- a/Profiles/Linux/OS Firmware/ucl2.xml      +++ b/Profiles/Linux/OS Firmware/ucl2.xml        @@ -621,8 +621,12 @@              <CMD state="Updater" type="push" body="$ mkfs.ext4 /dev/mmcblk%mmc%p6">Formatting cache partition</CMD>                <CMD state="Updater" type="push" body="$ mkfs.ext4 /dev/mmcblk%mmc%p7">Formatting device partition</CMD>      -       <CMD state="Updater" type="push" body="pipe dd of=/dev/mmcblk%mmc%p5 bs=512" file="files/android/sabresd/system.img">Sending and writting system.img</CMD>      -      +       <CMD state="Updater" type="push" body="send" file="files/android/simg2img" ifdev="MX7D">Sending simg2img</CMD>      +       <CMD state="Updater" type="push" body="$ cp $FILE /tmp/simg2img ">cp simg2img</CMD>      +       <CMD state="Updater" type="push" body="$ chmod  777 /tmp/simg2img ">chmod 777</CMD>      +       <CMD state="Updater" type="push" body="$  mount -o remount,size=512M rootfs /">change size of tmpfs</CMD>      +       <CMD state="Updater" type="push" body="send" file="files/android/sabresd/system_sparse.img" ifdev="MX7D">Sending system_sparse.img</CMD>      +       <CMD state="Updater" type="push" body="$ /tmp/simg2img $FILE /dev/mmcblk%mmc%p5">Sending and writting system_sparse.img</CMD>              <!-- Write userdata.img is optional, for some customer this is needed, but it's optional. -->              <!-- Also, userdata.img will have android unit test, you can use this to do some auto test. -->              <!--    <CMD state="Updater" type="push" onError="ignore" body="pipe dd of=/dev/mmcblk0p7" file="file/android/userdate.img"> Sending userdata.   3 Support sparse image in uboot(v2014.04)      Cheery-pick sparse image related patches. Use write_sparse_image to burn sparse system image.      For detail information, Please check the attached file(uboot(v2014.04)which support sparseimage.zip )        The step of apply these patches: cd myandroid/bootable/bootloader/uboot-imx/ copy uboot(v2014.04) which support sparseimage.zip to myandroid/bootable/bootloader/uboot-imx/         unzip uboot(v2014.04) which support sparseimage.zip git am 0001-add-header-for-Android-sparse-image-format.patch         git am 0002-add-code-to-handle-Android-sparse-image-format.patch         git am 0003-update-code-which-handles-Android-sparse-image-forma.patch         git am 0004-cleanup-code-which-handles-the-Android-sparse-image-.patch         git am 0005-implement-the-Android-sparse-image-format.patch         git am 0006-aboot-fix-block-addressing-for-don-t-care-chunk-type.patch         git am 0007-MA-6732-Add-sparse-image-flash-support-for-uboot-s-f.patch            The page will keep updating.   Reference:      How to enable userdata.img and cache.img in lollipop
View full article
(DEPRECATED. Please check this document for Real Time Streaming) A server can be streaming video and a client, in this case a i.MX6 target, is receiving and decoding it. For example, a server with GStreamer and a web camera connected, can be streaming with the following command: $ # Pipeline 1 $ gst-launch v4l2src ! 'video/x-raw-yuv, format=(fourcc)I420, width=(int)1280, height=(int)800' ! ffenc_mpeg4 ! tcpserversink host=$CLIENT_IP port=$PORT and on the target, the client receives, decodes and display with $ # Pipeline 2 $ gst-launch tcpclientsrc host=$SERVER_IP port=$PORT  ! 'video/mpeg, width=(int)1280, height=(int)800, framerate=(fraction)10/1, mpegversion=(int)4, systemstream=(boolean)false' ! vpudec ! mfw_isink The filter caps between the tcpclientsrc and the decoder (vpudec) depend on the sink caps coming from the server encoder (ffenc_mpeg4), so these may change depending on your needs. Running the above pipelines require the environment variables SERVER_IP, CLIENT_IP and PORT. In case you want the i.MX6 to act as a server, just change the video source (either mfw_v4lsrc of v4l2src) and the encoder (vpuenc), so $ # Pipeline 3 $  gst-launch v4l2src  !  'video/x-raw-yuv, format=(fourcc)I420, width=(int)640, height=(int)480, interlaced=(boolean)false, framerate=(fraction)10/1'  ! vpuenc ! tcpserversink host=$CLIENT_IP port=$PORT For testing purposes, set SERVER_IP=127.0.0.1, CLIENT_IP=127.0.0.1 and PORT=500, and run pipeline 3 and 2 in two different consoles. Check with 'top' the  CPU usage and see that VPU is actually doing most of the work.
View full article
The reference code is based on L4.14.78 GA1.0.0 BSP and M4 SDK 2.5.1.  It is tested on iMX8QXP MEK board, and it should also work for iMX8QM board. In L4.14.78 GA1.0.0 BSP, MU_5 is used for RPMSG between M4 FreeRTOS and A35 Linux, SC_R_MU_5B is M4 side and SC_R_MU_5A is A35 side. In linux side, we used the "imx_rpmsg_tty.ko" for this test, this driver is built as module in default BSP. Case 1: M4 wake up A35. Apply "L4.14.78_rpmsg_wakeup.patch" to linux kernel, this patch will enable the RPMSG wake up feature. "rpmsg_lite_pingpong_rtos.tar.bz2" is the M4 side test code. After booted the board with Linux + M4 rpmsg software, run followed test commands: 1. In A35 UART side, run followed commands:     # echo enabled > /sys/bus/platform/devices/90000000.rpmsg/power/wakeup     # insmod ./imx_rpmsg_tty.ko     # /unit_tests/Remote_Processor_Messaging/mxc_mcc_tty_test.out /dev/ttyRPMSG30 115200 R 100 1000 &     # echo deadbeaf > /dev/ttyRPMSG30     # echo mem > /sys/power/state 2. M4 UART side:    After run "echo deadbeaf > /dev/ttyRPMSG30" from Linux side, it will show "Got ping..." and wait there, after run A35 suspend commane "echo mem > /sys/power/state", Linux suspends. Then from M4 UART side, press "c" key, it will send RPMSG to A35 and wake up A35 Linux. Case 2: A35 wake up M4. "power_mode_switch_rpmsg_wakeup.tar.bz2" is the M4 side test code, After booted the board with Linux + M4 rpmsg software, the M4 UART will wait for A35 RPMSG driver ready. Test commands: 1. In A35 UART side, run followed commands to make RPMSG driver ready:     # insmod ./imx_rpmsg_tty.ko     # /unit_tests/Remote_Processor_Messaging/mxc_mcc_tty_test.out /dev/ttyRPMSG30 115200 R 100 1000 &     # echo deadbeaf > /dev/ttyRPMSG30 2. Now M4 UART shows ping pong messages to make sure RPMSG is ready. Now M4 is in power switch menu, select VLLS power mode in M4 UART:      Press  H for enter: VLLS     - Very Low Leakage Stop mode     ... ...      Press R for RPMSG. After press "R" key in M4 UART, M4 will print "Send a RPMSG message to wake up" and goto suspend mode. 3. Wake up M4 from A35 side, send any data to RPMSG:     # echo deadbeaf > /dev/ttyRPMSG30 M4 resumed and goto power switch menu again. SDK folder to compile the two M4 sample code: SDK/boards/mekmimx8qx/multicore_examples/rpmsg_lite_pingpong_rtos SDK/boards/mekmimx8qx/demo_apps/power_mode_switch
View full article
Some customers often use LVDS LCD with low resolution on i.MX6 platform, such as 320x240, but by defualt , linux bsp doesn't support low frequency pixel clock for LVDS module input. Question:     When we port LVDS LCD with 320x240 resolution to android4.2.2, we found pixel clock is not correct, it always output 38.9MHz, it is no probem for big resolution , for example 1024x768, but the clock we need for 320x240 LCD is 6.4MHz.     According to the quesiton, Let us check IPU & LDB clock in i.MX6 datasheet at first : From above table, if ldb clock is from IPU, we will not get 6.4MHz pixel clock, so we will have to adjust its source clock: The following steps are procedure that ports LVDS LCD with 320x240 resolution to i.MX6Q. 1. Adding LVDS LCD timing structure to ldb.c static struct fb_videomode ldb_modedb[] = { {       "LDB-XGA", 60, 320, 240, 155914,       38, 20,       15, 4,       30, 3,       0,       FB_VMODE_NONINTERLACED,       FB_MODE_IS_DETAILED, }, {      "LDB-1080P60", 60, 1920, 1080, 7692,      100, 40,      30, 3,      10, 2,      0,      FB_VMODE_NONINTERLACED,      FB_MODE_IS_DETAILED,}, }; 2.Modifying clock source of ldb module Checking /arch/arm/mach-mx6/clock.c, we can find there are 3 ldb's clock source : &pll5_video_main_clk, &pll2_pfd_352M, &pll2_pfd_400M, static int _clk_ldb_di1_set_parent(struct clk *clk, struct clk *parent) {        u32 reg, mux;        int rev = mx6q_revision();        reg = __raw_readl(MXC_CCM_CS2CDR)               & ~MXC_CCM_CS2CDR_LDB_DI1_CLK_SEL_MASK;        mux = _get_mux6(parent, &pll5_video_main_clk,               &pll2_pfd_352M, &pll2_pfd_400M,               (rev == IMX_CHIP_REVISION_1_0) ?                &pll3_pfd_540M :       /* MX6Q TO1.0 */                &mmdc_ch1_axi_clk[0],     /* MX6Q TO1.1 and MX6DL */               &pll3_usb_otg_main_clk, NULL);        reg |= (mux << MXC_CCM_CS2CDR_LDB_DI1_CLK_SEL_OFFSET);        __raw_writel(reg, MXC_CCM_CS2CDR);        return 0; } By default, pll2_pfd_352M is configured as the clock source of ldb: clk_set_parent(&ldb_di0_clk, &pll2_pfd_352M);        clk_set_parent(&ldb_di1_clk, &pll2_pfd_352M); We should change the clock source to be pll5_video_main_clk clk_set_parent(&ldb_di0_clk, &pll5_video_main_clk,);        clk_set_parent(&ldb_di1_clk, &pll5_video_main_clk,); 3. Configuring initial clock in board-mx6q_sabresd.c static struct ipuv3_fb_platform_data sabresd_fb_data[] = {        { /*fb0*/        .disp_dev = "ldb",        .interface_pix_fmt = IPU_PIX_FMT_RGB666,        .mode_str = "LDB-XGA",        .default_bpp = 16,        .int_clk = false,        .late_init = false, } int_clk=false means LDB clock is from PLL2_PFD_352 or pll5_video_main_clk; int_clk=true mean LDB clock if from IPU. OK, after doing above steps, LVDS LCD with low resolution should normally work. Freescale TICS team Weidong.sun 2015-08-18
View full article
Application Note AN13872  Enabling SWUpdate on i.MX 6ULL, i.MX 8M Mini, and i.MX 93 is available on www.nxp.com    SWUpdate: Embedded Systems become more and more complex. Software for Embedded Systems have new features and fixes can be updated in a reliable way. Most of time, we need OTA(Over-The-Air) to upgrade the system. Like Android has its own update system. Linux also need an update system. SWUpdate project is thought to help to update an embedded system from a storage media or from network. However, it should be mainly considered as a framework, where further protocols or installers (in SWUpdate they are called handlers) can be easily added to the application. Mongoose daemon mode: Mongoose is a daemon mode of SWUpdate that provides a web server, web interface and web application. Mongoose is running on the target board(i.MX8MM EVK/i.MX8QXP MEK).Using Web browser to access it.   Suricatta daemon mode: Suricatta regularly polls a remote server for updates, downloads, and installs them. Thereafter, it reboots the system and reports the update status to the server. The screenshot is SWUpdate scuricatta working with hawkbit server.          
View full article