@@ -12,9 +12,10 @@ This Repository provides a Linux Boot Image(U-boot, Kernel, Root-fs) for FPGA-So
1212
1313* Hardware
1414 + ZYBO : Xilinx Zynq-7000 ARM/FPGA SoC Trainer Board by Digilent
15+ + PYNQ-Z1 : Python Productive for Zynq by Digilent
1516 + DE0-Nano-SoC : Altera SoC FPGA Development Kit by terasic
1617* U-Boot v2016.03 (customized)
17- + Build for ZYBO and DE0-Nano-SoC
18+ + Build for ZYBO, PYNQ-Z1 and DE0-Nano-SoC
1819 + Customized boot by uEnv.txt
1920 + Customized boot by boot.scr
2021* Linux Kernel Version v4.8.17
@@ -55,8 +56,8 @@ shell$ git lfs pull origin master
5556 - design_1_wrapper.bit : FPGA configuration file (Xilinx Bitstream Format)
5657 - u-boot.img : Stage 2 Boot Loader(U-boot)
5758 - uEnv.txt : U-Boot environment variables for linux boot
58- - zImage-4.8.17-armv7-fpga : Linux Kernel Image (use Git LFS)
59- - devicetree-4.8.17-zynq-zybo.dtb : Linux Device Tree Blob (use Git LFS)
59+ - zImage-4.8.17-armv7-fpga : Linux Kernel Image
60+ - devicetree-4.8.17-zynq-zybo.dtb : Linux Device Tree Blob
6061 - devicetree-4.8.17-zynq-zybo.dts : Linux Device Tree Source
6162 + examples-001.tgz : Examples Programs (use Git LFS)
6263 * debian8-rootfs-vanilla.tgz : Debian8 Root File System (use Git LFS)
@@ -90,6 +91,57 @@ shell# umount mnt/usb1
9091shell# umount mnt/usb2
9192````
9293
94+ ### PYNQ-Z1
95+
96+ #### Downlowd from github
97+
98+ ```
99+ shell$ git clone git://github.com/ikwzm/FPGA-SoC-Linux
100+ shell$ cd FPGA-SoC-Linux
101+ shell$ git lfs pull origin master
102+ ```
103+
104+ #### File Description
105+
106+ * tareget/zynq-pynqz1/
107+ + boot/
108+ - boot.bin : Stage 1 Boot Loader(U-boot-spl)
109+ - u-boot.img : Stage 2 Boot Loader(U-boot)
110+ - uEnv.txt : U-Boot environment variables for linux boot
111+ - zImage-4.8.17-armv7-fpga : Linux Kernel Image
112+ - devicetree-4.8.17-zynq-pynqz1.dtb : Linux Device Tree Blob
113+ - devicetree-4.8.17-zynq-pynqz1.dts : Linux Device Tree Source
114+ * debian8-rootfs-vanilla.tgz : Debian8 Root File System (use Git LFS)
115+ * linux-image-4.8.17-armv7-fpga_4.8.17-armv7-fpga-1_armhf.deb : Linux Image Package (use Git LFS)
116+ * linux-headers-4.8.17-armv7-fpga_4.8.17-armv7-fpga-1_armhf.deb : Linux Headers Package (use Git LFS)
117+ * fpga-soc-linux-drivers-4.8.17-armv7-fpga_0.0.3-1_armhf.deb : Device Drivers Package (use Git LFS)
118+
119+ #### Format SD-Card
120+
121+ ````
122+ shell# fdisk /dev/sdc
123+ :
124+ :
125+ :
126+ shell# mkfs-vfat /dev/sdc1
127+ shell# mkfs.ext3 /dev/sdc2
128+ ````
129+
130+ #### Write to SD-Card
131+
132+ ````
133+ shell# mount /dev/sdc1 /mnt/usb1
134+ shell# mount /dev/sdc2 /mnt/usb2
135+ shell# cp target/zynq-pynqz1/boot/* /mnt/usb1
136+ shell# tar xfz debian8-rootfs-vanilla.tgz -C /mnt/usb2
137+ shell# cp linux-image-4.8.17-armv7-fpga_4.8.17-armv7-fpga-1_armhf.deb /mnt/usb2/home/fpga
138+ shell# cp linux-headers-4.8.17-armv7-fpga_4.8.17-armv7-fpga-1_armhf.deb /mnt/usb2/home/fpga
139+ shell# cp fpga-soc-linux-drivers-4.8.17-armv7-fpga_0.0.3-1_armhf.deb /mnt/usb2/home/fpga
140+ shell# tar xfz target/zynq-zybo/examples-001.tgz -C /mnt/usb2/home/fpga
141+ shell# umount mnt/usb1
142+ shell# umount mnt/usb2
143+ ````
144+
93145### DE0-Nano-SoC
94146
95147#### Downlowd from github
@@ -106,8 +158,8 @@ shell$ git lfs pull origin master
106158 + boot/
107159 - DE0_NANO_SOC.rbf : FPGA configuration file (Raw Binary Format)
108160 - uEnv.txt : U-Boot environment variables for linux boot
109- - zImage-4.8.17-armv7-fpga : Linux Kernel Image (use Git LFS)
110- - devicetree-4.8.17-socfpga.dtb : Linux Device Tree Blob (use Git LFS)
161+ - zImage-4.8.17-armv7-fpga : Linux Kernel Image
162+ - devicetree-4.8.17-socfpga.dtb : Linux Device Tree Blob
111163 - devicetree-4.8.17-socfpga.dts : Linux Device Tree Source
112164 + u-boot/
113165 - u-boot-spl.sfp : Stage 1 Boot Loader(U-boot-spl)
@@ -765,6 +817,58 @@ shell$ cp spl/boot.bin ../zynq-zybo/boot/
765817shell$ cp u-boot.img ../zynq-zybo/boot/
766818```
767819
820+ ### Build U-boot for PYNQ-Z1
821+
822+ There are two ways
823+
824+ 1. run scripts/build-u-boot-zynq-pynqz1.sh (easy)
825+ 2. run this chapter step-by-step (annoying)
826+
827+ #### Download U-boot Source
828+
829+ ##### Clone from git.denx.de/u-boot.git
830+
831+ ```
832+ shell$ git clone git://git.denx.de/u-boot.git u-boot-zynq-pynqz1
833+ ````
834+
835+ ##### Checkout v2016.03
836+
837+ ```
838+ shell$ cd u-boot-zynq-pynqz1
839+ shell$ git checkout -b u-boot-2016.03-zynq-pynqz1 refs/tags/v2016.03
840+ ```
841+
842+ #### Patch for zynq-zybo
843+
844+ ```
845+ shell$ patch -p0 < ../files/u-boot-2016.03-zynq-pynqz1.diff
846+ shell$ git add --update
847+ shell$ git commit -m "patch for zynq-pynqz1"
848+ ```
849+
850+ #### Setup for Build
851+
852+ ```
853+ shell$ cd u-boot-zynq-pynqz1
854+ shell$ export ARCH=arm
855+ shell$ export CROSS_COMPILE=arm-linux-gnueabihf-
856+ shell$ make zynq_pynqz1_defconfig
857+ ```
858+
859+ #### Build u-boot
860+
861+ ```
862+ shell$ make
863+ ```
864+
865+ #### Copy boot.bin and u-boot.img to zybo-pynqz1/boot/
866+
867+ ```
868+ shell$ cp spl/boot.bin ../zynq-pynqz1/boot/
869+ shell$ cp u-boot.img ../zynq-pynqz1/boot/
870+ ```
871+
768872### Build U-boot for DE0-Nano-SoC
769873
770874There are two ways
@@ -845,6 +949,7 @@ shell$ git checkout -b linux-4.8.17-armv7-fpga refs/tags/v4.8.17
845949shell$ patch -p0 < ../files/linux-4.8.17-armv7-fpga.diff
846950shell$ git add --update
847951shell$ git add arch/arm/configs/armv7_fpga_defconfig
952+ shell$ git add arch/arm/boot/dts/zynq-pynqz1.dts
848953shell$ git commit -m "patch for armv7-fpga"
849954shell$ git tag -a v4.8.17-armv7-fpga -m "relase v4.8.17-armv7-fpga"
850955```
@@ -863,6 +968,7 @@ shell$ make armv7_fpga_defconfig
863968````
864969shell$ make deb-pkg
865970shell$ make zynq-zybo.dtb
971+ shell$ make zynq-pynqz1.dtb
866972shell$ make socfpga_cyclone5_de0_sockit.dtb
867973````
868974
@@ -874,6 +980,14 @@ shell$ cp arch/arm/boot/dts/zynq-zybo.dtb ../target/zynq-zybo/boot/devicetree-4.
874980shell$ dtc -I dtb -O dts -o ../target/zynq-zybo/boot/devicetree-4.8.17-zynq-zybo.dts arch/arm/boot/dts/zynq-zybo.dtb
875981```
876982
983+ #### Copy zImage and devicetree to target/zybo-pynqz1/boot/
984+
985+ ```
986+ shell$ cp arch/arm/boot/zImage ../target/zynq-pynqz1/boot/zImage-4.8.17-armv7-fpga
987+ shell$ cp arch/arm/boot/dts/zynq-pynqz1.dtb ../target/zynq-pynqz1/boot/devicetree-4.8.17-zynq-pynqz1.dtb
988+ shell$ dtc -I dtb -O dts -o ../target/zynq-pynqz1/boot/devicetree-4.8.17-zynq-pynqz1.dts arch/arm/boot/dts/zynq-pynqz1.dtb
989+ ```
990+
877991#### Copy zImage and devicetree to target/de0-nano-soc/boot/
878992
879993```
0 commit comments