NXP official Linux kernel startup test

1. NXP official website Linux kernel test

This article tests the Linux kernel and device tree files provided by the NXP official website compiled in the previous article. Whether the development board can be started successfully.

This article follows the study of the previous article, the address is as follows:

NXP official Linux kernel compilation-CSDN blog


 

2. Startup test of Linux kernel and device tree files

In the previous section, we have obtained the two files zImage and imx6ull- 14x14-evk.dtb corresponding to the NXP official I.MX6ULL EVK development board. The generated directories for these two files are as follows:

Linux 内核镜像文件:/arch/arm/boot/zImage。
NXP官方 I.MX6ULL-EVK开发板对应的设备树文件:/arch/arm/boot/dts/imx6ull-14x14-evk.dtb。

1. Download through tftp service

The prerequisites for using the tftp service are:

① The tftp service has been set up on the development board or ubuntu system.

② The development board can ping the ubuntu system in uboot command mode.

(1) First, copy zImage and imx6ull - 14x14-evk.dtb to the file directory of the tftp service previously set in ubuntu. The operation of my ubuntu system here is as follows:

wangtian@wangtian-virtual-machine:~/zhengdian_Linux/linux/kernel/linux-imx-rel_imx_4.1.15_2.1.0_ga$ cp ./arch/arm/boot/zImage /home/wangtian/linux/tftp_file/

wangtian@wangtian-virtual-machine:~/zhengdian_Linux/linux/kernel/linux-imx-rel_imx_4.1.15_2.1.0_ga$ cp ./arch/arm/boot/dts/imx6ull-14x14-evk.dtb /home/wangtian /linux/tftp_file/

(2) Power on the development board, enter uboot command mode, and download zImage to the development board:

=> tftp 0x80800000 zImage
Using FEC1 device
TFTP from server 192.168.1.66; our IP address is 192.168.1.50
Filename 'zImage'.
Load address: 0x80800000
Loading: #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 ########################################################
	 2.5 MiB/s
done
Bytes transferred = 5582720 (552f80 hex)
=> 

Download the imx6ull- 14x14-evk.dtb device tree file:

=> tftp 0x83000000 imx6ull-14x14-evk.dtb
Using FEC1 device
TFTP from server 192.168.1.66; our IP address is 192.168.1.50
Filename 'imx6ull-14x14-evk.dtb'.
Load address: 0x83000000
Loading: ###
	 1.9 MiB/s
done
Bytes transferred = 35969 (8c81 hex)
=> 

2. Start the Linux kernel and device tree files

Start the Linux kernel and device tree files. After the above work is completed, enter the uboot command line mode. The operation is as follows:

Kernel image @ 0x80800000 [ 0x000000 - 0x552f80 ]
## Flattened Device Tree blob at 83000000
   Booting using the fdt blob at 0x83000000
   Using Device Tree in place at 83000000, end 8300bc80

Starting kernel ...

Booting Linux on physical CPU 0x0
Linux version 4.1.15 (wangtian@wangtian-virtual-machine) (gcc version 4.9.4 (Linaro GCC 4.9-2017.01) ) #1 SMP PREEMPT Tue Sep 26 19:46:04 CST 2023
CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine model: Freescale i.MX6 ULL 14x14 EVK Board

.....

010e           65536 ram14  (driver?)
010f           65536 ram15  (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
random: nonblocking pool is initialized

It can be seen from the above log information that the Linux kernel has been started at this time. The compilation time of the Linux kernel is 19:46 on September 26, 2023, indicating that it was compiled just recently.

Root file system missing error:

The last few lines of the above Log information are as follows:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
That is to say, the kernel crashes because VFS ( Virtual File System ) cannot mount the root file system because the root file system directory does not exist. Even if the root file system directory exists, if the root file system directory is empty, a kernel crash will still occur. This is a kernel crash caused by a missing root file system, but the kernel is started, but the root file system does not exist.
After the Linux kernel is started, the root file system is required. The location of the root file system is specified by the bootargs environment variable of uboot . The bootargs will be passed to the Linux kernel as command line parameters.

Guess you like

Origin blog.csdn.net/wojiaxiaohuang2014/article/details/133322677