Linux refresh uboot

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Linux refresh uboot

Jump to solution
1,590 Views
songhongliang
Contributor II

yocto imx8dx L5.4

I have a requirement now, my uboot has some bugs, but my device is already in the hands of the customer. I can remotely download files in Linux. Is there any way for me to update the uboot firmware downloaded from Linux and write it back to EMMC without using external devices such as PCs.

0 Kudos
1 Solution
1,424 Views
JudyJeo
Contributor III
1. 看一下那个partition 是boot用的
mmc extcsd read /dev/mmcblk0 |grep -A 3 PARTITION_CONFIG 
 
2. 使能其中一个partition
mmc bootpart enable 1 0  /dev/mmcblk0   enable boot1
mmc bootpart enable 2 0  /dev/mmcblk0   enable boot2 
mmc bootpart enable 7 0  /dev/mmcblk0   enable user
 
enable 完了可以用 #1 命令确认一下
 
3. 写bootloader 去 boot partition 
   
   a. boot1 
      echo 0 > /sys/block/mmcblk0boot0/force_ro
      dd if=flash.bin of=/dev/mmcblk0boot0
      echo 1 > /sys/block/mmcblk0boot0/force_ro
  
b. boot2
  echo 0 > /sys/block/mmcblk0boot1/force_ro
      dd if=flash.bin of=/dev/mmcblk0boot1
      echo 1 > /sys/block/mmcblk0boot1/force_ro
  
c  user
   
      dd if=flash.bin of=/dev/mmcblk0 bs=1k seek=32 
  
  
4. i.MX8X 的两个boot 分区是互相备份的。 见文章
    
 
我觉得 是smithcoba 的这个笔误 写错了 dd if=flash.bin of=/dev/mmc0boot0 应该是 dd if=flash.bin of=/dev/mmcblk0boot0
如果你照着没有改就错了。 
 

 

View solution in original post

0 Kudos
12 Replies
1,531 Views
smithcoba
Contributor III

suppose you are using mmc0 boot0

On the board:

echo 0 > /sys/block/mmcblk0boot0/force_ro
dd if=flash.bin of=/dev/mmc0boot0
echo 1 > /sys/block/mmcblk0boot0/force_ro

0 Kudos
1,466 Views
songhongliang
Contributor II

No effect, cat/proc/meminfo shows that the total memory has not changed, but using the uuu tool to flash the machine memory has changed. But the equipment has already been shipped

0 Kudos
1,574 Views
joanxie
NXP TechSupport
NXP TechSupport

你能用中文再描述一下吗? I can remotely download files in Linux. 你是指从linux下载什么文件?是说下载Images?你的需求是想从远程通过网络写uboot到板子里面的意思吗?

0 Kudos
1,485 Views
songhongliang
Contributor II

在Linux中 板子自己把自己的flash.bin给更新掉

0 Kudos
1,478 Views
JudyJeo
Contributor III

那个叫 smithcoba的人 不是已经告诉你怎么做了吗。

 

0 Kudos
1,465 Views
songhongliang
Contributor II

没有效果 ,操作完 重启   内存没有变化

 

0 Kudos
1,443 Views
JudyJeo
Contributor III

1. emmc 是几? emmc0 emmc2 你实际的 号码替换

2. uboot 里面看一下 现在是从哪个partition boot 的   mmc partconf 2(2 是emmc 的interface 的号码) 比方。是不是更新了boot 的那个partition

3. uboot 的log 里面有build的时间。 build 时间变了没有。 变了就是更新好了。 

0 Kudos
1,425 Views
JudyJeo
Contributor III
1. 看一下那个partition 是boot用的
mmc extcsd read /dev/mmcblk0 |grep -A 3 PARTITION_CONFIG 
 
2. 使能其中一个partition
mmc bootpart enable 1 0  /dev/mmcblk0   enable boot1
mmc bootpart enable 2 0  /dev/mmcblk0   enable boot2 
mmc bootpart enable 7 0  /dev/mmcblk0   enable user
 
enable 完了可以用 #1 命令确认一下
 
3. 写bootloader 去 boot partition 
   
   a. boot1 
      echo 0 > /sys/block/mmcblk0boot0/force_ro
      dd if=flash.bin of=/dev/mmcblk0boot0
      echo 1 > /sys/block/mmcblk0boot0/force_ro
  
b. boot2
  echo 0 > /sys/block/mmcblk0boot1/force_ro
      dd if=flash.bin of=/dev/mmcblk0boot1
      echo 1 > /sys/block/mmcblk0boot1/force_ro
  
c  user
   
      dd if=flash.bin of=/dev/mmcblk0 bs=1k seek=32 
  
  
4. i.MX8X 的两个boot 分区是互相备份的。 见文章
    
 
我觉得 是smithcoba 的这个笔误 写错了 dd if=flash.bin of=/dev/mmc0boot0 应该是 dd if=flash.bin of=/dev/mmcblk0boot0
如果你照着没有改就错了。 
 

 

0 Kudos
1,249 Views
yixinchi
Contributor I
你好,您知道/dev/mmcblk0和/dev/mmcblk1在emmc的地址吗,我可以uboot命令行下将uboot进行在线更新吗
0 Kudos
1,226 Views
yixinchi
Contributor I
Unfortunately, like you said the method I did not succeed, I read the IMX_LINUX_USERS_GUIDE.pdf manual before, I tried the mmc partition structure on page 9, and did not find the uboot that I downloaded using uuu, I even rummaged from 0x0 to 0xa00000 and did not find it
0 Kudos
1,504 Views
songhongliang
Contributor II

在imx8dx板子上,通过Linux  给自己的uboot重新刷写更新一下,uboot中默认是有预留的一百多M内存, 我想把这个内存给到linux用。但是板子已经在消费者手中了。或这有没有其他的方法 不用重新刷写uboot就能实现这个功能

0 Kudos
1,450 Views
joanxie
NXP TechSupport
NXP TechSupport
0 Kudos