Browse Source

conf: rewrite jh7110-uEnv.txt file.

Parse bootcmd parameters by jh7110-uEnv.txt

Signed-off-by: Clivia.Cai <Clivia.Cai@starfivetech.com>
Clivia.Cai 2 years ago
parent
commit
aa65a73062
1 changed files with 18 additions and 29 deletions
  1. 18 29
      conf/jh7110_uEnv.txt

+ 18 - 29
conf/jh7110_uEnv.txt

@@ -1,44 +1,33 @@
-# This is the sample uEnv.txt file for HiFive Unleashed U-boot
+# 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 first MSDOS(fat) GPT partition on the
-# MMC card. 
-
-# for debugging boot
-#bootargs=video=640x480 console=ttySI0 root=/dev/mmcblk0p2 rootwait
-bootargs=earlyprintk console=ttyS0,115200 debug rootwait stmmaceth=chain_mode:1 root=/dev/mmcblk0p3 
-
+# will be loaded from the third partition on the
+# MMC card.
+devnum=0
+partnum=3
 
 # The FIT file to boot from
-fitfile=hifiveu.fit
-
-# The rest of this is mostly of interest to u-boot developers
-# below much match what's in FIT (ugha)
-bbladdr=80700000
-fdtaddr=86000000
-irdaddr=86100000
-irdsize=06400000
+fitfile=starfiveu.fit
 
-# Use the FDT in the FIT image..
-#setupfdt1=fdt addr ${fdtaddr}; fdt resize; fdt chosen; fdt move ${fdtaddr} ${newfdt}
+# for debugging boot
+bootargs=earlyprintk console=ttyS0,115200 debug rootwait 
+#stmmaceth=chain_mode:1 root=/dev/mmcblk0p4 
 
-#use FDT that came with uboot
-#setupfdt1=fdt addr ${newfdt}; fdt resize; fdt chosen; fdt move ${fdtaddr} ${newfdt}
+# for addr info
+fileaddr=0xa0000000
+fdtaddr=0x46000000
+# boot Linux flat or compressed 'Image' stored at 'kernel_addr_r'
+kernel_addr_r=0x40200000
+irdaddr=0x46100000
+irdsize=0x5f00000
 
-#Use fit image, but don't call fdt move  (TODO: understand later)
-#setupfdt1=fdt addr ${newfdt}; fdt resize; fdt chosen
+# Use the FDT in the FIT image..
 setupfdt1=fdt addr ${fdtaddr}
 
 setupird=setexpr irdend ${irdaddr} + ${irdsize}; fdt set /chosen linux,initrd-start <0x0 0x${irdaddr}>; fdt set /chosen linux,initrd-end <0x0 0x${irdend}>
 
-#setupfdt2=fdt set /chosen bootargs ${bootargs}; fdt print /chosen
-#setupfdt2=fdt print /chosen; fdt set /chosen bootargs "${bootargs}"; fdt set /firmware uboot,ver ${ver}; fdt print /chosen
 setupfdt2=fdt print /chosen; fdt set /chosen bootargs "${bootargs}"; fdt print /chosen
 
 bootwait=setenv _delay ${bootdelay}; echo ${_delay}; while test ${_delay} > 0; do sleep 1; setexpr _delay ${_delay} - 1; echo ${_delay}; done
 
-# this assumes ${fileaddr} is already set!!
-#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
-boot2=fatload mmc 0:1 ${fileaddr} ${fitfile}; bootm start ${fileaddr}; run setupfdt1;run setupird;run setupfdt2; bootm loados ${fileaddr}; echo "Booting kernel in"; go ${bbladdr} ${fdtaddr}
+boot2=fatload mmc ${devnum}:${partnum} ${fileaddr} ${fitfile}; bootm start ${fileaddr}; run setupfdt1;run setupird;run setupfdt2; bootm loados ${fileaddr}; echo "Booting kernel in"; booti ${kernel_addr_r} ${irdaddr}:${filesize} ${fdtaddr}
 
-# if you want to network boot, for testing, uncomment the following:
-#boot2=dhcp; env import -t ${fileaddr} ${filesize}; run boot2