How to flash a new u-boot.bin with dd command?

Hi All,
I would like to flash a new u-boot by using dd command?

I have tried steps below but failed.

dd if=/dev/zero of=/dev/mmcblk0 seek=8192 count=8192
dd if=/path/to/new/u-boot of=/dev/mmcblk0 bs=1 seek=4194304 count=432068(size of the new u-boot)

Any comments are appreciated!

We are summarizing the steps for this. Will update once having conclusion.

Hi WayneWWW,
I finally success to reflash the new u-boot in a running system.
In addition to flash a new u-boot, we need to flash the corresponding BCT image (I guess so) into mmc boot partition.
But I don’t know how to generate the BCT image(??) so far.
So we need to dump the corresponding BCT image from the device which flashed the new u-boot.

I do this by following steps.

  1. Let MMC boot partition can be accessed. Please refer to link below.
    https://devtalk.nvidia.com/default/topic/802197/jetson-tk1/problem-solved-support-for-uboot-tools-fw_printenv-fw_setenv-on-linux-for-tegra/post/4425615/#4425615

  2. Flash the new u-boot by using nvidia flash tool. When system boot up, dump boot.bin form /dev/mmcblk0boot0.

$ dd if=/dev/mmcblk0boot0 of=boot.bin
  1. Flash another u-boot by using nvidia flash tool.

  2. Flash new u-boot in running system.

$ dd if=/dev/zero of=/dev/mmcblk0 seek=8192 count=8192     
$ dd if=/path/to/new/u-boot of=/dev/mmcblk0 bs=1 seek=4194304 count=432068
   
Add ended byte in the end of the new u-boot.
$ echo -n $'\x80' | dd of=/dev/mmcblk0 bs=1 seek=4626372

Flash the corresponding BCT image into mmc boot partition.
$ dd if=boot.bin of=/dev/mmcblk0boot0

My questions are

  1. Is the BCT image in mmcblk0boot0?
  2. How could I generate this image in mmcblk0boot0 by myself?

Many thanks.

FrankPCP,

Yes, BCT image is in “/dev/mmcblk0boot0”

Do you see a tool named " mkbctpart" under Jetpack folder? That tool can help you regenerate BCT and uboot image.