Skip to content

Commit

Permalink
u-boot-starfive: vf2: Update uEnv.txt
Browse files Browse the repository at this point in the history
Align uEnv.txt with the Starfive SDK to boot from SD card.
uEnv sets required variables to read the fitImage from the
partition 3 on the SD card and rootfs is expected on the
partition 4.

Signed-off-by: Alexey Firago <alexey.firago@gmail.com>
  • Loading branch information
a-firago committed Mar 7, 2023
1 parent 824b51c commit 9e68fe9
Showing 1 changed file with 22 additions and 14 deletions.
36 changes: 22 additions & 14 deletions recipes-bsp/u-boot/u-boot-starfive/uEnv-visionfive2.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
fdt_high=0xffffffffffffffff
initrd_high=0xffffffffffffffff
kernel_addr_r=0x44000000
kernel_comp_addr_r=0x90000000
kernel_comp_size=0x10000000
fdt_addr_r=0x48000000
ramdisk_addr_r=0x48100000
# Move distro to first boot to speed up booting
boot_targets=distro mmc0 dhcp
# Fix wrong fdtfile name
fdtfile=starfive/jh7110-visionfive-v2.dtb
# Fix missing bootcmd
bootcmd=run bootcmd_distro
bootargs=root=/dev/mmcblk1p2 rw console=tty0 console=ttyS0,115200 earlycon rootwait stmmaceth=chain_mode:1 selinux=0
# This is the sample jh7110_uEnv.txt file for starfive visionfive U-boot
# The current convention (SUBJECT TO CHANGE) is that this file
# will be loaded from the third partition on the
# MMC card.
#devnum=1
partnum=3

# The FIT file to boot from
fitfile=fitImage

# for debugging boot
bootargs_ext=if test ${devnum} = 0; then setenv bootargs "earlyprintk console=ttyS0,115200 debug rootwait earlycon=sbi root=/dev/mmcblk0p4"; else setenv bootargs "earlyprintk console=ttyS0,115200 debug rootwait earlycon=sbi root=/dev/mmcblk1p4"; fi;

# for addr info
fileaddr=0xa0000000
fdtaddr=0x46000000
# boot Linux flat or compressed 'Image' stored at 'kernel_addr_r'
kernel_addr_r=0x40200000

bootwait=setenv _delay ${bootdelay}; echo ${_delay}; while test ${_delay} > 0; do sleep 1; setexpr _delay ${_delay} - 1; echo ${_delay}; done

boot2=run bootargs_ext; mmc dev ${devnum}; fatload mmc ${devnum}:${partnum} ${fileaddr} ${fitfile}; bootm ${fileaddr}

0 comments on commit 9e68fe9

Please sign in to comment.