Jump to content

    

Recommended Posts

Добрый день!

Подскажите пожалуйста, что необходимо прописать в envoriment u-boot а для автозагрузки Линукса из QSPI?

Создал BOOT.BIN (fsbl.elf, pmufw.elf, system.bit, bl31.elf, u-boot.elf, image.itb) для Zynq MP, залил в QSPI. После подачи питания и загрузки u-boot в терминале читаю image.itb в RAM и запускаю Линукс:

sf probe 0
sf read 0x60000000 0x00000000 0xF00000
bootm 0x60000000

 Теперь хочу автоматизировать загрузку. Прописал в CONFIG_EXTRA_ENV_SETTINGS u-boot'а

#define CONFIG_EXTRA_ENV_SETTINGS \
	"distro_bootcmd=sf probe 0 && sf read 0x60000000 0x800000 0x700000 && bootm 0x60000000\0" \
""

Загрузка получается только после команды boot в терминале

Xilinx Zynq MP First Stage Boot Loader
Release 2019.1   Mar  3 2021  -  13:12:50
NOTICE:  ATF running on XCZU3EG/silicon v4/RTL5.1 at 0xfffea000
NOTICE:  BL31: Secure code at 0x0
NOTICE:  BL31: Non secure code at 0x8000000
NOTICE:  BL31: v2.0(release):xilinx-v2018.3-720-g80d1c790
NOTICE:  BL31: Built : 13:12:14, Mar  3 2021


U-Boot 2020.01-00031-ga604ef9-dirty (Mar 05 2021 - 00:47:52 -0800)

Board: Xilinx ZynqMP
DRAM:  2 GiB
usb dr_mode not found
PMUFW:  v1.1
EL Level:       EL2
Chip ID:        zu3eg
NAND:  0 MiB
MMC:   mmc@ff160000: 0, mmc@ff170000: 1
In:    serial@ff000000
Out:   serial@ff000000
Err:   serial@ff000000
Bootmode: QSPI_MODE
Reset reason:   EXTERNAL
Net:
ZYNQ GEM: ff0e0000, mdio bus ff0e0000, phyaddr -1, interface rgmii-id
Could not get PHY for eth0: addr -1
No ethernet found.

U-BOOT for sl_zynqmp

Hit any key to stop autoboot:  0
ZynqMP> printenv
arch=arm
baudrate=115200
board=zynqmp
board_name=zynqmp
boot_targets=qspi0
bootcmd=run distro_bootcmd
bootdelay=2
bootm_low=0
bootm_size=7ff00000
cpu=armv8
distro_bootcmd=sf probe 0 && sf read 0x60000000 0x800000 0x700000 && bootm 0x60000000
ethaddr=00:0a:35:00:22:01
fdtcontroladdr=7dda32a8
fdtfile=xilinx/zynqmp.dtb
ipaddr=192.168.0.123
modeboot=qspiboot
reset_reason=EXTERNAL
script_offset_f=3e80000
serverip=192.168.0.21
soc=zynqmp
stderr=serial@ff000000
stdin=serial@ff000000
stdout=serial@ff000000
vendor=xilinx

Environment size: 583/32764 bytes
ZynqMP>
ZynqMP> boot
SF: Detected n25q512a with page size 512 Bytes, erase size 128 KiB, total 128 MiB
device 0 offset 0x800000, size 0x700000
SF: 7340032 bytes @ 0x800000 Read: OK
## Loading kernel from FIT Image at 60000000 ...
   Using 'conf-1' configuration
   Trying 'kernel-1' kernel subimage
     Description:  Linux Kernel
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x600000c0
     Data Size:    3680269 Bytes = 3.5 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x00080000
     Entry Point:  0x00080000
     Hash algo:    sha1
     Hash value:   14723a2c892b059fef5585ee0b1b03e3c9e090fb
   Verifying Hash Integrity ... sha1+ OK
## Loading ramdisk from FIT Image at 60000000 ...
   Using 'conf-1' configuration
   Trying 'ramdisk-1' ramdisk subimage
     Description:  RAMDisk Image
     Type:         RAMDisk Image
     Compression:  lzma compressed
     Data Start:   0x60389b58
     Data Size:    3271927 Bytes = 3.1 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x10000000
     Entry Point:  0x10000000
     Hash algo:    sha1
     Hash value:   ce3929849a5e71b2dabe2d05d8dff2bb8a380c4e
   Verifying Hash Integrity ... sha1+ OK
   Loading ramdisk from 0x60389b58 to 0x10000000
WARNING: 'compression' nodes for ramdisks are deprecated, please fix your .its file!
## Loading fdt from FIT Image at 60000000 ...
   Using 'conf-1' configuration
   Trying 'fdt-1' fdt subimage
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x603829c8
     Data Size:    28864 Bytes = 28.2 KiB
     Architecture: AArch64
     Hash algo:    sha1
     Hash value:   44dcf97d89cd102df5c89916b8238a4f9d57cf75
   Verifying Hash Integrity ... sha1+ OK
   Booting using the fdt blob at 0x603829c8
   Uncompressing Kernel Image
   Loading Ramdisk to 7da82000, end 7dda0cf7 ... OK
   Loading Device Tree to 000000007da77000, end 000000007da810bf ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]

 

Share this post


Link to post
Share on other sites
4 minutes ago, aaarrr said:

Эту задержку отрабатывает? Похоже, u-boot просто видит нажатие клавиши и прерывает процесс.

Почему то уже не отрабатывает. В версии u-boot до того как автозагрузку начал реализовывать, задержка отрабатывалась

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.