构建 imx6ull sd 卡启动

1. 硬件环境

imx6ull + 256MB tf 卡 + 512 MB 的 ddr;

ubuntu 20.04;

芯片默认的启动方式是通过 LCD_DATA0 ~ LCD_DATA23;上下拉方式来确认的;

需要注意的上下拉是 BOOT_CFG1[7] BOOT_CFG1[6] BOOT_CFG1[5] 启动选择 和 BOOT_CFG2[4] BOOT_CFG2[3] 端口选择

2. 交叉编译器与源码下载

交叉编译器去 arm 官网下载一个;

# 我选择的是 arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-linux-gnueabihf.tar.xz
# 下载网址见下
https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads

uboot 源码下载

# 在 https://www.nxp.com/docs/en/user-guide/IMX_LINUX_USERS_GUIDE.pdf 中提到了下载编译的方法
# 下载 uboot 源码,并切换到分支 lf_v2023.04
git clone https://github.com/nxp-imx/uboot-imx -b lf_v2023.04

linux kernel 源码下载

# 在 https://www.nxp.com/docs/en/user-guide/IMX_LINUX_USERS_GUIDE.pdf 中提到了下载编译的方法
# 下载 linux kernel 源码,并切换到分支 lf-6.6.y
git clone https://github.com/nxp-imx/linux-imx -b lf-6.6.y

3. 配置交叉编译器,并编译 uboot、内核

3.1 配置交叉编译器

在 uboot 同级目录建立一个 linux_imx6ull.sh,文件内容填写如下(按自己的路径配置)

#!/bin/bash

export ARCH=arm
export CROSS_COMPILE=arm-none-linux-gnueabihf-
export PATH=$PATH:/opt/work/sdk/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-linux-gnueabihf/bin

临时在当前终端生效交叉编译器,执行命令如下

source linux_imx6ull.sh

3.2 编译 uboot

# 进入 uboot-imx 源码后,执行以下命令
make mx6ull_14x14_evk_defconfig
make -j8

# 编译出的文件为 u-boot-dtb.imx
ls -alh u-boot-dtb.imx

直接编译的 uboot 在板子上跑出现了以下日志:

U-Boot 2023.04-dirty (Apr 29 2024 - 11:56:23 +0800)

CPU:   i.MX6ULL rev1.1 792 MHz (running at 396 MHz)
CPU:   Industrial temperature grade (-40C to 105C) at 39C
Reset cause: POR
Model: i.MX6 ULL 14x14 EVK Board
Board: MX6ULL 14x14 EVK
DRAM:  512 MiB
Core:  77 devices, 22 uclasses, devicetree: separate
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... MMC: no card present
*** Warning - No block device, using default environment

[*]-Video Link 0 (480 x 272)
	[0] lcdif@21c8000, video
In:    serial
Out:   serial
Err:   serial
MMC: no card present
flash target is MMC:0
MMC: no card present
MMC card init failed!
MMC: no card present
** Block device MMC 0 not supported
Net:   Could not get PHY for FEC1: addr 1
Could not get PHY for FEC1: addr 1
Get shared mii bus on ethernet@2188000

Error: ethernet@2188000 address not set.
data abort
pc : [<9ee90f7e>]	   lr : [<9ee9d941>]
reloc pc : [<87819f7e>]	   lr : [<87826941>]
sp : 9de6c210  ip : 9de766c2	 fp : 00000017
r10: 878009a0  r9 : 9de74eb0	 r8 : 00000100
r7 : 9eeef754  r6 : 9de78ac0	 r5 : 00002588  r4 : 9eeef74c
r3 : 60c72453  r2 : 00000000	 r1 : 3d20666d  r0 : 3d20656d
Flags: nzCV  IRQs off  FIQs off  Mode SVC_32 (T)
Code: f104 0708 1a1b 4401 (6898) 42b8 
Resetting CPU ...

resetting ...

于是我执行 make menuconfig,将 net 支持取消;

一级菜单
[ ] Networking support  ----

再次编译刻录,uboot 没有崩溃,日志信息如下:

U-Boot 2023.04-dirty (Apr 29 2024 - 13:25:43 +0800)

CPU:   i.MX6ULL rev1.1 792 MHz (running at 396 MHz)
CPU:   Industrial temperature grade (-40C to 105C) at 38C
Reset cause: POR
Model: i.MX6 ULL 14x14 EVK Board
Board: MX6ULL 14x14 EVK
DRAM:  512 MiB
Core:  71 devices, 20 uclasses, devicetree: separate
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... MMC: no card present
*** Warning - No block device, using default environment

[*]-Video Link 0 (480 x 272)
	[0] lcdif@21c8000, video
In:    serial
Out:   serial
Err:   serial
MMC: no card present
flash target is MMC:0
MMC: no card present
MMC card init failed!
MMC: no card present
** Block device MMC 0 not supported
Fastboot: Normal
Normal Boot
Hit any key to stop autoboot:  0 
MMC: no card present
MMC: no card present
MMC: no card present
Booting from net ...
Unknown command 'dhcp' - try 'help'
Unknown command 'dhcp' - try 'help'
zimage: Bad magic!
=>

不知道是我买的 tf 卡质量差还是什么,在 uboot 阶段总是读取不到 tf 卡中的文件;

于是我修改了 dts 文件,修改如下:

diff --git a/arch/arm/dts/imx6ul-14x14-evk.dtsi b/arch/arm/dts/imx6ul-14x14-evk.dtsi
index e23d9f40ed..fe92d44745 100644
--- a/arch/arm/dts/imx6ul-14x14-evk.dtsi
+++ b/arch/arm/dts/imx6ul-14x14-evk.dtsi
@@ -21,8 +21,6 @@
                regulator-name = "VSD_3V3";
                regulator-min-microvolt = <3300000>;
                regulator-max-microvolt = <3300000>;
-               gpio = <&gpio1 9 GPIO_ACTIVE_HIGH>;
-               off-on-delay-us = <20000>;
                enable-active-high;
        };
 
@@ -351,7 +349,7 @@
        xnur-gpio = <&gpio1 3 GPIO_ACTIVE_LOW>;
        measure-delay-time = <0xffff>;
        pre-charge-time = <0xfff>;
-       status = "okay";
+       status = "disabled";
 };
 
 &uart1 {
@@ -392,11 +390,13 @@
 };
 };
 
 &uart1 {
@@ -392,11 +390,13 @@
 };
 
 &usdhc1 {
-       pinctrl-names = "default", "state_100mhz", "state_200mhz";
-       pinctrl-0 = <&pinctrl_usdhc1>;
-       pinctrl-1 = <&pinctrl_usdhc1_100mhz>;
-       pinctrl-2 = <&pinctrl_usdhc1_200mhz>;
-       cd-gpios = <&gpio1 19 GPIO_ACTIVE_LOW>;
+       //pinctrl-names = "default", "state_100mhz", "state_200mhz";
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc1_200mhz>;
+       //pinctrl-1 = <&pinctrl_usdhc1_100mhz>;
+       //pinctrl-2 = <&pinctrl_usdhc1_200mhz>;
+       cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
+       no-1-8-v;
        keep-power-in-suspend;
        wakeup-source;
        vmmc-supply = <&reg_sd1_vmmc>;
@@ -598,7 +598,6 @@
                        MX6UL_PAD_GPIO1_IO01__GPIO1_IO01                0xb0
                        MX6UL_PAD_GPIO1_IO02__GPIO1_IO02                0xb0
                        MX6UL_PAD_GPIO1_IO03__GPIO1_IO03                0xb0
-                       MX6UL_PAD_GPIO1_IO04__GPIO1_IO04                0xb0
                >;
        };
 
@@ -641,9 +640,8 @@
                        MX6UL_PAD_SD1_DATA1__USDHC1_DATA1       0x17059
                        MX6UL_PAD_SD1_DATA2__USDHC1_DATA2       0x17059
                        MX6UL_PAD_SD1_DATA3__USDHC1_DATA3       0x17059
-                       MX6UL_PAD_UART1_RTS_B__GPIO1_IO19       0x17059 /* SD1 CD */
+                       MX6UL_PAD_GPIO1_IO04__GPIO1_IO04        0x17059 /* SD1 CD */
                        MX6UL_PAD_GPIO1_IO05__USDHC1_VSELECT    0x17059 /* SD1 VSELECT */
-                       MX6UL_PAD_GPIO1_IO09__GPIO1_IO09        0x17059 /* SD1 RESET */
                >;
        };
 
@@ -667,6 +665,8 @@
                        MX6UL_PAD_SD1_DATA1__USDHC1_DATA1 0x170f9
                        MX6UL_PAD_SD1_DATA2__USDHC1_DATA2 0x170f9
                        MX6UL_PAD_SD1_DATA3__USDHC1_DATA3 0x170f9
+                       MX6UL_PAD_GPIO1_IO04__GPIO1_IO04                0x17059 /* SD1 CD */
+                       MX6UL_PAD_GPIO1_IO05__USDHC1_VSELECT    0x17059 /* SD1 VSELECT */
                >;
        };

3.3 将 uboot 写入 tf 卡

利用 shell 脚本来快速写入,新建一个命令为 mksdboot.sh 的脚本,给于执行权限;

将 uboot 编译出的文件 u-boot-dtb.imx 和 mksdboot.sh 放入同级目录,执行以下命令就能将 uboot 刻录到 tf 卡;

对于 imx6ull seek 为 1k;这个在 IMX_LINUX_USERS_GUIDE.pdf 中有提到;

sudo ./mksdboot.sh

虚拟机版本如下:

#!/bin/bash

# Determine the absolute path to the executable
# EXE will have the PWD removed so we can concatenate with the PWD safely
PWD=`pwd`
EXE=`echo $0 | sed s=$PWD==`
EXEPATH="$PWD"/"$EXE"
clear
cat << EOM

################################################################################

This script will create a bootable SD card from custom or pre-built binaries.

The script must be run with root permissions and from the bin directory of
the SDK

Example:
 $ sudo ./mksdboot.sh

Formatting can be skipped if the SD card is already formatted and
partitioned properly.

################################################################################

EOM

AMIROOT=`whoami | awk {'print $1'}`
if [ "$AMIROOT" != "root" ] ; then

	echo "	**** Error *** must run script with sudo"
	echo ""
	exit
fi

# find the avaible SD cards
echo " "
echo "Availible Drives to write images to: "
echo " "
ROOTDRIVE=`mount | grep 'on / ' | awk {'print $1'} |  cut -c6-8`
echo "#  major   minor    size   name "
cat /proc/partitions | grep -v $ROOTDRIVE | grep '\<sd.\>' | grep -n ''
echo " "

ENTERCORRECTLY=0
while [ $ENTERCORRECTLY -ne 1 ]
do
	read -p 'Enter Device Number: ' DEVICEDRIVENUMBER
	echo " "
	DEVICEDRIVENAME=`cat /proc/partitions | grep -v 'sda' | grep '\<sd.\>' | grep -n '' | grep "${DEVICEDRIVENUMBER}:" | awk '{print $5}'`
	echo "$DEVICEDRIVENAME"


	DRIVE=/dev/$DEVICEDRIVENAME
	DEVICESIZE=`cat /proc/partitions  | grep -v 'sda' | grep '\<sd.\>' | grep -n '' | grep "${DEVICEDRIVENUMBER}:" | awk '{print $4}'`


	if [ -n "$DEVICEDRIVENAME" ]
	then
		ENTERCORRECTLY=1
	else
		echo "Invalid selection"
	fi

	echo ""
done

echo "$DEVICEDRIVENAME was selected"
#Check the size of disk to make sure its under 16GB
if [ $DEVICESIZE -gt 17000000 ] ; then
cat << EOM

################################################################################

		**********WARNING**********

	Selected Device is greater then 16GB
	Continuing past this point will erase data from device
	Double check that this is the correct SD Card

################################################################################

EOM
	ENTERCORRECTLY=0
	while [ $ENTERCORRECTLY -ne 1 ]
	do
		read -p 'Would you like to continue [y/n] : ' SIZECHECK
		echo ""
		echo " "
		ENTERCORRECTLY=1
		case $SIZECHECK in
		"y")  ;;
		"n")  exit;;
		*)  echo "Please enter y or n";ENTERCORRECTLY=0;;
		esac
		echo ""
	done

fi

echo ""

DRIVE=/dev/$DEVICEDRIVENAME

echo "Checking the device is unmounted"
for i in `ls -1 $DRIVE?`; do
	echo "unmounting device '$i'"
	umount $i 2>/dev/null
done

ENTERCORRECTLY=0
while [ $ENTERCORRECTLY -ne 1 ]
do
	read -p 'Would you like to re-partition the drive anyways [y/n] : ' CASEPARTITION
	echo ""
	echo " "
	ENTERCORRECTLY=1
	case $CASEPARTITION in
	"y")  echo "Now partitioning $DEVICEDRIVENAME ...";PARTITION=0;;
	"n")  echo "Abort partitioning";
			exit ;;
	*)  echo "Please enter y or n";ENTERCORRECTLY=0;;
	esac
	echo ""
done

PARTITION=1

if [ "$PARTITION" -eq "1" ]
then

# Set the PARTS value as well
PARTS=1
cat << EOM

################################################################################

		Now making 1 partitions

################################################################################

EOM

dd if=/dev/zero of=$DRIVE bs=1024 count=1024
sync

SIZE=`fdisk -l $DRIVE | grep Disk | awk '{print $5}'`

echo DISK SIZE - $SIZE bytes

CYLINDERS=`echo $SIZE/255/63/512 | bc`

fdisk $DRIVE << EOF
n
p
1
16384

t
b
w
EOF

cat << EOM

################################################################################

		Partitioning Boot

################################################################################
EOM
	mkfs.vfat -F 32 -n "boot" ${DRIVE}1
fi

echo "Buring the u-boot-dtb.imx to sdcard"
if [ -e u-boot-dtb.imx ]
then
	dd if=u-boot-dtb.imx of=${DRIVE} bs=1K seek=1 conv=fsync
fi

echo ""
echo "Syncing...."
echo ""
sync

sleep 1

for i in `ls -1 $DRIVE?`; do
	echo "unmounting device '$i'"
	umount $i 2>/dev/null
done

echo "Make update sd card success!"

非虚拟机版本如下(慎用):

#!/bin/bash

# Determine the absolute path to the executable
# EXE will have the PWD removed so we can concatenate with the PWD safely
PWD=`pwd`
EXE=`echo $0 | sed s=$PWD==`
EXEPATH="$PWD"/"$EXE"
clear
cat << EOM

################################################################################

This script will create a bootable SD card from custom or pre-built binaries.

The script must be run with root permissions and from the bin directory of
the SDK

Example:
 $ sudo ./mksdboot.sh

Formatting can be skipped if the SD card is already formatted and
partitioned properly.

################################################################################

EOM

AMIROOT=`whoami | awk {'print $1'}`
if [ "$AMIROOT" != "root" ] ; then

	echo "	**** Error *** must run script with sudo"
	echo ""
	exit
fi

# find the avaible SD cards
echo " "
echo "Availible Drives to write images to: "
echo " "
ROOTDRIVE=`mount | grep 'on / ' | awk {'print $1'} |  cut -c6-8`
echo "#  major   minor    size   name "
cat /proc/partitions | grep -v $ROOTDRIVE | grep '\<sd.\>' | grep -n ''
echo " "

ENTERCORRECTLY=0
while [ $ENTERCORRECTLY -ne 1 ]
do
	read -p 'Enter Device Number: ' DEVICEDRIVENUMBER
	echo " "
	DEVICEDRIVENAME=`cat /proc/partitions | grep '\<sd.\>' | grep -n '' | grep "${DEVICEDRIVENUMBER}:" | awk '{print $5}'`
	echo "$DEVICEDRIVENAME"


	DRIVE=/dev/$DEVICEDRIVENAME
	DEVICESIZE=`cat /proc/partitions | grep '\<sd.\>' | grep -n '' | grep "${DEVICEDRIVENUMBER}:" | awk '{print $4}'`


	if [ -n "$DEVICEDRIVENAME" ]
	then
		ENTERCORRECTLY=1
	else
		echo "Invalid selection"
	fi

	echo ""
done

echo "$DEVICEDRIVENAME was selected"
#Check the size of disk to make sure its under 16GB
if [ $DEVICESIZE -gt 17000000 ] ; then
cat << EOM

################################################################################

		**********WARNING**********

	Selected Device is greater then 16GB
	Continuing past this point will erase data from device
	Double check that this is the correct SD Card

################################################################################

EOM
	ENTERCORRECTLY=0
	while [ $ENTERCORRECTLY -ne 1 ]
	do
		read -p 'Would you like to continue [y/n] : ' SIZECHECK
		echo ""
		echo " "
		ENTERCORRECTLY=1
		case $SIZECHECK in
		"y")  ;;
		"n")  exit;;
		*)  echo "Please enter y or n";ENTERCORRECTLY=0;;
		esac
		echo ""
	done

fi

echo ""

DRIVE=/dev/$DEVICEDRIVENAME

echo "Checking the device is unmounted"
for i in `ls -1 $DRIVE?`; do
	echo "unmounting device '$i'"
	umount $i 2>/dev/null
done

ENTERCORRECTLY=0
while [ $ENTERCORRECTLY -ne 1 ]
do
	read -p 'Would you like to re-partition the drive anyways [y/n] : ' CASEPARTITION
	echo ""
	echo " "
	ENTERCORRECTLY=1
	case $CASEPARTITION in
	"y")  echo "Now partitioning $DEVICEDRIVENAME ...";PARTITION=0;;
	"n")  echo "Abort partitioning";
			exit ;;
	*)  echo "Please enter y or n";ENTERCORRECTLY=0;;
	esac
	echo ""
done

PARTITION=1

if [ "$PARTITION" -eq "1" ]
then

# Set the PARTS value as well
PARTS=1
cat << EOM

################################################################################

		Now making 1 partitions

################################################################################

EOM

dd if=/dev/zero of=$DRIVE bs=1024 count=1024
sync

SIZE=`fdisk -l $DRIVE | grep Disk | awk '{print $5}'`

echo DISK SIZE - $SIZE bytes

CYLINDERS=`echo $SIZE/255/63/512 | bc`

fdisk $DRIVE << EOF
n
p
1
16384

t
b
w
EOF

cat << EOM

################################################################################

		Partitioning Boot

################################################################################
EOM
	mkfs.vfat -F 32 -n "boot" ${DRIVE}1
fi

echo "Buring the u-boot-dtb.imx to sdcard"
if [ -e u-boot-dtb.imx ]
then
	dd if=u-boot-dtb.imx of=${DRIVE} bs=1K seek=1 conv=fsync
fi

echo ""
echo "Syncing...."
echo ""
sync

sleep 1

for i in `ls -1 $DRIVE?`; do
	echo "unmounting device '$i'"
	umount $i 2>/dev/null
done

echo "Make update sd card success!"

3.4 编译 kernel

# 进入 linux-imx 源码后,执行以下命令
make imx_v7_defconfig
make zImage -j8
make dtbs

# 编译出的文件为 zImage
ls -alh arch/arm/boot/zImage
ls -alh arch/arm/boot/dts/nxp/imx/imx6ull-14x14-evk.dtb

# 将编译出的两个文件拷贝到 tf 卡分区 1 中,也就是默认分区中
zImage imx6ull-14x14-evk.dtb


# 快速拷贝文件
sudo mount -t vfat  /dev/sda1 /media/liangtao/
sudo cp arch/arm/boot/zImage /media/liangtao/
sudo cp arch/arm/boot/dts/nxp/imx/imx6ull-14x14-evk.dtb /media/liangtao/

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

3.5 调试 uboot 加载内核

## 在 uboot 常用命令如下
# 列举出 Host Controller 的个数
mmc list

# 列举出 sd 卡的信息
mmc info

# 切换到 mmc 设备 0
mmc dev 0

# 切换到 mmc 设备 1
mmc dev 1

# 重新扫描 mmc 设备
mmc rescan

# 列举出 mmc 设备 0 中的分区 1 的文件信息(fat 格式的分区)
fatls mmc 0:1

# 查看 uboot 的环境变量
print

# 查看 loadaddr 变量的值
print loadaddr

# 将 mmc 设备 0 中的分区 1 的 zImage 加载到 0x80800000 处(fat 格式的分区)
fatload mmc 0:1 0x80800000 zImage

# 将 mmc 设备 0 中的分区 1 的 imx6ull-14x14-evk.dtb 加载到 0x83000000 处(fat 格式的分区)
fatload mmc 0:1 0x83000000 imx6ull-14x14-evk.dtb

# 默认会自动加载设备 0 中的分区 1 的文件到 RAM 中的;
# 如果设备信息不一致,可以在以下文件中查找修改
uboot-imx/include/configs/mx6ullevk.h

# 0x80800000、0x83000000 是 uboot 中人为指定的;
# ram 空间范围可以见 imx6ull 芯片手册中的内存划分部分;

设备默认加载内核,启动信息如下:

U-Boot 2023.04-dirty (Apr 29 2024 - 17:51:02 +0800)

CPU:   i.MX6ULL rev1.1 792 MHz (running at 396 MHz)
CPU:   Industrial temperature grade (-40C to 105C) at 56C
Reset cause: POR
Model: i.MX6 ULL 14x14 EVK Board
Board: MX6ULL 14x14 EVK
DRAM:  512 MiB
Core:  71 devices, 20 uclasses, devicetree: separate
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... *** Warning - bad CRC, using default environment

[*]-Video Link 0 (480 x 272)
	[0] lcdif@21c8000, video
In:    serial
Out:   serial
Err:   serial
switch to partitions #0, OK
mmc0 is current device
flash target is MMC:0
Fastboot: Normal
Normal Boot
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc0 is current device
switch to partitions #0, OK
mmc0 is current device
Failed to load 'boot.scr'
9447888 bytes read in 553 ms (16.3 MiB/s)
Booting from mmc ...
45482 bytes read in 7 ms (6.2 MiB/s)
Kernel image @ 0x80800000 [ 0x000000 - 0x9029d0 ]
## Flattened Device Tree blob at 83000000
   Booting using the fdt blob at 0x83000000
Working FDT set to 83000000
   Using Device Tree in place at 83000000, end 8300e1a9
Working FDT set to 83000000
Modify /soc/bus@2200000/epdc@228c000 disabled

Starting kernel ...
.......
[    0.000000] Kernel command line: console=ttymxc0,115200 root=/dev/mmcblk0p2 rootwait rw
.......
[    3.490949] Loading compiled-in X.509 certificates
[    3.546142] imx_thermal 20c8000.anatop:tempmon: Industrial CPU temperature grade - max:105C critical:100C passive:95C
[    3.569584] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    3.581876] Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    3.587791] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    3.596546] clk: Disabling unused clocks
[    3.600882] ALSA device list:
[    3.603874]   No soundcards found.
[    3.607827] Waiting for root device /dev/mmcblk0p2...
[    3.613104] platform regulatory.0: Falling back to sysfs fallback for: regulatory.db
[   13.932900] platform sound-wm8960: deferred probe pending

如果想要启动完成,需要在 tf 卡的分区 2 中放入文件系统,分区 2 需要为 ext4 或 ext3 格式的文件系统。

4. 制作 ramdisk

# 参考博客:
https://blog.csdn.net/weixin_42262944/article/details/103284614

4.1 配置内核支持 ramdisk

# 内核默认支持了 ramdisk
Device Drivers  --->
	[*] Block devices  --->
		(16)    Default number of RAM disks
		(65536) Default RAM disk size (kbytes)

# 将其修改为如下,使用 1 个 ram 块设备,4MB 的 ram 空间
Device Drivers  --->
	[*] Block devices  --->
		(1)    Default number of RAM disks
		(4096) Default RAM disk size (kbytes)

# 配置完成后,重新编译,更新 zImage 文件到 tf 卡中
make zImage -j8

4.2 编译 busybox

# 下载 busybox 源码
wget https://busybox.net/downloads/busybox-1.36.1.tar.bz2

# 解压
tar -xvf busybox-1.36.1.tar.bz2

# 进入 busybox 目录
cd busybox-1.36.1

# 使用默认配置
make menuconfig

# 配置静态编译、交叉编译器前缀、安装路径;
Settings  --->
	[*] Build static binary (no shared libs)
	(arm-none-linux-gnueabihf-) Cross compiler prefix
	(../ramdisk) Destination path for 'make install'

# 在配置了交叉编译器的前提下
make -j8

# 安装 busybox 文件
make install

# 进入安装目录,创建一些必须的配置文件
cd ../ramdiskfs/
mkdir -p mnt tmp var usr sys proc etc lib dev bin sbin root home
mkdir -p usr/lib lib/modules

# 创建设备节点,一个 console,一个 null
cd dev/
sudo mknod -m 666 console c 5 1
sudo mknod -m 666 null c 1 3
cd ../

# 复制 busybox 中的 examples/bootfloppy/etc 的文件
cp ../busybox-1.36.1/examples/bootfloppy/etc ./ -a

# 修改文件的用户与用户组为 root
sudo chown root:root -R *

4.3 制作 ramdisk.img.gz

# 在 ramdisk 同级目录执行以下命令
sudo dd if=/dev/zero of=ramdisk.img bs=1K count=4096 conv=fsync
sudo mkfs.ext4 -i 4096 ramdisk.img -d ramdisk
sudo fsck.ext4 -pvf ramdisk.img
gzip -9 -f ramdisk.img

5. 修改 uboot,使其启动 ramdisk.img.gz

将 ramdisk.img.gz 拷贝到 tf 卡中;

5.1 在 uboot 临时启动

# 在 uboot 命令行中执行以下命令

# 读取 tf 卡分区 1 中的 zImage 文件(分区为 fat32 格式)
fatload mmc 0:1 0x80800000 zImage

# 读取 tf 卡分区 1 中的 ramdisk.img.gz 文件(分区为 fat32 格式)
fatload mmc 0:1 0x84000000 ramdisk.img.gz

# 读取 tf 卡分区 1 中的 imx6ull-14x14-evk.dtb 文件(分区为 fat32 格式)
fatload mmc 0:1 0x85000000 imx6ull-14x14-evk.dtb

# 设置给内核的传参:调试串口为 ttymxc0,波特率为 115200;文件系统设备为 /dev/ram0;读写;initramfs 地址为 0x84000000,大小为 4MB;init 应用为 linuxrc;文件系统类型为 ext4,;等待 rootfs 挂载
setenv bootargs 'console=ttymxc0,115200 root=/dev/ram0 rw initrd=0x84000000,0x400000 init=/linuxrc rootfstype=ext4 rootwait'

# 启动内核
bootz 80800000 - 85000000

在 imx6ull 手册中可知 ram 空间从 0x8000000 开始;

0x80800000:内核加载地址,随意定的;

0x84000000:ramdisk.img.gz 加载地址,随意定的;要给 zImage 文件留足解压空间;

0x85000000:imx6ull-14x14-evk.dtb 加载地址,随意定的;要给 ramdisk.img.gz 留足解压空间;

完整的启动日志如下:

U-Boot 2023.04-dirty (Apr 29 2024 - 17:51:02 +0800)

CPU:   i.MX6ULL rev1.1 792 MHz (running at 396 MHz)
CPU:   Industrial temperature grade (-40C to 105C) at 49C
Reset cause: POR
Model: i.MX6 ULL 14x14 EVK Board
Board: MX6ULL 14x14 EVK
DRAM:  512 MiB
Core:  71 devices, 20 uclasses, devicetree: separate
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... *** Warning - bad CRC, using default environment

[*]-Video Link 0 (480 x 272)
	[0] lcdif@21c8000, video
In:    serial
Out:   serial
Err:   serial
switch to partitions #0, OK
mmc0 is current device
flash target is MMC:0
Fastboot: Normal
Normal Boot
Hit any key to stop autoboot:  0 
=> fatload mmc 0:1 0x80800000 zImage
9447888 bytes read in 557 ms (16.2 MiB/s)
=> fatload mmc 0:1 0x84000000 ramdisk.img.gz
995096 bytes read in 60 ms (15.8 MiB/s)
=> fatload mmc 0:1 0x85000000 imx6ull-14x14-evk.dtb
45482 bytes read in 5 ms (8.7 MiB/s)
=> setenv bootargs 'console=ttymxc0,115200 root=/dev/ram0 rw initrd=0x84000000,0x400000 init=/linuxrc rootfstype=ext4 rootwait'
=> bootz 80800000 - 85000000
Kernel image @ 0x80800000 [ 0x000000 - 0x9029d0 ]
## Flattened Device Tree blob at 85000000
   Booting using the fdt blob at 0x85000000
Working FDT set to 85000000
   Using Device Tree in place at 85000000, end 8500e1a9
Working FDT set to 85000000
Modify /soc/bus@2200000/epdc@228c000 disabled

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 6.6.3-gccf0a99701a7 (liangtao@RedmiBook) (arm-none-linux-gnueabihf-gcc (Arm GNU Toolchain 13.2.rel1 (Build arm-13.7)) 13.2.1 20231009, GNU ld (Arm GNU Toolchain 13.2.rel1 (Build arm-13.7)) 2.41.0.20231009) #4 SMP PREEMPT Mon May  6 09:18:08 CST 2024
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Freescale i.MX6 ULL 14x14 EVK Board
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] Reserved memory: created CMA memory pool at 0x96000000, size 160 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] OF: reserved mem: 0x96000000..0x9fffffff (163840 KiB) map reusable linux,cma
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000080000000-0x000000009fffffff]
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000080000000-0x000000009fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x000000009fffffff]
[    0.000000] percpu: Embedded 12 pages/cpu s18900 r8192 d22060 u49152
[    0.000000] Kernel command line: console=ttymxc0,115200 root=/dev/ram0 rw initrd=0x84000000,0x400000 init=/linuxrc rootfstype=ext4 rootwait
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 129920
[    0.000000] mem auto-init: stack:all(zero), heap alloc:off, heap free:off
[    0.000000] Memory: 328504K/524288K available (14336K kernel code, 1378K rwdata, 4508K rodata, 1024K init, 425K bss, 31944K reserved, 163840K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu: 	RCU event tracing is enabled.
[    0.000000] rcu: 	RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
[    0.000000] 	Trampoline variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] Switching to timer-based delay loop, resolution 41ns
[    0.000003] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000041] clocksource: mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.003389] Console: colour dummy device 80x30
[    0.003485] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.003523] CPU: Testing write buffer coherency: ok
[    0.003627] pid_max: default: 32768 minimum: 301
[    0.004057] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.004107] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.006297] CPU0: update cpu_capacity 1024
[    0.006340] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.009762] RCU Tasks: Setting shift to 0 and lim to 1 rcu_task_cb_adjust=1.
[    0.010317] Setting up static identity map for 0x80100000 - 0x80100060
[    0.010855] rcu: Hierarchical SRCU implementation.
[    0.010878] rcu: 	Max phase no-delay instances is 1000.
[    0.012437] smp: Bringing up secondary CPUs ...
[    0.012505] smp: Brought up 1 node, 1 CPU
[    0.012534] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[    0.012557] CPU: All CPU(s) started in SVC mode.
[    0.013863] devtmpfs: initialized
[    0.034658] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.035402] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.035458] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
[    0.047699] pinctrl core: initialized pinctrl subsystem
[    0.052756] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.070772] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.074297] thermal_sys: Registered thermal governor 'step_wise'
[    0.074519] cpuidle: using governor menu
[    0.075064] CPU identified as i.MX6ULL, silicon rev 1.1
[    0.091608] platform soc: Fixed dependency cycle(s) with /soc/bus@2000000/gpc@20dc000
[    0.137847] failed to find ocotp node
[    0.138308] failed to find ocotp node
[    0.138768] No ATAGs?
[    0.138902] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.138931] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.142268] imx6ul-pinctrl 20e0000.pinctrl: initialized IMX pinctrl driver
[    0.146970] imx6ul-pinctrl 2290000.iomuxc-snvs: no groups defined in /soc/bus@2200000/iomuxc-snvs@2290000
[    0.147048] imx6ul-pinctrl 2290000.iomuxc-snvs: initialized IMX pinctrl driver
[    0.150578] imx mu driver is registered.
[    0.151748] imx rpmsg driver is registered.
[    0.155318] kprobes: kprobe jump-optimization is enabled. All kprobes are optimized if possible.
[    0.159751] gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    0.165456] gpio gpiochip1: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    0.171073] gpio gpiochip2: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    0.176766] gpio gpiochip3: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    0.182587] gpio gpiochip4: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    0.196572] SCSI subsystem initialized
[    0.198092] usbcore: registered new interface driver usbfs
[    0.198205] usbcore: registered new interface driver hub
[    0.198332] usbcore: registered new device driver usb
[    0.203795] i2c i2c-0: IMX I2C adapter registered
[    0.207608] i2c 1-003c: Fixed dependency cycle(s) with /soc/bus@2100000/csi@21c4000/port/endpoint
[    0.207895] i2c i2c-1: IMX I2C adapter registered
[    0.209019] mc: Linux media interface: v0.10
[    0.209227] videodev: Linux video capture interface: v2.00
[    0.209443] pps_core: LinuxPPS API ver. 1 registered
[    0.209460] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.209516] PTP clock support registered
[    0.214168] MIPI CSI2 driver module loaded
[    0.214335] Advanced Linux Sound Architecture Driver Initialized.
[    0.216842] Bluetooth: Core ver 2.22
[    0.216985] NET: Registered PF_BLUETOOTH protocol family
[    0.217004] Bluetooth: HCI device and connection manager initialized
[    0.217037] Bluetooth: HCI socket layer initialized
[    0.217058] Bluetooth: L2CAP socket layer initialized
[    0.217108] Bluetooth: SCO socket layer initialized
[    0.218145] vgaarb: loaded
[    0.219481] clocksource: Switched to clocksource mxc_timer1
[    0.220168] VFS: Disk quotas dquot_6.6.0
[    0.220293] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.252636] NET: Registered PF_INET protocol family
[    0.253295] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.257301] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.257390] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.257448] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.257557] TCP bind hash table entries: 4096 (order: 4, 65536 bytes, linear)
[    0.257824] TCP: Hash tables configured (established 4096 bind 4096)
[    0.258041] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.258123] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.258550] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.260189] RPC: Registered named UNIX socket transport module.
[    0.260226] RPC: Registered udp transport module.
[    0.260239] RPC: Registered tcp transport module.
[    0.260251] RPC: Registered tcp-with-tls transport module.
[    0.260263] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.264162] PCI: CLS 0 bytes, default 64
[    0.264773] Trying to unpack rootfs image as initramfs...
[    0.267828] rootfs image is not initramfs (no cpio magic); looks like an initrd
[    0.270857] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available
[    0.275532] Bus freq driver module loaded
[    0.278291] Initialise system trusted keyrings
[    0.290235] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[    0.292242] NFS: Registering the id_resolver key type
[    0.292420] Key type id_resolver registered
[    0.292439] Key type id_legacy registered
[    0.292549] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.292572] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    0.292679] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    0.293578] fuse: init (API version 7.39)
[    0.342652] Freeing initrd memory: 4096K
[    0.755153] Key type asymmetric registered
[    0.755188] Asymmetric key parser 'x509' registered
[    0.755377] io scheduler mq-deadline registered
[    0.755401] io scheduler kyber registered
[    0.755468] io scheduler bfq registered
[    0.777613] mxsfb 21c8000.lcdif: supply lcd not found, using dummy regulator
[    0.891229] sii902x bound to mxs-lcdif from 21c8000.lcdif
[    0.894267] Console: switching to colour frame buffer device 60x34
[    0.993064] mxsfb 21c8000.lcdif: initialized
[    1.006086] imx-sdma 20ec000.dma-controller: Direct firmware load for imx/sdma/sdma-imx6q.bin failed with error -2
[    1.006136] imx-sdma 20ec000.dma-controller: Falling back to sysfs fallback for: imx/sdma/sdma-imx6q.bin
[    1.011239] mxs-dma 1804000.dma-controller: initialized
[    1.022881] 2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 201, base_baud = 5000000) is a IMX
[    1.023036] printk: console [ttymxc0] enabled
[    1.942258] 21e8000.serial: ttymxc1 at MMIO 0x21e8000 (irq = 202, base_baud = 5000000) is a IMX
[    1.951801] serial serial0: tty port ttymxc1 registered
[    1.993104] random: crng init done
[    1.996625] imx_rngc 2284000.rng: Freescale RNGB registered (HW revision 2.129)
[    2.005186] imx sema4 driver is registered.
[    2.022240] brd: module loaded
[    2.042006] loop: module loaded
[    2.058289] spi-nor spi4.0: unrecognized JEDEC id bytes: ff ff ff ff ff ff
[    2.076659] tun: Universal TUN/TAP device driver, 1.6
[    2.082517] CAN device driver interface
[    2.092755] pps pps0: new PPS source ptp0
[    2.103930] fec 20b4000.ethernet: Invalid MAC address: 00:00:00:00:00:00
[    2.110957] fec 20b4000.ethernet: Using random MAC address: 8a:96:4b:4d:cc:2f
[    2.126803] fec 20b4000.ethernet eth0: registered PHC device 0
[    2.136814] pps pps1: new PPS source ptp1
[    2.148139] fec 2188000.ethernet: Invalid MAC address: 00:00:00:00:00:00
[    2.155332] fec 2188000.ethernet: Using random MAC address: ee:cd:f8:9c:7a:e7
[    2.165102] fec 2188000.ethernet eth1: registered PHC device 1
[    2.171855] e1000e: Intel(R) PRO/1000 Network Driver
[    2.176858] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[    2.183952] usbcore: registered new device driver r8152-cfgselector
[    2.190476] usbcore: registered new interface driver r8152
[    2.196110] usbcore: registered new interface driver lan78xx
[    2.201963] usbcore: registered new interface driver asix
[    2.207482] usbcore: registered new interface driver ax88179_178a
[    2.213751] usbcore: registered new interface driver cdc_ether
[    2.219756] usbcore: registered new interface driver smsc95xx
[    2.225621] usbcore: registered new interface driver net1080
[    2.231510] usbcore: registered new interface driver cdc_subset
[    2.237552] usbcore: registered new interface driver zaurus
[    2.243322] usbcore: registered new interface driver MOSCHIP usb-ethernet driver
[    2.251059] usbcore: registered new interface driver cdc_ncm
[    2.256843] usbcore: registered new interface driver r8153_ecm
[    2.263125] usbcore: registered new interface driver usb-storage
[    2.273702] imx_usb 2184000.usb: No over current polarity defined
[    2.896391] mxs_phy 20c9000.usbphy: Data pin can't make good contact.
[    2.909039] ci_hdrc ci_hdrc.1: EHCI Host Controller
[    2.914166] ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 1
[    2.959523] ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00
[    2.965524] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.06
[    2.973926] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.981341] usb usb1: Product: EHCI Host Controller
[    2.986257] usb usb1: Manufacturer: Linux 6.6.3-gccf0a99701a7 ehci_hcd
[    2.992864] usb usb1: SerialNumber: ci_hdrc.1
[    2.999066] hub 1-0:1.0: USB hub found
[    3.003156] hub 1-0:1.0: 1 port detected
[    3.013451] input: 20cc000.snvs:snvs-powerkey as /devices/platform/soc/2000000.bus/20cc000.snvs/20cc000.snvs:snvs-powerkey/input/input0
[    3.027530] SPI driver ads7846 has no spi_device_id for ti,tsc2046
[    3.035200] SPI driver ads7846 has no spi_device_id for ti,ads7843
[    3.041588] SPI driver ads7846 has no spi_device_id for ti,ads7845
[    3.047805] SPI driver ads7846 has no spi_device_id for ti,ads7873
[    3.057874] input: iMX6UL Touchscreen Controller as /devices/platform/soc/2000000.bus/2040000.tsc/input/input1
[    3.076009] snvs_rtc 20cc000.snvs:snvs-rtc-lp: registered as rtc0
[    3.082479] snvs_rtc 20cc000.snvs:snvs-rtc-lp: setting system clock to 1970-01-01T00:29:34 UTC (1774)
[    3.092331] i2c_dev: i2c /dev entries driver
[    3.101551] pxp-v4l2 pxp_v4l2: initialized
[    3.116067] Bluetooth: HCI UART driver ver 2.3
[    3.120776] Bluetooth: HCI UART protocol H4 registered
[    3.125953] Bluetooth: HCI UART protocol BCSP registered
[    3.131635] Bluetooth: HCI UART protocol LL registered
[    3.136891] Bluetooth: HCI UART protocol Three-wire (H5) registered
[    3.143365] Bluetooth: HCI UART protocol Marvell registered
[    3.149119] usbcore: registered new interface driver btusb
[    3.157238] sdhci: Secure Digital Host Controller Interface driver
[    3.163578] sdhci: Copyright(c) Pierre Ossman
[    3.167964] sdhci-pltfm: SDHCI platform and OF driver helper
[    3.177644] sdhci-esdhc-imx 2190000.mmc: Got CD GPIO
[    3.194873] usbcore: registered new interface driver usbhid
[    3.207254] usbhid: USB HID core driver
[    3.214687] mma8452 0-001e: mounting matrix not found: using identity...
[    3.221618] mma8452 0-001e: supply vdd not found, using dummy regulator
[    3.229021] mma8452 0-001e: supply vddio not found, using dummy regulator
[    3.239782] mmc1: SDHCI controller on 2194000.mmc [2194000.mmc] using ADMA
[    3.249864] mmc0: SDHCI controller on 2190000.mmc [2190000.mmc] using ADMA
[    3.273904] wm8960 1-001a: supply DCVDD not found, using dummy regulator
[    3.281394] wm8960 1-001a: supply DBVDD not found, using dummy regulator
[    3.288287] wm8960 1-001a: supply AVDD not found, using dummy regulator
[    3.295390] wm8960 1-001a: supply SPKVDD1 not found, using dummy regulator
[    3.302571] wm8960 1-001a: supply SPKVDD2 not found, using dummy regulator
[    3.311431] wm8960 1-001a: Failed to issue reset
[    3.323266] rpmsg-codec-wm8960 1-001a: Failed to issue reset
[    3.351772] NET: Registered PF_LLC protocol family
[    3.358025] NET: Registered PF_INET6 protocol family
[    3.366723] Segment Routing with IPv6
[    3.370737] In-situ OAM (IOAM) with IPv6
[    3.375147] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    3.383604] NET: Registered PF_PACKET protocol family
[    3.388939] can: controller area network core
[    3.393632] NET: Registered PF_CAN protocol family
[    3.398709] can: raw protocol
[    3.402029] can: broadcast manager protocol
[    3.406446] can: netlink gateway - max_hops=1
[    3.411649] Bluetooth: RFCOMM TTY layer initialized
[    3.416851] Bluetooth: RFCOMM socket layer initialized
[    3.422336] Bluetooth: RFCOMM ver 1.11
[    3.426334] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    3.431907] Bluetooth: BNEP filters: protocol multicast
[    3.437501] Bluetooth: BNEP socket layer initialized
[    3.442818] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    3.448870] Bluetooth: HIDP socket layer initialized
[    3.454529] lib80211: common routines for IEEE802.11 drivers
[    3.460482] Key type dns_resolver registered
[    3.494604] Registering SWP/SWPB emulation handler
[    3.512597] mmc1: Failed to initialize a non-removable card
[    3.531507] Loading compiled-in X.509 certificates
[    3.586721] imx_thermal 20c8000.anatop:tempmon: Industrial CPU temperature grade - max:105C critical:100C passive:95C
[    3.610160] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    3.622459] Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    3.628372] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    3.637181] clk: Disabling unused clocks
[    3.641278] platform regulatory.0: Falling back to sysfs fallback for: regulatory.db
[    3.649678] ALSA device list:
[    3.652680]   No soundcards found.
[    3.656598] RAMDISK: gzip image found at block 0
[    3.789674] EXT4-fs (ram0): mounted filesystem 5caf1ad2-5083-4b68-bf15-debf54d306b4 r/w without journal. Quota mode: none.
[    3.801067] VFS: Mounted root (ext4 filesystem) on device 1:0.
[    3.807271] devtmpfs: mounted
[    3.812316] Freeing unused kernel image (initmem) memory: 1024K
[    3.818672] Run /linuxrc as init process

Processing /etc/profile... Done

~ # ls
bin         home        lost+found  root        tmp
dev         lib         mnt         sbin        usr
etc         linuxrc     proc        sys         var
~ # 

5.2 修改 uboot 文件

通过编译后的 uboot-imx/include/config.h 可知,imx6ull 使用 uboot-imx/include/configs/mx6ullevk.h 来配置环境变量;

直接修该文件即可,我的修改如下:

liangtao:uboot-imx$git diff include/configs/mx6ullevk.h
diff --git a/include/configs/mx6ullevk.h b/include/configs/mx6ullevk.h
index 9a0c14efce..875e9267df 100644
--- a/include/configs/mx6ullevk.h
+++ b/include/configs/mx6ullevk.h
@@ -87,7 +87,7 @@
        "fdt_high=0xffffffff\0" \
        "initrd_high=0xffffffff\0" \
        "fdt_file=undefined\0" \
-       "fdt_addr=0x83000000\0" \
+       "fdt_addr=0x85000000\0" \
        "tee_addr=0x84000000\0" \
        "tee_file=undefined\0" \
        "boot_fdt=try\0" \
@@ -97,7 +97,7 @@
        "mmcpart=1\0" \
        "mmcroot=/dev/mmcblk1p2 rootwait rw\0" \
        "mmcautodetect=yes\0" \
-       "mmcargs=setenv bootargs console=${console},${baudrate} " \
+       "mmcargs=setenv bootargs console=${console},${baudrate} root=/dev/ram0 initrd=0x84000000,0x400000 init=/linuxrc rootfstype=ext4 rootwait" \
                BOOTARGS_CMA_SIZE \
                "root=${mmcroot}\0" \
        "loadbootscript=" \
@@ -107,13 +107,14 @@
        "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
        "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
        "loadtee=fatload mmc ${mmcdev}:${mmcpart} ${tee_addr} ${tee_file}\0" \
+       "loadramdisk=fatload mmc 0:1 0x84000000 ramdisk.img.gz\0" \
        "mmcboot=echo Booting from mmc ...; " \
                "run mmcargs; " \
                "if test ${tee} = yes; then " \
                        "run loadfdt; run loadtee; bootm ${tee_addr} - ${fdt_addr}; " \
                "else " \
                        "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
-                               "if run loadfdt; then " \
+                               "if run loadfdt; run loadramdisk; then " \
                                        "bootz ${loadaddr} - ${fdt_addr}; " \
                                "else " \
                                        "if test ${boot_fdt} = try; then " \

使用命令将 uboot 写入 tf 卡

${DRIVE} 是你的 tf 卡节点,比如 /dev/sdb

sudo dd if=u-boot-dtb.imx of=${DRIVE} bs=1K seek=1 conv=fsync

上电启动日志如下:

U-Boot 2023.04-dirty (May 08 2024 - 15:09:36 +0800)

CPU:   i.MX6ULL rev1.1 792 MHz (running at 396 MHz)
CPU:   Industrial temperature grade (-40C to 105C) at 47C
Reset cause: POR
Model: i.MX6 ULL 14x14 EVK Board
Board: MX6ULL 14x14 EVK
DRAM:  512 MiB
Core:  71 devices, 20 uclasses, devicetree: separate
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... *** Warning - bad CRC, using default environment

[*]-Video Link 0 (480 x 272)
	[0] lcdif@21c8000, video
In:    serial
Out:   serial
Err:   serial
switch to partitions #0, OK
mmc0 is current device
flash target is MMC:0
Fastboot: Normal
Normal Boot
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc0 is current device
switch to partitions #0, OK
mmc0 is current device
Failed to load 'boot.scr'
9447888 bytes read in 546 ms (16.5 MiB/s)
Booting from mmc ...
45482 bytes read in 4 ms (10.8 MiB/s)
995096 bytes read in 59 ms (16.1 MiB/s)
Kernel image @ 0x80800000 [ 0x000000 - 0x9029d0 ]
## Flattened Device Tree blob at 85000000
   Booting using the fdt blob at 0x85000000
Working FDT set to 85000000
   Using Device Tree in place at 85000000, end 8500e1a9
Working FDT set to 85000000
Modify /soc/bus@2200000/epdc@228c000 disabled

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 6.6.3-gccf0a99701a7 (liangtao@RedmiBook) (arm-none-linux-gnueabihf-gcc (Arm GNU Toolchain 13.2.rel1 (Build arm-13.7)) 13.2.1 20231009, GNU ld (Arm GNU Toolchain 13.2.rel1 (Build arm-13.7)) 2.41.0.20231009) #4 SMP PREEMPT Mon May  6 09:18:08 CST 2024
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Freescale i.MX6 ULL 14x14 EVK Board
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] Reserved memory: created CMA memory pool at 0x96000000, size 160 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] OF: reserved mem: 0x96000000..0x9fffffff (163840 KiB) map reusable linux,cma
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000080000000-0x000000009fffffff]
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000080000000-0x000000009fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x000000009fffffff]
[    0.000000] percpu: Embedded 12 pages/cpu s18900 r8192 d22060 u49152
[    0.000000] Kernel command line: console=ttymxc0,115200 root=/dev/ram0 initrd=0x84000000,0x400000 init=/linuxrc rootfstype=ext4 rootwaitroot=/dev/mmcblk0p2 rootwait rw
[    0.000000] Unknown kernel command line parameters "rootwaitroot=/dev/mmcblk0p2", will be passed to user space.
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 129920
[    0.000000] mem auto-init: stack:all(zero), heap alloc:off, heap free:off
[    0.000000] Memory: 328504K/524288K available (14336K kernel code, 1378K rwdata, 4508K rodata, 1024K init, 425K bss, 31944K reserved, 163840K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu: 	RCU event tracing is enabled.
[    0.000000] rcu: 	RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
[    0.000000] 	Trampoline variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] Switching to timer-based delay loop, resolution 41ns
[    0.000003] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000044] clocksource: mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.003380] Console: colour dummy device 80x30
[    0.003470] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.003510] CPU: Testing write buffer coherency: ok
[    0.003616] pid_max: default: 32768 minimum: 301
[    0.004050] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.004100] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.006285] CPU0: update cpu_capacity 1024
[    0.006330] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.009752] RCU Tasks: Setting shift to 0 and lim to 1 rcu_task_cb_adjust=1.
[    0.010303] Setting up static identity map for 0x80100000 - 0x80100060
[    0.010837] rcu: Hierarchical SRCU implementation.
[    0.010861] rcu: 	Max phase no-delay instances is 1000.
[    0.012424] smp: Bringing up secondary CPUs ...
[    0.012491] smp: Brought up 1 node, 1 CPU
[    0.012517] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[    0.012538] CPU: All CPU(s) started in SVC mode.
[    0.013845] devtmpfs: initialized
[    0.034662] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.035394] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.035452] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
[    0.047723] pinctrl core: initialized pinctrl subsystem
[    0.052762] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.070799] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.074304] thermal_sys: Registered thermal governor 'step_wise'
[    0.074527] cpuidle: using governor menu
[    0.075092] CPU identified as i.MX6ULL, silicon rev 1.1
[    0.091735] platform soc: Fixed dependency cycle(s) with /soc/bus@2000000/gpc@20dc000
[    0.138989] failed to find ocotp node
[    0.139458] failed to find ocotp node
[    0.139922] No ATAGs?
[    0.140057] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.140088] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.143474] imx6ul-pinctrl 20e0000.pinctrl: initialized IMX pinctrl driver
[    0.148158] imx6ul-pinctrl 2290000.iomuxc-snvs: no groups defined in /soc/bus@2200000/iomuxc-snvs@2290000
[    0.148238] imx6ul-pinctrl 2290000.iomuxc-snvs: initialized IMX pinctrl driver
[    0.151932] imx mu driver is registered.
[    0.152999] imx rpmsg driver is registered.
[    0.156559] kprobes: kprobe jump-optimization is enabled. All kprobes are optimized if possible.
[    0.161029] gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    0.166698] gpio gpiochip1: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    0.172536] gpio gpiochip2: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    0.178010] gpio gpiochip3: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    0.183868] gpio gpiochip4: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    0.197677] SCSI subsystem initialized
[    0.199202] usbcore: registered new interface driver usbfs
[    0.199315] usbcore: registered new interface driver hub
[    0.199444] usbcore: registered new device driver usb
[    0.204693] i2c i2c-0: IMX I2C adapter registered
[    0.208546] i2c 1-003c: Fixed dependency cycle(s) with /soc/bus@2100000/csi@21c4000/port/endpoint
[    0.208835] i2c i2c-1: IMX I2C adapter registered
[    0.209961] mc: Linux media interface: v0.10
[    0.210174] videodev: Linux video capture interface: v2.00
[    0.210388] pps_core: LinuxPPS API ver. 1 registered
[    0.210407] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.210460] PTP clock support registered
[    0.215047] MIPI CSI2 driver module loaded
[    0.215219] Advanced Linux Sound Architecture Driver Initialized.
[    0.217730] Bluetooth: Core ver 2.22
[    0.217876] NET: Registered PF_BLUETOOTH protocol family
[    0.217895] Bluetooth: HCI device and connection manager initialized
[    0.217928] Bluetooth: HCI socket layer initialized
[    0.217950] Bluetooth: L2CAP socket layer initialized
[    0.218001] Bluetooth: SCO socket layer initialized
[    0.219055] vgaarb: loaded
[    0.220442] clocksource: Switched to clocksource mxc_timer1
[    0.221134] VFS: Disk quotas dquot_6.6.0
[    0.221263] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.253612] NET: Registered PF_INET protocol family
[    0.254276] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.258313] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.258400] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.258441] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.258548] TCP bind hash table entries: 4096 (order: 4, 65536 bytes, linear)
[    0.258816] TCP: Hash tables configured (established 4096 bind 4096)
[    0.259027] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.259110] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.259537] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.261157] RPC: Registered named UNIX socket transport module.
[    0.261196] RPC: Registered udp transport module.
[    0.261209] RPC: Registered tcp transport module.
[    0.261221] RPC: Registered tcp-with-tls transport module.
[    0.261233] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.265093] PCI: CLS 0 bytes, default 64
[    0.265701] Trying to unpack rootfs image as initramfs...
[    0.268718] rootfs image is not initramfs (no cpio magic); looks like an initrd
[    0.271874] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available
[    0.276534] Bus freq driver module loaded
[    0.279291] Initialise system trusted keyrings
[    0.291209] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[    0.293196] NFS: Registering the id_resolver key type
[    0.293370] Key type id_resolver registered
[    0.293389] Key type id_legacy registered
[    0.293500] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.293525] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    0.293631] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    0.294542] fuse: init (API version 7.39)
[    0.343422] Freeing initrd memory: 4096K
[    0.755735] Key type asymmetric registered
[    0.755769] Asymmetric key parser 'x509' registered
[    0.755953] io scheduler mq-deadline registered
[    0.755978] io scheduler kyber registered
[    0.756047] io scheduler bfq registered
[    0.778219] mxsfb 21c8000.lcdif: supply lcd not found, using dummy regulator
[    0.891646] sii902x bound to mxs-lcdif from 21c8000.lcdif
[    0.894696] Console: switching to colour frame buffer device 60x34
[    0.993292] mxsfb 21c8000.lcdif: initialized
[    1.006311] imx-sdma 20ec000.dma-controller: Direct firmware load for imx/sdma/sdma-imx6q.bin failed with error -2
[    1.006364] imx-sdma 20ec000.dma-controller: Falling back to sysfs fallback for: imx/sdma/sdma-imx6q.bin
[    1.011493] mxs-dma 1804000.dma-controller: initialized
[    1.023086] 2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 201, base_baud = 5000000) is a IMX
[    1.023243] printk: console [ttymxc0] enabled
[    1.954850] 21e8000.serial: ttymxc1 at MMIO 0x21e8000 (irq = 202, base_baud = 5000000) is a IMX
[    1.964398] serial serial0: tty port ttymxc1 registered
[    2.005773] random: crng init done
[    2.009296] imx_rngc 2284000.rng: Freescale RNGB registered (HW revision 2.129)
[    2.017875] imx sema4 driver is registered.
[    2.034930] brd: module loaded
[    2.054575] loop: module loaded
[    2.070965] spi-nor spi4.0: unrecognized JEDEC id bytes: ff ff ff ff ff ff
[    2.089120] tun: Universal TUN/TAP device driver, 1.6
[    2.095090] CAN device driver interface
[    2.105339] pps pps0: new PPS source ptp0
[    2.116532] fec 20b4000.ethernet: Invalid MAC address: 00:00:00:00:00:00
[    2.123571] fec 20b4000.ethernet: Using random MAC address: 66:5d:a7:7b:6f:24
[    2.139311] fec 20b4000.ethernet eth0: registered PHC device 0
[    2.149401] pps pps1: new PPS source ptp1
[    2.161055] fec 2188000.ethernet: Invalid MAC address: 00:00:00:00:00:00
[    2.167844] fec 2188000.ethernet: Using random MAC address: 2a:b8:ea:b0:b1:97
[    2.177649] fec 2188000.ethernet eth1: registered PHC device 1
[    2.184499] e1000e: Intel(R) PRO/1000 Network Driver
[    2.189505] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[    2.196647] usbcore: registered new device driver r8152-cfgselector
[    2.203164] usbcore: registered new interface driver r8152
[    2.208793] usbcore: registered new interface driver lan78xx
[    2.214642] usbcore: registered new interface driver asix
[    2.220161] usbcore: registered new interface driver ax88179_178a
[    2.226422] usbcore: registered new interface driver cdc_ether
[    2.232446] usbcore: registered new interface driver smsc95xx
[    2.238309] usbcore: registered new interface driver net1080
[    2.244180] usbcore: registered new interface driver cdc_subset
[    2.250218] usbcore: registered new interface driver zaurus
[    2.255994] usbcore: registered new interface driver MOSCHIP usb-ethernet driver
[    2.263584] usbcore: registered new interface driver cdc_ncm
[    2.269368] usbcore: registered new interface driver r8153_ecm
[    2.275769] usbcore: registered new interface driver usb-storage
[    2.286323] imx_usb 2184000.usb: No over current polarity defined
[    2.906747] mxs_phy 20c9000.usbphy: Data pin can't make good contact.
[    2.919389] ci_hdrc ci_hdrc.1: EHCI Host Controller
[    2.924575] ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 1
[    2.970605] ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00
[    2.976615] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.06
[    2.985021] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.992330] usb usb1: Product: EHCI Host Controller
[    2.997239] usb usb1: Manufacturer: Linux 6.6.3-gccf0a99701a7 ehci_hcd
[    3.003945] usb usb1: SerialNumber: ci_hdrc.1
[    3.010154] hub 1-0:1.0: USB hub found
[    3.014242] hub 1-0:1.0: 1 port detected
[    3.024537] input: 20cc000.snvs:snvs-powerkey as /devices/platform/soc/2000000.bus/20cc000.snvs/20cc000.snvs:snvs-powerkey/input/input0
[    3.038619] SPI driver ads7846 has no spi_device_id for ti,tsc2046
[    3.045568] SPI driver ads7846 has no spi_device_id for ti,ads7843
[    3.052078] SPI driver ads7846 has no spi_device_id for ti,ads7845
[    3.058293] SPI driver ads7846 has no spi_device_id for ti,ads7873
[    3.068185] input: iMX6UL Touchscreen Controller as /devices/platform/soc/2000000.bus/2040000.tsc/input/input1
[    3.086389] snvs_rtc 20cc000.snvs:snvs-rtc-lp: registered as rtc0
[    3.092859] snvs_rtc 20cc000.snvs:snvs-rtc-lp: setting system clock to 1970-01-01T00:57:19 UTC (3439)
[    3.102719] i2c_dev: i2c /dev entries driver
[    3.111943] pxp-v4l2 pxp_v4l2: initialized
[    3.126395] Bluetooth: HCI UART driver ver 2.3
[    3.131192] Bluetooth: HCI UART protocol H4 registered
[    3.136374] Bluetooth: HCI UART protocol BCSP registered
[    3.141980] Bluetooth: HCI UART protocol LL registered
[    3.147240] Bluetooth: HCI UART protocol Three-wire (H5) registered
[    3.153702] Bluetooth: HCI UART protocol Marvell registered
[    3.159457] usbcore: registered new interface driver btusb
[    3.167591] sdhci: Secure Digital Host Controller Interface driver
[    3.173926] sdhci: Copyright(c) Pierre Ossman
[    3.178312] sdhci-pltfm: SDHCI platform and OF driver helper
[    3.188005] sdhci-esdhc-imx 2190000.mmc: Got CD GPIO
[    3.203420] usbcore: registered new interface driver usbhid
[    3.209047] usbhid: USB HID core driver
[    3.224379] mma8452 0-001e: mounting matrix not found: using identity...
[    3.231415] mma8452 0-001e: supply vdd not found, using dummy regulator
[    3.238531] mma8452 0-001e: supply vddio not found, using dummy regulator
[    3.258330] mmc1: SDHCI controller on 2194000.mmc [2194000.mmc] using ADMA
[    3.266363] mmc0: SDHCI controller on 2190000.mmc [2190000.mmc] using ADMA
[    3.281861] wm8960 1-001a: supply DCVDD not found, using dummy regulator
[    3.289437] wm8960 1-001a: supply DBVDD not found, using dummy regulator
[    3.296846] wm8960 1-001a: supply AVDD not found, using dummy regulator
[    3.304038] wm8960 1-001a: supply SPKVDD1 not found, using dummy regulator
[    3.311285] wm8960 1-001a: supply SPKVDD2 not found, using dummy regulator
[    3.319700] wm8960 1-001a: Failed to issue reset
[    3.330955] rpmsg-codec-wm8960 1-001a: Failed to issue reset
[    3.361640] NET: Registered PF_LLC protocol family
[    3.367795] NET: Registered PF_INET6 protocol family
[    3.376522] Segment Routing with IPv6
[    3.380585] In-situ OAM (IOAM) with IPv6
[    3.384752] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    3.393338] NET: Registered PF_PACKET protocol family
[    3.398581] can: controller area network core
[    3.403283] NET: Registered PF_CAN protocol family
[    3.408340] can: raw protocol
[    3.411465] can: broadcast manager protocol
[    3.415903] can: netlink gateway - max_hops=1
[    3.421192] Bluetooth: RFCOMM TTY layer initialized
[    3.426373] Bluetooth: RFCOMM socket layer initialized
[    3.431844] Bluetooth: RFCOMM ver 1.11
[    3.435851] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    3.441419] Bluetooth: BNEP filters: protocol multicast
[    3.446862] Bluetooth: BNEP socket layer initialized
[    3.452101] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    3.458385] Bluetooth: HIDP socket layer initialized
[    3.464272] lib80211: common routines for IEEE802.11 drivers
[    3.470248] Key type dns_resolver registered
[    3.505633] Registering SWP/SWPB emulation handler
[    3.533638] mmc1: Failed to initialize a non-removable card
[    3.543986] Loading compiled-in X.509 certificates
[    3.605162] imx_thermal 20c8000.anatop:tempmon: Industrial CPU temperature grade - max:105C critical:100C passive:95C
[    3.620844] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    3.633246] Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    3.639154] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    3.647921] clk: Disabling unused clocks
[    3.652235] ALSA device list:
[    3.655226]   No soundcards found.
[    3.659145] RAMDISK: gzip image found at block 0
[    3.664028] platform regulatory.0: Falling back to sysfs fallback for: regulatory.db
[    3.800309] EXT4-fs (ram0): mounted filesystem 5caf1ad2-5083-4b68-bf15-debf54d306b4 r/w without journal. Quota mode: none.
[    3.811751] VFS: Mounted root (ext4 filesystem) on device 1:0.
[    3.817954] devtmpfs: mounted
[    3.822986] Freeing unused kernel image (initmem) memory: 1024K
[    3.830917] Run /linuxrc as init process

Processing /etc/profile... Done

~ # ls
bin         home        lost+found  root        tmp
dev         lib         mnt         sbin        usr
etc         linuxrc     proc        sys         var
~ # 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/603136.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

leetcode-矩阵最长递增路径-102

题目要求 思路 1.通过双循环去把每一个结点作为起始点进行统计&#xff0c;将返回的路径长度存放在res中&#xff0c;取最大的res的长度。 2.递归中需要的几个值&#xff0c;x和y当前结点的坐标&#xff0c;pre用于存储上一个结点的元素值&#xff0c;因为要求是路径上的元素是…

3D 交互展示该怎么做?

在博维数孪&#xff08;Bowell&#xff09;平台制作3D交互展示的流程相对简单&#xff0c;主要分为以下几个步骤&#xff1a; 1、准备3D模型&#xff1a;首先&#xff0c;你需要有一个3D模型。如果你有3D建模的经验&#xff0c;可以使用3ds Max或Blender等软件自行创建。如果没…

前后端分离项目中的一些疑惑

1、前后端分离项目&#xff0c;浏览器发起请求后&#xff0c;请求的是前端服务器还是后端服务器&#xff1f; 在前后端分离的项目中&#xff0c;当浏览器发起请求时&#xff0c;它首先会请求的是前端服务器。 前后端分离的工作流程大致如下&#xff1a; 用户在浏览器中输入网…

Echarts散点图的29个配置项,散点图可以随心所欲啦。

1-9 当使用 ECharts 绘制散点图时&#xff0c;可以配置以下一些常用的选项&#xff1a; 1. tooltip&#xff1a;配置提示框组件&#xff0c;用于显示鼠标悬停在散点上时的提示信息。 2. legend&#xff1a;配置图例组件&#xff0c;用于展示不同散点的标识和名称。 3. xAxis…

图数据库 之 Neo4j 与 AI 大模型的结合绘制知识图谱

引言 随着信息时代的到来&#xff0c;海量的文本数据成为了我们获取知识的重要来源。然而&#xff0c;如何从这些文本数据中提取出有用的信息&#xff0c;并将其以可视化的方式展示出来&#xff0c;一直是一个具有挑战性的问题。近年来&#xff0c;随着人工智能技术的发展&…

rust使用serde_json转换Value为rust中的数据类型

为了方便转换未知json数据&#xff0c;我们可以使用serde提供的value类型来进行转换&#xff0c;将json字符串转化为Value值&#xff0c;然后可以快速使用get方法来获取值&#xff1a; let json_str r#"{"name": "John","age": 30,"c…

科技控必看!让你轻松成为机器人领域达人

科技控们注意了&#xff01;你是不是经常对机器人技术充满无限的好奇&#xff0c;却又因为缺乏合适的渠道而难以深入了解和亲身体验呢&#xff1f;别担心&#xff0c;BFT机器人&#xff0c;正是你探索机器人世界的绝佳之地&#xff01; 在这里&#xff0c;你将发现一个充满惊喜…

政安晨:【Keras机器学习示例演绎】(三十九)—— 使用 FNet 进行文本分类

目录 简介 模型 设置 加载数据集 对数据进行标记 格式化数据集 建立模型 训练我们的模型 与变换器模型比较 政安晨的个人主页&#xff1a;政安晨 欢迎 &#x1f44d;点赞✍评论⭐收藏 收录专栏: TensorFlow与Keras机器学习实战 希望政安晨的博客能够对您有所裨益&…

Linux学习之高级IO

之前的内容我们基本掌握了基础IO&#xff0c;如套接字&#xff0c;文件描述符&#xff0c;重定向&#xff0c;缓冲区等知识都是文的基本认识&#xff0c;而高级IO则是指更加高效的IO。 对于应用层&#xff0c;在读写的时候&#xff0c;本质就是把数据写给OS&#xff0c;若一方…

1W 3KVDC 隔离 单输出 DC/DC 电源模块 ——TPF 系列

TPF系列提供输出稳压&#xff0c;精度高&#xff0c;对于输出电压有要求的场合特别适合&#xff0c;工业级环境温度&#xff0c;用于PCB安装的国际标准结构。此系列产品小巧&#xff0c;效率高&#xff0c;低输出纹波及提供3000V以上的直流电压隔离&#xff0c;封装有SIP和DIP可…

实测幻方新出的超强AI大模型,中文能力对比GPT4.0不落下风

目前从网上的消息来看&#xff0c;DeepSeek中文综合能力&#xff08;AlignBench&#xff09;开源模型中最强&#xff0c;与GPT-4-Turbo&#xff0c;文心4.0等闭源模型在评测中处于同一梯队。 话不多说&#xff0c;我们开测&#xff01; 1.首先我们来让他直接来一段逻辑推理【并…

Jetpack Compose三:主题和基础控件的使用

设置主题 与Android View的主题定义方式不同&#xff0c;Jetpack Compose中的主题由许多较低级别的结构体和相关API组成&#xff0c;它们包括颜色、排版和形状属性。 Theme.kt控制工程的主题&#xff0c;它是一个可组合的Compose函数 最后主题函数ComposeStudyTheme的相关设置…

安装Nox夜神模拟器关闭了HyperV后Docker运行不了怎么办?

1.背景 为了模拟真机&#xff0c;尝试安装了Nox夜神模拟器&#xff0c; 安装过程要求关闭Hyper-V。当时只是在程序安装卸载中关闭了系统服务。以为到时勾选上就好了。操作路径&#xff1a;控制面板\所有控制面板项\程序和功能\启用或关闭Windows功能\Hyper-V。 后来卸载掉了夜神…

D盘被格式化了能找回吗 d盘格式化了数据可以找回来吗

D盘作为电脑中重要的磁盘之一&#xff0c;很多用户都会将一些重要的数据保存在D盘。但在磁盘空间不足的情况下&#xff0c;或许有些用户会将其进行格式化&#xff0c;D盘被格式化了如何恢复数据&#xff1f; 如果是比较重要的数据&#xff0c;建议用户立即进行数据恢复操作&am…

Java-异常处理-定义三角形类Triangle和异常三角形IllegalTriangleException类 (1/2)

任意一个三角形&#xff0c;其任意两边之和大于第三边。当三角形的三条边不满足前述条件时&#xff0c;就表示发生了异常&#xff0c;将这种异常情况定义为IllegalTriangleException类。 自定义异常类IllegalTriangleException&#xff1a; 当三角形的三条边不满足条件&#x…

数据丢失不慌张,手机数据恢复一键解决!

如今手机已经成为我们生活中不可或缺的一部分。无论是工作、学习还是娱乐&#xff0c;手机都扮演着重要的角色。随着使用时间的增加&#xff0c;手机数据丢失的问题也时常发生。那么手机数据恢复有哪些方法呢&#xff1f;面对这种情况&#xff0c;先不要慌张&#xff0c;本文将…

3dmax-vray6渲染器参数设置

适用于3dmax2018-2023版本 一、【公用】 小图输出大小:1500*1125&#xff0c;勾选大气、效果&#xff1b; 大图输出大小:3000*2250&#xff0c;勾选大气、效果、置换&#xff1b; 二、【vray】 小图抗锯齿类型:渐进式&#xff1b;最小细分:1&#xff0c;最大细分:100&#…

CRM(客户关系管理系统)

商机流程 为什么选择简道云CRM&#xff1f; 行业痛点 很多客户有复杂的订单成本计算方式&#xff0c;复杂多变的审批流程&#xff0c;个性化/流程化的数据结构&#xff0c;没有自定义能力就很难满足。 解决方案 在CRM套件的基础上自定义编辑/搭建了适合公司业务的CRMERP 两…

数据结构之单单单——链表

一.链表 1&#xff09;链表的概念 链表&#xff08;Linked List&#xff09;是一种物理存储结构上非连续&#xff0c;非顺序的储存结构&#xff0c;数据元素的逻辑顺序是通过链表中指针链接次序实现的。要注意&#xff0c;链表也是线性表----->但链表在物理结构上不是线性的…

安装helm

&#xff08;作者&#xff1a;陈玓玏&#xff09; 文档&#xff1a;https://helm.sh/zh/docs/intro/install/ 文档记载了几种安装方法&#xff0c;我用的是一步到位的那种&#xff0c;直接运行curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 …