ophub / amlogic-s9xxx-armbian

Support for Armbian in Amlogic, Rockchip and Allwinner boxes. Support a311d, s922x, s905x3, s905x2, s912, s905d, s905x, s905w, s905, s905l, rk3588, rk3568, rk3399, rk3328, h6, etc.
GNU General Public License v2.0
5.68k stars 1.82k forks source link

魔百盒E900V22D 可以从U盘启动,但执行armbian-install失败或者网络不可用的解决办法 #989

Closed muxi01 closed 1 year ago

muxi01 commented 1 year ago

Standard chat template, no routine, no chat. 标准聊天模板,无套路不聊天。

Device Information | 设备信息

Armbian Version | 系统版本

Describe the bug | 问题描述 Describe the problem in detail and attach screenshots if necessary. 详细描述问题,并在必要时附上屏幕截图。

使用的镜像:Armbian_23.02.0_amlogic_s905l3a_jammy_5.15.90_server_2023.01.30 (4).img.gz EMMC 型号: IMG_20230201_145630

尝试了,303、304、305 所对应的dtb文件 参考了(#986 魔百盒CM211-1-CH 可以U盘启动,写入EMMC失败 )中 fsync 改成 sync ,或者 删除conv=sync 安卓系统:9

失败记录:

IMG_20230201_110325

ophub commented 1 year ago

用304在USB里使用时,有线网络可以正常获得IP使用吧

你可以把这个频率从200改为100试试: max-frequency = <100000000>;

https://github.com/unifreq/linux-5.15.y/blob/main/arch/arm64/boot/dts/amlogic/meson-g12a-s905l3a-e900v22c.dts#L120

或者改306的meson-g12a-s905l3a-m401a.dtb试试

muxi01 commented 1 year ago

我需要自己把仓库代码全部拉下来,然后修改再编译设备树吗? ifconfig eth0 up ,启动失败,获取不了IP地址。

ophub commented 1 year ago

https://github.com/ophub/amlogic-s9xxx-armbian/blob/main/compile-kernel/README.cn.md

这是内核从源码编译方法。

或者你看反编译改,搜关键词找到位置2改1看12.13,这个更简单一点

https://github.com/ophub/amlogic-s9xxx-armbian/blob/main/build-armbian/documents/README.cn.md

7Ji commented 1 year ago

内核从源码编译

要从内核源码树构建dtb,没有必要编译整个内核。用cpp把c风格的include处理得到符合fdt语法的dts,再用dtc编译成dtb就行了。这个也是Linux编译过程中得到dtb的过程。

git clone https://github.com/unifreq/linux-5.15.y.git --single-branch --depth=1
cd linux-5.15.y
vi arch/arm64/boot/dts/amlogic/meson-g12a-s905l3a-e900v22c.dts
cpp -nostdinc -I include -I arch -undef -x assembler-with-cpp arch/arm64/boot/dts/amlogic/meson-g12a-s905l3a-e900v22c.dts /tmp/e900v22c-low-freq.preprocessed.dts
dtc /tmp/e900v22c-low-freq.preprocessed.dts > /tmp/e900v22c-low-freq.dtb

cpp和dtc也可以写在一条,如果不需要无引用的dts的话

cpp -nostdinc -I include -I arch -undef -x assembler-with-cpp arch/arm64/boot/dts/amlogic/meson-g12a-s905l3a-e900v22c.dts | dtc > /tmp/e900v22c-low-freq.dtb
muxi01 commented 1 year ago

目前状态: 1.修改了Emmc 的max-frequency = <100000000>;之后,系统安装成功了,并可以从EMMC启动 2.目前有线网卡不通,ifconfig eth0 up. 失败,错误代码和1楼一模一样

ophub commented 1 year ago

你刚才改的是meson-g12a-s905l3a-e900v22c.dtb这个吧?

你反编译cm311这个改max-frequency = <100000000>; meson-g12a-s905l3a-cm311.dtb 测试这个dtb

这个是在e900v22c上添加了几个和网卡相关的设置,以前cm311用那个时也一样,后来用这个方法解决了。

ophub commented 1 year ago

我不知道你有没有晕乎了,简单点就是修改USB里的/boot/uEnv.txt把dtb名称改为meson-g12a-s905l3a-cm311.dtb

然后把你修改好的dtb上传到/boot/dtb/amlogic即可同名覆盖。 然后sync && reboot重启测试。

如果有线网络IP获取正常,就再armbian-install写入一次即可,选305 这样不仅测试了USB还测试了写EMMC

muxi01 commented 1 year ago

目前可以正常使用了。 1.armbian-install 失败的问题: 解决方案: 将meson-g12a-s905l3a-e900v22c.dtb转换成dts之后修改mmc的max-frequency = <100000000>;再重新编译替换原来的文件

2.有线网络无法使用的问题: 解决方案: cd /boot cp -f u-boot-e900v22c.bin u-boot.emmc chmod +x u-boot.emmc sync && reboot

hanxuelong321 commented 5 months ago

可以把修改后的.dtb分享一下嘛