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

CM311-1 YST刷写到安装系统到emmc之后,无法从mmc启动,只能从U盘启动 #923

Closed
oahxu opened this issue Jan 13, 2023 · 30 comments

Comments

@oahxu
Copy link

oahxu commented Jan 13, 2023

Device Information | 设备信息

SOC: [SOC=s905l2]
Model [CM311-1 YST]
Armbian Version | 系统版本

Kernel Version: [e.g. 5.15.86]
Release: [Armbian_23.02.0_amlogic_s905l2_bullseye_5.15.86_server_2023.01.10.img.gz])
Describe the bug | 问题描述

通过armbian-install -m yes -a yes写入系统到emmc之后,去掉U盘,重启无法进入系统,插入U盘,可以通过U盘引导进入系统。

ophub-release

root@armbian:/etc# cat ophub-release
PLATFORM='amlogic'
VERSION_CODEID='debian'
VERSION_CODENAME='bullseye'
SOC='s905l2'
MODEL_NAME='MGV2000'
FDTFILE='meson-gxl-s905l2-x7-5g.dtb'
UBOOT_OVERLOAD='u-boot-s905x-s912.bin'
MAINLINE_UBOOT='/usr/lib/u-boot/'
BOOTLOADER_IMG='/usr/lib/u-boot/'
FAMILY='meson-gxl'
BOARD='s905l2'
KERNEL_VERSION='5.15.86'
KERNEL_BRANCH='stable'
K510='0'
ROOTFS_TYPE='btrfs'
BOOT_CONF='uEnv.txt'
DISK_TYPE='usb'
MLUBOOT_STATUS='no'
AMPART_STATUS='no'
PACKAGED_DATE='2023-01-10'

@ophub
Copy link
Owner

ophub commented Jan 13, 2023

这盒子没主线,你加-m没用,-a是自动的也不用加。

#763

/boot/uEnv.txt 改对meson-gxl-s905l2-x7-5g.dtb
你u-boot不对
看看,armbian-install选择116

@texaszc
Copy link

texaszc commented Jan 13, 2023

你可以试一试第一次没引导的时候断电插U盘然后启动,在指示灯正常后断电拔下U盘再重启(我在网上看到的)
IITE4Q@4T1V2(GW 4I(UE
型号是cm311-1a yst

@oahxu
Copy link
Author

oahxu commented Jan 13, 2023

你可以试一试第一次没引导的时候断电插U盘然后启动,在指示灯正常后断电拔下U盘再重启(我在网上看到的) IITE4Q@4T1V2(GW 4I(UE 型号是cm311-1a yst

这个试过了,不行。而且这个设备的指示灯好像一直是红色的。

@ophub
Copy link
Owner

ophub commented Jan 13, 2023

你能认真点吗?这不是一个盒子
cm311-1(序号116)
cm311-1a (序号305)
你说你是cm311-1,你看着1a的操作能行吗?
这两个盒子都支持,但配置不同,你自己看好了再操作。

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

@texaszc
Copy link

texaszc commented Jan 13, 2023

我盒子买错了,买之前看的qwq
本来想买a1,结果商家发个mgv3000来了

@oahxu
Copy link
Author

oahxu commented Jan 13, 2023

你能认真点吗?这不是一个盒子 cm311-1(序号116) cm311-1a (序号308) 你说你是cm311-1,你看1a的贴子有什么用? 这两个盒子都支持,但配置不同,你自己看好了再操作

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

我就是按照cm311-1(序号116)这个刷的

@ophub ophub closed this as completed Jan 13, 2023
@oahxu
Copy link
Author

oahxu commented Jan 13, 2023

你能认真点吗?这不是一个盒子 cm311-1(序号116) cm311-1a (序号305) 你说你是cm311-1,你看着1a的操作能行吗? 这两个盒子都支持,但配置不同,你自己看好了再操作。

https://github.com/ophub/amlogic-s9xxx-armbian/blob/main/build-armbian/documents/amlogic_model_database.md
捕获

@ophub
Copy link
Owner

ophub commented Jan 13, 2023

你如果分不清盒子,也可以根据当前u盘中的文件确定你的配置。

你U盘工作正常,你看看/boot/uEnv.txt里dtb是什么,对着上面的设备列表确认一下你是哪个,写入emmc时不要加参数,用默认的就是最佳的armbian-install

@oahxu
Copy link
Author

oahxu commented Jan 13, 2023

你如果分不清盒子,也可以根据当前u盘中的文件确定你的配置。

你U盘工作正常,你看看/boot/uEnv.txt里dtb是什么,对着上面的设备列表确认一下你是哪个,写入emmc时不要加参数,用默认的就是最佳的armbian-install

捕获1
dtb是对的,没错

@oahxu
Copy link
Author

oahxu commented Jan 13, 2023

刚才又操作写入了一遍,用默认armbian-install,还是不行

@ophub
Copy link
Owner

ophub commented Jan 13, 2023

去路由器看有没有armbian设备,写入emmc后ip变了,有些设备没有hdmi显示,去路由器找ip然后ssh连接

@oahxu
Copy link
Author

oahxu commented Jan 13, 2023

去路由器看有没有armbian设备,写入emmc后ip变了,有些设备没有hdmi显示,去路由器找ip然后ssh连接

经过您的提示,找到新IP了,由于SSH连不上,以前没认为是盒子的新IP。但是现在还是SSH连不上去。
U盘启动的系统中启动时获取到了两个IP,我把NetworkManager服务停了,只留下了network服务,再刷到了EMMC中,但是emmc系统启动后,没法通过SSH连接登录系统。@ophub

@ophub
Copy link
Owner

ophub commented Jan 14, 2023

每次写入emmc都会随机生成并分配不同的mac地址,所以每次的ip都肯定不同。

不用停网络服务,从路由器可以看到两个ip,但是那两个ip只有一个能用,时间最近的一个,刚启动时这两个ip会在1分钟内交替重启一下,等ip稳定了连时间最新的那个就可以。

@oahxu
Copy link
Author

oahxu commented Jan 14, 2023

每次写入emmc都会随机生成并分配不同的mac地址,所以每次的ip都肯定不同。

不用停网络服务,从路由器可以看到两个ip,但是那两个ip只有一个能用,时间最近的一个,刚启动时这两个ip会在1分钟内交替重启一下,等ip稳定了连时间最新的那个就可以。

捕获
@ophub 通过U盘启动,能获取到两个IP,等好几分钟,到目前为止两个IP都能连接,不是只有一个IP能用,刷入到emmc,我再测试一下。

@ophub
Copy link
Owner

ophub commented Jan 14, 2023

重启后,在路由里找名字是armbian的设备的ip,这条记录上下应该还有一个ip值和他挨着,时间间隔了几秒,这两个ip会交替重启一下,等一会儿稳定了再ssh连接

@oahxu
Copy link
Author

oahxu commented Jan 14, 2023

重启后,在路由里找名字是armbian的设备的ip,这条记录上下应该还有一个ip值和他挨着,时间间隔了几秒,这两个ip会交替重启一下,等一会儿稳定了再ssh连接

捕获1
@ophub 刷入emmc后启动,只有一个IP(图中上面那个IP,下面那个IP是当时U盘启动时的分配的IP),目前无法通过次IP SSH登录。
捕获2
上图是重新插入U盘启动,分配的两个IP情况。
捕获3
上图是查看的写入emmc中/etc/network/interfaces中eth0的mac地址,和路由器中emmc启动时分配IP的mac地址不一样。

@ophub
Copy link
Owner

ophub commented Jan 14, 2023

你这终端是怎么进入的emmc系统,显示器+键盘?
你可以使用终端,在banner上就有ip,你上面发的图片上的绿字ip

ifconfig

@oahxu
Copy link
Author

oahxu commented Jan 14, 2023

你这终端是怎么进入的,显示器+键盘? 你可以使用终端,在banner上就有ip

ifconfig

这个芯片的系统好像没有hdmi视频输出,我这是u盘启动后,网络是能够连接的,通过SSH登录的。emmc启动只有一个IP地址,SSH连接不上。
捕获4
这是banner
捕获5
这是ifconfig输出结果,请看一下。@ophub

@ophub
Copy link
Owner

ophub commented Jan 14, 2023

192.168.2.185
这是ip
你没ssh截图怎么弄的?

@oahxu
Copy link
Author

oahxu commented Jan 14, 2023

192.168.2.185 这是ip 你没ssh截图怎么弄的?

@ophub 这个185的IP是通过U盘启动系统,ssh登录进去截图的。写入到emmc之后启动是上面179那个IP,那个IP用SSH连接不上去。

@ophub
Copy link
Owner

ophub commented Jan 14, 2023

你在u盘中复制一下u-boot,看能启动吗?

cd /boot
cp -f u-boot-p212.bin u-boot.ext
cp -f u-boot-p212.bin u-boot.emmc
chmod +x u-boot.ext u-boot.emmc
sync 

这个把emmc的也添加了,写入emmc时会都复制进去。

@oahxu
Copy link
Author

oahxu commented Jan 14, 2023

你在u盘中复制一下u-boot,看能启动吗?

cd /boot
cp -f u-boot-s905x-s912.bin u-boot.ext
cp -f u-boot-s905x-s912.bin u-boot.emmc
chmod +x u-boot.ext u-boot.emmc
sync 

这个把emmc的也添加了,写入emmc时会都复制进去。

请问上面操作做完,需要再刷入一遍emmc吗?

@ophub
Copy link
Owner

ophub commented Jan 14, 2023

@ophub
Copy link
Owner

ophub commented Jan 14, 2023

[[ -f "${interfaces_file}" ]] && sed -i "s|hwaddress ether.*|hwaddress ether ${random_macaddr}:AA|g" ${interfaces_file}

随机生成的mac都是9e:61:开头的,你说的那个ip应该不是armbian

@oahxu
Copy link
Author

oahxu commented Jan 14, 2023

但那个确实是刷入EMMC后,启动后出现的。

@ophub
Copy link
Owner

ophub commented Jan 14, 2023

你修改网络服务了?

@oahxu
Copy link
Author

oahxu commented Jan 14, 2023

你修改网络服务了?

没有动,之前systemctl disable NetworkManager又enable了。

@oahxu
Copy link
Author

oahxu commented Jan 14, 2023

你在u盘中复制一下u-boot,看能启动吗?

cd /boot
cp -f u-boot-s905x-s912.bin u-boot.ext
cp -f u-boot-s905x-s912.bin u-boot.emmc
chmod +x u-boot.ext u-boot.emmc
sync 

这个把emmc的也添加了,写入emmc时会都复制进去。

我这个芯片不是用u-boot-p212.bin这个吗,需要改成u-boot-s905x-s912.bin这个吗?

@ophub
Copy link
Owner

ophub commented Jan 14, 2023

用u-boot-p212.bin
你改一下
同时回复几个贴子,晕乎了

@oahxu
Copy link
Author

oahxu commented Jan 14, 2023

用u-boot-p212.bin 你改一下 同时回复几个贴子,晕乎了

@ophub 修改完u-boot之后,再刷入emmc后,从emmc无法启动了,IP地址也无法分配了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants