目录

目录

1.编译环境以及uboot版本

2.默认编译测试

3.uboot中新增自己的开发板

3.编译测试

4.烧录测试

5.patch文件


1.编译环境以及uboot版本

宿主机Debian12
u-boot版本lf_v2022.04 ; git 连接GitHub – nxp-imx/uboot-imx: i.MX U-Boot
交叉编译工具gcc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf

2.默认编译测试

make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- distcleanmake ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- mx6ull_14x14_evk_emmc_defconfigmake ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf-

3.uboot中新增自己的开发板

#创建自己的config文件cp configs/mx6ull_14x14_evk_emmc_defconfigconfigs/mx6ull_xing_emmc_defconfig

cp include/configs/mx6ullevk.hinclude/configs/mx6ull_xing_emmc.h

复制自己的板级文件夹

cd board/freescalecp -rf mx6ullevkmx6ull_xing_emmc

修改 mx6ull_xing_emmc 文件夹下的Makefile

修改mx6ull_xing_emmc 文件下的imximage.cfg

修改mx6ull_xing_emmc下的Kconfig文件

修改mx6ull_xing_emmc.c

修改MAINTAINERS

修改arch/arm/mach-imx/mx6/Kconfig

3.编译测试

make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- distcleanmake ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- mx6ull_xing_emmc_defconfigmake ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- 

4.烧录测试

sudo dd if=u-boot-dtb.imx of=/dev/sdc bs=1k seek=1 conv=fsync

5.patch文件

From 8a36c3ca95ab8c8338eebe68a607cb575451be0c Mon Sep 17 00:00:00 2001From: xingpeng89 Date: Thu, 15 Feb 2024 17:24:34 +0800Subject: [PATCH] add mx6ull_xing_emmc board in uboot--- uboot-imx/.binman_stamp | 0 uboot-imx/arch/arm/mach-imx/mx6/Kconfig |11 + .../board/freescale/mx6ull_xing_emmc/Kconfig|17 + .../freescale/mx6ull_xing_emmc/MAINTAINERS| 8 + .../board/freescale/mx6ull_xing_emmc/Makefile | 4 + .../freescale/mx6ull_xing_emmc/imximage.cfg | 120 ++++++ .../mx6ull_xing_emmc/imximage_lpddr2.cfg| 125 ++++++ .../mx6ull_xing_emmc/mx6ull_xing_emmc.c | 376 ++++++++++++++++++ .../board/freescale/mx6ull_xing_emmc/plugin.S | 263 ++++++++++++ uboot-imx/configs/mx6ull_xing_emmc_defconfig| 109 +++++ uboot-imx/include/configs/mx6ull_xing_emmc.h| 244 ++++++++++++ uboot-imx/tools/boot/bootm.c| 1 + uboot-imx/tools/boot/fdt_region.c | 1 + uboot-imx/tools/boot/image-cipher.c | 1 + uboot-imx/tools/boot/image-fit-sig.c| 1 + uboot-imx/tools/boot/image-fit.c| 1 + uboot-imx/tools/boot/image-host.c | 1 + uboot-imx/tools/boot/image.c| 1 + 18 files changed, 1284 insertions(+) create mode 100644 uboot-imx/.binman_stamp create mode 100644 uboot-imx/board/freescale/mx6ull_xing_emmc/Kconfig create mode 100644 uboot-imx/board/freescale/mx6ull_xing_emmc/MAINTAINERS create mode 100644 uboot-imx/board/freescale/mx6ull_xing_emmc/Makefile create mode 100644 uboot-imx/board/freescale/mx6ull_xing_emmc/imximage.cfg create mode 100644 uboot-imx/board/freescale/mx6ull_xing_emmc/imximage_lpddr2.cfg create mode 100644 uboot-imx/board/freescale/mx6ull_xing_emmc/mx6ull_xing_emmc.c create mode 100644 uboot-imx/board/freescale/mx6ull_xing_emmc/plugin.S create mode 100644 uboot-imx/configs/mx6ull_xing_emmc_defconfig create mode 100644 uboot-imx/include/configs/mx6ull_xing_emmc.h create mode 100644 uboot-imx/tools/boot/bootm.c create mode 100644 uboot-imx/tools/boot/fdt_region.c create mode 100644 uboot-imx/tools/boot/image-cipher.c create mode 100644 uboot-imx/tools/boot/image-fit-sig.c create mode 100644 uboot-imx/tools/boot/image-fit.c create mode 100644 uboot-imx/tools/boot/image-host.c create mode 100644 uboot-imx/tools/boot/image.cdiff --git a/uboot-imx/.binman_stamp b/uboot-imx/.binman_stampnew file mode 100644index 00000000..e69de29bdiff --git a/uboot-imx/arch/arm/mach-imx/mx6/Kconfig b/uboot-imx/arch/arm/mach-imx/mx6/Kconfigindex 8954278c..7e9cb8bf 100644--- a/uboot-imx/arch/arm/mach-imx/mx6/Kconfig+++ b/uboot-imx/arch/arm/mach-imx/mx6/Kconfig@@ -622,6 +622,16 @@ config TARGET_MX6ULL_14X14_EVK select OF_SYSTEM_SETUP imply CMD_DM +config TARGET_MX6ULL_XING_EMMC+bool "Support mx6ull_xing_emmc"+depends on MX6ULL+select BOARD_LATE_INIT+select DM+select DM_THERMAL+select IMX_MODULE_FUSE+select OF_SYSTEM_SETUP+imply CMD_DM+ config TARGET_MYS_6ULX bool "MYiR MYS-6ULX" depends on MX6ULL@@ -858,6 +868,7 @@ source "board/freescale/mx6sxsabreauto/Kconfig" source "board/freescale/mx6sx_17x17_val/Kconfig" source "board/freescale/mx6sx_19x19_val/Kconfig" source "board/freescale/mx6ul_14x14_evk/Kconfig"+source "board/freescale/mx6ull_xing_emmc/Kconfig" source "board/freescale/mx6ul_14x14_ddr3_val/Kconfig" source "board/freescale/mx6ul_14x14_lpddr2_val/Kconfig" source "board/freescale/mx6ullevk/Kconfig"diff --git a/uboot-imx/board/freescale/mx6ull_xing_emmc/Kconfig b/uboot-imx/board/freescale/mx6ull_xing_emmc/Kconfignew file mode 100644index 00000000..a21cef6c--- /dev/null+++ b/uboot-imx/board/freescale/mx6ull_xing_emmc/Kconfig@@ -0,0 +1,17 @@+if TARGET_MX6ULL_XING_EMMC++config SYS_BOARD+default "mx6ull_xing_emmc"++config SYS_VENDOR+default "freescale"++config SYS_CONFIG_NAME+default "mx6ull_xing_emmc"++config IMX_CONFIG+default "board/freescale/mx6ull_xing_emmc/imximage.cfg"++config SYS_TEXT_BASE+default 0x87800000+endifdiff --git a/uboot-imx/board/freescale/mx6ull_xing_emmc/MAINTAINERS b/uboot-imx/board/freescale/mx6ull_xing_emmc/MAINTAINERSnew file mode 100644index 00000000..352405c0--- /dev/null+++ b/uboot-imx/board/freescale/mx6ull_xing_emmc/MAINTAINERS@@ -0,0 +1,8 @@+MX6ULLEVK BOARD+M:Peng Xing +S:Maintained+F:board/freescale/mx6ull_xing_emmc/+F:include/configs/mx6ull_xing_emmc.h+F:configs/mx6ull_xing_emmc_defconfig+F:configs/mx6ull_14x14_evk_plugin_defconfig+F:configs/mx6ulz_14x14_evk_defconfigdiff --git a/uboot-imx/board/freescale/mx6ull_xing_emmc/Makefile b/uboot-imx/board/freescale/mx6ull_xing_emmc/Makefilenew file mode 100644index 00000000..438b1794--- /dev/null+++ b/uboot-imx/board/freescale/mx6ull_xing_emmc/Makefile@@ -0,0 +1,4 @@+# SPDX-License-Identifier: GPL-2.0++# (C) Copyright 2016 Freescale Semiconductor, Inc.++obj-y:= mx6ull_xing_emmc.odiff --git a/uboot-imx/board/freescale/mx6ull_xing_emmc/imximage.cfg b/uboot-imx/board/freescale/mx6ull_xing_emmc