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

CM211-1 MC022可以烧录EMMC启动,但是网络异常 #2196

Closed
qingniaoheyu opened this issue Mar 29, 2024 · 18 comments
Closed

CM211-1 MC022可以烧录EMMC启动,但是网络异常 #2196

qingniaoheyu opened this issue Mar 29, 2024 · 18 comments

Comments

@qingniaoheyu
Copy link

Device Information | 设备信息

  • SOC: S905L3
  • Model CM211-1 2+8 WIFI版本,主板标识:MC022

Armbian Version | 系统版本

  • Kernel Version: 6.1.82
  • Release: Armbian_24.5.0_amlogic_s905l3-cm211_noble_6.1.82_server_2024.03.16.img

Describe the bug | 问题描述
5.15版本、6.1版本内核版本不做修改可以正常写入EMMC并启动,但是U盘/emmc启动均无网络。

  1. 使用nmcli显示有线网卡存在但是unavailable,无IP(虚拟IP也没有);
    root@armbian:~# nmcli
    ……
    eth0: unavailable
    "eth0"
    ethernet (meson8b-dwmac), CA:B9:43:51:5C:B5, hw, mtu 1500

  2. 使用网线通过usb转网口连接usb可以识别网络,IP有效;

  3. 参照# 1318,U盘启动将extlinux.conf启用,reboot u盘枚举失效,set addr失败,手动断电重启后,依旧无IP
    cd /boot/extlinux
    mv -f extlinux.conf.bak extlinux.conf
    sync
    reboot

需求O大协助:

  1. 在其他站点有看到如下包可以正常工作,但目前路径已失效,请问这部分包可以在哪边找到吗?
    https://github.com/ophub/amlogic-s9xxx-armbian/releases/download/Armbian_lunar_save_2023.11/Armbian_23.11.0_amlogic_s905l3-cm211_lunar_6.1.60_server_2023.11.01.img.gz

  2. 对于unavailable网络可以如何改动来实现对网络的支持吗?

@ophub
Copy link
Owner

ophub commented Mar 29, 2024

先刷一下root的安卓系统
https://github.com/ophub/kernel/releases/tag/tools

再刷armbian即可识别网卡

@qingniaoheyu
Copy link
Author

好的,我试试,多谢o大

@qingniaoheyu
Copy link
Author

hi o大:
尝试刷入了android_tv_cm211-1_s905l3.tar.xz后,再刷入armbian,还是存在该问题;
网卡应该是有的,有wifi网卡和eth0网卡,但是是unavailable的,这个可能和啥会有关系;ps使用usb转网线依旧是可以的,有ip,并且是managed,可正常上网

@qingniaoheyu
Copy link
Author

如下是目前本地排查信息,看起来wifi(手边板子的wifi模块是mt7661)是没有加载对应bin,而有线则不知道是啥问题

Last login: Sat Mar 16 15:30:21 CST 2024 on ttyAML0
root@armbian:~# nmcli
eth0: unavailable
"eth0"
ethernet (meson8b-dwmac), B2:66:3A:47:A0:EC, hw, mtu 1500

wlan0: unavailable
"MediaTek Wi-Fi"
wifi (mt7663s), 00:12:61:10:04:D5, hw, mtu 1500

ip6tnl0: unmanaged
"ip6tnl0"
iptunnel (ip6tnl), 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00, sw,>

sit0: unmanaged
"sit0"
iptunnel (sit), 00:00:00:00, sw, mtu 1480

lo: unmanaged
"lo"
loopback (unknown), 00:00:00:00:00:00, sw, mtu 65536

Use "nmcli device show" to get complete information about known devices and
"nmcli connection show" to get an overview on active connection profiles.

root@armbian:# dmesg | grep MediaTek
root@armbian:
# dmesg | grep mt7663s
[ 25.560578] mt7663s mmc0:0001:1: Failed to get patch semaphore
[ 25.560807] mt7663s mmc0:0001:1: mediatek/mt7663pr2h.bin not found, switching to mediatek/mt7663pr2h_rebb.bin
[ 25.611909] mt7663s mmc0:0001:1: Failed to get patch semaphore
[ 25.612167] mt7663s mmc0:0001:1: failed to load mediatek/mt7663pr2h_rebb.bin
root@armbian:~# dmesg | grep meson8b
[ 5.935871] meson8b-dwmac c9410000.ethernet: IRQ eth_wake_irq not found
[ 5.940263] meson8b-dwmac c9410000.ethernet: IRQ eth_lpi not found
[ 5.946560] meson8b-dwmac c9410000.ethernet: PTP uses main clock
[ 5.953101] meson8b-dwmac c9410000.ethernet: User ID: 0x11, Synopsys ID: 0x37
[ 5.959420] meson8b-dwmac c9410000.ethernet: DWMAC1000
[ 5.964575] meson8b-dwmac c9410000.ethernet: DMA HW capability register supported
[ 5.971990] meson8b-dwmac c9410000.ethernet: RX Checksum Offload Engine supported
[ 5.979406] meson8b-dwmac c9410000.ethernet: COE Type 2
[ 5.984581] meson8b-dwmac c9410000.ethernet: TX Checksum insertion supported
[ 5.991568] meson8b-dwmac c9410000.ethernet: Wake-Up On Lan supported
[ 5.997951] meson8b-dwmac c9410000.ethernet: Normal descriptors
[ 6.003816] meson8b-dwmac c9410000.ethernet: Ring mode enabled
[ 6.009594] meson8b-dwmac c9410000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[ 6.017540] meson8b-dwmac c9410000.ethernet: device MAC address 46:b5:c7:dc:71:69
[ 49.676212] meson8b-dwmac c9410000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
[ 49.746116] meson8b-dwmac c9410000.ethernet eth0: PHY [mdio_mux-0.e40908ff:08] driver [Meson GXL Internal PHY] (irq=34)
[ 51.275510] meson8b-dwmac c9410000.ethernet eth0: No Safety Features support found
[ 51.277476] meson8b-dwmac c9410000.ethernet eth0: PTP not supported by HW
[ 51.284950] meson8b-dwmac c9410000.ethernet eth0: configuring for phy/rmii link mode

@tanhow
Copy link

tanhow commented Apr 2, 2024

可以换个uboot试试

@qingniaoheyu
Copy link
Author

可以换个uboot试试

  1. 尝试更新u-boot-s905x-s912.bin,u盘可以获取有线ip,刷入emmc成功;但是emmc启动失败,卡在tee;

  2. 考虑uboot适配问题,参照etc/model_database.conf,更新uboot为u-boot-p212.bin,刷入emmc成功;但是emmc启动失败,卡在无分区表信息No partition table - mmc 2;

  3. 基于分区表,怀疑写入reserve分区导致;
    3.1 故线刷回安卓,读取分区表信息如链接(https://7ji.github.io/ampart-web-reporter/?dsnapshot=logo::33554432:1%20recovery::33554432:1%20rsv::8388608:1%20tee::8388608:1%20crypt::33554432:1%20misc::33554432:1%20instaboot::536870912:1%20boot::33554432:1%20system::1073741824:1%20cache::536870912:2%20params::67108864:2%20ctc::314572800:2%20bootfiles::536870912:2%20data::-1:4&esnapshot=bootloader:0:4194304:0%20reserved:37748736:67108864:0%20cache:113246208:536870912:2%20env:658505728:8388608:0%20logo:675282944:33554432:1%20recovery:717225984:33554432:1%20rsv:759169024:8388608:1%20tee:775946240:8388608:1%20crypt:792723456:33554432:1%20misc:834666496:33554432:1%20instaboot:876609536:536870912:1%20boot:1421869056:33554432:1%20system:1463812096:1073741824:1%20params:2545942528:67108864:2%20bootfiles:2621440000:536870912:2%20swdb:3166699520:16777216:2%20data:3191865344:4282384384:4);

3.2 增加s905l3分区列表如下,后尝试armbian-install(带-a no和不带参数依次尝试),写入成功

if [[ "${AMPART_STATUS}" == "yes" ]]; then
     BLANK1="117" # After using the ampart to part disk, space after [ 117 M>
     BOOT="512"
     BLANK2="0"
+ # Set partition size (Unit: MiB)
+ elif [[ "${AMLOGIC_SOC}" == "s905l3" ]]; then
+     BLANK1="100"
+     BOOT="520"
+     BLANK2="10"

3.3 mmc启动log如下:
GXLX2:BL1:3cfee7:42a5ae;FEAT:ADFC318C:0;POC:3;RCY:0;EMMC:0;READ:0;0.0;CHK:0;
TE: 101428

BL2 Built : 14:48:45, Sep 26 2018.
gxl g6d68897 - yao.zhang@droid07

Board ID = 4, adc=301
set vcck to 1070 mv
set vddee to 1070 mv
CPU clk: 1200MHz
DDR3
DDR3 chl: Rank0+1 @ 792MHz - FAIL
DDR3 chl: Rank0 @ 792MHz
bist_test rank: 0 27 04 4a 38 15 5b 24 00 48 40 20 61 25 01 49 39 17 5c 29 03 4f 3b 18 5e 607 - PASS

Rank0: 2048MB(auto)-2T-11
AddrBus test pass!
-s
Load fip header from eMMC, src: 0x0000c200, des: 0x01400000, size: 0x00004000
New fip structure!
Load bl30 from eMMC, src: 0x00010200, des: 0x013c0000, size: 0x00007600
Load bl301 from eMMC, src: 0x00018200, des: 0x01380000, size: 0x00002200
Load bl31 from eMMC, src: 0x0001c200, des: 0x10100000, size: 0x00019600
Load bl33 from eMMC, src: 0x00038200, des: 0x01000000, size: 0x00047400
NOTICE: BL3-1: v1.0(debug):361f8a7
NOTICE: BL3-1: Built : 16:43:26, Dec 19 2018
NOTICE: BL31: GXL normal boot!
NOTICE: BL31: BL33 decompress pass
[Image: gxl_v1.1.3103-9234004 2018-12-27 10:43:23 yao.zhang@droid07]
efuse init ops = c5
efuse init hdcp = c, cf9=7
x2_hp_e = 0
bl30: check_permit, count is 1
bl30: check_permit: ok!
chipid: 0 0 3 c c 0 92 b3 38 a0 0 c5 not ES chip
[0.587499 Inits done]
INFO: BL3-1: Initializing runtime services
WARNING: No OPTEE provided by BL2 boot loader
ERROR: Error initializing runtime service opteed_fast
INFO: BL3-1: Preparing for EL3 exit to normal world
INFO: BL3-1: Next image address = 0x1000000
INFO: BL3-1: Next image spsr = 0x3c9
DRAM:
MMC: In: Out: Err: wipe_data=successfulSecd
wipe_cache=successful
store init flag
store read name addr off|partition size
read 'size' bytes starting at offset 'off'
to/from memory address 'addr', skipping bad blocks.
store write name addr off|partition size
write 'size' bytes starting at offset 'off'
to/from memory address 'addr', skipping bad blocks.
store rom_write add off size.
write uboot to the boot device
store erase boot/data:
erase the area which is uboot or data
store erase partition <partition_name>:
erase the area which partition in u-boot
store erase dtb
store erase key
store disprotect key
store rom_protect on/off
store scrub off|partition size
scrub the area from offset and size
store dtb iread/read/write addr
read/write dtb, size is optional
store key read/write addr
read/write key, size is optional
store mbr addr
update mbr/partition table by dtb

upgrade_step=2
[BL31]: tee size: 0
rebootmode=cold_boot

Starting the controller
()
()

U-Boot 2021.04-00056-g13ac02db31-dirty (Apr 28 2021 - 22:52:02 +0800) p212

Model: Amlogic Meson GXL (S905X) P212 Development Board
SoC: Amlogic Meson Unknown (Unknown) Revision 2a:e (c5:2)
DRAM: 2 GiB
MMC: mmc@70000: 0, mmc@72000: 1, mmc@74000: 2
Loading Environment from nowhere... OK
In: serial
Out: serial
Err: serial
[BL31]: tee size: 0
[BL31]: tee size: 0
Net: eth0: ethernet@c9410000
Hit any key to stop autoboot: 0
starting USB...
Bus usb@c9000000: dwc3_meson_gxl_get_phys: usb2 ports: 2
Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.00
scanning bus usb@c9000000 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found

Device 0: unknown device
Card did not respond to voltage select! : -110
Card did not respond to voltage select! : -110
switch to partitions #0, OK
mmc2(part 0) is current device
Scanning mmc 2:1...
Found U-Boot script /boot.scr
1025 bytes read in 1 ms (1001 KiB/s)

Executing script at 08000000

Start AMLOGIC mainline U-boot

Error: "bootfromsd" not defined

373 bytes read in 1 ms (364.3 KiB/s)

Error: "mac" not defined

Error: "eth_mac" not defined

ethaddr=72:d3:ad:68:ec:a3
Error reading cluster
** Unable to read file /zImage **
Failed to load '/zImage'
Card did not respond to voltage select! : -110
Card did not respond to voltage select! : -110
SCRIPT FAILED: continuing...
Card did not respond to voltage select! : -110
Card did not respond to voltage select! : -110
Card did not respond to voltage select! : -110
Card did not respond to voltage select! : -110
Card did not respond to voltage select! : -110
Card did not respond to voltage select! : -110
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Card did not respond to voltage select! : -110
Scanning disk mmc@70000.blk...
Disk mmc@70000.blk not ready
Card did not respond to voltage select! : -110
Scanning disk mmc@72000.blk...
Disk mmc@72000.blk not ready
Scanning disk mmc@74000.blk...
** fs_devread read error - block
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
Found 3 disks
No EFI system partition
BootOrder not defined
EFI boot manager: Cannot load any image
Card did not respond to voltage select! : -110
Speed: 100, full duplex
BOOTP broadcast 1
*** Unhandled DHCP Option in OFFER/ACK: 43
*** Unhandled DHCP Option in OFFER/ACK: 43
DHCP client bound to address 192.168.31.81 (476 ms)
*** Warning: no boot file name; using 'C0A81F51.img'
Using ethernet@c9410000 device
TFTP from server 192.168.31.1; our IP address is 192.168.31.81
Filename 'C0A81F51.img'.
Load address: 0x44000000
Loading: T T T T T T T T T T

3.4 插入u盘启动,重新回读分区如下

@qingniaoheyu
Copy link
Author

补充下上条comment中的安卓分区表:
链接

@ophub
Copy link
Owner

ophub commented Apr 6, 2024

BLANK1="108"
BOOT="512"
BLANK2="64"

在安装里加个序号,写这个配置,这是你发的emmc分区位置。

@qingniaoheyu
Copy link
Author

这个是

BLANK1="108"
BOOT="512"
BLANK2="64"

在安装里加个序号,写这个配置,这是你发的emmc分区位置。

  1. 我使用的方式是写入序号0,然后选soc为s905l3,dtb写302a,其他留空这样可以吗,还是必须要增加安装序号
  2. armbind-install需要带参数吗
  3. 基于这个设定我再试试

@ophub
Copy link
Owner

ophub commented Apr 6, 2024

0只改了dtb和uboot,没改分区,要加一个序号,model加一行,这个序号在armbian-install 里加上面的分区位置。

@qingniaoheyu
Copy link
Author

OK,我试下,多谢大的快速回复

@qingniaoheyu
Copy link
Author

采用替代121方式并增加了打印,armbian-install确实使用了分区设定上的值,install成功;但是mmc启动依旧有问题,看起来进入了uboot命令行,但是mmc info/part无返回值,log如下:
GXLX2:BL1:3cfee7:42a5ae;FEAT:ADFC318C:0;POC:3;RCY:0;EMMC:0;READ:0;0.0;CHK:0;
TE: 103225

BL2 Built : 14:48:45, Sep 26 2018.
gxl g6d68897 - yao.zhang@droid07

Board ID = 4, adc=301
set vcck to 1070 mv
set vddee to 1070 mv
CPU clk: 1200MHz
DDR3
DDR3 chl: Rank0+1 @ 792MHz - FAIL
DDR3 chl: Rank0 @ 792MHz
bist_test rank: 0 27 04 4a 37 15 5a 24 00 48 40 1f 61 25 01 49 38 15 5b 29 03 4f 3b 18 5f 607 - PASS

Rank0: 2048MB(auto)-2T-11
AddrBus test pass!
-s
Load fip header from eMMC, src: 0x0000c200, des: 0x01400000, size: 0x00004000
New fip structure!
Load bl30 from eMMC, src: 0x00010200, des: 0x013c0000, size: 0x00007600
Load bl301 from eMMC, src: 0x00018200, des: 0x01380000, size: 0x00002200
Load bl31 from eMMC, src: 0x0001c200, des: 0x10100000, size: 0x00019600
Load bl33 from eMMC, src: 0x00038200, des: 0x01000000, size: 0x00047400
NOTICE: BL3-1: v1.0(debug):361f8a7
NOTICE: BL3-1: Built : 16:43:26, Dec 19 2018
NOTICE: BL31: GXL normal boot!
NOTICE: BL31: BL33 decompress pass
[Image: gxl_v1.1.3103-9234004 2018-12-27 10:43:23 yao.zhang@droid07]
efuse init ops = c5
efuse init hdcp = c, cf9=7
x2_hp_e = 0
bl30: check_permit, count is 1
bl30: check_permit: ok!
chipid: 0 0 3 c c 0 92 b3 38 a0 0 c5 not ES chip
[0.588741 Inits done]
INFO: BL3-1: Initializing runtime services
WARNING: No OPTEE provided by BL2 boot loader
ERROR: Error initializing runtime service opteed_fast
INFO: BL3-1: Preparing for EL3 exit to normal world
INFO: BL3-1: Next image address = 0x1000000
INFO: BL3-1: Next image spsr = 0x3c9
DRAM:
MMC: In: Out: Err: wipe_data=successful
wipe_cache=successful
store init flag
store read name addr off|partition size
read 'size' bytes starting at offset 'off'
to/from memory address 'addr', skipping bad blocks.
store write name addr off|partition size
write 'size' bytes starting at offset 'off'
to/from memory address 'addr', skipping bad blocks.
store rom_write add off size.
write uboot to the boot device
store erase boot/data:
erase the area which is uboot or data
store erase partition <partition_name>:
erase the area which partition in u-boot
store erase dtb
store erase key
store disprotect key
store rom_protect on/off
store scrub off|partition size
scrub the area from offset and size
store dtb iread/read/write addr
read/write dtb, size is optional
store key read/write addr
read/write key, size is optional
store mbr addr
update mbr/partition table by dtb

upgrade_step=0
[BL31]: tee size: 0
rebootmode=cold_boot

store init flag
store read name addr off|partition size
read 'size' bytes starting at offset 'off'
to/from memory address 'addr', skipping bad blocks.
store write name addr off|partition size
write 'size' bytes starting at offset 'off'
to/from memory address 'addr', skipping bad blocks.
store rom_write add off size.
write uboot to the boot device
store erase boot/data:
erase the area which is uboot or data
store erase partition <partition_name>:
erase the area which partition in u-boot
store erase dtb
store erase key
store disprotect key
store rom_protect on/off
store scrub off|partition size
scrub the area from offset and size
store dtb iread/read/write addr
read/write dtb, size is optional
store key read/write addr
read/write key, size is optional
store mbr addr
update mbr/partition table by dtb

Starting the controller
store init flag
store read name addr off|partition size
read 'size' bytes starting at offset 'off'
to/from memory address 'addr', skipping bad blocks.
store write name addr off|partition size
write 'size' bytes starting at offset 'off'
to/from memory address 'addr', skipping bad blocks.
store rom_write add off size.
write uboot to the boot device
store erase boot/data:
erase the area which is uboot or data
store erase partition <partition_name>:
erase the area which partition in u-boot
store erase dtb
store erase key
store disprotect key
store rom_protect on/off
store scrub off|partition size
scrub the area from offset and size
store dtb iread/read/write addr
read/write dtb, size is optional
store key read/write addr
read/write key, size is optional
store mbr addr
update mbr/partition table by dtb

gxl_p211_v1#info - display info of the current MMC device
mmc read addr blk# cnt
mmc write addr blk# cnt
mmc erase blk# cnt
mmc rescan
mmc part - lists available partition on current mmc device
mmc dev [dev] [part] - show or set current mmc device [partition]
mmc list - lists available devices
mmc lifetime - show dev life time estimate type A/B
mmc ext_csd [bit] - read/write ext_csd [bit] value
mmc setdsr - set DSR register value

gxl_p211_v1#
gxl_p211_v1#
gxl_p211_v1#

@Intro-iu
Copy link

Intro-iu commented Apr 6, 2024

遇到同样问题,无法获取IP,armbian-config中也没有WIFI

@ophub
Copy link
Owner

ophub commented Apr 6, 2024

先恢复安卓系统,再安装

@ophub
Copy link
Owner

ophub commented Apr 6, 2024

#2109 (comment)

这个和你同款

@qingniaoheyu
Copy link
Author

hi all,
这里对本地踩的坑做一下梳理;
固件信息:
盒子型号:CM211-1 MC022
soc:s905l3
有线:tms1102nl
无线:mt7661(需要后续适配网卡驱动,fix me)
nand:TBD
flash:TBD

  1. 使用本项目中的安卓刷机包为android4.4(https://github.com/ophub/kernel/releases/tag/tools),可以u盘启动armbian,且刷入mmc可以正常启动;但都无法正常使用有线/wifi;
  2. U盘启动下,更新uboot为u-boot-p212.bin,可以正常获取有线ip,成功联网;刷入emmc并添加uboot.emmc成功,但无法正常启动;
  3. uboot作为引导程序,大概启动流程如下:Android uboot -> kernel;增添了overload(也就是上个步骤中的更新uboot动作)启动流程:Android uboot -> overload uboot -> kernel,这也是启动时间增长的原因;所以个人上述遇到的问题可以分为两步:
    3.1 Android uboot不能正常引导kernel启动有线网卡,所以需要增加overload uboot;
    3.2 刷入的overload uboot在emmc中可能不能正常识别(fix me)
  4. 所以采用了另一种方式,直接修改Android uboot,也就是线刷安卓为9.0,然后搭配bulleye armbian包成功写入emmc,且有线可用(网络指示灯一直为红,对我来说无关紧要,只是dtb适配LED而已)

@pan8664716
Copy link

pan8664716 commented Jun 25, 2024

CM211-1 ZG 广东移动的的盒子

  1. 可以刷4.4 带root,也正常刷入armbian(无线/有线 网络无法正常使用);
  2. 刷9.0几乎尝试了各种各样的包,都卡7% [0x32030201]UBOOT/获取返回/DiskInitial命令出错

这种情况下能通过什么方式解决吗?

@pan8664716
Copy link

pan8664716 commented Jun 25, 2024

CM211-1 ZG 广东移动的的盒子

  1. 可以刷4.4 带root,也正常刷入armbian(无线/有线 网络无法正常使用);
  2. 刷9.0几乎尝试了各种各样的包,都卡7% [0x32030201]UBOOT/获取返回/DiskInitial命令出错

这种情况下能通过什么方式解决吗?

问题得到解决!更新uboot为u-boot-p212.bin,写入EMMC,正常启动,可以识别有线网络,但是WIFI网络无法识别,关于wifi uwe5621ds 驱动的问题希望得到一些帮助

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

5 participants