Browse Source

Merge branch 'CR_5623_1GDDR_samin.guo' into 'vf2-515-devel'

CR5623:Compatible with 1G DDR && Simplify the command of uboot to load Linux.

See merge request sbc/visionfive!42
andy.hu 10 months ago
parent
commit
0968755a20
3 changed files with 12 additions and 21 deletions
  1. 8 9
      README.md
  2. 2 6
      conf/vf2_nvme_uEnv.txt
  3. 2 6
      conf/vf2_uEnv.txt

+ 8 - 9
README.md

@@ -196,19 +196,19 @@ transfer image.fit through TFTP:
 Step1: set enviroment parameter:
 
 ```
-setenv bootfile vmlinuz; setenv fileaddr a0000000; setenv fdtcontroladdr 0xffffffffffffffff; setenv ipaddr 192.168.xxx.xxx; setenv serverip 192.168.xxx.xxx;
+setenv 192.168.xxx.xxx; setenv serverip 192.168.xxx.xxx;
 ```
 
 Step2: upload image file to ddr:
 
 ```
-tftpboot ${fileaddr} ${serverip}:image.fit;
+tftpboot ${loadaddr} image.fit;
 ```
 
 Step3: load and excute:
 
 ```
-bootm start ${fileaddr};bootm loados ${fileaddr};run chipa_set_linux;run cpu_vol_set;booti 0x40200000 0x46100000:${filesize} 0x46000000
+bootm start ${loadaddr};bootm loados ${loadaddr};run chipa_set_linux;run cpu_vol_set; booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r};
 ```
 
 When you see the `buildroot login:` message, then congratulations, the launch was successful
@@ -225,8 +225,7 @@ If we want to loading the other dtb, e.g. `jh7110-visionfive-v2-wm8960.dtb`, fol
 Step1: set enviroment parameter:
 
 ```
-setenv bootfile vmlinuz; setenv fileaddr a0000000; setenv fdtcontroladdr 0xffffffffffffffff; setenv ipaddr 192.168.xxx.xxx; setenv serverip 192.168.xxx.xxx;
-setenv kernel_comp_addr_r 0xb0000000;setenv kernel_comp_size 0x10000000;
+setenv ipaddr 192.168.xxx.xxx; setenv serverip 192.168.xxx.xxx;
 ```
 
 Step2: upload files to ddr:
@@ -400,14 +399,14 @@ Prepare the tftp sever. e.g. `sudo apt install tftpd-hpa` for Ubuntu host.
 5. Update SPL binary
 
    ```
-   StarFive # tftpboot 0xa0000000 ${serverip}:u-boot-spl.bin.normal.out
-   StarFive # sf update 0xa0000000 0x0 $filesize
+   StarFive # tftpboot ${loadaddr}  u-boot-spl.bin.normal.out
+   StarFive # sf update ${loadaddr} 0x0 $filesize
    ```
 
 6. Update U-Boot binary
 
    ```
-   StarFive # tftpboot 0xa0000000 ${serverip}:visionfive2_fw_payload.img
-   StarFive # sf update 0xa0000000 0x100000 $filesize
+   StarFive # tftpboot ${loadaddr}  visionfive2_fw_payload.img
+   StarFive # sf update ${loadaddr} 0x100000 $filesize
    ```
 

+ 2 - 6
conf/vf2_nvme_uEnv.txt

@@ -13,20 +13,16 @@ bootargs_ext=if test ${devnvme} = 0; then setenv bootargs "earlyprintk console=t
 #bootargs=earlyprintk console=ttyS0,115200 debug rootwait earlycon=sbi root=/dev/nvme0n1p4
 
 # for addr info
-fileaddr=0xa0000000
-fdtaddr=0x46000000
 # boot Linux flat or compressed 'Image' stored at 'kernel_addr_r'
-kernel_addr_r=0x40200000
-irdaddr=46100000
 irdsize=5f00000
 
 # Use the FDT in the FIT image..
 setupfdt1=fdt addr ${fdtaddr}; fdt resize;
 
-setupird=setexpr irdend ${irdaddr} + ${irdsize}; fdt set /chosen linux,initrd-start <0x0 0x${irdaddr}>; fdt set /chosen linux,initrd-end <0x0 0x${irdend}>
+setupird=setexpr irdend ${ramdisk_addr_r} + ${irdsize}; fdt set /chosen linux,initrd-start <0x0 0x${ramdisk_addr_r}>; fdt set /chosen linux,initrd-end <0x0 0x${irdend}>
 
 setupfdt2=fdt set /chosen bootargs "${bootargs}";
 
 bootwait=setenv _delay ${bootdelay}; echo ${_delay}; while test ${_delay} > 0; do sleep 1; setexpr _delay ${_delay} - 1; echo ${_delay}; done
 
-boot2=run bootargs_ext; nvme dev ${devnvme}; fatload nvme ${devnvme}:${partnum} ${fileaddr} ${fitfile}; bootm start ${fileaddr}; run setupfdt1;run setupird;run setupfdt2; bootm loados ${fileaddr}; run chipa_set_linux; run cpu_vol_set; echo "Booting kernel in"; booti ${kernel_addr_r} ${irdaddr}:${filesize} ${fdtaddr}
+boot2=run bootargs_ext; nvme dev ${devnvme}; fatload nvme ${devnvme}:${partnum} ${loadaddr} ${fitfile}; bootm start ${loadaddr}; run setupfdt1;run setupird;run setupfdt2; bootm loados ${loadaddr}; run chipa_set_linux; run cpu_vol_set; echo "Booting kernel in"; booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdtaddr}

+ 2 - 6
conf/vf2_uEnv.txt

@@ -13,20 +13,16 @@ bootargs_ext=if test ${devnum} = 0; then setenv bootargs "earlyprintk console=tt
 #bootargs=earlyprintk console=ttyS0,115200 debug rootwait earlycon=sbi root=/dev/mmcblk1p4
 
 # for addr info
-fileaddr=0xa0000000
-fdtaddr=0x46000000
 # boot Linux flat or compressed 'Image' stored at 'kernel_addr_r'
-kernel_addr_r=0x40200000
-irdaddr=46100000
 irdsize=5f00000
 
 # Use the FDT in the FIT image..
 setupfdt1=fdt addr ${fdtaddr}; fdt resize;
 
-setupird=setexpr irdend ${irdaddr} + ${irdsize}; fdt set /chosen linux,initrd-start <0x0 0x${irdaddr}>; fdt set /chosen linux,initrd-end <0x0 0x${irdend}>
+setupird=setexpr irdend ${ramdisk_addr_r} + ${irdsize}; fdt set /chosen linux,initrd-start <0x0 0x${ramdisk_addr_r}>; fdt set /chosen linux,initrd-end <0x0 0x${irdend}>
 
 setupfdt2=fdt set /chosen bootargs "${bootargs}";
 
 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 start ${fileaddr}; run setupfdt1;run setupird;run setupfdt2; bootm loados ${fileaddr}; run chipa_set_linux; run cpu_vol_set; echo "Booting kernel in"; booti ${kernel_addr_r} ${irdaddr}:${filesize} ${fdtaddr}
+boot2=run bootargs_ext; mmc dev ${devnum}; fatload mmc ${devnum}:${partnum} ${loadaddr} ${fitfile}; bootm start ${loadaddr}; run setupfdt1;run setupird;run setupfdt2; bootm loados ${loadaddr}; run chipa_set_linux; run cpu_vol_set; echo "Booting kernel in"; booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdtaddr}