Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
muxi01 opened this issue Feb 1, 2023 · 9 comments
Labels
documentation Improvements or additions to documentation support This need is supported

Comments

@muxi01
Copy link

muxi01 commented Feb 1, 2023

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

Device Information | 设备信息

  • SOC: [e.g. S095x3] S905l3a
  • Model [e.g. HK1]

Armbian Version | 系统版本

  • Kernel Version: [e.g. 5.15.100] 5.15.90
  • Release: [e.g. jammy] jammy

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
Copy link
Owner

ophub commented Feb 1, 2023

用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
Copy link
Author

muxi01 commented Feb 1, 2023

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

@ophub
Copy link
Owner

ophub commented Feb 1, 2023

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
Copy link
Contributor

7Ji commented Feb 1, 2023

内核从源码编译

要从内核源码树构建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
Copy link
Author

muxi01 commented Feb 1, 2023

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

@ophub
Copy link
Owner

ophub commented Feb 1, 2023

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

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

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

@muxi01 muxi01 closed this as completed Feb 2, 2023
@muxi01 muxi01 reopened this Feb 2, 2023
@ophub
Copy link
Owner

ophub commented Feb 2, 2023

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

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

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

@muxi01
Copy link
Author

muxi01 commented Feb 2, 2023

目前可以正常使用了。
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

@muxi01 muxi01 closed this as completed Feb 2, 2023
@ophub ophub changed the title 魔百盒E900V22D 可以从U盘启动,但执行armbian-install失败 魔百盒E900V22D 可以从U盘启动,但执行armbian-install失败或者网络不可用的解决办法 Feb 2, 2023
@ophub ophub added documentation Improvements or additions to documentation support This need is supported labels Feb 2, 2023
@hanxuelong321
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation support This need is supported
Projects
None yet
Development

No branches or pull requests

4 participants