Boot u-boot from SD-Card on T1042D4RDB

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Boot u-boot from SD-Card on T1042D4RDB

跳至解决方案
2,064 次查看
oyvind_harboe
Contributor I

How can I write a u-boot.bin-sdcard to an SD card for Tt1042d4rdb?

Here's what I did:

1. Using Yocto 2.6.1, I've followed:https://www.yoctoproject.org/docs/2.6.1/brief-yoctoprojectqs/brief-yoctoprojectqs.html

2. In local.confg, I've set "MACHINE ??= "t1042d4rdb"

3. I've run "bitbake u-boot"

4. I've run: sudo dd if=tmp/deploy/images/t1042d4rdb/u-boot.bin-sdcard of=/dev/sdb obs=4096 seek=1; sync

5. I've set the dip-switches as per the image below

6. Insert sd-card

7. power up

Expected result: u-boot startup output on the UART1 115200. I'm getting output when I run the factory installed u-boot from NOR flash.

Actual result: no output on serial port

AN12105.pdf tells me: "SD card must be pre-programmed at 0x1000 offset starting with RCW
data, PBI commands, SPL, and U-Boot image."

pastedImage_1.png

0 项奖励
回复
1 解答
1,813 次查看
ufedor
NXP Employee
NXP Employee

Program the image to SD card in Linux.
dd if=<U-Boot SD card image> of=/dev/sdb bs=512 seek=8

where "<U-Boot SD card image>" is the binary image file name with the path.

在原帖中查看解决方案

6 回复数
1,813 次查看
oyvind_harboe
Contributor I

I've discovered that my Ubuntu 18 laptop sometimes fails to write to the SD card. There's no error message, the "sudo dd ..;sync" commands happily completes. However, the SD card is not updated. The fix is to reboot my PC.

Also, if I forget to insert the SD card, the "sudo dd ...;sync" command still completes successfully, which is unfortunate. I'd much prefer an explict error message.

0 项奖励
回复
1,813 次查看
sinanakman
Senior Contributor III

Hi øyvind

Try issuing a "sync" after dd is completed.

Regards

Sinan Akman

0 项奖励
回复
1,813 次查看
oyvind_harboe
Contributor I

Sorry, I should have been more specific. I'm fraid I was seeing these problems programming the SD card with  "sudo dd; sync"

0 项奖励
回复
1,813 次查看
oyvind_harboe
Contributor I

I ran: "sudo dd if=tmp/deploy/images/t1042d4rdb/u-boot.bin-sdcard of=/dev/sdb bs=512 seek=8; sync"

Now it works: it boots from the SD-card.

Thanks!

Q: what's the difference between "bs=512 seek=8" and "bs=4096 seek=1"?

0 项奖励
回复
1,813 次查看
ufedor
NXP Employee
NXP Employee

I assume that this is a "dd" implementation feature - i.e. "bs" has to be equal to physically addressable block size for the specific device. "4096" looks good for hard drives.

0 项奖励
回复
1,814 次查看
ufedor
NXP Employee
NXP Employee

Program the image to SD card in Linux.
dd if=<U-Boot SD card image> of=/dev/sdb bs=512 seek=8

where "<U-Boot SD card image>" is the binary image file name with the path.