Advertisement
zmatt

boot BBB from u-boot (no initramfs, no overlays)

Jun 27th, 2022 (edited)
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.74 KB | None | 0 0
  1. # this is for booting from eMMC;
  2. # to boot from SD card use "mmc 0:1" instead of "mmc 1:1" and "mmcblk0p1" instead of "mmcblk1p1"
  3.  
  4. # set defaults
  5. run findfdt ; setenv dtb $fdtfile
  6.  
  7. # load settings from /boot/uEnv.txt
  8. load mmc 1:1 $loadaddr /boot/uEnv.txt
  9. env import -t $loadaddr $filesize
  10.  
  11. # this is the right time to customize if needed, e.g. to
  12. # reset the dtb to its default:
  13. #setenv dtb $fdtfile
  14.  
  15. # load kernel
  16. load mmc 1:1 $loadaddr /boot/vmlinuz-$uname_r
  17.  
  18. # load DT (try two locations):
  19. load mmc 1:1 $fdtaddr /boot/dtbs/$uname_r/$dtb || load mmc 1:1 $fdtaddr /boot/dtbs/$dtb
  20.  
  21. # set kernel parameters
  22. setenv bootargs console=$console root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait $cmdline
  23.  
  24. # go!
  25. bootz $loadaddr - $fdtaddr
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement