gpt4 book ai didi

How to enable eth0 on Banana PI ZERO M2(如何在香蕉PI ZERO M2上启用eth0)

转载 作者:bug小助手 更新时间:2023-10-24 19:22:16 27 4
gpt4 key购买 nike



By default, eth0 is disabled on BPI ZERO M2.

默认情况下,在BPI零M2上禁用eth0。


Here we will show to enable it

在这里,我们将演示如何启用它


更多回答
优秀答案推荐

The solution is to create a dtdo file and place it in right place.

解决方案是创建一个dtdo文件并将其放置在正确的位置。


1: Create a text source file: bananapi-m2-zero-eth0.dts

1:创建文本源文件:bananapi-m2-ero-eth0.dts


/dts-v1/;
/plugin/;

/ {
model = "Banana Pi BPI-M2-Zero";
compatible = "sinovoip,bpi-m2-zero\0allwinner,sun8i-h2-plus";

/*
* enable onboard eth0 on Banana PI M2 ZERO
* which is disabled by default
* bontango 08.2022
*
* compile with
* dtc -I dts -O dtb -o bananapi-m2-zero-eth0.dtbo bananapi-m2-zero-eth0.dts
* move bananapi-m2-zero-eth0.dtbo to /boot/overlay-user
* add line "user_overlays=bananapi-m2-zero-eth0" to /boot/armbianEnv.txt
*/
fragment@0 {
target-path = "/aliases";
__overlay__ {
ethernet0 = "/soc/ethernet@1c30000";
};
};

fragment@1 {
target = <&emac>;
__overlay__ {
status = "okay";
phy-handle = <&int_mii_phy>;
phy-mode = "mii";
allwinner,leds-active-low;
};
};
};

2: Use dtc tool to compile source file:

2:使用DTC工具编译源文件:


dtc -I dts -O dtb -o bananapi-m2-zero-eth0.dtbo bananapi-m2-zero-eth0.dts 

3: create subdirectory into /boot as root

3:以超级用户身份在/Boot中创建子目录


cd /boot ; mkdir overlay-user ; cd -

4: place the binary file (dtbo) into user_overlays:

4:将二进制文件(Dtbo)放入user_overays:


mv bananapi-m2-zero-eth0.dtbo overlay-user

5: enable overlay into armbianEnv.txt (without .dtbo extension !!!)

5:启用覆盖到armbianEnv.txt(不带.dtbo扩展名!)


echo "user_overlays=bananapi-m2-zero-eth0" >> /boot/armbianEnv.txt

6: reboot (and thank bontango (https://forum.banana-pi.org/) for his help)

第6集:重启(感谢BonTango(https://forum.banana-pi.org/)的帮助))


Apply this wiring and connect your BPI on your LAN.

应用此布线并将您的BPI连接到您的局域网。


Component are:

组件包括:



  • RJ2 socket from LCSC: DS1128-09-S8B8X

    来自LCSC的RJ2插槽:DS1128-09-S8B8X



  • CN1 from LCSC: A2005HWV-2x2P

    来自LCSC的CN1:A2005HWV-2x2P




eth0 schema for BPI Zero M2


It works under "Armbian 21.05.1 Focal with Linux 5.15.48-sunxi"

它在“Armbian 21.05.1 Focus with Linux 5.15.48-sunxi”下运行


更多回答

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com