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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

x96max+ a100 支持写入emmc使用

dicsonpan opened this issue · comments

Device Information | 设备信息

  • SOC: [S095x3]
  • Model [x96max+ a100,无线网卡是AM7256,有线100M 那款]

Armbian Version | 系统版本

  • Kernel Version: [6.0.11]
  • Release: [jammy]

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+ 的动画的,我是不是把某些更底层的启动代码给洗掉了?

commented

517 :X96-Air/X96-Max+_100Mb :s905x3 :meson-sm1-x96-air.dtb :u-boot-x96maxplus.bin :NA :NA :stable :amlogic :meson-sm1 :s905x3 :no

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

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

commented

安装时用:armbian-install -m yes

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

commented
cat /boot/uEnv.txt
sha256sum /boot/u-boot*

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

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

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

commented

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

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

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

commented

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

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

commented

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

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

commented

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

盒子已经没了,我一直用主板。照片稍后整理发出
现在的情况是这样
内核: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 命令

commented

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

commented
# 下面的命令一行复制到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
# 下面的命令一行复制到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

正面
52731670400895_ pic_hd

反面
52741670400896_ pic_hd

短接点
52721670400895_ pic

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

commented

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

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

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

commented

#283

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

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

commented

你会救砖的话,可以试试在 /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

这样就可以了!

commented

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

添加MAINLINE_UBOOT可以了?

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

commented

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

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

commented

Snip20221207_1

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

Snip20221207_1

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

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

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

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

image

commented

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

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

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

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?

commented

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?

image

image

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

commented

Your 100W can be used normally?

commented

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

Yes, stock firmware x96 max+ 100w.

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.

commented

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.

commented

try 5.15/5.10 kernel

commented

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'
commented

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

commented

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

commented

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

commented

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)
commented

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

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 :/

commented

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?

commented

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.

commented

1.恢复原厂安装系统
2.下载最新固件
3.安装时加参数启用主线
armbian-install -m yes
select 522

commented

1.恢复原厂安装系统 2.下载最新固件 3.安装时加参数启用主线 armbian-install -m yes select 522

I have already done those steps. But when I do armbian-install -m yes, the ethernet no longer works. But while running from USB, there is no problem.

And if I do armbian-install -m no the Ethernet works, but only 1GB ram available.

commented

which kernel are you using

commented

which kernel are you using

I have tried 5.15/5.10/5.4

please send pictures of your board

commented

It was advertised as 1Gbps Ethernet, but it appears to be only 100Mbps.

Front
Back

export to dtb

commented

This is the dtb that I have extracted from my box
mybox.gz

commented

I have used this way to extract the dtb
https://github.com/ophub/amlogic-s9xxx-armbian/tree/main/build-armbian/documents#1213-how-to-decompile-a-dtb-file

Should I try the method you have just provided?

commented

boot_log

try to open the error file

mybox.gz

The dtb you provided in the first post cannot be decompiled. The file is damaged.

if you can export the DTS

commented

try to open the error file

mybox.gz

The dtb you provided in the first post cannot be decompiled. The file is damaged.

if you can export the DTS

The second one is working and I managed to decompile it:

mybox.dts

Hello @D-Sta
follow the following steps:
install original android firmware
prepare the pen/sdcard with the latest version
https://github.com/ophub/amlogic-s9xxx-armbian/releases/tag/Armbian_jammy_12.12.0346

install select the 523 and after feedback

commented

Hi @tv4you2016
Thanks for the instructions, currently downloading the new armbian image.
Should install with the mainline u-boot or not? armbian-install -m yes/no?

commented

@tv4you2016 I have tried to boot from the this image, but with no success. But this image seems different that those build for s905x3. This image has only 1 partition called armbi_root and not a separate boot partition. As well, could not find any u-boot and uEnv.txt to change the dtb, inside the boot directory in the root partition.

commented

OK, thanks. Waiting for the build to complete.
Meanwhile I have tried Armbian_23.02.0_amlogic_s905x3_jammy_5.15.82_server_2022.12.08.img.gz with meson-sm1-x96-max-plus-q1.dtb which is the DTB for the 523 target that you advised me trying, and the system did NOT boot at all. Is that OK?

describe the procedures you performed

commented

describe the procedures you performed

  1. I've prepared an USB drive with this image Armbian_23.02.0_amlogic_s905x3_jammy_5.15.82_server_2022.12.08.img.gz using Etcher.
  2. In uEnv.txt modified the DTB like that FDT=/dtb/amlogic/meson-sm1-x96-max-plus-q1.dtb
  3. Copied u-boot-x96maxplus.bin to u-boot.ext
  4. After powering the device with the USB plugged in, and doing the toothpick the device is stucked at the boot logo.

With the exact same setup and method, but only using meson-sm1-sei610.dtb the system boots normally and everything is working fine (WiFi, Ethernet, 4GB ram, ...).
Then there are 2 options for installing:

  1. Using the mainline u-boot armbian-install -m yes: The RAM is 4GB, WiFi working, but Ethernet NOT working
  2. Not using the mainline u-boot armbian-install -m no: The RAM is 1GB, WiFi working, Ethernet working

put the dtb in the folder??
meson-sm1-x96-max-plus-q1.dtb??

@D-Sta follow the following steps:

  1. install original android firmware

  2. prepare the pen/sdcard with the Armbian_23.02.0_amlogic_s905x3_jammy_5.15.82_server_2022.12.08.img.gz

  3. download the https://github.com/ophub/amlogic-s9xxx-armbian/files/10200168/meson-sm1-x96-max-plus-q1.dtb.zip
    put file in /dtb/amlogic/

  4. In uEnv.txt modified the DTB like that FDT=/dtb/amlogic/meson-sm1-x96-max-plus-q1.dtb

  5. run the usb go to /etc/model_database.conf
    Modify one line, such as the line corresponding to 516

I can say that this works, because I did it in the box of @luucasmooreira #784

Yes it works. Congratulations to @tv4you2016

@D-Sta build completed

follow the following steps:
install original android firmware
prepare the pen/sdcard with the latest version

install select the 523 and after feedback

commented

@D-Sta build completed

follow the following steps: install original android firmware prepare the pen/sdcard with the latest version

install select the 523 and after feedback

Thanks @tv4you2016!

I used the previous build, but used the DTB you have provided

download the https://github.com/ophub/amlogic-s9xxx-armbian/files/10200168/meson-sm1-x96-max-plus-q1.dtb.zip
put file in /dtb/amlogic/

and update the /etc/model_database.conf

and after installing the system to the emmc, everything is working fine, WIFI + 4GB RAM + Ethernet.

But can you please provide some information about the solution? How is the new meson-sm1-x96-max-plus-q1.dtb different from the old one (which did not boot at all).

Regards