User Tools

Site Tools



en:bpi-r3:uboot

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
en:bpi-r3:uboot [2023/04/07 10:51] – [kernel/initrd] franken:bpi-r3:uboot [2024/04/07 09:38] – [writing emmc] frank
Line 69: Line 69:
   BPI-R3> run newboot   BPI-R3> run newboot
  
-  #using spi dt-overlay+  #using dt-overlay config
   BPI-R3> setenv bootconf "#conf-sd-nor" #conf-sd-nor=sd base dts + nor dt overlay   BPI-R3> setenv bootconf "#conf-sd-nor" #conf-sd-nor=sd base dts + nor dt overlay
  
Line 202: Line 202:
 device 0 offset 0xc00000, size 0x808c5c                                          device 0 offset 0xc00000, size 0x808c5c                                         
 SF: 8424540 bytes @ 0xc00000 Written: OK SF: 8424540 bytes @ 0xc00000 Written: OK
 +</code>
 +
 +loading it:
 +
 +<code>
 +MT7986> setenv useinitrd 'setenv root "/dev/ram0 rw";setenv bootopts "${bootopts} initrd=${rdaddr},20M";'
 +MT7986> sf read ${rdaddr} 0x180000 0xa80000
 +device 0 offset 0x180000, size 0xa80000
 +SF: 11010048 bytes @ 0x180000 Read: OK
 +MT7986> sf read ${kaddr} 0xc00000 0x1400000
 +device 0 offset 0xc00000, size 0x1400000
 +SF: 20971520 bytes @ 0xc00000 Read: OK
 +MT7986> setenv bootnor 'run useinitrd;run setbootconf; run buildargs; bootm ${kaddr}${bootconf};'
 +MT7986> run bootnor
 </code> </code>
 ===== usb ===== ===== usb =====
Line 244: Line 258:
 </code> </code>
 ===== writing emmc ===== ===== writing emmc =====
 +
 +:!: newest atf for mediatek needs gpt with fip partition so it must be created first (maybe copy first 1mM from sdcard to emmc).
  
 get emmc/gpt information: get emmc/gpt information:
Line 391: Line 407:
  
 now flash bl2 to boot0 block and fip to fip partition now flash bl2 to boot0 block and fip to fip partition
 +
 +short way using my environment:
 +<code>
 +MT7986> setenv bl2file 2023.04/bpi-r3_emmc_bl2.img                                                                                                                                          
 +MT7986> setenv fipfile 2023.04/bpi-r3_emmc_fip.bin                                                                                                                                          
 +MT7986> run wremmc                                                                                                                                                                          
 +bl2file=2023.04/bpi-r3_emmc_bl2.img                                                                                                                                                         
 +195976 bytes read in 20 ms (9.3 MiB/s)                                                                                                                                                      
 +                                                                                                                                                                                            
 +MMC erase: dev # 0, block # 0, count 1024 ... 1024 blocks erased: OK                                                                                                                        
 +                                                                                                                                                                                            
 +MMC write: dev # 0, block # 0, count 1024 ... 1024 blocks written: OK                                                                                                                       
 +fipfile=2023.04/bpi-r3_emmc_fip.bin                                                                                                                                                         
 +645001 bytes read in 58 ms (10.6 MiB/s)                                                                                                                                                     
 +                                                                                                                                                                                            
 +MMC erase: dev # 0, block # 13312, count 4096 ... 4096 blocks erased: OK                                                                                                                    
 +                                                                                                                                                                                            
 +MMC write: dev # 0, block # 13312, count 4096 ... 4096 blocks written: OK
 +</code>
 +manual way:
 +<hidden>
 <code> <code>
 BPI-R3> mmc dev 0 BPI-R3> mmc dev 0
Line 417: Line 454:
 BPI-R3> BPI-R3>
 </code> </code>
 +</hidden>
  
 If boot from emmc does not work,maybe bootbus needs to be changed to 0: If boot from emmc does not work,maybe bootbus needs to be changed to 0:
en/bpi-r3/uboot.txt · Last modified: 2024/04/07 09:39 by frank