i.MX处理器知识库

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

i.MX Processors Knowledge Base

讨论

排序依据:
U-Boot is a bootloader, which supports some i.MX SoCs. Configuring U-Boot LTIB Creating Uimage Uboot U-boot FW Printenv FW Env File Add New i.MX5x Board on LTIB i.MX25 PDK I.MX25 PDK U-boot SplashScreen I.MX25 PDK U-boot SDCard i.MX27 ADS Board Compiling U-Boot for i.MX27ADS i.MX31 ADS Board I.MX31ADS Installing Uboot Blink i.MX31 PDK LEDs Using U-Boot i.MX51 EVK Board i.MX51 EVK U-boot i.MX51 EVK Compiling U-boot i.MX51 EVK Changing Env I.MX51EVK Install U-Boot i.MX53 Board i.MX53 USB Eth NFS i.MX53 ARD Dual LVDS i.MX53 QSB Board Get Started Additional Resources Script to Flash a Linux System into a SD card All Boards U-boot All Boards LTIB Creating Uimage Uboot Configuring U-Boot Running a Script in U-boot Transferring File Over Serial Transferring file over network U-boot.bin
查看全文
Setting up your machine Exporting variables Edit your ~/.bashrc and add these 2 lines export ARCH=arm export CROSS_COMPILE=/opt/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi- To build and debug android you will need to install some packages and services in the host machine,this how-to assumes that you are using Ubuntu 9.04 or greater. Installing packages sudo apt-get install nfs-kernel-server patch g++ rpm zlib1g-dev m4 bison libncurses5-dev gettext build-essential tcl intltool libxml2-dev minicom tftpd  xinetd For a complete list, depending on system type, refer to Installing required packages Set serial port Setting TFTP Setting NFS Compile Android Download the SDK from our internal repository cd /opt wget http://android.maxtrack.com.br/imx-android-r6.tar.gz tar xvfz imx-android-r6.tar.gz cd imx-android-r6/code tar xzvf R6.tar.gz cd ~ mkdir myandroid cd myandroid curl http://android.git.kernel.org/repo > ./repo chmod a+x ./repo ./repo init -u git://android.git.kernel.org/platform/manifest.git -b donut * If you are behind a firewall or proxy try this one:./repo init -u http://android.git.kernel.org/platform/manifest.git -b donut cp /opt/imx-android-r6/code/R6/default.xml .repo/manifests/default.xml ./repo sync Preparing cross compiling tools cd /opt/imx-android-r6/tool tar xzvf gcc-4.1.2-glibc-2.5-nptl-3.tar.gz -C /opt export ARCH=arm export CROSS_COMPILE=/opt/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi- Download the kernel source git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.28.y.git kernel_imx Download U-Boot cd bootable/bootloader git clone git://git.denx.de/u-boot.git uboot-imx       Patching the environment Previously we decompressed the SDK at "/opt/imx-android-r6/code/R6" there we can find all the patches needed to iMX51 cd ~/myandroid . /opt/imx-android-r6/code/R6/and_patch.sh c_patch /opt/imx-android-r6/code/R6 imx_R6 Build Uboot cd ~/myandroid/bootable/bootloader/uboot-imx make mx51_bbg_android_config make Build Android cd ~/myandroid make PRODUCT-imx51_BBG-eng 2>&1 | tee build_imx51_BBG_android.log For i.MX51 BBG build, it will generate the compiled environment under myandroid/out/target/product/imx51_BBG. These 4 folders can be used to create your Android file system for NFS mounting, i.e., "root/" -> "/", "system/" -> "/system", "data/" -> "/data" root/ : root file system (including init, init.rc, etc). Will be mounted at "/" system/:  Android system binary/libraries. Will be mounted at "/system" data/: Android data area. Will be mounted at "/data" recovery/: root file system when booting in "recovery" mode. Not directly used. Image files to use with SD cards ramdisk.img: Ramdisk image generated from "root/". Not directly used. system.img: EXT3 image generated from "system/". Can be programmed to "SYSTEM" partition on SD card with "dd" userdata.img: EXT3 image generated from "data/". recovery.img: EXT3 image generated from "recovery/". Can be programmed to "RECOVERY" partition on SD card with "dd" Build uRamdisk Assuming that you had already built uboot, "mkimage" was generated under myandroid//bootable/bootloader/uboot-imx/tools/ cd ~/myandroid/out/target/product/imx51_BBG ~/myandroid/bootable/bootloader/uboot-imx/tools/mkimage -A arm -O linux -T ramdisk -C none -a 0x90308000 -n "Android Root Filesystem" -d ./ramdisk.img ./uramdisk.img Build Kernel Image If you want to run Android via NFS or from SD, you can build kernel with default configuration now: cd ~/myandroid/kernel_imx       make imx51_android_defconfig      make uImage After compiling the image can be found at ~/myandroid/kernel_imx/arch/arm/boot/uImage. Since we are using Uboot we will need to do this step: cd myandroid/kernel_imx/arch/arm/boot ~/myandroid/bootable/bootloader/uboot-imx/tools/mkimage -A arm -O linux -T kernel -C none -a 0x90008000 -e 0x90008000 -n "Android Linux Kernel" -d ./zImage ./uImage Boot FS from SDcard Partioning the SD Card Insert your SD card/cardreader to the Linux PC (you need root privileges for programming SD), you can use dmesg to check the SD device, in our how-to we will consider that the sdcard is detected as /dev/sdb, so be careful to not mess up your own file system. To boot the entire FS from SDcard you must follow this partition schema: File:Pt.png To achieve this, we are going to use fdisk to create the partition table: # sudo fdisk /dev/sdb Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel with disk identifier 0x1787490d. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) Listing the partition talbe (in our example the SDcard does not have a partition schema): Command (m for help): p Disk /dev/sdb: 3965 MB, 3965190144 bytes 122 heads, 62 sectors/track, 1023 cylinders Units = cylinders of 7564 * 512 = 3872768 bytesDisk identifier: 0x1787490d    Device Boot      Start         End      Blocks   Id  System If you have any previous partition, please delete it using the "d" command. Pay attention that each sdcard block has 3872768 bytes (this size usually changes for each type of sdcard) so the first step is to jump at least 8 MB to store uboot, kernel and ramdisk ( as shown in the partition schema ) With that advice in mind, create a 10 MB primary partition that will store the media (/sdcards): Command (m for help): nCommand action    e   extended    p   primary partition (1-4) pPartition number (1-4): 1First cylinder (1-1023, default 1): +8MLast cylinder, +cylinders or +size{K,M,G} (2-1023, default 1023): +10M List the partition table to check if the partition was correctly created: Command (m for help): p Disk /dev/sdb: 3965 MB, 3965190144 bytes 122 heads, 62 sectors/track, 1023 cylinders Units = cylinders of 7564 * 512 = 3872768 bytes Disk identifier: 0x1787490d     Device Boot      Start         End      Blocks   Id  System /dev/sdb1               2           5       15128   83  Linux Note that the first partition does not start in the first cylinder; the first cylinder and the second one will store uboot, kernel and ramdisk. Now we need to change the partition label to vfat: Command (m for help): tSelected partition 1 Hex code (type L to list codes): bChanged system type of partition 1 to b (W95 FAT32) Command (m for help): p Disk /dev/sdb: 3965 MB, 3965190144 bytes 122 heads, 62 sectors/track, 1023 cylinders Units = cylinders of 7564 * 512 = 3872768 bytes Disk identifier: 0x1787490d     Device Boot      Start         End      Blocks   Id  System /dev/sdb1               2           5       15128    b  W95 FAT32 Create another 80 MB primary partition with 80 MB storage capacity; this partition will store the system's files. This partition must start in the cylinder that follows the last cylinder of the former partition. Command (m for help): nCommand action    e   extended    p   primary partition (1-4) p Partition number (1-4): 2First cylinder (1-1023, default 1): 6Last cylinder, +cylinders or +size{K,M,G} (6-1023, default 1023): +80M Command (m for help): p Disk /dev/sdb: 3965 MB, 3965190144 bytes 122 heads, 62 sectors/track, 1023 cylinders Units = cylinders of 7564 * 512 = 3872768 bytes Disk identifier: 0x1787490d    Device Boot      Start         End      Blocks   Id  System /dev/sdb1               2           5       15128    b  W95 FAT32 /dev/sdb2               6          28       86986   83  Linux Now you must create an extended partition big enough to store other 2 logic partitions ( DATA partition with 20 MegaBytes and CACHE partition with 10 MB): Command (m for help): nCommand action    e   extended    p   primary partition (1-4) ePartition number (1-4): 3First cylinder (1-1023, default 1): 29Last cylinder, +cylinders or +size{K,M,G} (29-1023, default 1023): +30M Command (m for help): p Disk /dev/sdb: 3965 MB, 3965190144 bytes 122 heads, 62 sectors/track, 1023 cylinders Units = cylinders of 7564 * 512 = 3872768 bytes Disk identifier: 0x1787490d     Device Boot      Start         End      Blocks   Id  System /dev/sdb1               2           5       15128    b  W95 FAT32 /dev/sdb2               6          28       86986   83  Linux /dev/sdb3              29          37       34038    5  Extended Now create the logic partitions: Command (m for help): nCommand action    l   logical (5 or over)    p   primary partition (1-4) lFirst cylinder (29-37, default 29): Using default value 29 Last cylinder, +cylinders or +size{K,M,G} (29-37, default 37): +20M Command (m for help): p Disk /dev/sdb: 3965 MB, 3965190144 bytes 122 heads, 62 sectors/track, 1023 cylinders Units = cylinders of 7564 * 512 = 3872768 bytes Disk identifier: 0x1787490d     Device Boot      Start         End      Blocks   Id  System /dev/sdb1               2           5       15128    b  W95 FAT32 /dev/sdb2               6          28       86986   83  Linux /dev/sdb3              29          37       34038    5  Extended /dev/sdb5              29          34       22661   83  Linux Command (m for help): nCommand action    l   logical (5 or over)    p   primary partition (1-4) lFirst cylinder (35-37, default 35): Using default value 35 Last cylinder, +cylinders or +size{K,M,G} (35-37, default 37): Using default value 37 At last, you must create a primary partition to store the /recovery: Command (m for help): nCommand action    l   logical (5 or over)    p   primary partition (1-4) pSelected partition 4 First cylinder (1-1023, default 1): 38 Last cylinder, +cylinders or +size{K,M,G} (38-1023, default 1023): +10M Command (m for help): p Disk /dev/sdb: 3965 MB, 3965190144 bytes 122 heads, 62 sectors/track, 1023 cylinders Units = cylinders of 7564 * 512 = 3872768 bytes Disk identifier: 0x1787490d     Device Boot      Start         End      Blocks   Id  System /dev/sdb1               2           5       15128    b  W95 FAT32 /dev/sdb2               6          28       86986   83  Linux /dev/sdb3              29          37       34038    5  Extended /dev/sdb4              38          41       15128   83  Linux /dev/sdb5              29          34       22661   83  Linux /dev/sdb6              35          37       11315   83  Linux Saving the partition table: Command (m for help): wThe partition table has been altered! Calling ioctl() to re-read partition table. WARNING: Re-reading the partition table failed with error 16: Device or resource busy. The kernel still uses the old table. The new table will be used at the next reboot. WARNING: If you have created or modified any DOS 6.x partitions, please see the fdisk manual page for additional information. Syncing disks. Now you are ready to start flashing the SDcard: Flashing SDcard Flashing Uboot cd ~/myandroid/bootable/bootloader/uboot-imx sudo dd if=your_bootloader_binfile of=/dev/sdb bs=1K seek=1 Usually we use this no-padding uboot image in SD card, i.e. program this no-padding uboot image into 1KB offset of SD card so that we will NOT overwrite the MBR (including partition table) within 1st 512B on SD card. Formatting the SD Do not copy and paste the commands; wait for the complete output. sudo mkfs.vfat /dev/sdb1 sudo mkfs.ext3 /dev/sdb2 sudo mkfs.ext3 /dev/sdb4 sudo mkfs.ext3 /dev/sdb5 sudo mkfs.ext3 /dev/sdb6 Flashing Kernel cd ~/myandroid/kernel_imx/arch/arm/boot sudo dd if=uImage of=/dev/sdb bs=1M seek=1 Flashing FS cd ~/myandroid/out/target/product/imx51_BBG sudo dd if=uramdisk.img of=/dev/sdb bs=4M seek=1 sudo dd if=system.img of=/dev/sdb2  (Program system.img into SYSTEM partition which will be mounted as "/system") sudo dd if=recovery.img of=/dev/sdb4 (Program recovery.img into RECOVERY partition which will mounted as "/" in recovery mode) Configure Uboot After inserting the SD card in the board (the slot is located at the inferior portion of the board), plugging in the serial cable and start a configured minicom session, you should turn on the iMX51 board and see in your console something like this: U-Boot 2009.08-00046-gf91e287 (Jan 18 2010 - 12:32:32) CPU:   Freescale i.MX51 family 2.5V at 400 MHz mx51 pll1: 800MHz mx51 pll2: 665MHz mx51 pll3: 216MHz ipg clock     : 66500000Hz ipg per clock : 665000000Hz uart clock    : 66500000Hz cspi clock    : 54000000Hz Board: MX51 BABBAGE 3.0 [POR] Boot Device: MMC DRAM:  512 MB MMC:   FSL_ESDHC: 0 In:    serial Out:   serial Err:   serial Press home + power to enter recovery mode ... Net:   FEC0 [PRIME] Hit any key to stop autoboot:  0 BBG U-Boot > Copy and paste these configurations, line by line: setenv bootcmd 'run bootcmd_SD1 bootcmd_SD2' setenv bootcmd_SD1 'run bootargs_base bootargs_android bootargs_SD' setenv bootcmd_SD2 'mmc read 0 ${loadaddr} 0x800 0x1280;mmc read 0 ${rd_loadaddr} 0x2000 0x258;bootm ${loadaddr} ${rd_loadaddr}' setenv bootargs_base 'setenv bootargs console=ttymxc0,115200' setenv bootargs_SD 'setenv bootargs ${bootargs}' setenv bootargs_android 'setenv bootargs ${bootargs} init=/init androidboot.console=ttymxc0 wvga calibration' setenv loadaddr 0x90800000 setenv rd_loadaddr 0x90B00000 saveenv Reboot the board: reset Additional Resources All Board Android ADB All Board Android Getevent All Board Android logcat All Board Android Without Ramdisk All Boards Debugging Android [Android] Fatal exception happens when preview size does not match video snapshot size Android Data Partition Encryption on i.MX6 Android GDB for Native Code Android Graphic UI with GPU hardware acceleration Android HTML5 Video Android Memory Usage Tool: Procrank Build Android 4.0 ICS under Ubuntu 11.10 Build Linphone Android for i.MX6 How to find the crash point: Android Native crash How to debug memory leakage in media server in Android How to Enable LDO Bypass Based on i.MX6 Android ICS How to Enable PCIe WiFi into i.MX6 Android Release? How to Install Android on SD Card How to play a file with 2 audio tracks: DTS & AC3 on i.MX6/Android How to play a media file/stream from console in Android How to port new audio codec into Android.docx How to Print Function Caller Stack in Android Log File How to Support New WiFi Card in Android How to Use Proxy to Access Network in Android i.MX6 Android 13.4.1.03 Patch Release i.MX6 Android R13.4.1.04 patch release i.MX6 D/Q and i.MX6 DL/S Android JB4.2.2_1.0.0-GA release iMX6QD How to Add 24-bit LVDS Support in Android i.MX6 Android R13.4-GA.03 patch release IoT Solutions: Cloud Connector for Android Memory Management on i.MX6 Android New Android SD Card Demo Image for the i.MX6Q SABRE Board for Smart Devices New Android SD Card Demo Image for the i.MX6Q SABRE Platform for Smart Devices Sabre-l Setup Memo Video - Bye-Bye Standby Power - Ubiquitous QuickBoot with Android on NetWalker Video - Efika MX Smartbook Android Flash
查看全文
Introduction to Linux In 1989, a Finnish student called Linus Torvalds started an improvement work of Minix's Kernel, an operational system like Unix wrote by Andrew Tannenbaum, calling his own Kernel as Linux, a mix of Linus and Minix. The main idea about this new Kernel is that it's free. Anyone can develop to improve the Kernel, share the software, change it specific application and distribute without any fee or restriction. All the code is open. Finally, in 1991, Linus launched the first official Linux version, later joining Richard Stallman's GNU project in 1992 with the objective to produce the complete operational system that we know today. Linux had fast success on the x86 architecture and soon it had ported for various processor architectures and became very popular on embedded devices in many different applications like automotive, industrial, telecommunications, consumer and internet appliances. The use of Linux in embedded devices has many advantages: Supports many devices, file systems, networking protocols High portability, since it has been ported for many CPU architectures Large number of ready applications Mature source code with constant actualization Large community of programmers and users over the world testing and adding new features Which Linux distribution should I install on my PC? There are many distributions of Linux available for free. Below are a list of some of them: Ubuntu (IPA: [uːˈbuːntuː] in English,[3][ùbúntú] in Zulu) is an operating system for desktops, laptops, and servers. It has consistently been rated among the most popular of the many Linux distributions. Ubuntu's goals include providing an up-to-date yet stable Linux distribution for the average user and having a strong focus on usability and ease of installation. It is a derivative of Debian, another popular distribution. Ubuntu is sponsored by Canonical Ltd, owned by South African entrepreneur Mark Shuttleworth. The name of the distribution comes from the African concept of ubuntu which may be rendered roughly as "humanity toward others", "we are people because of other people", or "I am who I am because of who we all are", though other meanings have been suggested. This Linux distribution is named as such to bring the spirit of the philosophy to the software world. Ubuntu is free software and can be shared by any number of users. Kubuntu and Xubuntu are official subprojects of the Ubuntu project, aiming to bring the KDE and Xfce desktop environments, respectively, to the Ubuntu core (by default Ubuntu uses GNOME for its desktop environment). Edubuntu is an official subproject designed for school environments, and should be equally suitable for children to use at home. Gobuntu is an official subproject that is aimed at adhering strictly to the Free Software Foundation's Four Freedoms. The newest official subproject is JeOS. Ubuntu JeOS (pronounced "Juice") is a concept for what an operating system should look like in the context of a virtual appliance. Ubuntu releases new versions every six months, and supports those releases for 18 months with daily security fixes and patches to critical bugs. LTS (Long Term Support) releases, which occur every two years, are supported for 3 years for desktops and 5 years for servers. The most recent LTS version, Ubuntu 10.04 LTS (Lucid Lynx), was released on 29 April 2010. The current non-LTS version is 10.10 (Maverick Meerkat) released on 10/10/10 (10 October 2010). Click here for official site Mandriva Linux (formerly Mandrakelinux or Mandrake Linux) is a Linux distribution created by Mandriva (formerly Mandrakesoft). It uses the RPM Package Manager. The product lifetime of Mandriva Linux releases is 18 months for base updates and 12 months for desktop updates. Click here for official site openSUSE, (pronounced /ˌoʊpɛnˈsuːzə/), is a community project, sponsored by Novell and AMD, to develop and maintain a general purpose Linux distribution. After acquiring SUSE Linux in January 2004, Novell decided to release the SUSE Linux Professional product as a 100% open source project, involving the community in the development process. The initial release was a beta version of SUSE Linux 10.0, and as of October 2007 the current stable release is openSUSE 10.3. Beyond the distribution, openSUSE provides a web portal for community involvement. The community assists in developing openSUSE collaboratively with representatives from Novell by contributing code through the open Build Service, writing documentation, designing artwork, fostering discussion on open mailing lists and in Internet Relay Chat channels, and improving the openSUSE site through its wiki interface. Novell markets openSUSE as the best, easiest distribution for all users. Like most distributions it includes both a default graphical user interface (GUI) and a command line interface option; it allows the user (during installation) to select which GUI they are comfortable with (either KDE, GNOME or XFCE), and supports thousands of software packages across the full range of open source development. Click here for official site Fedora is an RPM-based, general purpose Linux distribution, developed by the community-supported Fedora Project and sponsored by Red Hat. Fedora's mission statement is: "Fedora is about the rapid progress of Free and Open Source software." One of Fedora's main objectives is not only to contain free and open source software, but also to be on the leading edge of such technologies. Also, developers in Fedora prefer to make upstream changes instead of applying fixes specifically for Fedora – this ensures that updates are available to all Linux distributions. Click here for official site Debian (pronounced [ˈdɛbiən]) is a computer operating system (OS) composed entirely of software which is both free and open source (FOSS). Its primary form, Debian GNU/Linux, is a popular and influential Linux distribution. It is a multipurpose OS; it can be used as a desktop or server operating system. Debian is known for strict adherence to the Unix and free software philosophies. Debian is also known for its abundance of options — the current release includes over twenty-six thousand software packages for eleven computer architectures. These architectures range from the Intel/AMD 32-bit/64-bit architectures commonly found in personal computers to the ARM architecture commonly found in embedded systems and the IBM eServer zSeries mainframes. Throughout Debian's lifetime, other distributions have taken it as a basis to develop their own, including: Ubuntu, MEPIS, Dreamlinux, Damn Small Linux, Xandros, Knoppix, Linspire, sidux, Kanotix, and LinEx among others. A university's study concluded that Debian's 283 million source code lines would cost 10 billion USA Dollars to develop by proprietary means. Prominent features of Debian are its APT package management system, its strict policies regarding its packages and the quality of its releases. These practices afford easy upgrades between releases and easy automated installation and removal of packages. Debian uses an open development and testing process. It is developed by volunteers from around the world and supported by donations through SPI, a non-profit umbrella organization for various free software projects. The default install provides popular programs such as: OpenOffice, Iceweasel (a rebranding of Firefox), Evolution mail, CD/DVD writing programs, music and video players, image viewers and editors, and PDF viewers. Only the first CD/DVD is necessary for the default install; the remaining discs contain all 26,000+ extra programs and packages currently available. If a user does not wish to download the CDs/DVDs, these extras can be downloaded and installed separately using the package manager. Debian can also be configured to download and install updates automatically. Click here for official site Slackware is a Linux distribution created by Patrick Volkerding of Slackware Linux, Inc. Slackware was one of the earliest distributions, and is the oldest currently being maintained. Slackware aims for design stability and simplicity, and to be the most Unix-like GNU/Linux distribution. Click here for official site
查看全文
  Some customers want to expose their i3c device on the /dev, In order to develop their i3c APP or operation the i3c device like I2C. But in our default BSP code, we do not support this feature for I3C device, This article will introduce how to make the i3c device expose to the user space. Board : i.MX 93 EVK BSP Version : lf-6.1.55-2.2.0 I3C device : LSM6DSOXTR Step 1 : Rework the i.MX93 EVK Board, Install the R1010.      Step 2 : Apply the add_i3c_device_to_dev.patch file to the linux kernel code              Command : git apply add_i3c_device_to_dev.patch Step 3 : Re-compile the kernel Image file.              Command : make imx_v8_defconfig                                  make Step 4 : Boot your board with "imx93-11x11-evk-i3c.dtb" file and see if you can see the I3C device on the /dev directory. Result : We can see the i3c device is appeared in /dev directory, The i2c-8 is an i2c device mounted to the i3c bus. The i3c is backward compatible with i2c device. It will simulate the I2C signal loading i2c device.                 PS : You can also use the i2ctool detect i2c-8 device. As shown in the following picture:   Note : If you need the patch file, Please contact me any time for free.
查看全文
The table below contains notable updates to the current release of the Reference Manual. The information provided here is preliminary and subject to change without notice. Affected Modules Issue Summary Description Date - - No issues noted -
查看全文
  NXP的OpenWRT方案:连接未来的智能网络体验   在数字化时代,智能家居、物联网等概念正不断演进,而要实现这些愿景,一个强大而高效的网络基础设施变得至关重要。OpenWRT以其开源自由、高度可定制和卓越稳定性,成为引领未来网络发展的关键一环。NXP作为全球领先的半导体技术创新公司,以其在嵌入式系统和通信领域的卓越技术积累,推出的基于OpenWRT的智能网络解决方案,为蓬勃发展的智能家居、物联网赋能。本文将介绍NXP公司芯片对OpenWRT方案支持的现状及获取途径,为读者应用OpenWRT去构建全新的下一代网络构建坚实的基础。 1、OpenWRT的独特特性 1.1、开源自由的崇高价值 OpenWRT以其开放源代码的本质脱颖而出。用户享有无限的自由,可以自由获取、修改和分享源代码,释放出创新的巨大潜力。这种开放性既推动了技术的不断进步,也使用户能够更主动地掌控网络的方向,也节约了用户的成本。 1.2、稳定可靠的网络基石 建立在成熟的Linux内核之上,OpenWRT经过长时间的演化和精细调整,确保系统的出色稳定性。这意味着更少的网络故障、更长的设备使用寿命,为各类网络需求提供了坚实的支撑。这一特性使得OpenWRT成为构建可靠家庭网络的理想选择,用户不用担心网络不稳定或崩溃的问题。 1.3 强大的软件包管理 OpenWRT引以为傲的软件包管理系统给用户带来了极大的灵活性。用户可以根据需求自由安装、更新和卸载各类应用程序和服务,从而实现网络环境的高度个性化,实现更智能的网络体验。OpenWRT允许用户安装各种网络服务和应用程序,如VPN、代理服务器等,以满足特定的网络需求。这为用户提供了更大的自由度,使他们能够创建符合个人或家庭需求的网络环境。 1.4 强大的社区支持 OpenWRT庞大的社区是其强大动力的源泉。用户可以在社区中交流心得、解决问题,甚至参与到项目的开发中。这种协作精神推动了OpenWRT的不断创新和进步。   2、NXP OpenWRT方案的应用 2.1 智能家居生态系统的构建 NXP OpenWRT方案与NXP Matter方案无缝结合为用户提供了构建智能家居生态系统的理想平台。通过其强大的定制能力,用户可以轻松连接、管理和控制各类智能设备,打造一个高度智能化的家居环境。该方案完整集成了NXP的Bluetooth和WIFI的芯片驱动,如:IW612, 88W9098, 88W8997等。 用户只需勾选相应的驱动即可轻松构建一个基于OpenWRT的Matter的OpenThread Border Router (OTBR)或者Zigbee Bridge。   2.2 定制化的网络服务 NXP OpenWRT方案支持各类网络服务和应用程序的定制安装。用户可以根据个人需求,轻松创建个性化的网络服务,如VPN、代理服务器,家庭路由器或网关等,实现更灵活的网络体验。 2.3 高清晰度视频流的传输 智能家居中高清晰度视频流的传输对网络性能提出了更高的要求。NXP OpenWRT方案通过其卓越的网络性能,结合NXP的工业级IP Camera方案, 确保用户能够流畅地享受高清视频流,为家庭娱乐带来更为优质的体验。 2.4 智能安防系统的构建 安防系统是不可或缺的一部分。NXP OpenWRT方案通过其高级网络安全功能,为用户打造了更可靠、更智能的安防系统,提高家庭的安全性。 3、NXP对OpenWRT的支持现状 基于OpenWRT众多优点及广阔的应用场景,NXP也很早就对OpenWRT实现了适配。不但实现了全部Layerscape系列处理器对OpenWRT的支持,目前主流的IMX处理器也得到了支持。具体支持的IMX平台及细节如下所示: Processor and Board Support ARMv8                                             ARMv7       I.MX93EVK                                •      I.MX6ULL       I.MX8MPlus       I.MX8MMini       I.MX8MNano       I.MX8MQuad OpenWrt Version       Based on OpenWrt v23.05 from mainline (tag: v23.05.0-rc1) Toolchain: ARMV8: gcc-11.3, binutils-2.37 ARMV7: gcc-12.3, binutils-2.40 U-Boot Boot Loader       IMX LF release, tag: lf-5.15.71-2.2.1 v2022.04 Linux Kernel       OpenWrt kernel 5.15.114 based on IMX SDK release kernel v5.15.71_2.2.1 Firmware       firmware-imx-8.18       firmware-sentinel-0.5.1 Main Features       Squashfs rootfs support on SD card.       Supported CLI and web configuation.       U-Boot Boot Loader - U-Boot: lf-5.15.71-2.2.1. - Arm Trusted firmware (TF-A) integration. - Boot from SDHC       Linux Kernel Core - Linux kernel 5.15.114 - Cortex-A53 (AARCH64), little endian for imx8m platform - Cortex-A55 (AARCH64), little endian for imx93 platform - Cortex-A7, little endian for imx6ull platform - 64-bit effective kernel addressing [Cortex-A53/A55]       Linux Kernel Drivers - SDIO 3.0 / eMMC5.1 - USB 3.0/2.0 Dual-Role with PHY type C - 32-bit LPDDR4 - 2x Gigabit Ethernet with AVB, IEEE 1588, EEE   and 1x w/ TSN - PCIe Gen 3 + WIFI - CAN FD - Dual-ch. QuadSPI (XIP) or 1x OctalSPI(XIP) - RTC Licensing       The majority of the software included in the OpenWrt release is licensed under a form of open source license (e.g. GPL, BSD).       Some software is licensed under the NXP EULA license. 4、如何开始部署和使用OpenWRT? 如果想体验Layerscape系列芯片的OpenWRT强大功能,请从OpenWRT官方下载,即:https://git.openwrt.org/openwrt/openwrt.git。Layerscape的OpenWRT支持代码已经全部集成到了OpenWRT官方代码库。 此处以IMX8MMini-EVK为例说明OpenWRT在IMX平台的部署步骤,编译环境为Ubuntu22.04。 4.1 从github.com上获取源码 https://github.com/nxp-imx/imx_openwrt Tag: imx_v23.05_v5.15.114 4.2 编译,安装,配置OpenWRT $ ./scripts/feeds update -a; ./scripts/feeds install -a; cp config.default .config; make -j $ sudo dd if=/mnt/tftpboot/imx8/matter_20230908/openwrt-imx-imx8-imx8mmini-squashfs-sdcard.img of=/dev/sdX bs=1M && sync 这样就有生成了一个可以SD卡启动的OpenWRT了启动盘了。 可以直接用SD卡来启动体验OpenWRT. 更多的编译帮助请参考源代码中的README文件:target/linux/imx/README。 4.3 配置和个性化 用户可通过Web界面或SSH访问OpenWRT设备,开始配置和个性化网络环境。包括设置网络规则、安装软件包等,确保设备按照个人需求运行。下图为安装删除软件的界面。是不是很简单,很方便!       4.4 遇到问题怎么办? 首先可以到OpenWRT社区这个充满活力的地方获得支持。 当然也可以分享自己的开发或使用经验,甚至参与到项目的开发中。这个开放的社区为用户提供了更多学习和发展的机会,共同推动OpenWRT不断向前。 还可以参与到NXP官方社区https://community.nxp.com/t5/i-MX-Processors/bd-p/imx-processors 进行提问和技术分享。有专业的工程师为您排忧解难。NXP OpenWRT期待您的参与!   免责声明 此OpenWRT发布是NXP系统工程倡议的一部分,不属于NXP为其MPU平台的Linux基础支持策略。NXP不对本发布及其后续版本的质量负责,包括添加对新平台的支持,这完全由系统工程团队自行决定。对于具体需求或问题,请通过以下电子邮件地址联系NXP的系统工程团队:“andy.tang@nxp.com”.
查看全文
The i.MX 8QXP introduces a concept for manipulating resource allocation, power, clocking and IO configuration and muxing, the System Controller Unit (SCU) has been added to the system. The SCU is an Arm Cortex-M4 core and is the first processor to boot in the i.MX 8QXP design. It is the responsibility of the SCU to control: Boot management Power management Clock IO and reset management configuration and muxing Resource partitioning / access control DDR Management Temperature monitoring AP watchdog services Low power wakeup All those subsystems are abstracted thanks to the System Controller Firmware (SCFW) running in the SCU. Other software components communicate with SCU via an Application Programming Interface (API). This API makes Remote Procedure Calls (RPC) via an underlying Inter-Processor Communication (IPC) mechanism. Each OS distributed by NXP features a library that allows it to interact with the SCFW running on the SCU. The SCU sub-system is made out of: 1x Arm Cortex-M4 processor running at 266MHz with 256KB of Tightly Coupled Memory (TCM) It includes the following set of peripherals: 1x TPM 1x UART 1x I2C 8x GPIOs 4x MUs System Controller Firmware (SCFW) NXP only releases packages in a majority object code form, however a board.c file is provided in which most of the configuration of the SCFW can be done. The first main step from SCFW to configure the DDR and start all other cores in the system. The boot flow is described in the image below:   The i.MX8 boot sequence involves SCU ROM, SCFW, Security Controller (SECO) ROM, and SECO FW: At reset, the SCU ROM and SECO ROM both start execution The SCU ROM reads boot mode pins SCU ROM loads the first container from the boot media; this container always has the SECO FW, signed using the NXP key The SECO FW is loaded into SECO Tightly Coupled Memory (TCM) A message is sent by the SCU via private MU to the SECO ROM to authenticate and run SECO FW The SCU ROM loads the second container from the boot media; this container always has the SCFW and can be signed using the customer key SCFW is loaded to SCU TCM SCU ROM will then configure the DDR SCU ROM will start the SCFW From this point SCFW takes over and loads any image to the Arm Cortex-M or Cortex-A cores.   Downloading and building SCFW Download the Arm GCC toolchain from here: https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads Export the toolchain to compile SCFW: mkdir ~/gcc_toolchain cp ~/Downloads/gcc-arm-none-eabi-10.3-2021.10-linux.tar.bz2 ~/gcc_toolchain/ cd ~/gcc_toolchain/ tar -xvjf gcc-arm-none-eabi-10.3-2021.10-linux.tar.bz2 export TOOLS=~/gcc_toolchain/ Download the file IMX-SCFW-PORTING-KIT-1.4.2 from NXP. After the SCFW porting kit is downloaded and un-tar, navigate into packages and run the binary file inside: $ cd <download-dir>/packages/ $ chmod a+x imx-scfw-porting-kit-1.4.2.bin $ ./imx-scfw-porting-kit-1.4.2.bin Navigate inside the newly created “imx-scfw-porting-kit” and into “src”. Extract the desired SCFW porting kit. $ cd imx-scfw-porting-kit-1.4.2/ $ tar -xvf src/scfw_export_mx8qx.tar.gz $ cd scfw_export_mx8qx/ The tar file extracted will be different depending on which board is being used. All the code that is specific to a board configuration is under “platform/board/mx8qxp_mek/board.c” To compile SCFW type the following command: $ make qx B=mek R=B0 All the files resulting from compilation can be found inside build_mx8qx/
查看全文
1 - Introduction: The Ultra Secured Digital Host Controller (uSDHC) provides the interface between the host processor and the SD/SDIO/MMC cards. Most recent versions provides the ability to automatically select a quantized delay (in fractions of the clock period) regardless of on-chip variations such as process, voltage, and temperature (PVT). The auto tuning is performed during runtime at hardware level, no software enablement is needed to drive this feature. 2 - Failure description: SDIO cards can implement an optional feature that uses DATA[1] to signal the card's interrupt to the i.MX device, this feature can be enabled by the SDIO card device and does not depends on i.MX uSDHC driver configuration. NXP Linux BSP is enabling the auto tuning for high SDIO frequencies (SDR104 and SDR50). Out of reset uSDHC_VEND_SPEC2 register is configured to use DATA[3:0] for calibration, this setup can conflict with the SDIO interrupt as DATA[1] signal can be asserted asynchronously. SDIO failures can be observed when running SDIO applications that requires high usage of the SDIO interface (e.g Download of large files), SDIO controller cannot return an accurate DLL causing failures such as "CMD53 read error". Failure can be observed on i.MX8MM EVK and i.MX8MN EVK boards, both devices are running 88w8987 Wi-Fi chipset at 208Mhz (SDR104). Users can observe an SDIO crash followed by error message below at Linux Kernel level. [ 401.945627] cmd53 read error=-84 [ 401.974677] moal_read_data_sync: read registers failed 3 - Impacted devices: The following devices are impacted by this limitation. - i.MX6 Family:   i.MX6SL, i.MX6SLL, i.MX6SX, i.MX6UL, i.MX6ULZ and i.MX6ULL. - All i.MX7 and i.MX7ULP family:   i.MX7D, i.MX7S and i.MX7ULP. - All i.MX8M Family:   i.MX8MQuad, i.MX8M Mini, i.MX8M Nano, i.MX8M Nano UL and i.MX8M Plus. - All i.MX8/8X Family:   i.MX8DQXP, i.MX8DX and i.MX8QM. NXP Linux BSP is enabling the auto tuning for SDR104 and SDR50 modes. Other operation modes are not impacted by this limitation. Users can poll uSDHCx_CLK_TUNE_CTRL_STATUS register when running SDIO applications to confirm. TAP_SEL_PRE field is updated automatically during run time and constant variations can point to an incorrect delay cell calculated by the uSDHC controller.   All NXP Wi-Fi chipsets are enabling SDIO interrupt during firmware load, failures can be observed with any Wi-Fi vendor enabling SDIO asynchronous interrupt. 4 - Software changes: Recommendation is to enable auto tuning for DATA[0] and CMD signals only, DATA[1] should not be used for auto calibration to avoid a possible conflict with SDIO interrupt. This setup can only be used if SDIO interface length are well matched. Software patches can be found at codeaurora.org. Fix is already included in L5.10.52-2.1.0 BSP, users can add fsl,sdio-interrupt-enabled property to uSDHC device tree node to enable SW workaround. https://source.codeaurora.org/external/imx/linux-imx/commit/?h=lf-5.10.y&id=3b3d6dec05277f7786d813592a31ea4a1ce60a74 https://source.codeaurora.org/external/imx/linux-imx/commit/?h=lf-5.10.y&id=b9b5a43df1d709809b2b654ad8f8181b00a4ee55 https://source.codeaurora.org/external/imx/linux-imx/commit/?h=lf-5.10.y&id=95a846af9f82dc6ea60064d9d12d5d2378e23941  
查看全文
  Just sharing some experiences during the development and studying.   Although, it appears some hardwares, it focuses on software to speed up your developing on your  hardware.     杂记共享一下在开发和学习过程中的经验。    虽然涉及一些硬件,但其本身关注软件,希望这些能加速您在自己硬件上的开发。   02/07/2024 Device Tree Standalone Compile under Windows https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/Device-Tree-Standalone-Compile-under-Windows/ta-p/1855271   02/07/2024 i.MX8X security overview and AHAB deep dive i.MX8X security overview and AHAB deep dive - NXP Community   11/23/2023 “Standalone” Compile Device Tree https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/Standalone-Compile-Device-Tree/ta-p/1762373     10/26/2023 Linux Dynamic Debug https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/Linux-Dynamic-Debug/ta-p/1746611   08/10/2023 u-boot environment preset for sdcard mirror u-boot environment preset for sdcard mirror - NXP Community   06/06/2023 all(bootloader, device tree, Linux kernel, rootfs) in spi nor demo imx8qxpc0 mek all(bootloader, device tree, Linux kernel, rootfs)... - NXP Community     09/26/2022 parseIVT - a script to help i.MX6 Code Signing parseIVT - a script to help i.MX6 Code Signing - NXP Community   Provide  run under windows   09/16/2022   create sdcard mirror under windows create sdcard mirror under windows - NXP Community     08/03/2022   i.MX8MM SDCARD Secondary Boot Demo https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX8MM-SDCARD-Secondary-Boot-Demo/ta-p/1500011     02/16/2022 mx8_ddr_stress_test without UI   https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/mx8-ddr-stress-test-without-UI/ta-p/1414090   12/23/2021 i.MX8 i.MX8X Board Reset https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX8-i-MX8X-Board-Reset/ta-p/1391130       12/21/2021 regulator userspace-consumer https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/regulator-userspace-consumer/ta-p/1389948     11/24/2021 crypto af_alg blackkey demo crypto af_alg blackkey demo - NXP Community   09/28/2021 u-boot runtime modify Linux device tree(dtb) u-boot runtime modify Linux device tree(dtb) - NXP Community     08/17/2021 gpio-poweroff demo https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/gpio-poweroff-demo/ta-p/1324306         08/04/2021 How to use gpio-hog demo https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/How-to-use-gpio-hog-demo/ta-p/1317709       07/14/2021 SWUpdate OTA i.MX8MM EVK / i.MX8QXP MEK https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/SWUpdate-OTA-i-MX8MM-EVK-i-MX8QXP-MEK/ta-p/1307416     04/07/2021 i.MX8QXP eMMC Secondary Boot https://community.nxp.com/t5/i-MX-Community-Articles/i-MX8QXP-eMMC-Secondary-Boot/ba-p/1257704#M45       03/25/2021 sc_misc_board_ioctl to access the M4 partition from A core side sc_misc_board_ioctl to access the M4 partition fr... - NXP Community     03/17/2021 How to Changei.MX8X MEK+Base Board  Linux Debug UART https://community.nxp.com/t5/i-MX-Community-Articles/How-to-Change-i-MX8X-MEK-Base-Board-Linux-Debug-UART/ba-p/1246779#M43     03/16/2021 How to Change i.MX8MM evk Linux Debug UART https://community.nxp.com/t5/i-MX-Community-Articles/How-to-Change-i-MX8MM-evk-Linux-Debug-UART/ba-p/1243938#M40       05/06/2020 Linux fw_printenv fw_setenv to access U-Boot's environment variables Linux fw_printenv fw_setenv to access U-Boot's env... - NXP Community     03/30/2020 i.MX6 DDR calibration/stress for Mass Production https://community.nxp.com/docs/DOC-346065     03/25/2020 parseIVT - a script to help i.MX6 Code Signing https://community.nxp.com/docs/DOC-345998     02/17/2020 Start your machine learning journey from tensorflow playground Start your machine learning journey from tensorflow playground      01/15/2020 How to add  iMX8QXP PAD(GPIO) Wakeup How to add iMX8QXP PAD(GPIO) Wakeup    01/09/2020 Understand iMX8QX Hardware Partitioning By Making M4 Hello world Running Correctly https://community.nxp.com/docs/DOC-345359   09/29/2019 Docker On i.MX6UL With Ubuntu16.04 https://community.nxp.com/docs/DOC-344462   09/25/2019 Docker On i.MX8MM With Ubuntu https://community.nxp.com/docs/DOC-344473 Docker On i.MX8QXP With Ubuntu https://community.nxp.com/docs/DOC-344474     08/28/2019 eMMC5.0 vs eMMC5.1 https://community.nxp.com/docs/DOC-344265     05/24/2019 How to upgrade  Linux Kernel and dtb on eMMC without UUU How to upgrade Linux Kernel and dtb on eMMC without UUU     04/12/2019 eMMC RPMB Enhance and GP https://community.nxp.com/docs/DOC-343116   04/04/2019 How to Dump a GPT SDCard Mirror(Android O SDCard Mirror) https://community.nxp.com/docs/DOC-343079   04/04/2019 i.MX Create Android SDCard Mirror https://community.nxp.com/docs/DOC-343078   04/02/2019: i.MX Linux Binary_Demo Files Tips  https://community.nxp.com/docs/DOC-343075   04/02/2019:       Update Set fast boot        eMMC_RPMB_Enhance_and_GP.pdf   02/28/2019: imx_builder --- standalone build without Yocto https://community.nxp.com/docs/DOC-342702   08/10/2018: i.MX6SX M4 MPU Settings For RPMSG update    Update slide CMA Arrangement Consideration i.MX6SX_M4_MPU_Settings_For_RPMSG_08102018.pdf   07/26/2018 Understand ML With Simplest Code https://community.nxp.com/docs/DOC-341099     04/23/2018:     i.MX8M Standalone Build     i.MX8M Standalone Build.pdf     04/13/2018:      i.MX6SX M4 MPU Settings For RPMSG  update            Add slide CMA Arrangement  Consideration     i.MX6SX_M4_MPU_Settings_For_RPMSG_04132018.pdf   09/05/2017:       Update eMMC RPMB, Enhance  and GP       eMMC_RPMB_Enhance_and_GP.pdf 09/01/2017:       eMMC RPMB, Enhance  and GP       eMMC_RPMB_Enhance_and_GP.pdf 08/30/2017:     Dual LVDS for High Resolution Display(For i.MX6DQ/DLS)     Dual LVDS for High Resolution Display.pdf 08/27/2017:  L3.14.28 Ottbox Porting Notes:         L3.14.28_Ottbox_Porting_Notes-20150805-2.pdf MFGTool Uboot Share With the Normal Run One:        MFGTool_Uboot_share_with_NormalRun_sourceCode.pdf Mass Production with programmer        Mass_Production_with_NAND_programmer.pdf        Mass_Production_with_emmc_programmer.pdf AndroidSDCARDMirrorCreator https://community.nxp.com/docs/DOC-329596 L3.10.53 PianoPI Porting Note        L3.10.53_PianoPI_PortingNote_151102.pdf Audio Codec WM8960 Porting L3.10.53 PianoPI        AudioCodec_WM8960_Porting_L3.10.53_PianoPI_151012.pdf TouchScreen PianoPI Porting Note         TouchScreen_PianoPI_PortingNote_151103.pdf Accessing GPIO From UserSpace        Accessing_GPIO_From_UserSpace.pdf        https://community.nxp.com/docs/DOC-343344 FreeRTOS for i.MX6SX        FreeRTOS for i.MX6SX.pdf i.MX6SX M4 fastup        i.MX6SX M4 fastup.pdf i.MX6 SDCARD Secondary Boot Demo        i.MX6_SDCARD_Secondary_Boot_Demo.pdf i.MX6SX M4 MPU Settings For RPMSG        i.MX6SX_M4_MPU_Settings_For_RPMSG_10082016.pdf Security        Security03172017.pdf    NOT related to i.MX, only a short memo
查看全文