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

X96 max + 2/16G S905x3 Unable to boot from eMMC after flashing #47

Closed
dinhchinh82 opened this issue Dec 6, 2021 · 20 comments
Closed

X96 max + 2/16G S905x3 Unable to boot from eMMC after flashing #47

dinhchinh82 opened this issue Dec 6, 2021 · 20 comments

Comments

@dinhchinh82
Copy link

I've try to install Armbian_21.11.0_Aml_s905x3_buster_5.10.83 to X96 max+ (2+16G version) but it could not boot after rebooting from eMMC. The log is as picture below:
IMG_4943

If I boot from USB, the box still can boot as usual but the ethernet is not recognized correctly (there is no local ip address).
There is an error if boot from USB as below:
IMG_4942

Do you have any suggestion to fix?
Thank you.

@ophub
Copy link
Owner

ophub commented Dec 6, 2021

What is the version of the motherboard?
What version of the network card chip?

The V5.1 version of X96 Max+ is known as a gigabit network card, but it cannot be driven. After disassembly and inspection, the RTL8211F network card chip was replaced with IP1001M.

@dinhchinh82
Copy link
Author

IMG_4949
My version is V3.1, X96 Max +, 2G Memory + 16GB flash. While booting using USB, if I change the uEnv.txt to use x96-air-100.dtb and reboot, the eth0 is recognized but after flashing to eMMC, the box stop booting only after several seconds as the first error picture above.

@dinhchinh82
Copy link
Author

dinhchinh82 commented Dec 6, 2021

As before, I still can get eth0 working if use the balbes150's image with meson-sm1-sei610.dtb. But with that armbian version, the local network was not stable, sometimes there was no local network after rebooting.

@ophub
Copy link
Owner

ophub commented Dec 7, 2021

Is your box x96 air?
What does it look like?

The dtb files you mentioned are included in the firmware by default:

meson-sm1-x96-air-100.dtb
meson-sm1-x96-air-1000.dtb
meson-sm1-sei610.dtb

If you are sure that your box uses a different dtb file, you can modify the armbian-install script yourself and replace it with the corresponding dtb.

/usr/sbin/armbian-install: https://github.com/ophub/amlogic-s9xxx-armbian/blob/main/build-armbian/common-files/files/usr/sbin/armbian-install#L66

meson-sm1-x96-max-plus.dtb is modified to what you know is available, such as meson-sm1-sei610.dtb

@dinhchinh82
Copy link
Author

dinhchinh82 commented Dec 7, 2021

Is your box x96 air? What does it look like?

The dtb files you mentioned are included in the firmware by default:

meson-sm1-x96-air-100.dtb
meson-sm1-x96-air-1000.dtb
meson-sm1-sei610.dtb

If you are sure that your box uses a different dtb file, you can modify the armbian-install script yourself and replace it with the corresponding dtb.

/usr/sbin/armbian-install: https://github.com/ophub/amlogic-s9xxx-armbian/blob/main/build-armbian/common-files/files/usr/sbin/armbian-install#L66

meson-sm1-x96-max-plus.dtb is modified to what you know is available, such as meson-sm1-sei610.dtb

our box is X96 max+ as the picture above, not x96 air. I know you already included the x96-air dtb file then I already tried to update it manually in the /boot/uEnv.txt of USB boot device.
But the most problem now is whether using x96-air dtb or x96-max-plus dtb or meson-sm1-sei610.dtb, the box is unable to boot from eMMC, only can boot form USB.

Anw, I will try to modify armbian-install but do I need to call build-armbian or just use rebuild-armbian to save the time?.
It takes more than 2 hours to build-armbian but only 20 minutes to rebuild-armbian.

Thank you.

@ophub
Copy link
Owner

ophub commented Dec 7, 2021

You don't need to use rebuild. After your usb is started, modify: vi /use/sbin/armbian-install script in your box. The URL I sent you is telling you the location of the modification.

  1. Download the firmware to write to usb and boot from usb.
  2. After the usb is started, enter vi /use/sbin/armbian-install, after modifying .dtb, press esc, and enter :wq! Save and exit.
  3. Enter the command to write emmc: armbian-install
  4. After completion, unplug the usb, unplug the power supply, plug in the power supply again to see if it can start.

Use steps 1-4 to try which .dtb can be used in the emmc of your box. waiting for your good news.

@dinhchinh82
Copy link
Author

You don't need to use rebuild. After your usb is started, modify: vi /use/sbin/armbian-install script in your box. The URL I sent you is telling you the location of the modification.

Oh I understand your point, just modify the script in the file from USB boot. Thank you.

@ophub
Copy link
Owner

ophub commented Dec 7, 2021

I consulted flippy and he answered:

Do you know what model of your network card is? Realtek modules have no drivers, only Broadcom has drivers.

Are you a 100M network card? You can try:

meson-g12a-x96-max-rmii.dtb
meson-sm1-sei610.dtb

@ophub
Copy link
Owner

ophub commented Dec 7, 2021

This is Broadcom:

33

2021-12-07 12 49 44

222

@dinhchinh82
Copy link
Author

It seems

I consulted flippy and he answered:

Do you know what model of your network card is? Realtek modules have no drivers, only Broadcom has drivers.

Are you a 100M network card? You can try:

meson-g12a-x96-max-rmii.dtb
meson-sm1-sei610.dtb

It seems my box using Realtek module but the eth0 works under balbes150 armbian image (but not stable).
For Android, it works as 1Gbps.

@ophub
Copy link
Owner

ophub commented Dec 7, 2021

Have you tried these 2 .dtb?
Currently there is no Realtek network card driver in the kernel.

@ophub
Copy link
Owner

ophub commented Dec 7, 2021

What version of the kernel of the armbian of balbes150 you are using? Is there a driver for this network card in the previous kernel version? Or is it the introduction of a third-party driver?
You can use the kernel compilation script provided in the repo to compile the kernel of the firmware before balbes150, and try whether it can be driven.

@dinhchinh82
Copy link
Author

Have you tried these 2 .dtb? Currently there is no Realtek network card driver in the kernel.

I will try again tonight.

What version of the kernel of the armbian of balbes150 you are using? Is there a driver for this network card in the previous kernel version? Or is it the introduction of a third-party driver?

For X96 max + (2+16G version), I already used armbian 5.7.8 of balbes150 with default meson-sm1-sei610.dtb. But I don't want to use his firmware anymore because there are 2 bugs below.

  1. Sometimes the X96 max + is unable to boot again from eMMC after unplug & plug the power. For this case, I must use the sd card to boot 1 time to make it boot from eMMC again.
  2. Sometimes the x96 max + is unable to get the local IP address after rebooting.

I hope your firmware will solve 2 big issues above.

Please note that for X96 max + (4G+32G version), the eth0 is always recognized with default dtb and it seems to work well from about 3 days up to now since I used your firmware.

@dinhchinh82
Copy link
Author

dinhchinh82 commented Dec 7, 2021

One more thing, I can extract the file bootloader.img from X96 max + stock android firmware (android 9). Do you think I should use the extracted bootloader image for X96 max + instead of /lib/u-boot/hk1box-bootloader.img?

@ophub
Copy link
Owner

ophub commented Dec 7, 2021

If usb/tf can be used, you can use usb first. See if the driver can be provided in the kernel in the future.

Or you can use the kernel compilation script: recompile, to compile the 5.7.8 kernel to see if it can be driven.

@dinhchinh82
Copy link
Author

dinhchinh82 commented Dec 7, 2021

If usb/tf can be used, you can use usb first. See if the driver can be provided in the kernel in the future.

Or you can use the kernel compilation script: recompile, to compile the 5.7.8 kernel to see if it can be driven.

Yes. I will try to recompile kernel 5.7.8 then try again.

At current, for x96 max + (2+16G), I still can boot from USB and got eth0 working (using meson-sm1-x96-air-100.dtb) but unable to boot from eMMC. I will report you detail tonight.

@ophub
Copy link
Owner

ophub commented Dec 7, 2021

Since meson-sm1-x96-air-100.dtb can be used to access the Internet normally in usb, the dtb should also be used when writing emmc, you can try to modify armbian-install and use this file to see.

https://github.com/ophub/amlogic-s9xxx-armbian/blob/main/build-armbian/common-files/files/usr/sbin/armbian-install#L74

Choose 5.4 kernel armbian firmware. Do not choose 5.10 kernel, this requires u-boot.

Add a new line in: vi /usr/sbin/armbian-install

59:X96-100M:s905x3:meson-sm1-x96-air-100.dtb:NA:NA:NA:x96max,2/16G

Choose 59 when installing.

@ophub
Copy link
Owner

ophub commented Dec 7, 2021

It’s actually the best choice to use armbian on USB/TF. Its space is large enough, much larger than EMMC. It has better room to play, and can be used with confidence for a long time without worrying about the space being full, especially for running docker. Users, USB/TF is a perfect match.

And if the EMMC is broken, it will be troublesome to repair, TF/USB is much more convenient, just replace one.

So, you can convince yourself to explore EMMC, but instead of using EMMC, using TF/USB should be the best solution.

@dinhchinh82
Copy link
Author

Sorry I still have not tried your solution yet. From your suggestion, I have some ideas and I guess there should be a way to make it work. I will report you later.

@ophub
Copy link
Owner

ophub commented Dec 8, 2021

Try 5.4 kernel Armbian firmware.

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

2 participants