从 Nand Flash 中启动 LS1043ARDB
说明
本文阐述的是如何在 DN for LS1043ARDB 平台上实现从 Nand Flash 中启动,这里是将 u-boot 镜像使用 TFTP 烧录的方式烧录到 Nand Flash 将 kernel 和文件系统 烧录到 SD 卡中来实现的,所以事先我们需要搭建好 TFTP 环境,准备好一张 SD 卡。
一、 TFTP Linux环境搭建
参考前面博文:【NXP DN 系列】从 Nor Flash 中启动 LS1043ARDB
第一章节 TFTP Linux环境搭建
二、组建局域网
参考前面博文:【NXP DN 系列】从 Nor Flash 中启动 LS1043ARDB
第二章节局域网的组建
三、烧录 U-Boot 镜像到 Nand Flash
- 使用 Flexbuild 编译 Nand Flash 的 U-Boot 镜像
flex-builder -i mkfw -m ls1043ardb -b nand
- 将编译好的镜像复制到 tftpboot 目录
cp firmware_ls1043ardb_uboot_nandboot.img /home/dana/tftpboot/
- 将 U-Boot 镜像通过 tftp 传输到开发板内存中
=> tftp a0000000 firmware_ls1043ardb_uboot_nandboot.img
- 将镜像烧写到 Nand Flash 中
=> nand erase 0x0 2b6d624;nand write a0000000 0x0 2b6d624
- 切换到 Nand Flash 启动
=> cpld reset nand
这样就成功从 Nand Flash
四、启动 Kernel
- 使用 flex-installer 创建和格式化存储设备的分区 ( USB / SATA / SD )
- 使用 flex-installer 将 kernel 和文件系统部署到 SD 卡
flex-installer -i install -b bootpartition_<arch>_lts_<version>.tgz -r rootfs_lsdk_19.03_LS_<arch>_<timestamp>.tgz -d /dev/mmcblk0
For example:
flex-installer -i install -b bootpartition_LS_arm64_lts_4.19.tgz -r rootfs_lsdk1906_LS_arm64_main.tgz -d /dev/sdb
- 到这里我们就将 u-boot 部署烧录到 Nand Flash 中,将 kernel 和 文件系统部署烧录到 SD 卡中了,接下来我们可以将 SD 卡插入到开发板卡槽中,将拨码开关设置为:
SW3 [1:8] = 10110011 SW4 [1:8] = 10000010 SW5 [1:8] = 10100110
从 Nand Flash 中启动,开发板上电就行了
五、操作启动 Log
NOTICE: Fixed DDR on board
OTICE: 2 GB DDR4, 32-bit, CL=11, ECC off
NOTICE: BL2: v1.5(release):LSDK-19.09
NOTICE: BL2: Built : 17:38:26, Oct 31 2019
NOTICE: BL31: v1.5(release):LSDK-19.09
NOTICE: BL31: Built : 17:38:30, Oct 31 2019
NOTICE: Welcome to LS1043 BL31 Phase
U-Boot 2019.04 (Oct 31 2019 - 12:39:24 +0800)
SoC: LS1043AE Rev1.1 (0x87920011)
Clock Configuration:
CPU0(A53):1600 MHz CPU1(A53):1600 MHz CPU2(A53):1600 MHz
CPU3(A53):1600 MHz
Bus: 400 MHz DDR: 1600 MT/s FMAN: 500 MHz
Reset Configuration Word (RCW):
00000000: 08100010 0a000000 00000000 00000000
00000010: 14550002 80004012 e0025000 c1002000
00000020: 00000000 00000000 00000000 00038800
00000030: 00000000 00001101 00000096 00000001
Model: LS1043A RDB Board
Board: LS1043ARDB, boot from vBank 0
CPLD: V2.0
PCBA: V6.0
SERDES Reference Clocks:
SD1_CLK1= 156.25MHZ, SD1_CLK2 = 100.00MHZ
I2C: ready
DRAM: 1.9 GiB (DDR4, 32-bit, CL=11, ECC off)
Using SERDES1 Protocol: 5205 (0x1455)
SEC0: RNG instantiated
Firmware 'Microcode version 0.0.1 for LS1021a r1.0' for 1021 V1.0
E: uploading microcode 'Microcode for LS1021a r1.0' version 0.0.1
Flash: 128 MiB
NAND: 512 MiB
MMC: FSL_SDHC: 0
Loading Environment from Flash... OK
EEPROM: NXID v1
In: serial
Out: serial
Err: serial
Net: Fman1: Uploading microcode version 106.4.18
FM1@TGEC1 running firmware version 2.B.E
FM1@TGEC1: system interface XFI
FM1@TGEC1: Aquantia AQR105 Firmware Version 2.b.e
PCIe0: pcie@3400000 disabled
PCIe1: pcie@3500000 Root Complex: no link
PCIe2: pcie@3600000 Root Complex: no link
FM1@DTSEC1 [PRIME], FM1@DTSEC2, FM1@DTSEC3, FM1@DTSEC4, FM1@DTSEC5, FM1@DTSEC6, FM1@TGEC1
Hit any key to stop autoboot: 0
=> setenv serverip 192.168.1.1
=> setenv ethprime FM1@DTSEC1
=> setenv ethact FM1@DTSEC1
=> setenv ipaddr 192.168.1.2
=> setenv netmask 255.255.255.0
=> saveenv
Saving Environment to Flash... Un-Protected 1 sectors
Erasing Flash...
. done
Erased 1 sectors
Writing to Flash... 9....8..9....8....7....6....5....4....3....2....1....done
Protected 1 sectors
OK
=> ping 192.168.1.1
Using FM1@DTSEC1 device
host 192.168.1.1 is alive
=> tftp a0000000 firmware_ls1043ardb_uboot_nandboot.img
Using FM1@DTSEC1 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.2
Filename 'firmware_ls1043ardb_uboot_nandboot.img'.
Load address: 0xa0000000
Loading:
#################################################################
/* 【省略……】 */
#################################################################
1.9 MiB/s
done
Bytes transferred = 45536804 (2b6d624 hex)
=> nand erase 0x0 2b6d624;nand write a0000000 0x0 2b6d624
NAND erase: device 0 offset 0x0, size 0x2b6d624
Erasing at 0x2b60000 -- 100% complete.
OK
NAND write: device 0 offset 0x0, size 0x2b6d624
45536804 bytes written: OK
=> cpld reset nand
NOTICE: Fixed DDR on board
NOTICE: 2 GB DDR4, 32-bit, CL=11, ECC off
NOTICE: BL2: v1.5(release):LSDK-19.06
NOTICE: BL2: Built : 08:53:04, Dec 20 2019
NOTICE: BL31: v1.5(release):LSDK-19.06
NOTICE: BL31: Built : 08:53:11, Dec 20 2019
NOTICE: Welcome to LS1043 BL31 Phase
U-Boot 2019.04 (Oct 24 2019 - 09:36:56 +0800)
SoC: LS1043AE Rev1.1 (0x87920011)
Clock Configuration:
CPU0(A53):1600 MHz CPU1(A53):1600 MHz CPU2(A53):1600 MHz
CPU3(A53):1600 MHz
Bus: 400 MHz DDR: 1600 MT/s FMAN: 500 MHz
Reset Configuration Word (RCW):
00000000: 08100010 0a000000 00000000 00000000
00000010: 14550002 80004012 e0106000 c1002000
00000020: 00000000 00000000 00000000 00038800
00000030: 00000000 00001100 00000096 00000001
Model: LS1043A RDB Board
Board: LS1043ARDB, boot from NAND
CPLD: V2.0
PCBA: V6.0
SERDES Reference Clocks:
SD1_CLK1 = 156.25MHZ, SD1_CLK2 = 100.00MHZ
I2C: ready
DRAM: 1.9 GiB (DDR4, 32-bit, CL=11, ECC off)
Using SERDES1 Protocol: 5205 (0x1455)
SEC0: RNG instantiated
Not a microcode
Flash: 128 MiB
NAND: 512 MiB
MMC: FSL_SDHC: 0
Loading Environment from NAND... *** Warning - bad CRC, using default environment
EEPROM: NXID v1
In: serial
Out: serial
Err: serial
Net: Fman1: Uploading microcode version 106.4.18
FM1@TGEC1 running firmware version 2.B.E
FM1@TGEC1: system interface XFI
FM1@TGEC1: Aquantia AQR105 Firmware Version 2.b.e
PCIe0: pcie@3400000 disabled
PCIe1: pcie@3500000 Root Complex: no link
PCIe2: pcie@3600000 Root Complex: no link
FM1@DTSEC1, FM1@DTSEC2, FM1@DTSEC3 [PRIME], FM1@DTSEC4, FM1@DTSEC5, FM1@DTSEC6, FM1@TGEC1
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Scanning mmc 0:2...
Found U-Boot script /ls1043ardb_boot.scr
965 bytes read in 8 ms (117.2 KiB/s)
## Executing script at 80000000
25149952 bytes read in 1071 ms (22.4 MiB/s)
40799 bytes read in 10 ms (3.9 MiB/s)
## Flattened Device Tree blob at 90000000
Booting using the fdt blob at 0x90000000
Using Device Tree in place at 0000000090000000, end 000000009001cf5e
WARNING failed to get smmu node: FDT_ERR_NOTFOUND
WARNING failed to get smmu node: FDT_ERR_NOTFOUND
Starting kernel ...
/* 【省略……】 */
[ OK ] Started Dispatcher daemon for systemd-networkd.
NXP LSDK 1906 main //账号:root
localhost login: //密码:root
到这里就完成了
注:
未经本人允许,不得转载!谢谢!
版权声明:本文为dana_xiong原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。