mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-15 19:51:37 +00:00
Merge branch 'CR_5228_debian_nvme_boot' into 'vf2-devel'
CR_5228: Added booting from nvme support for debian See merge request sbc/u-boot!50
This commit is contained in:
commit
2139bf20ea
2 changed files with 29 additions and 9 deletions
|
@ -28,7 +28,7 @@ CONFIG_SPI_BOOT=y
|
|||
CONFIG_USE_BOOTARGS=y
|
||||
CONFIG_BOOTARGS="console=tty1 console=ttyS0,115200 debug rootwait earlycon=sbi"
|
||||
CONFIG_USE_BOOTCOMMAND=y
|
||||
CONFIG_BOOTCOMMAND="run load_vf2_env;run importbootenv;run boot2; run load_distro_uenv;run distro_bootcmd"
|
||||
CONFIG_BOOTCOMMAND="run load_vf2_env;run importbootenv;run boot2; run scan_boot_dev; run load_distro_uenv;run distro_bootcmd"
|
||||
CONFIG_USE_PREBOOT=y
|
||||
CONFIG_PREBOOT="run chipa_set_uboot;run mmcbootenv"
|
||||
CONFIG_DEFAULT_FDT_FILE="starfive/starfive_visionfive2.dtb"
|
||||
|
|
|
@ -141,32 +141,52 @@
|
|||
#define VF2_DISTRO_BOOTENV \
|
||||
"fatbootpart=1:3\0" \
|
||||
"distroloadaddr=0xb0000000\0" \
|
||||
"load_distro_uenv=" \
|
||||
"fatload mmc ${devnum}:3 ${distroloadaddr} /${bootenv}; " \
|
||||
"bootdev=mmc\0" \
|
||||
"scan_boot_dev=" \
|
||||
"if test ${bootmode} = flash; then " \
|
||||
"if pci enum; then " \
|
||||
"nvme scan; " \
|
||||
"echo pci enum ...;" \
|
||||
"fi; " \
|
||||
"if nvme dev; then " \
|
||||
"setenv fatbootpart ${devnvme}:${nvmepart};" \
|
||||
"setenv devnum ${devnvme};" \
|
||||
"setenv bootdev nvme;" \
|
||||
"else " \
|
||||
"if mmc dev ${devnum}; then " \
|
||||
"echo found device ${devnum};" \
|
||||
"else " \
|
||||
"setenv devnum 0;" \
|
||||
"mmc dev 0;" \
|
||||
"fi; " \
|
||||
"fi; " \
|
||||
"fi; \0" \
|
||||
"load_distro_uenv=" \
|
||||
"fatload ${bootdev} ${devnum}:3 ${distroloadaddr} /${bootenv}; " \
|
||||
"setenv fatbootpart ${devnum}:3; " \
|
||||
"env import ${distroloadaddr} 200; \0" \
|
||||
"fdt_loaddtb=" \
|
||||
"fatload mmc ${fatbootpart} ${fdt_addr_r} /dtbs/${fdtfile}; fdt addr ${fdt_addr_r}; \0" \
|
||||
"fatload ${bootdev} ${fatbootpart} ${fdt_addr_r} /dtbs/${fdtfile}; fdt addr ${fdt_addr_r}; \0" \
|
||||
"fdt_sizecheck=" \
|
||||
"fatsize mmc ${fatbootpart} /dtbs/${fdtfile}; \0" \
|
||||
"fatsize ${bootdev} ${fatbootpart} /dtbs/${fdtfile}; \0" \
|
||||
"set_fdt_distro=" \
|
||||
"if test ${chip_vision} = A; then " \
|
||||
"if test ${memory_size} = 200000000; then " \
|
||||
"run chipa_gmac_set;" \
|
||||
"run visionfive2_mem_set;" \
|
||||
"fatwrite mmc ${fatbootpart} ${fdt_addr_r} /dtbs/${fdtfile} ${filesize};" \
|
||||
"fatwrite ${bootdev} ${fatbootpart} ${fdt_addr_r} /dtbs/${fdtfile} ${filesize};" \
|
||||
"else " \
|
||||
"run chipa_gmac_set;" \
|
||||
"run visionfive2_mem_set;" \
|
||||
"fatwrite mmc ${fatbootpart} ${fdt_addr_r} /dtbs/${fdtfile} ${filesize};" \
|
||||
"fatwrite ${bootdev} ${fatbootpart} ${fdt_addr_r} /dtbs/${fdtfile} ${filesize};" \
|
||||
"fi;" \
|
||||
"else " \
|
||||
"run visionfive2_mem_set;" \
|
||||
"run cpu_vol_set;" \
|
||||
"fatwrite mmc ${fatbootpart} ${fdt_addr_r} /dtbs/${fdtfile} ${filesize};" \
|
||||
"fatwrite ${bootdev} ${fatbootpart} ${fdt_addr_r} /dtbs/${fdtfile} ${filesize};" \
|
||||
"fi; \0" \
|
||||
"bootcmd_distro=" \
|
||||
"run fdt_loaddtb; run fdt_sizecheck; run set_fdt_distro; sysboot mmc ${fatbootpart} fat c0000000 /${boot_syslinux_conf}; \0" \
|
||||
"run fdt_loaddtb; run fdt_sizecheck; run set_fdt_distro; sysboot ${bootdev} ${fatbootpart} fat c0000000 /${boot_syslinux_conf}; \0" \
|
||||
|
||||
#define PARTS_DEFAULT \
|
||||
"name=loader1,start=17K,size=1M,type=${type_guid_gpt_loader1};" \
|
||||
|
|
Loading…
Add table
Reference in a new issue