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."
Solved! Go to Solution.
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.
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.
Hi øyvind
Try issuing a "sync" after dd is completed.
Regards
Sinan Akman
Sorry, I should have been more specific. I'm fraid I was seeing these problems programming the SD card with "sudo dd; sync"
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"?
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.
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.