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
Next revisionBoth sides next revision
en:bpi-r3:uboot [2022/10/10 07:11] – [building] franken:bpi-r3:uboot [2023/01/29 19:18] – [writing emmc] frank
Line 23: Line 23:
   sudo dd if=build/mt7986/release/fip.bin of=/dev/sdb4   sudo dd if=build/mt7986/release/fip.bin of=/dev/sdb4
  
-ATF branch contains gpt file for flashing first and script to create basic image with bootchain+ATF branch contains gpt file (gpt_sdmmc_100m6g.img) for flashing first and script to create basic image with bootchain 
 + 
 +  ./build.sh createimg
 ===== booting kernel ===== ===== booting kernel =====
  
Line 351: Line 353:
  
   mmc bootbus 0 0 0 0   mmc bootbus 0 0 0 0
 +
 +
 +instead of writing the gpt image file you can bootup a linux with initrd
 +
 +  BPI-R3> run useusb
 +  BPI-R3> setenv initrd rootfs.cpio.zst                                                                                                                                      
 +  BPI-R3> setenv fit bpi-r3.itb
 +  BPI-R3> run newboot
 +
 +and create gpt like i do it for [[https://github.com/frank-w/u-boot/blob/mtk-atf/build.sh#L114|sdcard]], original gpt uses same values for partitions and use a partition named gpt (0..33) instead of bl2 (34..8191)
 +
 +<code>
 +sudo sgdisk -o ${LDEV}
 +#sudo sgdisk -a 1 -n 1:34:8191 -A 1:set:2 -t 1:8300 -c 1:"bl2" ${LDEV} #sdcard only
 +sudo sgdisk -a 1 -n 1:0:33 -A 1:set:2 -t 1:8300 -c 1:"gpt" ${LDEV} #emmc only
 +sudo sgdisk -a 1 -n 2:8192:9215 -t 2:8300 -c 2:"u-boot-env" ${LDEV}
 +sudo sgdisk -a 1 -n 3:9216:13311 -t 3:8300 -c 3:"factory" ${LDEV}
 +sudo sgdisk -a 1 -n 4:13312:17407 -t 4:8300 -c 4:"fip" ${LDEV}
 +sudo sgdisk -a 1024 -n 5:17408:${bootend} -t 5:8300 -c 5:"boot" ${LDEV}
 +sudo sgdisk -a 1024 -n 6:${rootstart}:${rootend} -t 6:8300 -c 6:"rootfs" ${LDEV}
 +</code>
 ===== chainload uboot ===== ===== chainload uboot =====
  
en/bpi-r3/uboot.txt · Last modified: 2024/04/07 09:39 by frank