We want to use dd command to download uboot image instead of MFGtool to fast debugging process as the following Freescale documents mention:
Although the steps can be finshed, the uboot remains the same as before. We made a special printf flag to verify this. However, with the same uboot image, MFGtool can update it without problem. Is there any extra step has to be done ? security etc.
By the way, there is NO problem with dd recocery Image.
We are testing sabresd_6dq for smart devices and anroid 4.4.3.
Thanks for any suggestion.
1:
https://community.freescale.com/docs/DOC-95015
2: Android user guide:
The Linux utility "dd" on Linux computer can be used to download the images into the MMC/SD/TF card.
Before downloading, ensure that your MMC/SD/TF card partitions are created as described in Storage partitions.
All partitions can be recognized by the Linux computer. To download all images into the card, use the commands below:
Download the U-Boot image:
# sudo dd if=u-boot.imx of=/dev/sdx bs=1K seek=1; sync
Download the boot image:
# sudo dd if=boot.img of=/dev/sdx1; sync
Download the Android system root image:
# sudo dd if=system.img of=/dev/sdx5; sync
Download the Android recovery image:
# sudo dd if=recovery.img of=/dev/sdx2; sync
The commands seems to be correct. Do the card have right partitions? Are you using right "x" letter there?
If you are unsure about the commands you can make one single TF card using MFGtool
then make sure that it works fine and then make its image:
# sudo dd if=/dev/sdx of=OSimage bs=1024k
And then you can simply burn the image to fresh cards:
# sudo dd if=OSimage of=/dev/sdx bs=1024k
Have a great day,
Victor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Victor,
Thanks for your reply.
During this debugging, we use EMMC on device which is /dev/block/mmcblk3 (android). After android booting successfully, we confirm this by mount command output.
We want this dd way to avoid too many hardwre setting changes like dip switch, usb cables plugging etc. After uboot is built, then adb pushes it to device, then dd updates it. This way will save lot of time comparing to MFGtool method.
Thanks for any more suggestion.
Have a nice day,
Tony
The sabresd_6dq console log is attached here:
The log shows that bs=1k is just treat as bs=1. But this correction does not fix the problem.
/worng command mentioned in doc:
dd if=u-boot-imx6q.imx of=/dev/block/mmcblk3 bs=1K seek=1; sync <
392192+0 records in
392192+0 records out
392192 bytes transferred in 3.848 secs (101920 bytes/sec)
/Correct command:
dd if=u-boot-imx6q.imx of=/dev/block/mmcblk3 bs=1024 seek=1; sync <
383+0 records in
383+0 records out
392192 bytes transferred in 0.010 secs (39219200 bytes/sec)
root@sabresd_6dq:/data # sync
root@sabresd_6dq:/data # ls -l
drwxrwx--x system system 1970-01-01 00:00 app
drwx------ root root 1970-01-01 00:00 app-asec
drwxrwx--x system system 1970-01-01 00:00 app-lib
drwxrwx--x system system 1970-01-01 00:00 app-private
drwx------ system system 1970-01-02 00:00 backup
lrwxrwxrwx root root 1970-01-01 00:00 bugreports -> /data/data/com.android.shell/files/bugreports
drwxrwx--x system system 1970-01-02 00:01 dalvik-cache
drwxrwx--x system system 1970-01-02 00:00 data
drwxr-x--- root log 1970-01-01 00:00 dontpanic
drwxrwx--- drm drm 1970-01-02 00:00 drm
drwxr-x--x root root 1970-01-01 00:00 local
drwxrwx--- root root 1970-01-01 00:00 lost+found
drwxrwx--- media_rw media_rw 1970-01-02 00:00 media
drwxrwx--- mediadrm mediadrm 1970-01-01 00:00 mediadrm
drwxrwx--t system misc 1970-01-01 00:00 misc
drwx------ root root 1970-01-02 00:03 property
drwxrwx--x system system 1970-01-01 00:00 resource-cache
drwx--x--x system system 1970-01-01 00:00 security
drwxr-x--- root shell 1970-01-01 00:00 ssh
drwxrwxr-x system system 1970-01-02 00:03 system
-rwxrwxrwx root root 392192 2015-09-04 20:35 u-boot-imx6q.imx
drwx--x--x system system 1970-01-01 00:00 user
root@sabresd_6dq:/data # request_suspend_state: sleep (0->3) at 383982400378 (1970-01-02 00:09:16.350279711 UTC)
active wake lock gadget
active wake lock PowerManagerService.Display
active wake lock PowerManagerService.WakeLocks
mma enable setting inactive
root@sabresd_6dq:/data # ls -l /dev/block/mmc*
brw------- root root 179, 0 1970-01-02 00:03 mmcblk2
brw------- root root 179, 8 1970-01-02 00:03 mmcblk3
brw------- root root 179, 16 1970-01-02 00:03 mmcblk3boot0
brw------- root root 179, 24 1970-01-02 00:03 mmcblk3boot1
brw------- root root 179, 9 1970-01-02 00:03 mmcblk3p1
brw------- root root 259, 2 1970-01-02 00:03 mmcblk3p10
brw------- root root 179, 10 1970-01-02 00:03 mmcblk3p2
brw------- root root 179, 11 1970-01-02 00:03 mmcblk3p3
brw------- root root 179, 12 1970-01-02 00:03 mmcblk3p4
brw------- root root 179, 13 1970-01-02 00:03 mmcblk3p5
brw------- root root 179, 14 1970-01-02 00:03 mmcblk3p6
brw------- root root 179, 15 1970-01-02 00:03 mmcblk3p7
brw------- root root 259, 0 1970-01-02 00:03 mmcblk3p8
brw------- root root 259, 1 1970-01-02 00:03 mmcblk3p9
brw------- root root 179, 32 1970-01-02 00:03 mmcblk3rpmb
dd if=u-boot-imx6q.imx of=/dev/block/mmcblk3 bs=1K seek=1; sync <
392192+0 records in
392192+0 records out
392192 bytes transferred in 3.848 secs (101920 bytes/sec)
dd if=u-boot-imx6q.imx of=/dev/block/mmcblk3 bs=1024 seek=1; sync <
383+0 records in
383+0 records out
392192 bytes transferred in 0.010 secs (39219200 bytes/sec)
root@sabresd_6dq:/data #
root@sabresd_6dq:/data #
root@sabresd_6dq:/data #
root@sabresd_6dq:/data # sync
root@sabresd_6dq:/data #
power off ->on
=====> A flag is set to verify the new uboot image in log output:
Version ID:009BBA -----> :check_and_clean: reg 0, flag_set 0
But the results indicate the uboot image had not been updated by this way. But MFGtool can update the same uboot image correctly.
U-Boot 2014.04-08639-ge5ef3e4-dirty (Sep 04 2015 - 13:18:46)
CPU: Freescale i.MX6Q rev1.2 at 792 MHz
CPU: Temperature 31 C, calibration data: 0x5924f87d
Reset cause: POR
Board: MX6-SabreSD
I2C: ready
DRAM: 1 GiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
*** Warning - bad CRC, using default environment
No panel detected: default to Hannstar-XGA
Display: Hannstar-XGA (1024x768)
In: serial
Out: serial
Err: serial
Found PFUZE100 deviceid=10,revid=11
Version ID:009BBA -----> :check_and_clean: reg 0, flag_set 0
Fastboot: Normal
flash target is MMC:2
Bad partition index:1 for partition:boot
Bad partition index:2 for partition:recovery
Bad partition index:5 for partition:system
Bad partition index:8 for partition:misc
Net: FEC [PRIME]
Normal Boot
Hit any key to stop autoboot: 0
booti mmc2
booti: version:006CCC-------first check boot count in misc:0
------>just before reading booti partition: boot
booti: bad boot image magic
fastboot is in init......USB Mini b cable Connected!
fastboot initialized
USB_SUSPEND
USB_RESET
USB_PORT_CHANGE 0x4
USB_RESET
USB_PORT_CHANGE 0x4