【发布时间】:2018-11-09 19:58:59
【问题描述】:
我目前已经为橙色 pi 零板(我用于学习的便宜的中国板)构建了一个 Yocto core-minimal-images(带有 meta-sunxi)
https://github.com/linux-sunxi/meta-sunxi
它在我的板上成功启动,但在 /dev 目录中我没有访问 SPI NOR 内存的权限。在橙色 pi wiki 上进行一些搜索后,我发现我的设备树需要一些行:https://linux-sunxi.org/Orange_Pi_Zero#Installing_from_linux
&spi0 {
status = "okay";
flash: m25p80@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "winbond,w25q128";
reg = <0>;
spi-max-frequency = <40000000>;
};
};
但我真的不明白如何进行...因为我没有找到需要编辑的文件?也许这不是一个好主意?我认为创建一个 .bbappend 食谱更好吗?
我通过在 meta-sunxi 目录中搜索收集到的信息:
在 conf/orange-pi-zero/KERNEL_DEVICETREE = "sun8i-h2-plus-orangepi-zero.dtb" 但是 meta-sunxi 目录中没有“sun8i-h2-plus-orangepi-zero.dts”文件?
"sun8i-h2-plus-orangepi-zero.dtb"文件存在于 /build/tmp/deploy/images/orange-pi-zero/ 所以我真的不知道怎么做它是生成的?只有yocto下载吗? (没有设备树编译?)
通过 serachin 在网上我找到了 sun8i-h2-plus-orangepi-zero.dts 在:https://github.com/torvalds/linux/blob/master/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
它包含这些有趣的行:
&spi0 {
/* Disable SPI NOR by default: it optional on Orange Pi Zero boards */
status = "disabled";
flash@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "mxicy,mx25l1606e", "winbond,w25q128";
reg = <0>;
spi-max-frequency = <40000000>;
};
};
所以也许有人能够提供一些建议以在我的板上添加 SPI NOR 支持?什么是最好的方法 ?做一些 .bbappend 吗?或者通过复制“meta-sunxi”来创建我自己的meta并编辑它?然后我需要编辑哪些文件?
提前感谢您的宝贵时间
皮埃尔。
【问题讨论】:
-
给你:gist.github.com/parthitce/d2fb0e473c1b8d7ce7daeaf7db1117a1 将此补丁应用到 meta-sunxi 以解决它。但我会在回答时详细解释。我的 android 上的 stackoverflow 不能做太多事情!