U-Boot 2021.10 (Feb 14 2024 - 09:27:08 +0000)
CPU: rv64imacu_zba_zbb
Model: LeapFive NB2L DevKits
DRAM: 2 GiB
MMC: sdio0@16010000: 0, sdio1@16020000: 1
Loading Environment from SPIFlash... SF: Detected gd25lq128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
OK
Not a LeapFive EEPROM data format - magic error
EEPROM dump: (0x100 bytes)
00: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
10: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
20: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
30: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
40: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
50: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
60: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
70: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
80: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
90: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
A0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
B0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
C0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
D0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
E0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
F0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
In: serial
Out: serial
Err: serial
Model: LeapFive NB2L DevKits
no screen connected
Net: eth0: ethernet@16030000, eth1: ethernet@16040000
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc1 is current device
Try booting from MMC1 ...
1576 bytes read in 5 ms (307.6 KiB/s)
switch to partitions #0, OK
mmc1 is current device
42510700 bytes read in 129 ms (314.3 MiB/s)
## Loading kernel from FIT Image at a0000000 ...
Bad FIT kernel image format! (err=-22)
ERROR: can't get kernel image!
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
XIP Invalid Image
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
Booting kernel in
Bad Linux RISCV Image magic!
Tring booting distro ...
switch to partitions #0, OK
mmc1 is current device
Try booting from MMC1 ...
Failed to load '/uEnv.txt'
## Warning: defaulting to text format
## Error: Environment import failed: errno = 12
Failed to load '/dtbs/leapfive/nb2l-devkits.dtb'
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
/dtbs/leapfive: doesn't exist (-2)
** Unable to write file /dtbs/leapfive/nb2l-devkits.dtb **
Retrieving file: /extlinux/extlinux.conf
Failed to load '/extlinux/extlinux.conf'
Error reading config file
my printenv
eapFive # printenv
baudrate=115200
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_lin}
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_devs=mmc nvme
boot_efi_binary=load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootriscv64.efi; if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r};else bootefi ${kernel_addr_r} ${fdti
boot_efi_bootmgr=if fdt addr ${fdt_addr_r}; then bootefi bootmgr ${fdt_addr_r};else bootefi bootmgr;fi
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}
boot_net_usb_start=usb start
boot_pci_enum=pci enum
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
boot_syslinux_conf=extlinux/extlinux.conf
boot_targets=mmc1
bootargs=earlyprintk console=tty1 console=ttyS0,115200 debug rootwait earlycon=sbi root=/dev/mmcblk1p4
bootargs_ext=if test ${devnum} = 0; then setenv bootargs "earlyprintk console=tty1 console=ttyS0,115200 debug rootwait earlycon=sbi root=/dev/mmcblk0p4"; else setenv bootargs "earlyprintk console=tty1 console=t;
bootcmd=devnum=1; run mmc_boot
bootcmd_dhcp=devtype=dhcp; run boot_net_usb_start; run boot_pci_enum; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;setenv efi_fdtfile ${fdtfile}; setenv efi_old_vci ${bootp_vci};sete;
bootcmd_distro=run load_distro_uenv; run fdt_loaddtb; run fdt_sizecheck; run set_fdt_distro; sysboot ${bootdev} ${devnum}:${bootpart} fat ${scriptaddr} /${boot_syslinux_conf};
bootcmd_mmc0=devnum=0; run mmc_boot
bootcmd_mmc1=devnum=1; run mmc_boot
bootcmd_sd=devnum=1; run mmc_boot
bootdelay=2
bootdev=mmc
bootdir=/boot
bootenv=uEnv.txt
bootenv_mmc=setenv bootdev mmc;if test ${bootmode} = flash; then for mmc_devnum in ${mmc_devnum_l}; do setenv devnum ${mmc_devnum}; run mmc_test_and_boot;done;fi; if test ${bootmode} = sd; then setenv devnum ${
bootenv_nvme=if test ${bootmode} = flash; then for nvme_devnum in ${nvme_devnum_l}; do setenv devnum ${nvme_devnum};if pci enum; then nvme scan; fi; if nvme dev ${devnum}; then echo Try booting from NVME${devnu
bootenv_sdk=devkits_uEnv.txt
bootfile=/extlinux/extlinux.conf
bootmode=sd
bootpart=3
bootwait=setenv _delay ${bootdelay}; echo ${_delay}; while test ${_delay} > 0; do sleep 1; setexpr _delay ${_delay} - 1; echo ${_delay}; done
chip_vision=B
chipa_gmac_set=fdt set /soc/ethernet@16030000/ethernet-phy@0 tx_inverted_10 <0x1>;fdt set /soc/ethernet@16030000/ethernet-phy@0 tx_inverted_100 <0x1>;fdt set /soc/ethernet@16030000/ethernet-phy@0 tx_inverted_10;
chipa_set=if test ${chip_vision} = B; then run chipa_gmac_set;fi;
chipa_set_linux=fdt addr ${fdt_addr_r};run devkits_mem_set;run chipa_set;
chipa_set_uboot=fdt addr ${fdtcontroladdr};run chipa_set;
cma_1g=b000000
cma_2g=20000000
cma_4g=40000000
cma_8g=60000000
cma_ddr1g_set=fdt set ${cma_node} size <0x0 0x${cma_1g}>;fdt set ${cma_node} alloc-ranges <0x0 0x${cma_start} 0x0 0x${cma_1g}>;
cma_ddr2g_set=fdt set ${cma_node} size <0x0 0x${cma_2g}>;fdt set ${cma_node} alloc-ranges <0x0 0x${cma_start} 0x0 0x${cma_2g}>;
cma_ddr4g_set=fdt set ${cma_node} size <0x0 0x${cma_4g}>;fdt set ${cma_node} alloc-ranges <0x0 0x${cma_start} 0x0 0x${cma_4g}>;
cma_ddr8g_set=fdt set ${cma_node} size <0x0 0x${cma_8g}>;fdt set ${cma_node} alloc-ranges <0x0 0x${cma_start} 0x0 0x${cma_8g}>;
cma_node=/reserved-memory/linux,cma
cma_resize=if test ${memory_size} -eq 40000000; then run cma_ddr1g_set;elif test ${memory_size} -eq 80000000; then run cma_ddr2g_set;elif test ${memory_size} -eq 100000000; then run cma_ddr4g_set;elif test ${me
cma_start=70000000
cpu_max_vol=1060000
cpu_speed_1250_set=fdt rm /opp-table-0/opp-375000000;fdt rm /opp-table-0/opp-500000000;fdt rm /opp-table-0/opp-750000000;fdt rm /opp-table-0/opp-1500000000;
cpu_speed_1500_set=fdt rm /opp-table-0/opp-312500000;fdt rm /opp-table-0/opp-417000000;fdt rm /opp-table-0/opp-625000000;fdt rm /opp-table-0/opp-1250000000;
cpu_vol_1020_set=fdt set /opp-table-0/opp-1500000000 opp-microvolt <1020000>;
cpu_vol_1040_set=fdt set /opp-table-0/opp-1500000000 opp-microvolt <1040000>;
cpu_vol_1060_set=fdt set /opp-table-0/opp-1500000000 opp-microvolt <1060000>;
cpu_vol_set=if test ${cpu_max_vol} = 1000000; then run cpu_speed_1250_set; else run cpu_speed_1500_set; if test ${cpu_max_vol} = 1060000; then run cpu_vol_1060_set; elif test ${cpu_max_vol} = 1020000; then run
devkits_mem_set=fdt memory ${memory_addr} ${memory_size};run cma_resize;
devnum=1
distro_boot_env=echo Tring booting distro ...;for bootdev_s in ${boot_devs}; do run distro_bootenv_${bootdev_s}; done;
distro_bootcmd=setenv nvme_need_init; for target in ${boot_targets}; do run bootcmd_${target}; done
distro_bootenv_mmc=setenv bootdev mmc;if test ${bootmode} = flash; then for mmc_devnum in ${mmc_devnum_l}; do setenv devnum ${mmc_devnum}; run distro_mmc_test_and_boot;done;fi; if test ${bootmode} = sd; then se
distro_bootenv_nvme=if test ${bootmode} = flash; then for nvme_devnum in ${nvme_devnum_l}; do setenv devnum ${nvme_devnum};if pci enum; then nvme scan; fi; if nvme dev ${devnum}; then echo Try booting from NVME
distro_mmc_test_and_boot=if mmc dev ${devnum}; then echo Try booting from MMC${devnum} ...; run bootcmd_distro;fi;
efi_dtb_prefixes=/ /dtb/ /dtb/current/
emmc_devnum=0
eth0addr=6c:cf:39:6c:de:ad
eth1addr=6c:cf:39:7c:ae:5d
ethaddr=6c:cf:39:6c:de:ad
fdt_addr_r=0x46000000
fdt_high=0xffffffffffffffff
fdt_loaddtb=fatload ${bootdev} ${devnum}:${bootpart} ${fdt_addr_r} /dtbs/${fdtfile}; fdt addr ${fdt_addr_r};
fdt_sizecheck=fatsize ${bootdev} ${devnum}:${bootpart} /dtbs/${fdtfile};
fdtaddr=0x46000000
fdtcontroladdr=b770ce70
fdtfile=starfive/leapfive.dtb
fdtoverlay_addr_r=0x4f000000
fileaddr=a0000000
filesize=288a96c
fitfile=leapfiveu.fit
initrd_high=0xffffffffffffffff
ipaddr=192.168.120.230
irdaddr=46100000
irdend=4c000000
irdsize=5f00000
kernel_addr_r=0x40200000
kernel_comp_addr_r=0x5a000000
kernel_comp_size=0x4000000
load_distro_uenv=fatload ${bootdev} ${devnum}:${bootpart} ${loadaddr} /${bootenv}; env import ${loadaddr} ${filesize};
load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile}
load_sdk_uenv=fatload ${bootdev} ${devnum}:${bootpart} ${loadaddr} ${bootenv_sdk};env import -t ${loadaddr} ${filesize};
loadaddr=0x60000000
memory_addr=40000000
memory_size=80000000
mmc_boot=if mmc dev ${devnum}; then devtype=mmc; run scan_dev_for_boot_part; fi
mmc_devnum_l=1 0
mmc_test_and_boot=if mmc dev ${devnum}; then echo Try booting from MMC${devnum} ...; setenv sdev_blk mmcblk${devnum}p${rootpart};run load_sdk_uenv; run boot2;fi;
netmask=255.255.255.0
nvme_boot=run boot_pci_enum; run nvme_init; if nvme dev ${devnum}; then devtype=nvme; run scan_dev_for_boot_part; fi
nvme_devnum_l=0 0
nvme_init=if ${nvme_need_init}; then setenv nvme_need_init false; nvme scan; fi
partitions=name=loader1,start=17K,size=1M,type=${type_guid_gpt_loader1};name=loader2,size=4MB,type=${type_guid_gpt_loader2};name=system,size=-,bootable,type=${type_guid_gpt_system};
partnum=3
preboot=run chipa_set_uboot
pxefile_addr_r=0x45900000
ramdisk_addr_r=0x46100000
rootpart=4
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;run scan_dev_for_efi;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootft
scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; for prefix in ${efi_dtb_prefixes}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${efi_fdtfile}; then run load_efi_dtb; fi;done;run boot_efi_boote
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf}; then echo Found ${prefix}${boot_syslinux_conf}; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAIe
scan_sf_for_scripts=${devtype} read ${scriptaddr} ${script_offset_f} ${script_size_f}; source ${scriptaddr}; echo SCRIPT FAILED: continuing...
script_offset_f=0x1fff000
script_size_f=0x1000
scriptaddr=0x43900000
sd_devnum=1
sdev_blk=mmcblk1p4
sdk_boot_env=for bootdev_s in ${boot_devs}; do run bootenv_${bootdev_s}; done;
set_fdt_distro=run chipa_set_linux; run cpu_vol_set;fatwrite ${bootdev} ${devnum}:${bootpart} ${fdt_addr_r} /dtbs/${fdtfile} ${filesize};
setupfdt1=fdt addr ${fdtaddr}; fdt resize;
setupfdt2=fdt set /chosen bootargs "${bootargs}";
setupird=setexpr irdend ${irdaddr} + ${irdsize}; fdt set /chosen linux,initrd-start <0x0 0x${irdaddr}>; fdt set /chosen linux,initrd-end <0x0 0x${irdend}>
sf_boot=if sf probe ${busnum}; then devtype=sf; run scan_sf_for_scripts; fi
type_guid_gpt_loader1=5B193300-FC78-40CD-8002-E86C45580B47
type_guid_gpt_loader2=2E54B353-1271-4842-806F-E436D6AF6985
type_guid_gpt_system=0FC63DAF-8483-4772-8E79-3D69D8477DE4
usb_boot=usb start; if usb dev ${devnum}; then devtype=usb; run scan_dev_for_boot_part; fi
ver=U-Boot 2021.10 (Feb 14 2024 - 09:27:08 +0000)
Environment size: 10945/65532 bytes
i tried these steps
LeapFive # setenv boot_targets mmc1
LeapFive # setenv bootcmd_mmc1 "devnum=1; run mmc_boot"
LeapFive # saveenv
Saving Environment to SPIFlash... Erasing SPI flash...Writing to SPI flash...done
OK
LeapFive # printenv bootcmd
bootcmd=run sdk_boot_env; run distro_boot_env;
LeapFive # printenv boot_targets
boot_targets=mmc1
LeapFive # setenv boot_targets mmc1
LeapFive # setenv bootcmd "devnum=1; run mmc_boot"
LeapFive # saveenv
Saving Environment to SPIFlash... Erasing SPI flash...Writing to SPI flash...done
OK
LeapFive # printenv boot_targets
boot_targets=dhcp mmc0
LeapFive # fatls mmc 1:3 /
1576 devkits_uEnv.txt
42510700 leapfiveu.fit
62669 nb2l-devkits-v2-leapfive-nb2l.dtb
26352128 Image
62476 nb2l-devkits.dtb
can u give solution for this