目录
目录
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_defconfig configs/mx6ull_xing_emmc_defconfig
cp include/configs/mx6ullevk.h include/configs/mx6ull_xing_emmc.h
复制自己的板级文件夹
cd board/freescalecp -rf mx6ullevk mx6ull_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 2001
From: xingpeng89 <xingpeng8889@126.com>
Date: Thu, 15 Feb 2024 17:24:34 +0800
Subject: [PATCH] add mx6ull_xing_emmc board in uboot---uboot-imx/.binman_stamp | 0uboot-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_stampcreate mode 100644 uboot-imx/board/freescale/mx6ull_xing_emmc/Kconfigcreate mode 100644 uboot-imx/board/freescale/mx6ull_xing_emmc/MAINTAINERScreate mode 100644 uboot-imx/board/freescale/mx6ull_xing_emmc/Makefilecreate mode 100644 uboot-imx/board/freescale/mx6ull_xing_emmc/imximage.cfgcreate mode 100644 uboot-imx/board/freescale/mx6ull_xing_emmc/imximage_lpddr2.cfgcreate mode 100644 uboot-imx/board/freescale/mx6ull_xing_emmc/mx6ull_xing_emmc.ccreate mode 100644 uboot-imx/board/freescale/mx6ull_xing_emmc/plugin.Screate mode 100644 uboot-imx/configs/mx6ull_xing_emmc_defconfigcreate mode 100644 uboot-imx/include/configs/mx6ull_xing_emmc.hcreate mode 100644 uboot-imx/tools/boot/bootm.ccreate mode 100644 uboot-imx/tools/boot/fdt_region.ccreate mode 100644 uboot-imx/tools/boot/image-cipher.ccreate mode 100644 uboot-imx/tools/boot/image-fit-sig.ccreate mode 100644 uboot-imx/tools/boot/image-fit.ccreate mode 100644 uboot-imx/tools/boot/image-host.ccreate mode 100644 uboot-imx/tools/boot/image.cdiff --git a/uboot-imx/.binman_stamp b/uboot-imx/.binman_stamp
new file mode 100644
index 00000000..e69de29b
diff --git a/uboot-imx/arch/arm/mach-imx/mx6/Kconfig b/uboot-imx/arch/arm/mach-imx/mx6/Kconfig
index 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_EVKselect OF_SYSTEM_SETUPimply 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_6ULXbool "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/Kconfig
new file mode 100644
index 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
+endif
diff --git a/uboot-imx/board/freescale/mx6ull_xing_emmc/MAINTAINERS b/uboot-imx/board/freescale/mx6ull_xing_emmc/MAINTAINERS
new file mode 100644
index 00000000..352405c0
--- /dev/null
+++ b/uboot-imx/board/freescale/mx6ull_xing_emmc/MAINTAINERS
@@ -0,0 +1,8 @@
+MX6ULLEVK BOARD
+M: Peng Xing <peng.xing@quectel.com>
+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_defconfig
diff --git a/uboot-imx/board/freescale/mx6ull_xing_emmc/Makefile b/uboot-imx/board/freescale/mx6ull_xing_emmc/Makefile
new file mode 100644
index 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.o
diff --git a/uboot-imx/board/freescale/mx6ull_xing_emmc/imximage.cfg b/uboot-imx/board/freescale/mx6ull_xing_emmc