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:
It is one mandatory patch if you are in the case: The chip you are using is imx6sx TO1.3 and newer, and use the kobs-ng to flash your image to the Nand memory chip. If you are using MFG, you also need rebuild the kobs-ng, and update the binary into your MFG tool.  The patch have been integrated into the default release yocto_4.1.15, but if you are using the older version release before yocto_4.1.15, please make sure you have integrated the modification when you need to use kobs-ng to flash the image to Nand memory chip. commit 5ecf08703da489a3bd317341f630870a3d07dab9 Author: Han Xu <han.xu@nxp.com> Date:   Thu Jan 28 14:40:14 2016 -0600     MMT-105: change the i.mx6sx revision check change the i.mx6sx revision check since v1.3 uses v1.2 boot config as well.     Signed-off-by: Han Xu <han.xu@nxp.com>     (cherry picked from commit 1dac0c14d1e2016c2fa804f6628543d8d238c680) diff --git a/src/plat_boot_config.c b/src/plat_boot_config.c index 461675a..e1ef6f3 100644 --- a/src/plat_boot_config.c +++ b/src/plat_boot_config.c @@ -1,5 +1,5 @@ /* -* Copyright (C) 2010-2015 Freescale Semiconductor, Inc. All Rights Reserved. +* Copyright (C) 2010-2016 Freescale Semiconductor, Inc. All Rights Reserved. */ /* @@ -256,10 +256,12 @@ int discover_boot_rom_version(void)                                         }                                         fgets(line_buffer, sizeof(line_buffer), revision);                                         if (!strncmp(line_buffer, "1.0", strlen("1.0")) || -                                                       !strncmp(line_buffer, "1.1", strlen("1.1"))) +                                                       !strncmp(line_buffer, "1.1", strlen("1.1"))) {                                                 plat_config_data = &mx6sx_boot_config; -                                       if (!strncmp(line_buffer, "1.2", strlen("1.2"))) +                                       /* all other revisions should use the latest boot config */ +                                       } else {                                                 plat_config_data = &mx6sx_to_1_2_boot_config; +                                       }                                 }                                 if (!strncmp(line_buffer, plat_imx6ul, strlen(plat_imx6ul))) How to apply it to older version quickly:  Apply the patch and rebuild the kobs-ng in yocto_3.14_x environment: bitbake -c compile -v -f imx-kobs cd tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/imx-kobs/5.0-r0/imx-kobs-5.0 git apply yocto_3_14_x.patch bitbake -c compile -v -f imx-kobs you can find the new binary “kobs-ng” under “tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/imx-kobs/5.0-r0/build/src” Apply the patch and rebuild the kobs-ng in yocto_3.10_53 environment: . ./setup-environment build bitbake -c compile -v -f imx-kobs cd tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/imx-kobs/3.10.53-1.1.0-r0/imx-kobs-3.10.53-1.1.0 git apply yocto_3_10_53patch bitbake -c compile -v -f imx-kobs you can find t he new binary “kobs-ng” under tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/imx-kobs/3.10.53-1.1.0-r0/imx-kobs-3.10.53-1.1.0/src As one alternation method, you also can download the whole imx-kobs-5.4 package which yocto_4.1.15 is using to build. wget http://www.freescale.com/lgfiles/NMG/MAD/YOCTO//imx-kobs-5.4.tar.gz
View full article
[中文翻译版] 见附件   原文链接: https://community.nxp.com/docs/DOC-342877 
View full article
The LMEM Base address is 0xE0082000u rather than 0xE0002000u.So please apply the patch to FreeRTOS_BSP_1.0.0_iMX6SX to enable the M4 cache, or the cache was not be enabled by default.It may have the big impact to your product performance. diff --git a/platform/devices/MCIMX6X/include/MCIMX6X_M4.h b/platform/devices/MCIMX6X/include/MCIMX6X_M4.h index 31d6eb2..3b9d240 100644 --- a/platform/devices/MCIMX6X/include/MCIMX6X_M4.h +++ b/platform/devices/MCIMX6X/include/MCIMX6X_M4.h @@ -25584,7 +25584,7 @@ typedef struct { /* LMEM - Peripheral instance base addresses */ /** Peripheral LMEM base address */ -#define LMEM_BASE                                (0xE0002000u) +#define LMEM_BASE                                (0xE0082000u) /** Peripheral LMEM base pointer */ #define LMEM                                   ((LMEM_Type *)LMEM_BASE) #define LMEM_BASE_PTR                            (LMEM)
View full article
This document shows the steps for the creation of Archlinux and kernel 4.18.5 on the UDOO board. Required material: UDOO board, Ubuntu 16.04 and SD card. Firts we need u-boot (universal bootloader), for that reason we need update the host. $ sudo apt-get update Then we need the file *.img and SPL for the file system $ wget http://os.archlinuxarm.org/os/imx6/boot/udoo/SPL $ wget http://os.archlinuxarm.org/os/imx6/boot/udoo/u-boot.img Kernel 4.18.5 and file system: $ sudo mkdir archlinux $ wget http://os.archlinuxarm.org/os/ArchLinuxARM-armv7-latest.tar.gz $ sudo tar -xzvf  ArchLinuxARM-armv7-latest.tar.gz $ sudo rm -rf *.tar.gz You must have the following files Now  We are going to burn the memory, we need a 16Gb of space: We need to make sure it is empty Then partitions: $ sudo fdisk /dev/sdc O, P, N, P, 1 space, 8192 default, W At the end the sdc is partition, then create the filesystem partition $ sudo mkfs.ext4 /dev/sdc1 The working directory $ sudo mkdir mnt mount the partition 1 $ sudo mount /devsdc1 mtn/ Now we where the kernel and filesystem are and copy all the file in mnt: $ sudo cp -vr * ~/mnt/ Once it finish we execute $ sync then unmount the partition of sdc1: $ sudo umount mnt/ Now is moment to load the SPL and u-boot: and $ sync we retire the sd and turn on the board. Now you are on ArchLinux. user: alarm                  root: Root Pass: alarm                 pass: root Now the firts thing we must do it is upgrade the keys: $ pacman -key --init $ pacman -key --populate archlinuxarm $ pacman -Syyuu We can add another user: $ useradd - m -g user  -s /bin/bash user_name $ passwd user_name $ paman -S sudo $ visudo Root ALL= (ALL) ALL user_name ALL=(ALL) ALL $ exit For the graphic we are going to install the xorg: $ sudo pacman -S xorg-server $ sudo pacman -S xorg-apps Now we can execute startx and observe the windows of xorg $ startx To have a windows gestor: $ sudo pacman -S sddm $ sudo pacman -S plasma kde-applications $ sudo systemctl enable sddm Reboot and you are ArchLinux graphics windows
View full article
[中文翻译版] 见附件   原文链接: https://community.nxp.com/docs/DOC-343116 
View full article
[中文翻译版] 见附件   原文链接: https://community.nxp.com/docs/DOC-343344 
View full article
[中文翻译版] 见附件   原文链接: https://community.nxp.com/docs/DOC-343079 
View full article
[中文翻译版] 见附件   原文链接: https://community.nxp.com/docs/DOC-343273 
View full article
[中文翻译版] 见附件   原文链接: Guide to flash an eMMC from SD Card on i.MX6Q SABRE-SD 
View full article
In some cases, such as mass production or preparing a demo. We need u-boot environment stored in demo sdcard mirror image.  Here is a way: HW:  i.MX8MP evk SW:  LF_v5.15.52-2.1.0_images_IMX8MPEVK.zip The idea is to use fw_setenv to set the sdcard mirror as the operation on a real emmc/sdcard. Add test=ABCD in u-boot-initial-env for test purpose. And use fw_printenv to check and use hexdump to double confirm it. The uboot env is already written into sdcard mirror(imx-image-multimedia-imx8mpevk.wic). All those operations are on the host x86/x64 PC. ./fw_setenv -c fw_env.config -f u-boot-initial-env Environment WRONG, copy 0 Cannot read environment, using default ./fw_printenv -c fw_env.config Environment OK, copy 0 jh_root_dtb=imx8mp-evk-root.dtb loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${bsp_script}; mmc_boot=if mmc dev ${devnum}; then devtype=mmc; run scan_dev_for_boot_part; fi arch=arm baudrate=115200 ...... ...... ...... splashimage=0x50000000 test=ABCD usb_boot=usb start; if usb dev ${devnum}; then devtype=usb; run scan_dev_for_boot_part; fi vendor=freescale hexdump -s 0x400000 -n 2000 -C imx-image-multimedia-imx8mpevk.wic 00400000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| hexdump -s 0x400000 -n 10000 -C imx-image-multimedia-imx8mpevk.wic 00400000 5f a4 9b 97 20 6a 68 5f 72 6f 6f 74 5f 64 74 62 |_... jh_root_dtb| 00400010 3d 69 6d 78 38 6d 70 2d 65 76 6b 2d 72 6f 6f 74 |=imx8mp-evk-root| 00400020 2e 64 74 62 00 20 6c 6f 61 64 62 6f 6f 74 73 63 |.dtb. loadbootsc| 00400030 72 69 70 74 3d 66 61 74 6c 6f 61 64 20 6d 6d 63 |ript=fatload mmc| 00400040 20 24 7b 6d 6d 63 64 65 76 7d 3a 24 7b 6d 6d 63 | ${mmcdev}:${mmc| 00400050 70 61 72 74 7d 20 24 7b 6c 6f 61 64 61 64 64 72 |part} ${loadaddr| 00400060 7d 20 24 7b 62 73 70 5f 73 63 72 69 70 74 7d 3b |} ${bsp_script};| 00400070 00 20 6d 6d 63 5f 62 6f 6f 74 3d 69 66 20 6d 6d |. mmc_boot=if mm| ...... ...... ...... 00401390 76 3d 31 00 73 6f 63 3d 69 6d 78 38 6d 00 73 70 |v=1.soc=imx8m.sp| 004013a0 6c 61 73 68 69 6d 61 67 65 3d 30 78 35 30 30 30 |lashimage=0x5000| 004013b0 30 30 30 30 00 74 65 73 74 3d 41 42 43 44 00 75 |0000.test=ABCD.u| 004013c0 73 62 5f 62 6f 6f 74 3d 75 73 62 20 73 74 61 72 |sb_boot=usb star| 004013d0 74 3b 20 69 66 20 75 73 62 20 64 65 76 20 24 7b |t; if usb dev ${| 004013e0 64 65 76 6e 75 6d 7d 3b 20 74 68 65 6e 20 64 65 |devnum}; then de| flash the sdcard mirror into i.MX8MP evk board emmc to check uuu -b emmc_all imx-boot-imx8mp-lpddr4-evk-sd.bin-flash_evk imx-image-multimedia-imx8mpevk.wic  The first time boot, the enviroment is already there.  How to achieve that: a. fw_setenv/fw_printenv: https://github.com/sbabic/libubootenv.git Note: Please do not use uboot fw_setenv/fw_printenv Compile it on the host x86/x64 PC. It is used on host. b. u-boot-initial-env Under uboot, make u-boot-initial-env Note: Yocto deploys u-boot-initial-env by default c. fw_env.config  imx-image-multimedia-imx8mpevk.wic 0x400000 0x4000 0x400000 0x4000 are from uboot-imx\configs\imx8mp_evk_defconfig CONFIG_ENV_SIZE=0x4000 CONFIG_ENV_OFFSET=0x400000 Now, you can run  ./fw_setenv -c fw_env.config -f u-boot-initial-env
View full article
[中文翻译版] 见附件   原文链接: i.MX Create Android SDCard Mirror 
View full article
[中文翻译版] 见附件   原文链接: https://community.nxp.com/docs/DOC-343372 
View full article
[中文翻译版] 见附件   原文链接: https://community.nxp.com/docs/DOC-343761 
View full article
From iMX 3.1x kernel, all kernel debug messages will be print to debug serial port after UART driver loaded, so if the kernel hang up before tty console driver ready, there will be no kernel boot up messages.   The attached patch can be used to enable the iMX serial debug console in early time, then kernel will not buffer the debug messages.   Note: the default patch is for UART1 (tty0) as the debug port, if you need use other debug port, please modify the code "early_console_setup()" with correct UART port base address.   L3.10.53-Add-early-console-for-debug-message.patch This patch is based on L3.10.53_GA1.1.0 release, it can support iMX6S/DL/D/Q.   L3.14.52-Add-early-console-for-debug-message.patch This patch is based on L3.14.52_GA1.1.0 release, it can support iMX6S/DL/D/Q, iMX6SL, iMX6SX, iMX6UL and iMX7.  
View full article
[中文翻译版] 见附件   原文链接: https://community.nxp.com/docs/DOC-344336 
View full article
[中文翻译版] 见附件   原文链接: https://community.nxp.com/docs/DOC-341566 
View full article
Hello there. Here is a good way to use U-boot in an efficient way with custom scripts. The bootscript is an script that is automatically executed when the boot loader starts, and before the OS auto boot process. The bootscript allows the user to execute a set of predefined U-Boot commands automatically before proceeding with normal OS boot. This is especially useful for production environments and targets which don’t have an available serial port for showing the U-Boot monitor. This information can be find in U-Boot Reference Manual.   I will take the example load a binary file in CORTEX M4 of IMX8MM-EVK. In my case, I have the binary file in MMC 2:1 called gpio.bin and I will skip those steps because that is not the goal.   First, you need the u-boot-tools installed in your Linux machine: sudo apt install u-boot-tools   That package provide to us the tool mkimage to convert a text file (.src, .txt) file to a bootscript file for U-Boot.   Now, create your custom script, in this case a simple script for load binary file in Cortex M4: nano mycustomscript.scr  and write your U-Boot commands: fatload mmc 2:1 0x80000000 gpio.bin cp.b 0x80000000 0x7e0000 0x10000 bootaux 0x7e0000   Now we can convert the text file to bootscript with mkimage. Syntax: mkimage -T script -n "Bootscript" -C none -d <input_file> <output_file> mkimage -T script -n "Bootscript" -C none -d mycustomscript.scr LCM4-bootscript   This will create a file called LCM4-bootscript (Or as your called it).   A way to load this bootscript file to U-Boot is using the UUU tool, in U-Boot set the device in fastboot with command: u-boot=> fastboot 0 Then in linux with the board connected through USB to PC run the command: sudo uuu -b fat_write LCM4-bootscript mmc 2:1 LCM4-bootscript   Now we have our bootscript in U-Boot in MMC 2:1.   Finally, we can run the bootscript in U-Boot: u-boot=> load mmc 2:1 ${loadaddr} LCM4-bootscript 158 bytes read in 2 ms (77.1 KiB/s) u-boot=> source ${loadaddr} ## Executing script at 40400000 6656 bytes read in 5 ms (1.3 MiB/s) ## No elf image at address 0x007e0000 ## Starting auxiliary core stack = 0x20020000, pc = 0x1FFE02CD...   And the Cortex M4 booted successfully:    I hope this can helps to you.   Best regards.   Salas.  
View full article
[中文翻译版] 见附件   原文链接: https://community.nxp.com/docs/DOC-342833 
View full article