uEnv.txt 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # This is the sample uEnv.txt file for HiFive Unleashed U-boot
  2. # The current convention (SUBJECT TO CHANGE) is that this file
  3. # will be loaded from the first MSDOS(fat) GPT partition on the
  4. # MMC card.
  5. # for debugging boot
  6. bootargs=video=640x480 console=ttySI0 root=/dev/mmcblk0p2 rootwait
  7. # for normal boot
  8. #bootargs=video=640x480 root=/dev/mmcblk0p2 rootwait
  9. # To boot from partition 2 of an NVME drive (with a PCI iofpga,
  10. # such as the MicroSemi expansion board, uncomment below:
  11. #bootargs=debug console=tty0 console=ttySIF0 root=/dev/nvme0n1p2
  12. # to boot an initramfs (buildroot or debian/etc) use this
  13. #setupchosen=run setupvml; run setupird
  14. # to boot with straight to the root= parition, uncomment below
  15. # so we do not set the ramdisk pointers
  16. #setupchosen=run setupvml
  17. setupchosen=run setupird
  18. # The FIT file to boot from
  19. fitfile=hifiveu.fit
  20. # The rest of this is mostly of interest to u-boot developers
  21. # below much match what's in FIT (ugha)
  22. bbladdr=80000000
  23. fdtaddr=81f00000
  24. vmladdr=80200000
  25. irdaddr=82000000
  26. # oh the hack.. use a large size.. ugh
  27. irdsize=01000000
  28. vmlsize=00800000
  29. newfdt=f0000000
  30. # Use the FDT in the FIT image..
  31. #setupfdt1=fdt addr ${fdtaddr}; fdt resize; fdt chosen; fdt move ${fdtaddr} ${newfdt}
  32. #use FDT that came with uboot
  33. #setupfdt1=fdt addr ${newfdt}; fdt resize; fdt chosen; fdt move ${fdtaddr} ${newfdt}
  34. #Use fit image, but don't call fdt move (TODO: understand later)
  35. setupfdt1=fdt addr ${newfdt}; fdt resize; fdt chosen
  36. setupird=setexpr irdend ${irdaddr} + ${irdsize}; fdt set /chosen linux,initrd-start <0x0 0x${irdaddr}>; fdt set /chosen linux,initrd-end <0x0 0x${irdend}>
  37. setupvml=setexpr vmlend ${vmladdr} + ${vmlsize}; fdt set /chosen riscv,kernel-start <0x0 0x${vmladdr}>; fdt set /chosen riscv,kernel-end <0x0 0x${vmlend}>
  38. #setupfdt2=fdt set /chosen bootargs ${bootargs}; fdt print /chosen
  39. setupfdt2=fdt print /chosen; fdt set /chosen bootargs "${bootargs}"; fdt set /firmware uboot,ver ${ver}; fdt print /chosen
  40. bootwait=setenv _delay ${bootdelay}; echo ${_delay}; while test ${_delay} > 0; do sleep 1; setexpr _delay ${_delay} - 1; echo ${_delay}; done
  41. # this assumes ${fileaddr} is already set!!
  42. boot2=fatload mmc 0:1 ${fileaddr} ${fitfile}; bootm start ${fileaddr}; run setupfdt1; run setupchosen; run setupfdt2; bootm loados ${fileaddr}; echo "Booting kernel in"; run bootwait; go 80000000
  43. # if you want to network boot, for testing, uncomment the following:
  44. #boot2=dhcp; env import -t ${fileaddr} ${filesize}; run boot2