Other Parts Discussed in Thread: OMAPL138,
Hi,
I am using the newest processor SDK(ti-processor-sdk-linux-omapl138-lcdk-06.03.00.106-Linux-x86-Install.bin) in one custom EVM board, so the u-boot version is 2019.01 and the Linux kernel version is 4.19.94. I followed the link below to build the u-boot and Linux kernel separately. The config file of u-boot is "omapl138_lcdk_defconfig" and the one of Linux kernel is "tisdk_omapl138-lcdk_defconfig". When all the builds were done, I replaced all the files in "board-support/prebuit-images" withe the new ones(two .dtb file, u-boot-spl.bin, u-boot.ais and zImage). After that, I ran the script "bin/create-sdcard.sh" to create a bootable SD card.
When all were done, I can start up the EVM board successfully, and I can also get the MTD partitions as below:
root@omapl138-lcdk:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00020000 00020000 "env"
mtd1: 00100000 00020000 "u-boot"
mtd2: 00020000 00020000 "NAND.u-boot-spl-os"
mtd3: 00500000 00020000 "NAND.kernel"
mtd4: 1f9c0000 00020000 "NAND.file-system"
root@omapl138-lcdk:~# nandtest /dev/mtd1
ECC corrections: 0
ECC failures : 0
Bad blocks : 0
BBT blocks : 0
000e0000: checking...of 4)...
Finished pass 1 successfully
root@omapl138-lcdk:~# nandtest /dev/mtd2
ECC corrections: 0
ECC failures : 0
Bad blocks : 0
BBT blocks : 0
00000000: checking...of 4)...
Finished pass 1 successfully
root@omapl138-lcdk:~# nandtest /dev/mtd3
ECC corrections: 0
ECC failures : 0
Bad blocks : 0
BBT blocks : 0
004e0000: checking...of 4)...
Finished pass 1 successfully
I ran the command "flash_erase" and "dd" to write the u-boot, the device tree, and zImage into the NAND flash as below. Both commands are fine. But when I tried to reboot the EVM from NAND, I can't see anything from the console.
root@omapl138-lcdk:/home/gw# flash_erase /dev/mtd1 0 0
Erasing 128 Kibyte @ e0000 -- 100 % complete
root@omapl138-lcdk:/home/gw# dd if=u-boot.ais of=/dev/mtdblock1
1279+1 records in
1279+1 records out
root@omapl138-lcdk:/home/gw# flash_erase /dev/mtd2 0 0
Erasing 128 Kibyte @ 0 -- 100 % complete
root@omapl138-lcdk:/home/gw# dd if=da850-lcdk.dtb of=/dev/mtdblock2
39+1 records in
39+1 records out
root@omapl138-lcdk:/home/gw# flash_erase /dev/mtd3 0 0
Erasing 128 Kibyte @ 4e0000 -- 100 % complete
root@omapl138-lcdk:/home/gw# dd if=zImage of=/dev/mtdblock3
6801+1 records in
6801+1 records out
But if I started up the EVM from SD card and wrote them into NAND flash from u-boot console, everything works fine - I can start up u-boot and Linux kernel from NAND flash
Hit any key to stop autoboot: 0
=> mtdparts
device nand0 <davinci_nand.0>, # parts = 5
#: name size offset mask_flags
0: env 0x00020000 0x00000000 0
1: u-boot 0x00100000 0x00020000 0
2: NAND.u-boot-spl-os 0x00020000 0x00120000 0
3: NAND.kernel 0x00500000 0x00140000 0
4: NAND.file-system 0x1f9c0000 0x00640000 0
active partition: nand0,0 - (env) 0x00020000 @ 0x00000000
defaults:
mtdids : nand0=davinci_nand.0
mtdparts: mtdparts=davinci_nand.0:128k(env),1m(u-boot),128k(NAND.u-boot-spl-os),5M(NAND.kernel),-(NAND.file-system)
=> set serverip 10.42.19.6
=> setenv bootfile ${serverip}:u-boot.ais
=> dhcp 0xc0700000
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
DHCP client bound to address 10.42.19.151 (1046 ms)
Using DaVinci-EMAC device
TFTP from server 10.42.19.6; our IP address is 10.42.19.151
Filename 'u-boot.ais'.
Load address: 0xc0700000
Loading: #############################################
4.8 MiB/s
done
Bytes transferred = 655028 (9feb4 hex)
=> nand erase 0x00020000 0x00100000
NAND erase: device 0 offset 0x20000, size 0x100000
Erasing at 0x100000 -- 100% complete.
OK
=> nand write 0xc0700000 0x00020000 0x00100000
NAND write: device 0 offset 0x20000, size 0x100000
1048576 bytes written: OK
=>
I am attaching the DTS file and git diff as the attached.