https://slayernoone.tistory.com/entry/20163-%EC%84%A4%EC%B9%98
petalinux 정리
1. petalinux 확인shlee@xilinxdev:~$ echo $PETALINUX/opt/petalinuxshlee@xilinxdev:~$ 2.프로젝트 생성shlee@xilinxdev:~$ petalinux-create -t project -s /opt/petalinux/Xilinx-ZC706-v2016.3-final.bsp INFO: Create project: INFO: Projects: INFO: * Xilinx-
slayernoone.tistory.com
9. u-boot 빌드
$ petalinux-build -c u-boot
10. u-boot 패키지 (BOOT.BIN 만들기)
$ petalinux-package --boot --fsbl pre-built/linux/images/zynq_fsbl.elf --fpga pre-built/linux/implementation/download.bit --uboot --force -o images/linux/BOOT.BIN
11. u-boot에서 BOOT.BIN QSPI에 Writing 하기
U-Boot-PetaLinux> setenv ipaddr 192.168.0.125;setenv serverip 192.168.0.43; tftpboot 0x1000000 BOOT.BIN;sf probe 0 0 0;sf erase 0x0 0x1000000;sf write 0x1000000 0x0 0xffffff;reset
12. u-boot에서 네트웍으로 리눅스 부팅
U-Boot-PetaLinux> setenv ipaddr 192.168.0.125;setenv serverip 192.168.0.43;tftpboot 0x8000000 image.ub;bootm 0x8000000
13. u-boot에 I2C 추가
~/build/Xilinx-ZC706-2016.3/subsystems/linux/configs/u-boot/platform-auto.h 파일
#define CONFIG_SYS_I2C_ZYNQ
/* I2C */
#if defined(CONFIG_SYS_I2C_ZYNQ)
# define CONFIG_ZYNQ_I2C0
# define CONFIG_SYS_I2C
# define CONFIG_CMD_I2C
# define CONFIG_SYS_I2C_ZYNQ_SPEED 100000
# define CONFIG_SYS_I2C_ZYNQ_SLAVE 0
#endif
14. u-boot 에 새로운 fsbl 적용하기
#!/bin/bash
petalinux-build -c u-boot
petalinux-package --boot --fsbl /home/shlee/shlee_zc706/shlee_zc706.sdk/shlee_zc706_fsbl/Debug/shlee_zc706_fsbl.elf --fpga /home/shlee/shlee_zc706/shlee_zc706.runs/impl_1/designz_main_wrapper.bit --uboot --force -o images/linux/BOOT.BIN
댓글