下载补丁和xenomai 3.2.1 stable
1
2
3
4
5
|
wget https://xenomai.org/downloads/dovetail/patch-5.10.89-dovetail1.patch.bz2
wget https://gitlab.denx.de/Xenomai/xenomai/-/archive/v3.1.1/xenomai-v3.2.1.tar.bz2
cd xenomai-v3.2.1
./prepare-kernel.sh --arch=arm64 --linux=/home/kong/src/kernel/linux-stable --dovetail=~/patch-5.10.89-dovetail1.patch --verbose
|
编译kernel和modules
1
2
3
|
make ARCH=arm64 CROSS_COMPILE=/output/linux-5.10-aarch/aarch64-linux-gnu/aarch64-linux-gnu/bin/aarch64-linux-gnu- Image -j4
make ARCH=arm64 CROSS_COMPILE=/output/linux-5.10-aarch/aarch64-linux-gnu/aarch64-linux-gnu/bin/aarch64-linux-gnu- modules -j4
make ARCH=arm64 INSTALL_MOD_PATH=/output/linux-5.10-aarch/rootfs/rootfs/ modules_install
|
1
2
3
4
5
|
~ # dmesg |grep -i xenomai
[ 0.308870] [Xenomai] scheduling class idle registered.
[ 0.309064] [Xenomai] scheduling class rt registered.
[ 0.309591] IRQ pipeline: high-priority Xenomai stage added.
[ 0.317918] [Xenomai] Cobalt v3.2.1
|
可能出现的问题
1
2
|
FAILED unresolved symbol udp_sock
make: *** [Makefile:1205: vmlinux] Error 255
|
https://www.mail-archive.com/netdev@vger.kernel.org/msg358778.html
但是昨天第二次重新打了一次又没了
用户空间工具编译
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
./configure CFLAGS="-march=armv8-a -O2" --enable-smp --with-core=cobalt --host=aarch64-linux-gnu
make
make DESTDIR=`pwd`/kong_install install
#打个包扔到rootfs里就行了
/usr/xenomai/bin # ./latency
== Sampling period: 1000 us
== Test mode: periodic user-mode task
== All results in microseconds
warming up...
RTT| 00:00:01 (periodic user-mode task, 1000 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst
RTD| 14.928| 27.278| 84.880| 0| 0| 14.928| 84.880
RTD| 17.920| 30.396| 690.320| 0| 0| 14.928| 690.320
RTD| 18.192| 29.107| 100.544| 0| 0| 14.928| 690.320
RTD| 17.728| 29.708| 105.616| 0| 0| 14.928| 690.320
RTD| 18.000| 34.148| 2567.520| 2| 0| 14.928| 2567.520
RTD| 14.656| 29.560| 145.984| 2| 0| 14.656| 2567.520
RTD| 18.144| 31.176| 214.736| 2| 0| 14.656| 2567.520
RTD| 17.904| 33.882| 2596.160| 4| 0| 14.656| 2596.160
RTD| 19.872| 31.771| 102.896| 4| 0| 14.656| 2596.160
RTD| 17.696| 29.522| 151.376| 4| 0| 14.656| 2596.160
^C---|-----------|-----------|-----------|--------|------|-------------------------
RTS| 14.656| 30.654| 2596.160| 4| 0| 00:00:11/00:00:11
/usr/xenomai/bin # exit
|