Orange Pi 5 (Armbian 23.02) に PX-W3U4 をセットアップした記録です。
ホームページ の通り実行すると、ドライバのインストールでエラーとなります。
$ sudo dkms install px4_drv/0.2.1
:
cleaning build area...
cd ./driver; make KVER=5.10.110-rockchip-rk3588 px4_drv.ko.......(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.10.110-rockchip-rk3588 (aarch64)
Consult /var/lib/dkms/px4_drv/0.2.1/build/make.log for more information.
エラーの中身は以下の通り。
$ cat /var/lib/dkms/px4_drv/0.2.1/build/make.log
DKMS make.log for px4_drv-0.2.1 for kernel 5.10.110-rockchip-rk3588 (aarch64)
Sun 16 Apr 2023 09:53:08 PM JST
'revision.h' was updated.
make[1]: Entering directory '/usr/src/linux-headers-5.10.110-rockchip-rk3588'
CC [M] /var/lib/dkms/px4_drv/0.2.1/build/driver/driver_module.o
:
CC [M] /var/lib/dkms/px4_drv/0.2.1/build/driver/px4_drv.mod.o
make[3]: *** No rule to make target 'scripts/module.lds', needed by '/var/lib/dkms/px4_drv/0.2.1/build/driver/px4_drv.ko'. Stop.
make[2]: *** [scripts/Makefile.modpost:175: __modpost] Error 2
make[1]: *** [Makefile:1896: single_modpost] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.10.110-rockchip-rk3588'
make: *** [Makefile:19: px4_drv.ko] Error 2
Orange Pi 5 向け linux-kernel-header
には module.lds.S
はあるが、module.lds
がないためこのエラーが発生します。
$ ls /usr/src/linux-headers-5.10.110-rockchip-rk3588/scripts/module.lds*
/usr/src/linux-headers-5.10.110-rockchip-rk3588/scripts/module.lds.S
以下の手順で module.lds を生成しました。
$ su
# cd /usr/src/linux-headers-5.10.110-rockchip-rk3588
# wget https://raw.githubusercontent.com/torvalds/linux/v5.10/arch/arm64/kernel/vdso/vdso.lds.S -P arch/arm64/kernel/vdso
# wget https://raw.githubusercontent.com/torvalds/linux/v5.10/arch/arm64/kernel/vdso/vgettimeofday.c -P arch/arm64/kernel/vdso
# wget https://raw.githubusercontent.com/torvalds/linux/v5.10/lib/vdso/gettimeofday.c -P lib/vdso
# wget https://raw.githubusercontent.com/torvalds/linux/v5.10/arch/arm64/kernel/vdso/note.c -P arch/arm64/kernel/vdso
# wget https://raw.githubusercontent.com/torvalds/linux/v5.10/arch/arm64/kernel/vdso/note.S -P arch/arm64/kernel/vdso
# wget https://raw.githubusercontent.com/torvalds/linux/v5.10/arch/arm64/kernel/vdso/sigreturn.S -P arch/arm64/kernel/vdso
# wget https://raw.githubusercontent.com/torvalds/linux/v5.10/arch/arm64/kernel/vdso/gen_vdso_offsets.sh -P arch/arm64/kernel/vdso
# chmod +x arch/arm64/kernel/vdso/gen_vdso_offsets.sh
# make olddefconfig && make modules_prepare
もう一度ドライバインストールすると、今度は成功しました。
$ sudo dkms install px4_drv/0.2.1
Kernel preparation unnecessary for this kernel. Skipping...
Building module:
cleaning build area...
cd ./driver; make KVER=5.10.110-rockchip-rk3588 px4_drv.ko.......
cleaning build area...
DKMS: build completed.
: