向NXP官网Linux内核添加ALPHA开发板

编程入门 行业动态 更新时间:2024-10-17 00:30:33

向NXP官网Linux<a href=https://www.elefans.com/category/jswz/34/1769575.html style=内核添加ALPHA开发板"/>

向NXP官网Linux内核添加ALPHA开发板

一.   Linux内核移植

上一篇文章 参考I.MX6ULL EVK 开发板的设置, 在 Linux 内核中添加正点原子的 I.MX6U-ALPHA 开发板,最后,也编译生成了 zImage和设备树文件。

本文验证 下载到开发板后,Linux内核是否可以成功运行。

本文继以下文章,地址如下:

向NXP官网Linux内核添加ALPHA开发板_凌肖战的博客-CSDN博客

二.  下载验证 Linux内核与设备树文件

1.  拷贝 zImage与设备树文件到 tftp服务的目录下 

将之前文章烧写的生成的内核镜像与设备树文件拷贝到 tftp服务所设置的目录下,如下两个文件:
 

①  Linux 内核镜像文件: ./arm/arm/boot/zImage 。

②  ALPHA开发板对应的设备树文件: ./arch/arm/boot/dts/imx6ull-alientek-nand.dtb 。

2.  通过 tftp下载到开发板

(1)  首先,保证在 开发板的 uboot命令模式下,可以ping 通 Ubuntu。

(2) 其次, 将之前编译好的 zImage、设备树文件复制到 (ubuntu系统下)之前设置好的 tftp服务目录下。

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

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

(3)最后, 下载 zImage,设备树文件imx6ull-alientek-nand.dtb 到开发板

开发板上电后,进入 uboot命令模式。操作如下:

=> tftp 0x80800000 zImage
FEC1 Waiting for PHY auto negotiation to complete... done
Using FEC1 device
TFTP from server 192.168.1.66; our IP address is 192.168.1.50
Filename 'zImage'.
Load address: 0x80800000
Loading: ############################################################################################################################################################################################################################################################################################################################################################################################758.8 KiB/s
done
Bytes transferred = 5577152 (5519c0 hex)
=> tftp 0x83000000 imx6ull-alientek-nand.dtb
Using FEC1 device
TFTP from server 192.168.1.66; our IP address is 192.168.1.50
Filename 'imx6ull-alientek-nand.dtb'.
Load address: 0x83000000
Loading: ###2.7 MiB/s
done
Bytes transferred = 36519 (8ea7 hex)

3.  启动开发板

以上步骤完成后,开发板的 uboot命令模式下,启动开发板,操作如下:

=> bootz 0x80800000 - 83000000
Kernel image @ 0x80800000 [ 0x000000 - 0x5519c0 ]
## Flattened Device Tree blob at 83000000Booting using the fdt blob at 0x83000000Using Device Tree in place at 83000000, end 8300bea6Starting 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 Sun Oct 29 02:22:11 CST 2023
CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
.......................
nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xdc
nand: Micron MT29F4G08ABADAWP
nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
gpmi-nand 1806000.gpmi-nand: enable the asynchronous EDO mode 5
Bad block table found at page 262080, version 0x01
Bad block table found at page 262016, version 0x01
nand_read_bbt: bad block at 0x000000c80000
nand_read_bbt: bad block at 0x000000ca0000
5 cmdlinepart partitions found on MTD device gpmi-nand
Creating 5 MTD partitions on "gpmi-nand":
0x000000000000-0x000004000000 : "boot"
0x000004000000-0x000005000000 : "kernel"
0x000005000000-0x000006000000 : "dtb"
0x000006000000-0x000006100000 : "misc"
0x000006100000-0x000020000000 : "rootfs"
gpmi-nand 1806000.gpmi-nand: driver registered.
20b4000.ethernet supply phy not found, using dummy regulator
............................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)

可以看出,Linux内核已经成功启动。还可以看到 内核启动过程中 NAND-FLash的信息:

nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xdc
nand: Micron MT29F4G08ABADAWP
nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
gpmi-nand 1806000.gpmi-nand: enable the asynchronous EDO mode 5
Bad block table found at page 262080, version 0x01
Bad block table found at page 262016, version 0x01
nand_read_bbt: bad block at 0x000000c80000
nand_read_bbt: bad block at 0x000000ca0000
5 cmdlinepart partitions found on MTD device gpmi-nand
Creating 5 MTD partitions on "gpmi-nand":
0x000000000000-0x000004000000 : "boot"
0x000004000000-0x000005000000 : "kernel"
0x000005000000-0x000006000000 : "dtb"
0x000006000000-0x000006100000 : "misc"
0x000006100000-0x000020000000 : "rootfs"
gpmi-nand 1806000.gpmi-nand: driver registered.
20b4000.ethernet supply phy not found, using dummy regulator

说明 NAND-Flash驱动正确识别了 Nand-Flash芯片正常。还有Nand-Flash分区信息。

最后的内核的 Log信息如下:

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
只是说明没有可用的文件系统,这里因为没有制作可用的文件系统。 Linux 内核启动成功,说明我们已经在 NXP 提供的 Linux 内核源码中添加了正点原子 I.MX6UL-ALPHA 开发板。

更多推荐

向NXP官网Linux内核添加ALPHA开发板

本文发布于:2024-02-10 21:45:31,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1677460.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:内核   官网   开发板   NXP   ALPHA

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!