Skip to content

Commit 829f3d7

Browse files
committed
Merge branch 'build-v2020.1.1'
2 parents cdc1844 + 998eec2 commit 829f3d7

File tree

43 files changed

+3828
-2364
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+3828
-2364
lines changed

Readme.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,15 @@ This Repository provides a Linux Boot Image(U-boot, Kernel, Root-fs) for Zynq MP
1919
+ PMU Firmware(Platform Management Unit Firmware)
2020
+ BL31(ARM Trusted Firmware Boot Loader stage 3-1)
2121
+ U-Boot xilinx-v2019.2 (customized)
22-
* Linux Kernel Version v4.19.0
23-
+ [linux-xlnx](https://github.com/Xilinx/linux-xlnx) tag=xilinx-v2019.2
22+
* Linux Kernel Version v5.4.0
23+
+ [linux-xlnx](https://github.com/Xilinx/linux-xlnx) tag=xilinx-v2020.1
2424
+ Enable Device Tree Overlay with Configuration File System
2525
+ Enable FPGA Manager
2626
+ Enable FPGA Bridge
2727
+ Enable FPGA Reagion
2828
+ Enable ATWILC3000 Linux Driver for Ultra96-V2
29+
+ Enable Xilinx APF Accelerator driver
30+
+ Enable Xilinx APF DMA engines support
2931
* Debian10(buster) Root File System
3032
+ Installed build-essential
3133
+ Installed device-tree-compiler
@@ -35,7 +37,7 @@ This Repository provides a Linux Boot Image(U-boot, Kernel, Root-fs) for Zynq MP
3537
+ Installed Other package list -> [files/debian10-dpkg-list.txt](files/debian10-dpkg-list.txt)
3638
* FPGA Device Drivers and Services
3739
+ [fclkcfg (FPGA Clock Configuration Device Driver)](https://github.com/ikwzm/fclkcfg)
38-
+ [udmabuf (User space mappable DMA Buffer)](https://github.com/ikwzm/udmabuf)
40+
+ [u-dma-buf (User space mappable DMA Buffer)](https://github.com/ikwzm/udmabuf)
3941

4042
Install
4143
------------------------------------------------------------------------------------
@@ -51,7 +53,7 @@ Build
5153
* [Build Boot Loader for UltraZed-EG-IOCC](target/UltraZed-EG-IOCC/build-v2019.2/Readme.md)
5254
* [Build Boot Loader for Ultra96](target/Ultra96/build-v2019.2/Readme.md)
5355
* [Build Boot Loader for Ultra96-V2](target/Ultra96-V2/build-v2019.2/Readme.md)
54-
* [Build Linux Kernel](doc/build/linux-xlnx-v2019.2-zynqmp-fpga.md)
56+
* [Build Linux Kernel](doc/build/linux-xlnx-v2020.1-zynqmp-fpga.md)
5557
* [Build Debian10 RootFS](doc/build/debian10-rootfs.md)
5658
* [Build Device Drivers](doc/build/device-drivers.md)
5759

doc/build/device-drivers.md

Lines changed: 11 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,28 @@
11
Build Device Drivers and Services Package
22
====================================================================================
33

4-
udmabuf-4.19.0-xlnx-v2019.2-zynqmp-fpga_1.4.6-0_arm64.deb
4+
u-dma-buf-5.4.0-xlnx-v2020.1-zynqmp-fpga_3.0.1-0_arm64.deb
55
------------------------------------------------------------------------------------
66

77
### Download repository
88

99
```console
10-
shell$ git clone --recursive --depth=1 -b v1.4.6 git://github.com/ikwzm/udmabuf-kmod-dpkg
11-
shell$ cd udmabuf-kmod-dpkg
12-
```
13-
14-
### Cross Compile for linux-xlnx-v2019.2-zynqmp-fpga
15-
16-
```console
17-
shell$ sudo debian/rules arch=arm64 deb_arch=arm64 kernel_release=4.19.0-xlnx-v2019.2-zynqmp-fpga kernel_src_dir=../../linux-xlnx-v2019.2-zynqmp-fpga binary
18-
:
19-
:
20-
:
21-
shell$ file ../udmabuf-4.19.0-xlnx-v2019.2-zynqmp-fpga_1.4.6-0_arm64.deb
22-
../udmabuf-4.19.0-xlnx-v2019.2-zynqmp-fpga_1.4.6-0_arm64.deb: Debian binary package (format 2.0)
23-
```
24-
25-
u-dma-buf-4.19.0-xlnx-v2019.2-zynqmp-fpga_2.1.3-0_arm64.deb
26-
------------------------------------------------------------------------------------
27-
28-
### Download repository
29-
30-
```console
31-
shell$ git clone --recursive --depth=1 -b v2.1.3 git://github.com/ikwzm/u-dma-buf-kmod-dpkg
10+
shell$ git clone --recursive --depth=1 -b v3.0.1 git://github.com/ikwzm/u-dma-buf-kmod-dpkg
3211
shell$ cd u-dma-buf-kmod-dpkg
3312
```
3413

35-
### Cross Compile for linux-xlnx-v2019.2-zynqmp-fpga
14+
### Cross Compile for linux-xlnx-v2020.1-zynqmp-fpga
3615

3716
```console
38-
shell$ sudo debian/rules arch=arm64 deb_arch=arm64 kernel_release=4.19.0-xlnx-v2019.2-zynqmp-fpga kernel_src_dir=../../linux-xlnx-v2019.2-zynqmp-fpga binary
17+
shell$ sudo debian/rules arch=arm64 deb_arch=arm64 kernel_release=5.4.0-xlnx-v2020.1-zynqmp-fpga kernel_src_dir=../../linux-xlnx-v2020.1-zynqmp-fpga binary
3918
:
4019
:
4120
:
42-
shell$ file ../u-dma-buf-4.19.0-xlnx-v2019.2-zynqmp-fpga_2.1.3-0_arm64.deb
43-
../u-dma-buf-4.19.0-xlnx-v2019.2-zynqmp-fpga_2.1.3-0_arm64.deb: Debian binary package (format 2.0)
21+
shell$ file ../u-dma-buf-5.4.0-xlnx-v2020.1-zynqmp-fpga_3.0.0-1_arm64.deb
22+
../u-dma-buf-5.4.0-xlnx-v2020.1-zynqmp-fpga_3.0.1-0_arm64.deb: Debian binary package (format 2.0)
4423
```
4524

46-
fclkcfg-4.19.0-xlnx-v2019.2-zynqmp-fpga_1.3.0-1_arm64.deb
25+
fclkcfg-5.4.0-xlnx-v2020.1-zynqmp-fpga_1.3.0-1_arm64.deb
4726
------------------------------------------------------------------------------------
4827

4928
### Download repository
@@ -53,15 +32,15 @@ shell$ git clone --recursive --depth=1 -b v1.3.0 git://github.com/ikwzm/fclkcfg-
5332
shell$ cd fclkcfg-kmod-dpkg
5433
```
5534

56-
### Cross Compile for linux-xlnx-v2019.2-zynqmp-fpga
35+
### Cross Compile for linux-xlnx-v2020.1-zynqmp-fpga
5736

5837
```console
59-
shell$ sudo debian/rules arch=arm64 deb_arch=arm64 kernel_release=4.19.0-xlnx-v2019.2-zynqmp-fpga kernel_src_dir=../../linux-xlnx-v2019.2-zynqmp-fpga binary
38+
shell$ sudo debian/rules arch=arm64 deb_arch=arm64 kernel_release=5.4.0-xlnx-v2020.1-zynqmp-fpga kernel_src_dir=../../linux-xlnx-v2020.1-zynqmp-fpga binary
6039
:
6140
:
6241
:
63-
shell$ file ../fclkcfg-4.19.0-xlnx-v2019.2-zynqmp-fpga_1.3.0-1_arm64.deb
64-
../fclkcfg-4.19.0-xlnx-v2019.2-zynqmp-fpga_1.3.0-1_arm64.deb: Debian binary package (format 2.0)
42+
shell$ file ../fclkcfg-5.4.0-xlnx-v2020.1-zynqmp-fpga_1.3.0-1_arm64.deb
43+
../fclkcfg-5.4.0-xlnx-v2020.1-zynqmp-fpga_1.3.0-1_arm64.deb: Debian binary package (format 2.0)
6544
```
6645

6746

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# Build Linux Kernel
2+
3+
There are two ways
4+
5+
1. run scripts/build-linux-xlnx-v2020.1-zynqmp-fpga.sh (easy)
6+
2. run this chapter step-by-step (annoying)
7+
8+
## Download ATWILC3000 Linux Driver for Ultra96-V2
9+
10+
```console
11+
shell$ git clone https://github.com/Avnet/u96v2-wilc-driver.git
12+
```
13+
## Download Linux Kernel Source
14+
15+
### Clone from linux-xlnx.git
16+
17+
```console
18+
shell$ git clone --depth 1 -b xilinx-v2020.1 https://github.com/Xilinx/linux-xlnx.git linux-xlnx-v2020.1-zynqmp-fpga
19+
```
20+
21+
### Make Branch linux-xlnx-v2020.1-zynqmp-fpga
22+
23+
```console
24+
shell$ cd linux-xlnx-v2020.1-zynqmp-fpga
25+
shell$ git checkout -b linux-xlnx-v2020.1-zynqmp-fpga refs/tags/xilinx-v2020.1
26+
```
27+
28+
## Patch for linux-xlnx-v2020.1-zynqmp-fpga
29+
30+
```console
31+
shell$ patch -p1 < ../files/linux-xlnx-v2020.1-zynqmp-fpga.diff
32+
shell$ git add --update
33+
shell$ git add arch/arm64/boot/dts/xilinx/zynqmp-uz3eg-iocc.dts
34+
shell$ git commit -m "[patch] for linux-xlnx-v2020.1-zynqmp-fpga."
35+
```
36+
37+
## Patch for linux-xlnx-v2020.1-builddeb
38+
39+
```console
40+
shell$ patch -p1 < ../files/linux-xlnx-v2020.1-builddeb.diff
41+
shell$ git add --update
42+
shell$ git commit -m "[update] scripts/package/builddeb to add tools/include and postinst script to header package."
43+
```
44+
45+
## Patch for drivers/drivers/tty/serial/xilinx_uartps.c
46+
47+
```console
48+
shell$ patch -p1 < ../files/linux-xlnx-v2020.1-zynqmp-fpga-xilinx_uartps.diff
49+
shell$ git add --update
50+
shell$ git commit -m "[fix] the problem that only the first port that xilinx_uartps.c found was the console."
51+
```
52+
53+
## Add ATWILC3000 Linux Driver for Ultra96-V2
54+
55+
```console
56+
shell$ cp -r ../u96v2-wilc-driver/wilc drivers/staging/wilc3000/
57+
shell$ patch -p1 < ../files/linux-xlnx-v2020.1-zynqmp-fpga-wilc3000.diff
58+
shell$ git add --update
59+
shell$ git add drivers/staging/wilc3000
60+
shell$ git commit -m "[add] drivers/staging/wilc3000"
61+
```
62+
63+
## Patch for Ultra96-V2
64+
65+
```console
66+
shell$ patch -p1 < ../files/linux-xlnx-v2020.1-zynqmp-fpga-ultra96v2.diff
67+
shell$ git add --update
68+
shell$ git add arch/arm64/boot/dts/xilinx/avnet-ultra96v2-rev1.dts
69+
shell$ git commit -m "[add] devicetree for Ultra96-V2."
70+
```
71+
72+
## Patch for Xilinx APF Driver
73+
74+
```console
75+
shell$ patch -p1 < ../files/linux-xlnx-v2020.1-zynqmp-fpga-apf.diff
76+
shell$ git add --update
77+
shell$ git commit -m "[add] Xilinx APF driver."
78+
```
79+
80+
## Create tag and .version
81+
82+
```console
83+
shell$ git tag -a xilinx-v2020.1-zynqmp-fpga-1 -m "release xilinx-v2020.1-zynqmp-fpga-1"
84+
shell$ echo 1 > .version
85+
```
86+
87+
## Setup for Build
88+
89+
```console
90+
shell$ cd linux-xlnx-v2020.1-zynqmp-fpga
91+
shell$ export ARCH=arm64
92+
shell$ export CROSS_COMPILE=aarch64-linux-gnu-
93+
shell$ make xilinx_zynqmp_defconfig
94+
```
95+
96+
## Build Linux Kernel and device tree
97+
98+
```console
99+
shell$ export DTC_FLAGS=--symbols
100+
shell$ make deb-pkg
101+
```
102+
103+
## Build kernel image and devicetree to target/UltraZed-EG-IOCC/boot/
104+
105+
```console
106+
shell$ cp arch/arm64/boot/Image ../target/UltraZed-EG-IOCC/boot/image-5.4.0-xlnx-v2020.1-zynqmp-fpga
107+
shell$ cp arch/arm64/boot/dts/xilinx/zynqmp-uz3eg-iocc.dtb ../target/UltraZed-EG-IOCC/boot/devicetree-5.4.0-xlnx-v2020.1-zynqmp-fpga-uz3eg-iocc.dtb
108+
shell$ ./scripts/dtc/dtc -I dtb -O dts --symbols -o ../target/UltraZed-EG-IOCC/boot/devicetree-5.4.0-xlnx-v2020.1-zynqmp-fpga-uz3eg-iocc.dts ../target/UltraZed-EG-IOCC/boot/devicetree-5.4.0-xlnx-v2020.1-zynqmp-fpga-uz3eg-iocc.dtb
109+
```
110+
111+
## Build kernel image and devicetree to target/Ultra96/boot/
112+
113+
```console
114+
shell$ cp arch/arm64/boot/Image ../target/Ultra96/boot/image-5.4.0-xlnx-v2020.1-zynqmp-fpga
115+
shell$ cp arch/arm64/boot/dts/xilinx/avnet-ultra96-rev1.dtb ../target/Ultra96/boot/devicetree-5.4.0-xlnx-v2020.1-zynqmp-fpga-ultra96.dtb
116+
shell$ ./scripts/dtc/dtc -I dtb -O dts --symbols -o ../target/Ultra96/boot/devicetree-5.4.0-xlnx-v2020.1-zynqmp-fpga-ultra96.dts ../target/Ultra96/boot/devicetree-5.4.0-xlnx-v2020.1-zynqmp-fpga-ultra96.dtb
117+
```
118+
119+
## Build kernel image and devicetree to target/Ultra96-V2/boot/
120+
121+
```console
122+
shell$ cp arch/arm64/boot/Image ../target/Ultra96-V2/boot/image-5.4.0-xlnx-v2020.1-zynqmp-fpga
123+
shell$ cp arch/arm64/boot/dts/xilinx/avnet-ultra96v2-rev1.dtb ../target/Ultra96-V2/boot/devicetree-5.4.0-xlnx-v2020.1-zynqmp-fpga-ultra96v2.dtb
124+
shell$ ./scripts/dtc/dtc -I dtb -O dts --symbols -o ../target/Ultra96-V2/boot/devicetree-5.4.0-xlnx-v2020.1-zynqmp-fpga-ultra96v2.dts ../target/Ultra96-V2/boot/devicetree-5.4.0-xlnx-v2020.1-zynqmp-fpga-ultra96v2.dtb
125+
```
126+

0 commit comments

Comments
 (0)