Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
Build drivers from source for rpi/zh
(view source)
Revision as of 17:16, 24 April 2022
258 bytes removed
,
17:16, 24 April 2022
→开发环境准备
Line 1:
Line 1:
[[Build drivers from source for rpi|English]]
[[Build drivers from source for rpi|English]]
−
本文主要参考资料为[https://www.raspberrypi.org/documentation/linux/kernel/building.md 官方piOS编译方法]
。我们采用交叉编译的方法。
+
本文主要参考资料为[https://www.raspberrypi.org/documentation/linux/kernel/building.md 官方piOS编译方法]
。
+
我们提供了在树莓派上本地编译和在PC上交叉编译的方法。建议使用树莓派本地编译,这更简单,也更快捷。
+
+
=== 树莓派本地编译 ===
+
+
=== PC机上交叉编译 ===
以下操作均在ubuntu PC上进行。
以下操作均在ubuntu PC上进行。
−
===开发环境准备===
+
=
===开发环境准备
=
===
<code>sudo apt install git bc bison flex libssl-dev make libc6-dev libncurses5-dev</code>
<code>sudo apt install git bc bison flex libssl-dev make libc6-dev libncurses5-dev</code>
Line 14:
Line 19:
<code>sudo apt install crossbuild-essential-arm64</code>
<code>sudo apt install crossbuild-essential-arm64</code>
−
===下载标准版本===
+
=
===下载标准版本
=
===
=====首先,请确认自己的树莓派上的piOS版本:=====
=====首先,请确认自己的树莓派上的piOS版本:=====
Line 61:
Line 66:
修改同路径下的Makefile,增加对应dts编译选项。
修改同路径下的Makefile,增加对应dts编译选项。
−
===编译===
+
=
===编译
=
===
=====编译准备=====
=====编译准备=====
不同树莓派的编译选项不同,区别如下:
不同树莓派的编译选项不同,区别如下:
Line 110:
Line 115:
<code>make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- Image modules dtbs -j4</code>
<code>make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- Image modules dtbs -j4</code>
−
===常见问题===
−
−
*disagrees about version of symbol module_layout
−
−
系统启动过后,dmesg可以看到camera的驱动加载的时候报这个错误。由于板子上原有的piOS版本与编译后的camera驱动版本不匹配导致。
−
−
建议参考这个[https://www.raspberrypi.com/documentation/computers/linux_kernel.html#cross-compiling-the-kernel 链接],从代码重新编译,并整体安装Image、dtb、modules。
===参考资料===
===参考资料===
Admin
Bureaucrats
,
Administrators
1,602
edits
Navigation menu
Personal tools
Log in
Namespaces
Page
Discussion
Variants
Views
Read
View source
View history
More
Search
Navigation
Links
VEYE IMAGING Website
VEYE IMAGING WIKI
VEYE IMAGING Github
VEYE IMAGING Forum
Offical Store
TAOBAO(淘宝网店)
AliExpress Shop
Amazon US. Shop
Amazon Canda Shop
WIKI Main Page
Main Page
Support
Support
Tools
Special pages
Printable version