Zynqmp linux boot using QSPI

(수정 중)

ubuntu 18.04환경이고 petalinux 및 XSDK 버전은 "2019.1" 입니다.
사용되는 FPGA는 ZynqMP UltraScale+MPSoc 입니다.

아래의 패키지들을 설치 해주셔야 합니다.
sudo apt-get install lib32ncurses5 lib32z1

크로스 컴파일 툴체인은 <aarch64-linux-gnu-> 입니다.
SDK를 정상적으로 설치 하셨다면 이미 기본적인 셋팅은 되어 있을 겁니다...아마도?

이제 페타리눅스에서 실행하시면 됩니다.
petalinux-create -t project -n <이름> --template zynqMP
mkdir hardware
생성한 *.hdf 파일을 hardware에 복사합니다.
petalinux-config --get-hw-description="./hardware"

아래의 경로에서 설정을 바꿔주시면 됩니다.
-*- Subsystem AUTO Hardware Settings --> [*] Advanced bootable images storage Settings --> 
boot image settings --> image storage media --> primary flash

-*- Subsystem AUTO Hardware Settings --> [*] Advanced bootable images storage Settings --> 
u-boot env image settings --> image storage media --> primary flash

-*- Subsystem AUTO Hardware Settings --> [*] Advanced bootable images storage Settings --> 
kernel image settings --> image storage media --> primary flash

petalinux-config -c rootfs --oldconfig
petalinux-config -c kernel (--defconfig <IC 버전>)
petalinux-config -c u-boot --defconfig <board 버전>
petalinux-config -c bootloader

petalinux-build -x distclean
petalinux-build -c u-boot -x cleansstate
petalinux-build -x mrproper
petalinux-build -x package 
petalinux-build
petalinux-build -c kernel -f
petalinux-build -c kernel -x compile -f

petalinux-package --boot --format BIN --fsbl images/linux/zynqmp_fsbl.elf --u-boot images/linux/u-boot.elf --pmufw images/linux/pmufw.elf --fpga images/linux/*.bit

command로 하는 방법도 있지만 저는 XSDK를 이용하겠습니다.
상단의 툴바에서 Xilinx -> Program flash -> 경로 입력 및 설정


kernel을 못 찾는다거나 하는 오류는 image.ub의 offset(0x14000)과 load(0x10000000)를 맞춰주시면 됩니다. <값은 저와 다를 수 있습니다. >

(ref)

댓글

이 블로그의 인기 게시물

파이썬을 이용한 image to pdf 변환 프로그램

젯슨 나노 - GPIO