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.69k stars 1.83k forks source link

x96max+ a100 支持写入emmc使用 #779

Closed dicsonpan closed 1 year ago

dicsonpan commented 1 year ago

Device Information | 设备信息

Armbian Version | 系统版本

Describe the bug | 问题描述 用2022年6月份的版本,具体记不清了,也是jammy,内核5.15把,已经刷机成功,并正常写入 emmc ,也是一直能够正常运行 最近想折腾一下桌面环境,自己装老是有各种报错,非常苦恼。看了现在最新的版本,有 armbian-software 命令,可以比较方便地一键安装桌面环境,故想要重新刷机。 把现在最新的 release 正常刷进 TF 卡,通过 TF 卡启动,然后运行 armbian-install 来写入 emmc 后,再断电,拔 TF 卡,插电,一直黑屏,估计是变砖了。 用线刷刷入 sbx_x96max_plus_a100_atv_15_4_1.img,回到 SlimBox,再捅菊花,通过 usb读卡器加载 TF 卡,启动进入 armbian,再次运行 armbian-install 写入 emmc,变砖情况依旧。

变砖是连开机的 logo 都看不到,之前开机是有一个 x96max+ 的动画的,我是不是把某些更底层的启动代码给洗掉了?

ophub commented 1 year ago

https://github.com/ophub/amlogic-s9xxx-armbian/blob/259107e4e376a8afdde9ca3e3543b54740f9b5b0/build-armbian/armbian-files/common-files/etc/model_database.conf#L118

百兆应该是选517吧,你先在USB里修改下/boot/uEnv.txt里的dtb名称为meson-sm1-x96-air.dtb,然后重启,确认选择正确的话再写入emmc,选择517

dicsonpan commented 1 year ago

按照上述操作,修改了 uEnv.txt,启动进入 TF 卡上的 armbian 并运行 armbian-install,选择 517 后写入 emmc 后重启,屏幕和之前变砖不同,虽然还是全黑,但 led 屏幕的背光是亮的,即不能显示任何信息。也不能正常启动 emmc 上的 armbian 拔电源,捅菊花,usb 读卡器加载 TF 卡,还能重新进入卡上的系统

ophub commented 1 year ago

安装时用:armbian-install -m yes

dicsonpan commented 1 year ago

情况还是一样,我把 armbian-install 的主要运行过程截图下来了,看看有没什么遗漏或者出错的地方? 另外更正一下,不用捅菊花,插入 usb 口也能加载 TF 卡上的 armbian,是不是 u-boot 或者 dtb 没搞对? 52711670388539_ pic

ophub commented 1 year ago
cat /boot/uEnv.txt
sha256sum /boot/u-boot*

你之前用的哪个dtb 你换5.15的固件试试,可能6.0不适合

dicsonpan commented 1 year ago

我记不清之前用的哪个 dtb 了,那几个 dtb 我都试过了,还是一样 刷到 emmc 里边的时候,我看到有个提示说把 u-boot-x96maxplus.bin copy 为 u-boot.emmc 对吗? 是不是意味着从 emmc 启动的话,bootloader 会去找 u-boot.emmc?我对嵌入式的启动过程一知半解,很不专业,瞎猜的

dicsonpan commented 1 year ago

image 5.15 固件也试过,一样的情况

ophub commented 1 year ago

你先改下uEnv.txt里的dtb为meson-sm1-sei610.dtb,改完重启,如果可以正常从tf卡启动,网络也没问题再写入emmc armbian-install 选0手动输入 meson-sm1-sei610.dtb

在5.15内核里,u-boot如果不需要也可以启动,就可以不添加

dicsonpan commented 1 year ago

5.15 内核里,用 meson-sm1-sei610.dtb 可以正常从 emmc 启动进入系统,无线网络没问题。我不太需要用到有线,就没试

ophub commented 1 year ago

你就改这个dtb测试,写入emmc时选0手动输入。测试没问题的话添加一条配置信息,以后就选ID。

dicsonpan commented 1 year ago

但内存只识别到 1G,蛮奇怪的啊。这个版本应该是 4+32,RAM少了,ROM正常 image

ophub commented 1 year ago

内存少了就复制u-boot重启

u-boot-x96maxplus.bin 复制为 u-boot.emmc

ophub commented 1 year ago

我在另外一个帖子里看到了,a100盒子用 meson-sm1-sei610.dtb 有线、无线、蓝牙都可以使用 你的盒子拍点照片给大家参考下, 外观 底部的标签 如何方便拍主板的话,正反两面拍一下 如果知道救砖的短接点的话,在主板上标示一下 如果有它的安卓系统的话分享一下,我转存一份备用

dicsonpan commented 1 year ago

盒子已经没了,我一直用主板。照片稍后整理发出 现在的情况是这样 内核:5.15 dtb:meson-sm1-sei610.dtb 没有 u-boot.emmc ,能正常通过 emmc 进入系统,但内存只检测到 1G 如果把 u-boot-x96maxplus.bin 复制为 u-boot.emmc,那还是不能通过 emmc 进入系统

我是用 u盘 启动,进入 u盘 自己的 armbian 之后,把 mmcblk2p1 mount 到一个目录下,进行的 copy 操作,没有重新运行 armbian-install 命令

ophub commented 1 year ago

u盘是u-boot.ext 我给配置添加一条记录,你稍等下载使用这个文件

ophub commented 1 year ago
# 下面的命令一行复制到USB启动系统里执行,替换本地的配置文件
wget https://raw.githubusercontent.com/ophub/amlogic-s9xxx-armbian/main/build-armbian/armbian-files/common-files/etc/model_database.conf -O /etc/model_database.conf

# 然后再执行安装选522即可
armbian-install -m yes
dicsonpan commented 1 year ago
# 下面的命令一行复制到USB启动系统里执行,替换本地的配置文件
wget https://raw.githubusercontent.com/ophub/amlogic-s9xxx-armbian/main/build-armbian/armbian-files/common-files/etc/model_database.conf -O /etc/model_database.conf

# 然后再执行安装选522即可
armbian-install -m yes

还是之前说的那个问题,emmc 不能启动 armbian。把 u-boot.emmc 删除后,能进入 armbian,但内存只识别出 1G

dicsonpan commented 1 year ago

正面 52731670400895_ pic_hd

反面 52741670400896_ pic_hd

短接点 52721670400895_ pic

SlimBox 固件下载地址 https://disk.yandex.ru/d/lr_HyGGilnzDzw

ophub commented 1 year ago

在usb里把u-boot-x96maxplus.bin 复制为 u-boot.ext可以启动?这时内存是正常的吧。 你是复制的还是改名的?只能复制不能改名,不要把u-boot-x96maxplus.bin整没了,不然写入emmc时缺少文件无法复制。

dicsonpan commented 1 year ago

在usb里把u-boot-x96maxplus.bin 复制为 u-boot.ext可以启动?这时内存是正常的吧。 可以启动,并且内存正常显示是 4G

你是复制的还是改名的?只能复制不能改名,不要把u-boot-x96maxplus.bin整没了,不然写入emmc时缺少文件无法复制。 我都是复制的,没有改名,写入到 emmc 后,也能找到 u-boot.emmc 这个文件

ophub commented 1 year ago

https://github.com/ophub/amlogic-s9xxx-armbian/issues/283

这个帖子里使用5.10内核。这个肯定需要u-boot才能启动,他存储32G不知道他使用的是emmc还是tf卡。

按理说tf能用的u-boot,在emmc里也没问题,你这是第一个反应只能usb使用的现象。

ophub commented 1 year ago

你会救砖的话,可以试试在 /etc/model_database.conf 里添加 MAINLINE_UBOOT

刚才给你添加的522编号这一行,第六列(MAINLINE_UBOOT)里把NA改为x96maxplus-u-boot.bin.sd.bin

写入时还是使用命令:armbian-install -m yes

USB使用u-boot.ext能使用的原因之一,是因为USB里的固件里添加MAINLINE_UBOOT

dicsonpan commented 1 year ago

这样就可以了!

ophub commented 1 year ago

添加MAINLINE_UBOOT可以了? 欢迎界面截个图

dicsonpan commented 1 year ago

添加MAINLINE_UBOOT可以了?

是的,你更新一下 /etc/model_database.conf 吧

dicsonpan commented 1 year ago

image

ophub commented 1 year ago

把你的emmc里的/etc/ophub-release这个文件改下,把这个MAINLINE_UBOOT值更新上(可能脚本已经自动更新对了,你检查下)。 MAINLINE_UBOOT='/usr/u-boot/x96maxplus-u-boot.bin.sd.bin'

这样以后更新内核时自动给添加。

ophub commented 1 year ago

Snip20221207_1

你分享的固件里,你使用过的是哪个?下面的atv这个?

dicsonpan commented 1 year ago

Snip20221207_1

你分享的固件里,你使用过的是哪个?下面的atv这个? 是的

dicsonpan commented 1 year ago

顺便试了一下 6.0 的内核,启动不成功,提示如下,供参考 52751670404552_ pic_hd

dicsonpan commented 1 year ago

把你的emmc里的/etc/ophub-release这个文件改下,把这个MAINLINE_UBOOT值更新上(可能脚本已经自动更新对了,你检查下)。 MAINLINE_UBOOT='/usr/u-boot/x96maxplus-u-boot.bin.sd.bin'

这样以后更新内核时自动给添加。

image

ophub commented 1 year ago

https://github.com/ophub/kernel/releases/tag/tools

安卓固件转存到这里了。 你试试5.10/5.4的应该可以。

6.0的好几个盒子反馈不能用。现在下载的固件里还没刚才添加的配置文件,你都需要手动改那个配置文件,手动添加u-boot,改dtb等。

luucasmooreira commented 1 year ago

Can anyone help me with the correct procedure? I booted the firm with sei610.dtb, copied u-boot-x96maxplus.bin to u-boot.ext, the system loaded and took the 4 GB of RAM and LAN IP. I gave the following command armbian-install -m yes, and selected dtb 522. But when I restarted I didn't get IP =/.

Where am I going wrong?

ophub commented 1 year ago

cat /etc/model_database.conf | grep ^522

Aren't you asking about the s905w next door? This post is s905a, did you change the device?

luucasmooreira commented 1 year ago

image

image

Yes, but it's the exact same problem I'm facing. I can't make IP Lan + 4GB of Ram work.

ophub commented 1 year ago

Your 100W can be used normally?

ophub commented 1 year ago

From the motherboard picture you sent, your bluetooth/WIFI chip is different, his is AM7256, yours is W522A

luucasmooreira commented 1 year ago

Yes, stock firmware x96 max+ 100w.

luucasmooreira commented 1 year ago

yes, sei610.dtb recognizes 1gb of ram and takes ip Lan. a95xf3.air.dtb recognizes 2 GB of Ram and Ip Lan. I don't remember if x96-air.dtb worked with 2 GB Ram too, and it got Ip Lan. I've been trying to solve it for 5 days, I'm not thinking straight anymore.

D-Sta commented 1 year ago

Hi, I have the same hardware: SOC: [S095x3] Model [x96max+ a100,无线网卡是AM7256,有线100M 那款]

I have installed the armbian to the emmc with armbian-install -m yes with updated /etc/model_database.conf and the target is 522. 4GB of ram is recognized but the Ethernet is not longer working.

ophub commented 1 year ago

try 5.15/5.10 kernel

D-Sta commented 1 year ago

Sorry i forgot mentioning the kernel.

/etc/ophub-release

PLATFORM='amlogic'
VERSION_CODEID='debian'
VERSION_CODENAME='bullseye'
SOC='s905x3'
MODEL_NAME='X96-Max+_100Mb'
FDTFILE='meson-sm1-sei610.dtb'
UBOOT_OVERLOAD='u-boot-x96maxplus.bin'
MAINLINE_UBOOT='/usr/lib/u-boot/x96maxplus-u-boot.bin.sd.bin'
BOOTLOADER_IMG='/usr/lib/u-boot/'
FAMILY='meson-sm1'
BOARD='s905x3'
KERNEL_VERSION='5.15.81'
KERNEL_BRANCH='stable'
K510='0'
ROOTFS_TYPE='btrfs'
BOOT_CONF='uEnv.txt'
DISK_TYPE='emmc'
MLUBOOT_STATUS='yes'
AMPART_STATUS='yes'
PACKAGED_DATE='2022-12-06'
ophub commented 1 year ago

Restore the original system of Android first, and then install armbian

D-Sta commented 1 year ago

Unfortunately i did not make a backup of the system, because when i tried doing amrbian-ddbr then b i used to get an error of not enough space, something like >2GB required, only 1GB available.

Can i use the images provided Android TV firmware with the armbian-ddbr or those images are only for Amlogic usb burning tool

ophub commented 1 year ago

Look at the previous reply, there is an Android system download in the post with pictures.

D-Sta commented 1 year ago

I have successfully recovered the stock android tv firmware, and then installed armbian to the emmc. Tried the 5.10.157 kernel by doing armbian-update -k 5.10.157 -v stable -m yes but the lan still does not work.

[    0.000000] Linux version 5.10.157-ophub (root@ubuntu2204) (Ubuntu clang version 14.0.0-1ubuntu1, Ubuntu LLD 14.0.0) #1 SMP PREEMPT Sun Dec 4 15:30:44 CST 2022
......
[   15.985415] meson8b-dwmac ff3f0000.ethernet eth0: validation of rmii with support 0000000,00000000,00006280 and advertisement 0000000,00000000,00006280 failed: -22
[   15.997961] meson8b-dwmac ff3f0000.ethernet eth0: no phy at addr -1
[   16.003998] meson8b-dwmac ff3f0000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
ophub commented 1 year ago

Is the kernel network working fine with 5.15.81? Is the network normal when in USB?

luucasmooreira commented 1 year ago

image

the best I could do was use armbian install and use dtb 520 ( a95xf3-air.dtb). I can't find a way to recognize 4GB of Ram and Ip Lan :/

D-Sta commented 1 year ago

Is the kernel network working fine with 5.15.81? Is the network normal when in USB?

Sorry for being late replying to your question, but was doing a lot of testing as to make sure if it works or not. So, the answer is: Yes, it works with kernel 5.15.81, when booting with USB, and the emmc is in its stock state, armbian not flashed to it yet. As soon as I flash armbian to the EMMC with the mainline u-boot, the Ethernet no longer works.

But there is a note that might be useful. When restoring the EMMC using the image provided in this issues SlimboxTV the Ethernet does not work even when booting from USB. Fortunately I have 2 pcs of the same TV box, so I booted into armbian from USB and did a backup using armbian-ddbr. Then used the image to restore the emmc of the first device and then the Ethernet was working with 5.15.81, but only while booting from usb. So I think the problem of Ethernet occurs somewhere in the u-boot.

Now I'm restoring back to stock firmware, and this time will try to install on EMMC but without using the mainline u-boot. As far as I remember everything was working that way, but only 1GB of RAM was available, but need to make sure because I forgot.

P.S I can confirm that Ethernet works when not using the mainline u-boot, but only 1GB of RAM is available. Now if I install with the mainline u-boot the RAM will be 4GB and Ethernet will not work.

Is it worth try installing 5.10 kernel?

D-Sta commented 1 year ago

UPDATE @ophub I've tried installing 5.10.158/5.4.226 kernel but no luck with the Ethernet. As long as i install the mainline u-boot the ethernet no longer works.