1. ~/Xilinx-ZC706-2016.3/subsystems/linux/configs/u-boot/config 파일에서 


# CONFIG_CMD_MMC is not set

# CONFIG_ZYNQ_SDHCI is not set



2. platform-auto.h에서


/* sdio - ps7_sd_0 */

#if 0

#define CONFIG_ZYNQ_SDHCI0  0xE0100000

#define CONFIG_MMC

#define CONFIG_GENERIC_MMC

#define CONFIG_SDHCI

#define CONFIG_SUPPORT_VFAT

#define CONFIG_DOS_PARTITION

#define CONFIG_FAT_WRITE

#define CONFIG_ZYNQ_SDHCI_MAX_FREQ  52000000

#endif



3. ReBuild


#!/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


cp images/linux/BOOT.BIN /tftpboot

'개발 > Xilinx Zynq' 카테고리의 다른 글

QSPI Kernel Booting  (0) 2016.11.17
DTSI수정하여 UART0 살리기  (0) 2016.11.16
petalinux 정리  (1) 2016.11.08
SDK에서 JTAG으로 리눅스 부팅  (0) 2016.11.08
petalinux build zc706 & 플래쉬 writing  (0) 2016.11.08
1. petalinux 확인
shlee@xilinxdev:~$ echo $PETALINUX
/opt/petalinux
shlee@xilinxdev:~$ 


2.프로젝트 생성
shlee@xilinxdev:~$ petalinux-create -t project -s /opt/petalinux/Xilinx-ZC706-v2016.3-final.bsp 
INFO: Create project: 
INFO: Projects: 
INFO:   * Xilinx-ZC706-2016.3
INFO: has been successfully installed to /home/shlee/
INFO: New project successfully created in /home/shlee/



3. 전체 빌드
shlee@xilinxdev:~/Xilinx-ZC706-2016.3$ petalinux-build
INFO: Checking component...
INFO: Generating make files and build linux
INFO: Generating make files for the subcomponents of linux
...
...


4. 커널 빌드
shlee@xilinxdev:~/Xilinx-ZC706-2016.3$ petalinux-build -c kernel
INFO: Checking component...
INFO: Generating make files and build linux/kernel
INFO: Generating make files for the subcomponents of linux/kernel
INFO: Building linux/kernel
[INFO ] build linux/kernel
...

shlee@xilinxdev:~/Xilinx-ZC706-2016.3$ petalinux-build -x package
INFO: Checking component...
INFO: Generating make files and build linux
INFO: Generating make files for the subcomponents of linux
INFO: Building linux
[INFO ] package rootfs.cpio to /home/shlee/Xilinx-ZC706-2016.3/images/linux
[INFO ] Update and install vmlinux image
...


5. 모듈 추가
shlee@xilinxdev:~/Xilinx-ZC706-2016.3$ petalinux-create -t modules --name axi-gpio --enable 

~/Xilinx-ZC706-2016.3/components/modules/axi-gpio가 생성되어있음

모듈 컴파일
shlee@xilinxdev:~/Xilinx-ZC706-2016.3$ petalinux-build -c rootfs/axi-gpio -x install


6.  패키지 생성
shlee@xilinxdev:~/Xilinx-ZC706-2016.3$ petalinux-build -x package


7. image.ub 생성
shlee@xilinxdev:~/Xilinx-ZC706-2016.3$ petalinux-package --image


8. scp 파일전송
scp axi-gpio.ko root@192.168.0.52:/home/root 


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





1. petalinux-build 한 images 파일을 sdk에 적절한 폴더에 옮김


2. Xilinx SDK에 [Xilinx Tools]-[Create Zynq Boot Image]를 선택

 


요렇게 넣고


3. 

xsdb% targets

xsdb% source D:\\vivado_work\\zc706_test1\\zc706_test1\\zc706_test1.sdk\\design_1_wrapper_hw_platform_0\\ps7_init.tcl

xsdb% ps7_init

xsdb% ps7_post_config

xsdb% dow D:\\vivado_work\\zc706_test1\\zc706_test1\\zc706_test1.sdk\\linux_image_test\\u-boot.elf

xsdb% dow -data D:\\vivado_work\\zc706_test1\\zc706_test1\\zc706_test1.sdk\\linux_image_test\\BOOT.bin 0x08000000

xsdb% con


4. U-boot가 부팅되면

> sf probe 0 0 0

> sf erase 0x0 0x01000000

> sf write 0x08000000 0 0xffffff


5. 딥스위치 4번 High로 올려도 U-boot 부팅됨....





'개발 > Xilinx Zynq' 카테고리의 다른 글

DTSI수정하여 UART0 살리기  (0) 2016.11.16
U-Boot 설정에서 SDHCI 제거  (0) 2016.11.16
petalinux 정리  (1) 2016.11.08
petalinux build zc706 & 플래쉬 writing  (0) 2016.11.08
ZC706 Doesn't work with VADJ at 1.8v  (0) 2016.11.07

+ Recent posts