Skip to content

Commit 09615a5

Browse files
committed
Merge branch 'build-v2021.1'
2 parents bb213df + 14c6af1 commit 09615a5

File tree

80 files changed

+30723
-541
lines changed

Some content is hidden

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

80 files changed

+30723
-541
lines changed

Readme.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@ This Repository provides a Linux Boot Image(U-boot, Kernel, Root-fs) for Zynq MP
1414
+ UltraZed-EG-IOCC : Xilinx Zynq UltraScale+ MPSoC Starter Kit by Avnet.
1515
+ Ultra96 : Xilinx Zynq UltraScale+ MPSoC development board based on the Linaro 96Boards specification.
1616
+ Ultra96-V2 : updates and refreshes the Ultra96 product that was released in 2018.
17+
+ KV260 : Kria KV260 Vision AI Startar Kit.
1718
* Boot Loader
1819
+ FSBL(First Stage Boot Loader for ZynqMP)
1920
+ PMU Firmware(Platform Management Unit Firmware)
2021
+ BL31(ARM Trusted Firmware Boot Loader stage 3-1)
2122
+ U-Boot xilinx-v2019.2 (customized)
22-
* Linux Kernel Version v5.4.0
23-
+ [linux-xlnx](https://github.com/Xilinx/linux-xlnx) tag=xilinx-v2020.2
23+
* Linux Kernel Version v5.10.0
24+
+ [linux-xlnx](https://github.com/Xilinx/linux-xlnx) tag=xilinx-v2021.1
2425
+ Enable Device Tree Overlay with Configuration File System
2526
+ Enable FPGA Manager
2627
+ Enable FPGA Bridge
@@ -29,38 +30,41 @@ This Repository provides a Linux Boot Image(U-boot, Kernel, Root-fs) for Zynq MP
2930
+ Enable CIFS (Common Internet File System)
3031
+ Enable Xilinx APF Accelerator driver
3132
+ Enable Xilinx APF DMA engines support
32-
* Debian10.9(buster) Root File System
33+
* Debian11.1(bullseye) Root File System
3334
+ Installed build-essential
3435
+ Installed device-tree-compiler
3536
+ Installed ruby ruby-msgpack ruby-serialport
3637
+ Installed python python3 msgpack-rpc-python
3738
+ Installed u-boot-tools
38-
+ Installed Other package list -> [files/debian10-dpkg-list.txt](files/debian10-dpkg-list.txt)
39+
+ Installed Other package list -> [files/debian11-dpkg-list.txt](files/debian11-dpkg-list.txt)
3940
* FPGA Device Drivers and Services
4041
+ [fclkcfg (FPGA Clock Configuration Device Driver)](https://github.com/ikwzm/fclkcfg)
4142
+ [u-dma-buf (User space mappable DMA Buffer)](https://github.com/ikwzm/udmabuf)
4243

4344
Install
4445
------------------------------------------------------------------------------------
4546

46-
* Install U-Boot and Linux to SD-Card
47+
* Install Boot Loader and Linux to SD-Card
4748
+ [UltraZed-EG-IOCC](doc/install/ultrazed-eg-iocc.md)
4849
+ [Ultra96](doc/install/ultra96.md)
4950
+ [Ultra96-V2](doc/install/ultra96v2.md)
51+
+ [KV260](doc/install/kv260.md)
5052

5153
Build
5254
------------------------------------------------------------------------------------
5355

5456
* [Build Boot Loader for UltraZed-EG-IOCC](target/UltraZed-EG-IOCC/build-v2019.2/Readme.md)
5557
* [Build Boot Loader for Ultra96](target/Ultra96/build-v2019.2/Readme.md)
5658
* [Build Boot Loader for Ultra96-V2](target/Ultra96-V2/build-v2019.2/Readme.md)
57-
* [Build Linux Kernel](doc/build/linux-xlnx-v2020.2-zynqmp-fpga.md)
58-
* [Build Debian10 RootFS](doc/build/debian10-rootfs.md)
59+
* [Build Linux Kernel](doc/build/linux-xlnx-v2021.1-zynqmp-fpga.md)
60+
* [Build Debian11 RootFS](doc/build/debian11-rootfs.md)
5961
* [Build Device Drivers](doc/build/device-drivers.md)
6062

6163
Other Projects
6264
------------------------------------------------------------------------------------
6365

66+
* https://github.com/ikwzm/ZynqMP-FPGA-Ubuntu20.04-Ultra96
67+
+ Linux Boot Image(U-boot, Kernel, Ubuntu 20.04 Desktop) for Ultra96/Ultra96-V2
6468
* https://github.com/ikwzm/ZynqMP-FPGA-Ubuntu18.04-Ultra96
6569
+ Linux Boot Image(U-boot, Kernel, Ubuntu 18.04 Desktop) for Ultra96/Ultra96-V2
6670
* https://github.com/ikwzm/ZynqMP-FPGA-Xserver

debian10-rootfs-vanilla.tgz

Lines changed: 0 additions & 3 deletions
This file was deleted.

debian11-rootfs-vanilla.tgz

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:26396d9019e0b2a5bbd5359dcb6c9261bbfd9e39dc00ad194cd9675abb438e5c
3+
size 377002704

doc/build/debian11-rootfs.md

Lines changed: 266 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,266 @@
1+
Build Debian11 RootFS
2+
====================================================================================
3+
4+
## Setup parameters
5+
6+
```console
7+
shell$ apt-get install qemu-user-static debootstrap binfmt-support
8+
shell$ export targetdir=debian11-rootfs
9+
shell$ export distro=bullseye
10+
```
11+
12+
## Build Debian RootFS first-step in $targetdir(=debian11-rootfs)
13+
14+
```console
15+
shell$ mkdir $PWD/$targetdir
16+
shell$ sudo chown root $PWD/$targetdir
17+
shell$ sudo debootstrap --arch=arm64 --foreign $distro $PWD/$targetdir
18+
shell$ sudo cp /usr/bin/qemu-aarch64-static $PWD/$targetdir/usr/bin
19+
shell$ sudo cp /etc/resolv.conf $PWD/$targetdir/etc
20+
shell$ sudo cp scripts/build-debian11-rootfs-with-qemu.sh $PWD/$targetdir
21+
shell$ sudo cp linux-image-5.4.0-xlnx-v2020.2-zynqmp-fpga_5.4.0-xlnx-v2020.2-zynqmp-fpga-3_arm64.deb $PWD/$targetdir
22+
shell$ sudo cp linux-image-5.10.0-xlnx-v2021.1-zynqmp-fpga_5.10.0-xlnx-v2021.1-zynqmp-fpga-4_arm64.deb $PWD/$targetdir
23+
````
24+
25+
## Build Debian RootFS second-step with QEMU
26+
27+
### Change Root to debian11-rootfs
28+
29+
```console
30+
shell$ sudo chroot $PWD/$targetdir
31+
```
32+
33+
There are two ways
34+
35+
1. run build-debian11-rootfs-with-qemu.sh (easy)
36+
2. run this chapter step-by-step (annoying)
37+
38+
### Run debootstrap second stage
39+
40+
```console
41+
debian11-rootfs# distro=bullseye
42+
debian11-rootfs# export LANG=C
43+
debian11-rootfs# /debootstrap/debootstrap --second-stage
44+
```
45+
46+
#### NOTE
47+
48+
If the version of qemu-user-static is old, you may get the following error.
49+
50+
```console
51+
debian11-rootfs# /debootstrap/debootstrap --second-stage
52+
W: Failure trying to run: /sbin/ldconfig
53+
W: See //debootstrap/debootstrap.log for details
54+
```
55+
56+
In this case, please update qemu-user-static.
57+
I used 'qemu-user-static_6.1+dfsg-8_amd64.deb'.
58+
59+
### Setup APT
60+
61+
```console
62+
debian11-rootfs# cat <<EOT > /etc/apt/sources.list
63+
deb http://ftp.jp.debian.org/debian bullseye main contrib non-free
64+
deb-src http://ftp.jp.debian.org/debian bullseye main contrib non-free
65+
deb http://ftp.jp.debian.org/debian bullseye-updates main contrib non-free
66+
deb-src http://ftp.jp.debian.org/debian bullseye-updates main contrib non-free
67+
deb http://security.debian.org bullseye-security main contrib non-free
68+
deb-src http://security.debian.org bullseye-security main contrib non-free
69+
EOT
70+
```
71+
72+
```console
73+
debian11-rootfs# cat <<EOT > /etc/apt/apt.conf.d/71-no-recommends
74+
APT::Install-Recommends "0";
75+
APT::Install-Suggests "0";
76+
EOT
77+
```
78+
79+
```console
80+
debian11-rootfs# apt-get update -y
81+
```
82+
83+
### Install applications
84+
85+
```console
86+
debian11-rootfs# apt-get install -y locales dialog
87+
debian11-rootfs# dpkg-reconfigure locales
88+
debian11-rootfs# apt-get install -y net-tools openssh-server ntpdate resolvconf sudo less hwinfo ntp tcsh zsh file
89+
```
90+
91+
### Setup hostname
92+
93+
```console
94+
debian11-rootfs# echo debian-fpga > /etc/hostname
95+
```
96+
97+
### Setup root password
98+
99+
```console
100+
debian11-rootfs# passwd
101+
```
102+
103+
This time, we set the "admin" at the root' password.
104+
105+
To be able to login as root from ZynqMP serial port.
106+
107+
```console
108+
debian11-rootfs# cat <<EOT >> /etc/securetty
109+
# Serial Port for Xilinx ZynqMP
110+
ttyPS0
111+
ttyPS1
112+
EOT
113+
```
114+
115+
### Add a new guest user
116+
117+
```console
118+
debian11-rootfs# adduser fpga
119+
```
120+
121+
This time, we set the "fpga" at the fpga'password.
122+
123+
```console
124+
debian11-rootfs# echo "fpga ALL=(ALL:ALL) ALL" > /etc/sudoers.d/fpga
125+
```
126+
127+
### Setup sshd config
128+
129+
```console
130+
debian11-rootfs# sed -i -e 's/#PasswordAuthentication/PasswordAuthentication/g' /etc/ssh/sshd_config
131+
```
132+
133+
### Setup Time Zone
134+
135+
```console
136+
debian11-rootfs# dpkg-reconfigure tzdata
137+
```
138+
139+
or if noninteractive set to Asia/Tokyo
140+
141+
```console
142+
debian11-rootfs# echo "Asia/Tokyo" > /etc/timezone
143+
debian11-rootfs# dpkg-reconfigure -f noninteractive tzdata
144+
```
145+
146+
147+
### Setup fstab
148+
149+
```console
150+
debian11-rootfs# cat <<EOT > /etc/fstab
151+
none /config configfs defaults 0 0
152+
EOT
153+
````
154+
155+
### Setup Network
156+
157+
```console
158+
debian11-rootfs# apt-get install -y ifupdown
159+
debian11-rootfs# cat <<EOT > /etc/network/interfaces.d/eth0
160+
allow-hotplug eth0
161+
iface eth0 inet dhcp
162+
EOT
163+
````
164+
165+
### Setup /lib/firmware
166+
167+
```console
168+
debian11-rootfs# mkdir /lib/firmware
169+
debian11-rootfs# mkdir /lib/firmware/ti-connectivity
170+
debian11-rootfs# mkdir /lib/firmware/mchp
171+
```
172+
173+
### Install Development applications
174+
175+
```console
176+
debian11-rootfs# apt-get install -y build-essential
177+
debian11-rootfs# apt-get install -y git git-lfs
178+
debian11-rootfs# apt-get install -y u-boot-tools device-tree-compiler
179+
debian11-rootfs# apt-get install -y libssl-dev
180+
debian11-rootfs# apt-get install -y socat
181+
debian11-rootfs# apt-get install -y ruby rake ruby-msgpack ruby-serialport
182+
debian11-rootfs# apt-get install -y python3 python3-dev python3-setuptools python3-wheel python3-pip
183+
debian11-rootfs# apt-get purge -y python3-pkg-resources
184+
debian11-rootfs# apt-get install -y python3-pkg-resources
185+
debian11-rootfs# apt-get install -y python3-numpy
186+
debian11-rootfs# pip3 install msgpack-rpc-python
187+
debian11-rootfs# apt-get install -y flex bison pkg-config
188+
```
189+
190+
### Install Wireless tools and firmware
191+
192+
```console
193+
debian11-rootfs# apt-get install -y wireless-tools
194+
debian11-rootfs# apt-get install -y wpasupplicant
195+
debian11-rootfs# apt-get install -y firmware-realtek
196+
debian11-rootfs# apt-get install -y firmware-ralink
197+
```
198+
199+
```console
200+
debian11-rootfs# git clone git://git.ti.com/wilink8-wlan/wl18xx_fw.git
201+
debian11-rootfs# cp wl18xx_fw/wl18xx-fw-4.bin /lib/firmware/ti-connectivity
202+
debian11-rootfs# rm -rf wl18xx_fw/
203+
```
204+
205+
```console
206+
debian11-rootfs# git clone git://git.ti.com/wilink8-bt/ti-bt-firmware
207+
debian11-rootfs# cp ti-bt-firmware/TIInit_11.8.32.bts /lib/firmware/ti-connectivity
208+
debian11-rootfs# rm -rf ti-bt-firmware
209+
```
210+
211+
```console
212+
debian11-rootfs# git clone git://github.com/linux4wilc/firmware linux4wilc-firmware
213+
debian11-rootfs# cp linux4wilc-firmware/*.bin /lib/firmware/mchp
214+
debian11-rootfs# rm -rf linux4wilc-firmware
215+
```
216+
217+
### Install Other applications
218+
219+
```console
220+
debian11-rootfs# apt-get install -y samba
221+
debian11-rootfs# apt-get install -y avahi-daemon
222+
```
223+
224+
### Install haveged for Linux Kernel 4.19
225+
226+
```console
227+
debian11-rootfs# apt-get install -y haveged
228+
```
229+
230+
### Install Linux Modules
231+
232+
```console
233+
debian11-rootfs# dpkg -i linux-image-5.4.0-xlnx-v2020.2-zynqmp-fpga_5.4.0-xlnx-v2020.2-zynqmp-fpga-3_arm64.deb
234+
debian11-rootfs# dpkg -i linux-image-5.10.0-xlnx-v2021.1-zynqmp-fpga_5.10.0-xlnx-v2021.1-zynqmp-fpga-4_arm64.deb
235+
```
236+
237+
### Clean Cache
238+
239+
```console
240+
debian11-rootfs# apt-get clean
241+
```
242+
243+
### Create Debian Package List
244+
245+
```console
246+
debian11-rootfs# dpkg -l > dpkg-list.txt
247+
```
248+
249+
### Finish
250+
251+
```console
252+
debian10-rootfs# exit
253+
shell$ sudo rm -f $PWD/$targetdir/usr/bin/qemu-aarch64-static
254+
shell$ sudo rm -f $PWD/$targetdir/build-debian11-rootfs-with-qemu.sh
255+
shell$ sudo rm -f $PWD/$targetdir/linux-image-5.4.0-xlnx-v2020.2-zynqmp-fpga_5.4.0-xlnx-v2020.2-zynqmp-fpga-3_arm64.deb
256+
shell$ sudo rm -f $PWD/$targetdir/linux-image-5.10.0-xlnx-v2021.1-zynqmp-fpga_5.10.0-xlnx-v2021.1-zynqmp-fpga-4_arm64.deb
257+
shell$ sudo mv $PWD/$targetdir/dpkg-list.txt files/debian11-dpkg-list.txt
258+
```
259+
260+
## Build debian11-rootfs-vanilla.tgz
261+
262+
```console
263+
shell$ cd $PWD/$targetdir
264+
shell$ sudo tar cfz ../debian11-rootfs-vanilla.tgz *
265+
```
266+

doc/build/device-drivers.md

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

4-
u-dma-buf-5.4.0-xlnx-v2020.2-zynqmp-fpga_3.2.4-0_arm64.deb
4+
u-dma-buf-5.10.0-xlnx-v2021.1-zynqmp-fpga_3.2.4-0_arm64.deb
55
------------------------------------------------------------------------------------
66

77
### Download repository
@@ -14,15 +14,15 @@ shell$ cd u-dma-buf-kmod-dpkg
1414
### Cross Compile for linux-xlnx-v2020.1-zynqmp-fpga
1515

1616
```console
17-
shell$ sudo debian/rules arch=arm64 deb_arch=arm64 kernel_release=5.4.0-xlnx-v2020.2-zynqmp-fpga kernel_src_dir=../../linux-xlnx-v2020.2-zynqmp-fpga binary
17+
shell$ sudo debian/rules arch=arm64 deb_arch=arm64 kernel_release=5.10.0-xlnx-v2021.1-zynqmp-fpga kernel_src_dir=../../linux-xlnx-v2021.1-zynqmp-fpga binary
1818
:
1919
:
2020
:
21-
shell$ file ../u-dma-buf-5.4.0-xlnx-v2020.2-zynqmp-fpga_3.2.4-0_arm64.deb
22-
../u-dma-buf-5.4.0-xlnx-v2020.2-zynqmp-fpga_3.2.4-0_arm64.deb: Debian binary package (format 2.0)
21+
shell$ file ../u-dma-buf-5.10.0-xlnx-v2021.1-zynqmp-fpga_3.2.4-0_arm64.deb
22+
../u-dma-buf-5.10.0-xlnx-v2021.1-zynqmp-fpga_3.2.4-0_arm64.deb: Debian binary package (format 2.0)
2323
```
2424

25-
fclkcfg-5.4.0-xlnx-v2020.2-zynqmp-fpga_1.7.2-1_arm64.deb
25+
fclkcfg-5.10.0-xlnx-v2021.1-zynqmp-fpga_1.7.2-1_arm64.deb
2626
------------------------------------------------------------------------------------
2727

2828
### Download repository
@@ -35,12 +35,12 @@ shell$ cd fclkcfg-kmod-dpkg
3535
### Cross Compile for linux-xlnx-v2020.1-zynqmp-fpga
3636

3737
```console
38-
shell$ sudo debian/rules arch=arm64 deb_arch=arm64 kernel_release=5.4.0-xlnx-v2020.2-zynqmp-fpga kernel_src_dir=../../linux-xlnx-v2020.2-zynqmp-fpga binary
38+
shell$ sudo debian/rules arch=arm64 deb_arch=arm64 kernel_release=5.10.0-xlnx-v2021.1-zynqmp-fpga kernel_src_dir=../../linux-xlnx-v2021.1-zynqmp-fpga binary
3939
:
4040
:
4141
:
42-
shell$ file ../fclkcfg-5.4.0-xlnx-v2020.2-zynqmp-fpga_1.7.2-1_arm64.deb
43-
../fclkcfg-5.4.0-xlnx-v2020.2-zynqmp-fpga_1.7.2-1_arm64.deb: Debian binary package (format 2.0)
42+
shell$ file ../fclkcfg-5.10.0-xlnx-v2021.1-zynqmp-fpga_1.7.2-1_arm64.deb
43+
../fclkcfg-5.10.0-xlnx-v2021.1-zynqmp-fpga_1.7.2-1_arm64.deb: Debian binary package (format 2.0)
4444
```
4545

4646

0 commit comments

Comments
 (0)