09.01.00.001版本SDK我们正在调试启动(uboot、kernel都是分别在对应源码目录下make编译出来的分立的镜像),当前linux分别编译出zImage、am335x_evm.dtb。
请问内核的dtb应该如何烧录,需要有哪些配置?
下面是当前的我们尝试使用的bootcmd
请问默认的分区表中 (NAND.u-boot-spl-os) 分区是做什么的,里面的镜像结构是什么样的?
我们当前尝试把NAND.u-boot-spl-os分区当做内核的dtb分区,使用如下的命令分别烧录MLO、uboot、kernel-dtb、kernel:
# MLO (SPL) 烧录
mw.b 0x82000000 0xFF 0x20000
tftp 0x82000000 MLO
nand erase 0x0 0x80000
nandecc hw 8
nand write.i 0x82000000 0x00000 0x20000
nand write.i 0x82000000 0x20000 0x20000
nand write.i 0x82000000 0x40000 0x20000
nand write.i 0x82000000 0x60000 0x20000
mw.b 0x82000000 0xFF 0x20000
tftp 0x82000000 MLO
nand erase 0x0 0x80000
nandecc hw 8
nand write.i 0x82000000 0x00000 0x20000
nand write.i 0x82000000 0x20000 0x20000
nand write.i 0x82000000 0x40000 0x20000
nand write.i 0x82000000 0x60000 0x20000
# u-boot.img 烧录
mw.b 0x82000000 0xFF 0x100000
tftp 0x82000000 u-boot.img
nandecc hw 8
nand erase 0xc0000 0x100000
nand write.i 0x82000000 0xc0000 0x100000
mw.b 0x82000000 0xFF 0x100000
tftp 0x82000000 u-boot.img
nandecc hw 8
nand erase 0xc0000 0x100000
nand write.i 0x82000000 0xc0000 0x100000
#dtb烧录
mw.b 0x82000000 0xff 0x00040000
tftp 0x82000000 am335x-evm.dtb
nandecc sw 1
nand erase 0x00080000 0x00040000
nand write 0x82000000 0x00080000 0x00040000
mw.b 0x82000000 0xff 0x00040000
tftp 0x82000000 am335x-evm.dtb
nandecc sw 1
nand erase 0x00080000 0x00040000
nand write 0x82000000 0x00080000 0x00040000
# kernel 烧录
mw.b 0x82000000 0xff 0x00800000
tftp 0x82000000 zImage
nandecc sw 1
nand erase 0x00200000 0x00800000
nand write 0x82000000 0x00200000 0x00800000
mw.b 0x82000000 0xff 0x00800000
tftp 0x82000000 zImage
nandecc sw 1
nand erase 0x00200000 0x00800000
nand write 0x82000000 0x00200000 0x00800000
完成后,后然后重启,无法启动:
U-Boot SPL 2023.04 (Apr 25 2024 - 12:06:05 +0000)
#### CORE Debug ####
DDR SIZE = 256MBytes
DDR BASE = 0x80000000
Trying to boot from NAND
U-Boot 2023.04 (Apr 25 2024 - 12:06:05 +0000)
CPU : AM335X-GP rev 2.1
Model: TI AM335x EVM
DRAM: 256 MiB
Core: 156 devices, 17 uclasses, devicetree: separate
WDT: Started wdt@44e35000 with servicing every 1000ms (60s timeout)
NAND: 256 MiB
MMC: OMAP SD/MMC: 0
Loading Environment from NAND... *** Warning - bad CRC, using default environment
<ethaddr> not set. Validating first E-fuse MAC
Net: eth2: ethernet@4a100000, eth3: usb_ether
cli_process_fdt start
### main_loop: bootcmd="run findfdt; run init_console; run nandboot"
Hit any key to stop autoboot: 0
Booting from nand ...
NAND read: 270336 bytes read: OK
NAND read: 8650752 bytes read: OK
* kernel: cmdline image address = 0x82000000
Kernel image @ 0x82000000 [ 0x000000 - 0xa0d200 ]
## Flattened Device Tree blob at 88000000
Booting using the fdt blob at 0x88000000
Working FDT set to 88000000
Loading Device Tree to 8cef4000, end 8cf08d2c ... OK
Working FDT set to 8cef4000
fdt_find_or_add_subnode: memory: FDT_ERR_BADSTRUCTURE
ERROR: arch-specific fdt fixup failed
- must RESET the board to recover.
FDT creation failed!
resetting ...
#### CORE Debug ####
DDR SIZE = 256MBytes
DDR BASE = 0x80000000
Trying to boot from NAND
U-Boot 2023.04 (Apr 25 2024 - 12:06:05 +0000)
CPU : AM335X-GP rev 2.1
Model: TI AM335x EVM
DRAM: 256 MiB
Core: 156 devices, 17 uclasses, devicetree: separate
WDT: Started wdt@44e35000 with servicing every 1000ms (60s timeout)
NAND: 256 MiB
MMC: OMAP SD/MMC: 0
Loading Environment from NAND... *** Warning - bad CRC, using default environment
<ethaddr> not set. Validating first E-fuse MAC
Net: eth2: ethernet@4a100000, eth3: usb_ether
cli_process_fdt start
### main_loop: bootcmd="run findfdt; run init_console; run nandboot"
Hit any key to stop autoboot: 0
Booting from nand ...
NAND read: 270336 bytes read: OK
NAND read: 8650752 bytes read: OK
* kernel: cmdline image address = 0x82000000
Kernel image @ 0x82000000 [ 0x000000 - 0xa0d200 ]
## Flattened Device Tree blob at 88000000
Booting using the fdt blob at 0x88000000
Working FDT set to 88000000
Loading Device Tree to 8cef4000, end 8cf08d2c ... OK
Working FDT set to 8cef4000
fdt_find_or_add_subnode: memory: FDT_ERR_BADSTRUCTURE
ERROR: arch-specific fdt fixup failed
- must RESET the board to recover.
FDT creation failed!
resetting ...
帮忙确认解答下,如下问题,much 3ks:
1、nand启动,如上各分区应该如何正常烧录?
2、启动参数、bootcmd,帮忙确认下上面的是否有问题?
3、内核dtb应该烧录到nand哪个位置,加载到哪个ddr地址?
4、NAND.u-boot-spl-os分区烧录的镜像结构是怎么样的,如何制作、烧录?