美文网首页
烧录镜像到EMMC

烧录镜像到EMMC

作者: Lazy_Caaat | 来源:发表于2020-05-04 17:33 被阅读0次

在i.MX_Linux_User's_Guide.PDF中有如下描述

4.2.1 Downloading UUU 下载UUU工具的链接
  Download UUU version 1.2.91 or later from       https://github.com/NXPmicro/mfgtools/releases.

4.2.2 Using UUU 如何使用UUU
Follow these instructions to use the UUU for i.MX 6, i.MX 7, i.MX 8M Quad, i.MX 8M Mini, i.MX 8QuadMax, and i.MX
8QuadXPlus:
1. Connect a USB cable from a computer to the USB OTG/TYPE C port on the board.
  连接usb线从PC端到板子的usb-OTG端
2. Connect a USB cable from the OTG-to-UART port to the computer for console output.
  在PC上打开串口工具并连接板子的端口
3. Open a Terminal emulator program. See Section "Basic Terminal Setup" in this document.
  具体打开方法有解释
4. Set the boot pin to serial download mode mode. See Section "Serial download mode for the Manufacturing Tool" in
this document.
  板子上的拨码开关设置成serial down模式
For detailed usage of UUU, see github.com/NXPmicro/mfgtools/wiki. 
更详细的使用方法,打开这个链接 github.com/NXPmicro/mfgtools/wiki


For example, the following command writes rootfs.sdcard into eMMC.
举例烧写根文件系统到emmc中的命令如下
uuu -b emmc_all <bootloader> <rootfs.sdcard>

The following command decompresses bz2 file and writes into eMMC:
举例烧写bz2格式的根文件系统到emmc中的命令如下(如果需要sdcard文件,使用bzip2 -d -f filename命令解压即可)
uuu -b emmc_all <bootloader> <rootfs.sdcard.bz2/*>

The following command executes downloading and bootloader (SPL and U-Boot) by USB:
通过USB烧写BootLoader到emmc
uuu -b spl <bootloader>

The follow command burns into eMMC (If only one board is supported in such a release package and the board supports
eMMC chip):
如果手头有官方释放的针对特定板子的打包文件(包括BootLoader kernel dts rootfs 等所有需要的文件),可以直接执行下面命令烧录
uuu <release package>.zip


关于烧录的时候无限循环重启的问题

其本质是usb typec的两个PD芯片被去掉的原因,它是一个IIC设备,上电后会寻找这个设备,如果找不到则会出现这个重启烧录不进去的问题

tpcp_init: Can't find device id=0x52

tpcp_init: Can't find device id=0x50

我们需要去uboot源码里找到设备树,并把它改为otg模式


marvin@ubuntu:~/imx-yocto-bsp/build-imx8mmevk/tmp/work/imx8mmevk-poky-linux/u-boot-imx/1_2019.04-r0/git/arch/arm/dts$ vim fsl-imx8mm-evk.dts

&i2c2 {
        clock-frequency = <400000>;
        pinctrl-names = "default", "gpio";
        pinctrl-0 = <&pinctrl_i2c2>;
        pinctrl-1 = <&pinctrl_i2c2_gpio>;
        scl-gpios = <&gpio5 16 GPIO_ACTIVE_HIGH>;
        sda-gpios = <&gpio5 17 GPIO_ACTIVE_HIGH>;
        /*status = "okay";  这里的IIC设备需要关闭掉*/ 
        status = "disabled";

        typec_ptn5110_1: ptn5110@50 {
                compatible = "usb,tcpci";
                reg = <0x50>;
                src-pdos = <0x380190c8>;
                snk-pdos = <0x380190c8 0x3802d0c8>;
                max-snk-mv = <9000>;
                max-snk-ma = <2000>;
                op-snk-mw = <9000>;
                max-snk-mw = <18000>;
                port-type = "drp";
                default-role = "sink";
        };

        typec_ptn5110_2: ptn5110@52 {
                compatible = "usb,tcpci";
                reg = <0x52>;
                src-pdos = <0x380190c8>;
                snk-pdos = <0x380190c8 0x3802d0c8>;
                max-snk-mv = <9000>;
                max-snk-ma = <2000>;
                op-snk-mw = <9000>;
                max-snk-mw = <18000>;
                port-type = "drp";
                default-role = "sink";
        };
};
............
&usbotg1 {
        status = "okay";
        /*extcon = <&typec_ptn5110_1>;这里的PD选为OTG*/
        dr_mode = "otg";
};

&usbotg2 {
        status = "okay";
        /*extcon = <&typec_ptn5110_2>;这里的PD选为OTG*/
        dr_mode = "otg";
};


/imx-yocto-bsp/build-imx8mmevk/tmp/work/imx8mmevk-poky-linux/u-boot-imx/1_2019.04-r0/git/configs$ vim imx8mm_ddr4_evk_android_uuu_defconfig

CONFIG_ARM=y
CONFIG_ARCH_IMX8M=y
CONFIG_SYS_TEXT_BASE=0x40200000
CONFIG_SYS_MALLOC_F_LEN=0x2000
#CONFIG_USB_TCPC=y  这里的typeC开关关掉
CONFIG_TARGET_IMX8MM_DDR4_EVK=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/imx8m/imximage.cfg,SPL_TEXT_BASE=0x7E1000,ANDROID_SUPPORT"
CONFIG_FIT=y
CONFIG_SPL_LOAD_FIT=y
CONFIG_EFI_PARTITION=y
CONFIG_ARCH_MISC_INIT=y
CONFIG_SPL=y
CONFIG_SPL_BOARD_INIT=y
CONFIG_SPL_MMC_SUPPORT=y

重新编译Zimage

bitbake -c cleansstate imx-boot   //注意  此命令会让修改过的uboot源码恢复git默认代码
bitbake -c compile -f imx-boot 
bitbake imx-boot

用新生成的imx-boot-imx8mmevk-sd.bin-flash_evk替换UUU所调用的同名文件
typeC芯片的问题参考如下链接:
https://app-community.nxp.com/thread/508045

相关文章

  • 烧录镜像到EMMC

    在i.MX_Linux_User's_Guide.PDF中有如下描述 关于烧录的时候无限循环重启的问题 其本质是u...

  • [Research.003] Odroid XU3 Notes

    1. Flash EMMC 1.1 Ubuntu方法 下载镜像并烧录 其中sdx要用lsblk查询 1.2 Win...

  • UUU烧录EMMC分区问题

    https://github.com/NXPmicro/mfgtools/releases/download/uu...

  • Ubuntu 20.04 花屏

    使用软碟通烧录镜像

  • 13.树莓派烧录系统镜像

    树莓派烧录系统镜像 准备工作 树莓派镜像 win32diskimager 在windows下烧录 打开软件,点击写...

  • 树莓派4B配置

    树莓派初上手 无显示器 烧录系统 下载系统,目前最新的是2021/10/30版本 烧录镜像到系统 在SD卡根目录,...

  • 树莓派4B 开启串口登陆

    烧录镜像 Raspberry Pi OS – Raspberry Pi[https://www.raspberry...

  • RK3399 烧写镜像到emmc

    对应开发板SOM-RK3399,友善提供的镜像下载地址: http://download.friendlyarm....

  • 树莓派系统烧录

    问题:如何烧录系统? 解答: 大概可以分为两步:1.下载镜像;2.使用Win32diskimage工具烧录 详细方...

  • EMMC

    eMMC 原理 1 :Flash Memory 简介 eMMC 原理 2 :eMMC 简介 eMMC 原理 3 :...

网友评论

      本文标题:烧录镜像到EMMC

      本文链接:https://www.haomeiwen.com/subject/nlsyghtx.html