cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Participant
Participant
1,168 Views
Registered: ‎06-23-2019

ERROR : sdboot not define i can't fix this problem

Jump to solution

i'm newbie student and i want to study about fpga

i use zynq7030 on picozed fmc v2

U-Boot 2019.01 (Jul 04 2019 - 02:56:39 +0000) Xilinx Zynq ZC702

CPU:   Zynq 7z030
Silicon: v3.1
DRAM:  ECC disabled 1 GiB
MMC:   mmc@e0100000: 0, mmc@e0101000: 1
Loading Environment from SPI Flash... SF: Detected s25fl128s_64k with page size 256 Bytes, erase size 64 KiB, total 16 MiB
OK
In:    serial@e0001000
Out:   serial@e0001000
Err:   serial@e0001000
Net:   ZYNQ GEM: e000b000, phyaddr ffffffff, interface rgmii-id
eth0: ethernet@e000b000
Hit any key to stop autoboot:  0 
## Error: "sdboot" not defined
Zynq> run adi_sdboot
## Error: "adi_sdboot" not defined

Before this problem i can memory maping and test my project but i'm editing my hdf i'm try to fix ERROR: Can’t get kernel image! from ug1144

 

Problem Description:This error message indicates that the U-Boot boot loader is unable to find kernelimage.

This is likely because bootcmd environment variable is not set properly.

Solution:To see the default boot device, print bootcmd environment variable using thefollowing command in U-Boot console.

U-Boot-PetaLinux> print bootcmd

If it is not run using sdboot flow, there are a few options as follows:

Without rebuild PetaLinux, set bootcmd to boot from your desired media,use setenv command. For SD card boot, set the environment variable asfollows.

U-Boot-PetaLinux> setenv bootcmd ’run sdboot’ ; saveenv

After that, I reset board and find Error : sdboot not define 

 

my enviroment

Zynq> printenv 
arch=arm
autoload=no
baudrate=115200
board=zynq
board_name=zynq
boot_img=BOOT.BIN
boot_targets=mmc mmc mmc mmc 
bootcmd=run sdboot
bootdelay=4
bootenv=uEnv.txt
bootenvsize=0x20000
bootenvstart=0x500000
clobstart=0x10000000
console=console=ttyPS0,115200
cp_kernel2ram=mmcinfo && fatload mmc ${sdbootdev} ${netstart} ${kernel_img}
cpu=armv7
default_bootcmd=run uenvboot; run cp_kernel2ram && bootm ${netstart}
dfu_mmc_info=set dfu_alt_info ${kernel_image} fat 0 1\\;dfu_mmc=run dfu_mmc_info && dfu 0 mmc 0
dfu_ram=run dfu_ram_info && dfu 0 ram 0
dfu_ram_info=setenv dfu_alt_info image.ub ram $netstart 0x1e00000
dtb_img=system.dtb
dtbnetstart=0x23fff000
eraseenv=sf probe 0 && sf erase ${bootenvstart} ${bootenvsize}
ethact=ethernet@e000b000
ethaddr=00:0a:35:00:1e:53
fault=echo ${img} image size is greater than allocated place - partition ${img} is NOT UPDATED
fdtcontroladdr=3f320780
fileaddr=10000000
filesize=a695dc
importbootenv=echo "Importing environment from SD ..."; env import -t ${loadbootenv_addr} $filesize
install_boot=mmcinfo && fatwrite mmc ${sdbootdev} ${clobstart} ${boot_img} ${filesize}
install_jffs2=sf probe 0 && sf erase ${jffs2start} ${jffs2size} && sf write ${clobstart} ${jffs2start} ${filesize}
install_kernel=mmcinfo && fatwrite mmc ${sdbootdev} ${clobstart} ${kernel_img} ${filesize}
jffs2_img=rootfs.jffs2
kernel_img=image.ub
load_boot=tftpboot ${clobstart} ${boot_img}
load_dtb=tftpboot ${clobstart} ${dtb_img}
load_jffs2=tftpboot ${clobstart} ${jffs2_img}
load_kernel=tftpboot ${clobstart} ${kernel_img}
loadaddr=0x10000000
loadbootenv=load mmc $sdbootdev:$partid ${loadbootenv_addr} ${bootenv}
loadbootenv_addr=0x00100000
modeboot=sdboot
nc=setenv stdout nc;setenv stdin nc;
netboot=tftpboot ${netstart} ${kernel_img} && bootm
netstart=0x10000000
psserial0=setenv stdout ttyPS0;setenv stdin ttyPS0
sd_uEnvtxt_existence_test=test -e mmc $sdbootdev:$partid /uEnv.txt
sd_update_dtb=echo Updating dtb from SD; mmcinfo && fatload mmc ${sdbootdev}:1 ${clobstart} ${dtb_img} && run install_dtb
sd_update_jffs2=echo Updating jffs2 from SD; mmcinfo && fatload mmc ${sdbootdev}:1 ${clobstart} ${jffs2_img} && run install_jffs2
sdbootdev=0
serial=setenv stdout serial;setenv stdin serial
serverip=10.0.0.113
soc=zynq
stderr=serial@e0001000
stdin=serial@e0001000
stdout=serial@e0001000
test_crc=if imi ${clobstart}; then run test_img; else echo ${img} Bad CRC - ${img} is NOT UPDATED; fi
test_img=setenv var "if test ${filesize} -gt ${psize}; then run fault; else run ${installcmd}; fi"; run var; setenv var
thor_mmc=run dfu_mmc_info && thordown 0 mmc 0
thor_ram=run dfu_ram_info && thordown 0 ram 0
uenvboot=if run sd_uEnvtxt_existence_test; then run loadbootenv; echo Loaded environment from ${bootenv}; run importbootenv; fi; if test -n $uenvcmd; then echo Running uenvcmd ...; run uenvcmd; fi
update_boot=setenv img boot; setenv psize ${bootsize}; setenv installcmd "install_boot"; run load_boot ${installcmd}; setenv img; setenv psize; setenv installcmd
update_dtb=setenv img dtb; setenv psize ${dtbsize}; setenv installcmd "install_dtb"; run load_dtb test_img; setenv img; setenv psize; setenv installcmd
update_jffs2=setenv img jffs2; setenv psize ${jffs2size}; setenv installcmd "install_jffs2"; run load_jffs2 test_img; setenv img; setenv psize; setenv installcmd
update_kernel=setenv img kernel; setenv psize ${kernelsize}; setenv installcmd "install_kernel"; run load_kernel ${installcmd}; setenv img; setenv psize; setenv installcmd
vendor=xilinx

Environment size: 3480/131068 bytes
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Contributor
Contributor
1,156 Views
Registered: ‎10-02-2018

You have no sdboot variable in your environment so you need to create one. Your default boot command is:

default_bootcmd=run uenvboot; run cp_kernel2ram && bootm ${netstart}

This assumes you have a text file (uenv.txt) on your sd card and it loads the environment variables into ram and boots. Create a uenv.txt file and create a sd_boot environment variable in that file or change the default_bootcmd command to run your sdboot environment variable.

Example of loading from sd card:

"sdboot=if mmcinfo; then " \
"echo Copying Linux from SD to RAM... && " \
"load mmc 0 ${kernel_load_address} ${kernel_image} && " \
"load mmc 0 ${devicetree_load_address} ${devicetree_image} && " \
"load mmc 0 ${ramdisk_load_address} ${ramdisk_image} && " \
"bootm ${kernel_load_address} ${ramdisk_load_address} ${devicetree_load_address}; " \

View solution in original post

0 Kudos
2 Replies
Highlighted
Contributor
Contributor
1,157 Views
Registered: ‎10-02-2018

You have no sdboot variable in your environment so you need to create one. Your default boot command is:

default_bootcmd=run uenvboot; run cp_kernel2ram && bootm ${netstart}

This assumes you have a text file (uenv.txt) on your sd card and it loads the environment variables into ram and boots. Create a uenv.txt file and create a sd_boot environment variable in that file or change the default_bootcmd command to run your sdboot environment variable.

Example of loading from sd card:

"sdboot=if mmcinfo; then " \
"echo Copying Linux from SD to RAM... && " \
"load mmc 0 ${kernel_load_address} ${kernel_image} && " \
"load mmc 0 ${devicetree_load_address} ${devicetree_image} && " \
"load mmc 0 ${ramdisk_load_address} ${ramdisk_image} && " \
"bootm ${kernel_load_address} ${ramdisk_load_address} ${devicetree_load_address}; " \

View solution in original post

0 Kudos
Highlighted
Participant
Participant
1,124 Views
Registered: ‎06-23-2019

Thank you for your advise i try to use

default_bootcmd=run uenvboot; run cp_kernel2ram && bootm ${netstart}

it work can use linux on board after that i rebuild myproject and copy to sd card but it cannot work , it's still same problem sdboot not define and i source same code but it's not work

U-Boot 2019.01 (Jul 11 2019 - 03:32:39 +0000) Xilinx Zynq ZC702

CPU:   Zynq 7z030
Silicon: v3.1
DRAM:  ECC disabled 1 GiB
MMC:   mmc@e0100000: 0, mmc@e0101000: 1
Loading Environment from SPI Flash... SF: Detected s25fl128s_64k with page size 256 Bytes, erase size 64 KiB, total 16 MiB
OK
In:    serial@e0001000
Out:   serial@e0001000
Err:   serial@e0001000
Net:   ZYNQ GEM: e000b000, phyaddr ffffffff, interface rgmii-id
eth0: ethernet@e000b000
Hit any key to stop autoboot:  0 
## Error: "sdboot" not defined
Zynq> default_bootcmd=run uenvboot; run cp_kernel2ram && bootm ${netstart}
Unknown command 'default_bootcmd=run' - try 'help'
Device: mmc@e0100000
Manufacturer ID: 3
OEM: 5344
Name: SC16G 
Bus Speed: 25000000
Mode : SD High Speed (50MHz)
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 14.8 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
4156816 bytes read in 363 ms (10.9 MiB/s)
## Loading kernel from FIT Image at 10000000 ...
   Using 'conf@system-top.dtb' configuration
   Verifying Hash Integrity ... OK
   Trying 'kernel@1' kernel subimage
     Description:  Linux kernel
     Type:         Kernel Image
     Compression:  uncompressed
     Data Start:   0x10000104
     Data Size:    4140656 Bytes = 3.9 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x00008000
     Entry Point:  0x00008000
     Hash algo:    sha1
     Hash value:   401cf45fd2a9a02beda7dd3c1c0c2983eb6db9ab
   Verifying Hash Integrity ... sha1 error!
Bad hash value for 'hash@1' hash node in 'kernel@1' image node
Bad Data Hash
ERROR: can't get kernel image!
0 Kudos