Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
docs:techref:mtd [2021/10/06 14:33] – [Example (flash u-boot from OpenWrt)] gandalfdocs:techref:mtd [2023/03/04 18:00] (current) – typo openwart
Line 39: Line 39:
 Tested  on Marvell EspressoBinBoard based on MVEBU, (see [[https://forum.openwrt.org/t/is-it-possible-to-flash-u-boot-from-openwrt/90284|forum topic]]) Tested  on Marvell EspressoBinBoard based on MVEBU, (see [[https://forum.openwrt.org/t/is-it-possible-to-flash-u-boot-from-openwrt/90284|forum topic]])
 Download ''flash-image.bin'' for your specific hardware from [[https://downloads.openwrt.org/snapshots/targets/mvebu/cortexa53/|SnapShots]] Download ''flash-image.bin'' for your specific hardware from [[https://downloads.openwrt.org/snapshots/targets/mvebu/cortexa53/|SnapShots]]
-(it's not safe to do so, here is for demonstration purpose only), then write ''flash-image.bin'' to a MTD partition labeled as ''spi0.0'' (could be ''mtd0'') and reboot afterwards :+ 
 +You can checks your mtd partitions from proc :  
 +<code> 
 +root@EBIN:~# cat /proc/mtd  
 +dev:    size   erasesize  name 
 +mtd0: 003f0000 00010000 "firmware" 
 +mtd1: 00010000 00010000 "u-boot-env" 
 + 
 +</code> 
 + 
 +(it's not safe to do so, here is for demonstration purpose only),  
 + 
 +then write ''flash-image.bin'' to a MTD partition labeled as ''spi0.0'' (could be ''mtd0'' or ''firmware'') and reboot afterwards :
 <code> <code>
 cd /tmp cd /tmp
Line 59: Line 71:
 </code> </code>
  
-This patches the mtd source to include the "-static" optin when building the binary. This way the binary gets all dependent library-code embedded to make it run itself, as long as the correct CPU-target is used. The new binary can be extracted from the resulting package or just copied from ''build_dir/target-<ARCH>/linux-<TARGET>-<SUBTARGET>/mtd''.+This patches the mtd source to include the "-static" option when building the binary. This way the binary gets all dependent library-code embedded to make it run itself, as long as the correct CPU-target is used. The new binary can be extracted from the resulting package or just copied from ''build_dir/target-<ARCH>/linux-<TARGET>-<SUBTARGET>/mtd''.
  
 ===== Notes ===== ===== Notes =====
  • Last modified: 2021/10/06 14:33
  • by gandalf