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

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

Closed
dicsonpan opened this issue Dec 7, 2022 · 79 comments
Closed

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

dicsonpan opened this issue Dec 7, 2022 · 79 comments
Labels
documentation Improvements or additions to documentation new box Research Fills in the Blanks support This need is supported

Comments

@dicsonpan
Copy link

dicsonpan commented Dec 7, 2022

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

@ophub
Copy link
Owner

ophub commented Dec 7, 2022

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

@dicsonpan
Copy link
Author

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

@ophub
Copy link
Owner

ophub commented Dec 7, 2022

安装时用:armbian-install -m yes

@dicsonpan
Copy link
Author

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

@ophub
Copy link
Owner

ophub commented Dec 7, 2022

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

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

@dicsonpan
Copy link
Author

dicsonpan commented Dec 7, 2022

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

@dicsonpan
Copy link
Author

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

@ophub
Copy link
Owner

ophub commented Dec 7, 2022

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

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

@dicsonpan
Copy link
Author

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

@ophub
Copy link
Owner

ophub commented Dec 7, 2022

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

@dicsonpan
Copy link
Author

dicsonpan commented Dec 7, 2022

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

@ophub
Copy link
Owner

ophub commented Dec 7, 2022

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

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

@ophub
Copy link
Owner

ophub commented Dec 7, 2022

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

@dicsonpan
Copy link
Author

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

ophub commented Dec 7, 2022

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

@ophub
Copy link
Owner

ophub commented Dec 7, 2022

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

@ophub ophub changed the title x96max+ a100 写入 emmc 后变砖无法启动 x96max+ a100 支持写入emmc使用 Dec 7, 2022
@ophub ophub added documentation Improvements or additions to documentation support This need is supported new box Research Fills in the Blanks labels Dec 7, 2022
@dicsonpan
Copy link
Author

dicsonpan commented Dec 7, 2022

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

正面
52731670400895_ pic_hd

反面
52741670400896_ pic_hd

短接点
52721670400895_ pic

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

@ophub
Copy link
Owner

ophub commented Dec 7, 2022

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

@dicsonpan
Copy link
Author

dicsonpan commented Dec 7, 2022

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

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

@ophub
Copy link
Owner

ophub commented Dec 7, 2022

#283

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

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

@ophub
Copy link
Owner

ophub commented Dec 7, 2022

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

这样就可以了!

@ophub
Copy link
Owner

ophub commented Dec 7, 2022

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

@dicsonpan
Copy link
Author

添加MAINLINE_UBOOT可以了?

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

@dicsonpan
Copy link
Author

image

@D-Sta
Copy link

D-Sta commented Dec 11, 2022

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.

@ophub
Copy link
Owner

ophub commented Dec 11, 2022

which kernel are you using

@D-Sta
Copy link

D-Sta commented Dec 11, 2022

which kernel are you using

I have tried 5.15/5.10/5.4

@tv4you2016
Copy link

please send pictures of your board

@D-Sta
Copy link

D-Sta commented Dec 11, 2022

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

Front
Back

@tv4you2016
Copy link

export to dtb

@tv4you2016
Copy link

try #788

@D-Sta
Copy link

D-Sta commented Dec 11, 2022

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

@tv4you2016
Copy link

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

used

https://unix.stackexchange.com/questions/347489/current-question-how-can-i-decompile-an-arm-firmware-file-to-get-the-device-tr

@D-Sta
Copy link

D-Sta commented Dec 11, 2022

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?

@tv4you2016
Copy link

yes

@D-Sta
Copy link

D-Sta commented Dec 11, 2022

mybox.gz

@D-Sta
Copy link

D-Sta commented Dec 11, 2022

boot_log

@tv4you2016
Copy link

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

@D-Sta
Copy link

D-Sta commented Dec 12, 2022

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

@tv4you2016
Copy link

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

@D-Sta
Copy link

D-Sta commented Dec 12, 2022

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?

@D-Sta
Copy link

D-Sta commented Dec 12, 2022

@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.

@tv4you2016
Copy link

@D-Sta
Please wait for the build to complete

https://github.com/ophub/amlogic-s9xxx-armbian/actions

@D-Sta
Copy link

D-Sta commented Dec 12, 2022

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?

@tv4you2016
Copy link

describe the procedures you performed

@D-Sta
Copy link

D-Sta commented Dec 12, 2022

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

@tv4you2016
Copy link

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

@tv4you2016
Copy link

@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

@tv4you2016
Copy link

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

@luucasmooreira
Copy link

Yes it works. Congratulations to @tv4you2016

@tv4you2016
Copy link

@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

@D-Sta
Copy link

D-Sta commented Dec 12, 2022

@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

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 new box Research Fills in the Blanks support This need is supported
Projects
None yet
Development

No branches or pull requests

5 participants