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, 100M, RTL8189ftv ] Unable to boot from eMMC with kernel 5.15 #136

Closed
dinhchinh82 opened this issue Mar 6, 2022 · 20 comments

Comments

@dinhchinh82
Copy link

dinhchinh82 commented Mar 6, 2022

I got success to boot my X96 max+ (2+16, 100M LAN, RTL8189ftv wifi with kernel 5.4 according this post. By the way, it did not work with kernel 5.15.

I use the same method to install kernel 5.15 (Armbian_22.05.0_Aml_s905x3_bullseye_5.15.26_2022.03.05.1324.img.gz) but the box is unable to boot from eMMC again.
Before installing 5.15.26 to eMMC, I also restore original Android firmware.

Here are detail steps:

  1. Flash Armbian_22.05.0_Aml_s905x3_bullseye_5.15.26_2022.03.05.1324.img.gz image to USB
  2. Unplug & plug the usb to the PC again, Open "Boot" partition then change the uEnv.txt to the code below:

LINUX=/zImage
INITRD=/uInitrd
FDT=/dtb/amlogic/meson-sm1-x96-air-100.dtb
APPEND=root=UUID=167aa722-e1e0-4745-a3ba-53505e2bc140 rootflags=data=writeback rw console=ttyAML0,115200n8 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1

  1. Unplug the USB and plug to the USB3.0 port (green) of X96 max+, plug the ethernet.
  2. Using toothpick to hold the reset button inside the AV port, plug the power of the box, keep holding the reset button about 10 seconds then release finger.
  3. Waiting for Armbian to start (quite fast, about 1-2 minutes)
  4. Login to Armbian and change default password
  5. Create the install-to-emmc.sh script with the content from this link:
    我有个x96 air 2g +16G wifi rtl8189ftv的盒子,请问下这个能否刷入emmc #105 (comment)
  6. Run the install-to-emmc.sh, select Option 2 (X96max+), waiting for installing to eMMC successfully
  7. Unplug the power, USB then plug the power again.
  8. Then the armbian 5.15 is unable to boot. There is a splash image with X96 max + logo and the screen is going to black.

By the way, in step 9, if I keep the USB attached to the box, just unplug & plug again then the box can boot from eMMC normally.
It means, in this case the eMMC only could boot if the USB is still attached to the box. When I try to run armbian-install again, there is message that the box already run in eMMC mode.

I also tried the armbian-install command instead of install-to-emmc.sh script with several cases as below and still not success (always restore stock Android firmware before installing to eMMC).

51:X96 Max+:s905x3:meson-sm1-x96-max-plus.dtb:u-boot-x96maxplus.bin:/usr/lib/u-boot/x96maxplus-u-boot.bin.sd.bin:/usr/lib/u-boot/hk1box-bootloader.img:4C@2100Mhz,4GB Mem,1Gb Nic,rtl8822cs wifi

60:X96 Air 100Mb:s905x3:meson-sm1-x96-air-100.dtb:u-boot-x96maxplus.bin:NA:NA:4C@2100Mhz,2GB Mem,100M Nic,Wifi

or even add a manual command below:
63:X96 Max+:s905x3:meson-sm1-x96-air-100.dtb:u-boot-x96maxplus.bin:/usr/lib/u-boot/x96maxplus-u-boot.bin.sd.bin:/usr/lib/u-boot/hk1box-bootloader.img:4C@2100Mhz,2GB Mem,100M Nic,Wifi

@ophub
Copy link
Owner

ophub commented Mar 7, 2022

Your mistake is that you used step 7. Not for you to create. Check out all the discussion posts. His meaning is to compare the difference between the two firmware partitions (he used 1350, I was 700 before, and now it has been changed to 1350). That is the installation file in the flippy firmware and cannot be used directly in mine. The operation of individual files in the installation operation is slightly different. There is also a missing configuration record file, which needs to be read in armbian-update in the future, and cannot be updated because of the lack.

After testing by other users, x96-100m can choose 60 to install, which is the same as air. If your model is different, you can add a line of armbian-install information yourself, but you must use armbian-install to install.

Since 5.4 can be used as long as the dtb is correct, you happen to be able to use step 7 in 5.4, not because the script is fully applicable, but because some operations in the script do not work. Firmware installed with the script in step 7 will not be able to use armbian-update for kernel upgrade due to missing configuration record files.

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

@dinhchinh82
Copy link
Author

Your mistake is that you used step 7. Not for you to create. Check out all the discussion posts. His meaning is to compare the difference between the two firmware partitions (he used 1350, I was 700 before, and now it has been changed to 1350). That is the installation file in the flippy firmware and cannot be used directly in mine. The operation of individual files in the installation operation is slightly different. There is also a missing configuration record file, which needs to be read in armbian-update in the future, and cannot be updated because of the lack.

I understand your point. By the way, I also use your armbian-install with option 60 to install 5.15 to eMMC WITHOUT using step 7 and the box is still unable to boot.

@ophub
Copy link
Owner

ophub commented Mar 7, 2022

What is your soc, look at the specific model on the motherboard is s905x3 or s905x2.
Is it normal when you use it on usb? You can create a new install record in armbian-install, the dtb uses the same as your usb. for example
meson-sm1-x96-max-plus.dtb
meson-sm1-sei610.dtb

@dinhchinh82
Copy link
Author

dinhchinh82 commented Mar 7, 2022

What is your soc, look at the specific model on the motherboard is s905x3 or s905x2. Is it normal when you use it on usb? You can create a new install record in armbian-install, the dtb uses the same as your usb. for example meson-sm1-x96-max-plus.dtb meson-sm1-sei610.dtb

This is my X96 max + (S905X3, 2+16, 100Mb Lan, RTL8189ftv) as the model I used to test your firmware.
The picture is from this topic:
#95

Here are detail steps:

  1. Restore original Android 9 firmware. Flash Armbian_22.05.0_Aml_s905x3_bullseye_5.15.26_2022.03.05.1324.img.gz image to USB
  2. Unplug & plug the usb to the PC again, Open "Boot" partition then change the uEnv.txt to the code below:

LINUX=/zImage
INITRD=/uInitrd
FDT=/dtb/amlogic/meson-sm1-x96-air-100.dtb
APPEND=root=UUID=167aa722-e1e0-4745-a3ba-53505e2bc140 rootflags=data=writeback rw console=ttyAML0,115200n8 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1

  1. Unplug the USB and plug to the USB3.0 port (green) of X96 max+, plug the ethernet.

  2. Using toothpick to hold the reset button inside the AV port, plug the power of the box, keep holding the reset button about 10 seconds then release finger.

  3. Waiting for Armbian to start (quite fast, about 1-2 minutes)

  4. Login to Armbian and change default password

  5. Run the armbian-install to install armbian to eMMC with some option below:
    60:X96 Air 100Mb:s905x3:meson-sm1-x96-air-100.dtb:u-boot-x96maxplus.bin:NA:NA:4C@2100Mhz,2GB Mem,100M Nic,Wifi
    63:X96 Max+ 100Mb NA NA:s905x3:meson-sm1-sei610.dtb:u-boot-x96maxplus.bin:NA:NA:4C@2100Mhz,2GB Mem,100M Nic,Wifi

  6. Waiting for installing to eMMC successfully

image

  1. Unplug the power, unplug USB then only plug the power again.
  2. Then the armbian 5.15 is unable to boot. The screen is black as below:

IMG_5863

Please note that my box already can boot from eMMC if using kernel 5.4 as I wrote in the topic:
#134 (comment)

@ophub
Copy link
Owner

ophub commented Mar 7, 2022

Snip20220307_2

60:X96 Air 100Mb:s905x3:meson-sm1-x96-air-100.dtb:u-boot-x96maxplus.bin:NA:NA:4C@2100Mhz,2GB Mem,100M Nic,Wifi

The code (60) you sent is inconsistent with your picture. Cannot use Mainline bootloader.

First restore the Android TV system to restore the partition table, and then select the default 60 serial number of the script to install.

@ophub
Copy link
Owner

ophub commented Mar 7, 2022

Same as air100M:
#105 (comment)

Partition Recovery with Correct Android TV System:
#105 (comment)

Cannot use mainline u-boot:
#105 (comment)

@dinhchinh82
Copy link
Author

@ophub Please check the detail steps as below:

  1. Step 1: restore Android TV and boot Android normally as below:
    IMG_5861

  2. Step 2: Boot 5.15 from USB , run armbian-install command, select 60

Screen Shot 2022-03-07 at 20 53 52

  1. Step 3: Waiting for installing to eMMC successfully

step 2

  1. Step 4: Unplug the power, unplug the USB

  2. Step 5: plug the power again, only see the splash screen of X96 max + then black screen as clip below
    https://user-images.githubusercontent.com/22479095/157049748-bd20b9ff-0b42-4c64-ae24-369dee9996c3.mov

@ophub
Copy link
Owner

ophub commented Mar 7, 2022

There is no response at all, indicating that u-boot-x96maxplus.bin is wrong and cannot be booted.
You use 5.4 first

@dinhchinh82
Copy link
Author

There is no response at all, indicating that u-boot-x96maxplus.bin is wrong and cannot be booted. You use 5.4 first

I see. But when using 5.4 from eMMC, sometimes I got the error below while booting.
IMG_5871
IMG_5868

Then I must restore Android stock firmware and install armbian to eMMC from USB again.

@ophub
Copy link
Owner

ophub commented Mar 8, 2022

I have a gtk pro device. When using the 5.15 kernel, there is a black screen with no information for about 10 seconds at the beginning, but it will start later. Unlike other devices, it starts up as soon as it is plugged in.

@dinhchinh82
Copy link
Author

I have a gtk pro device. When using the 5.15 kernel, there is a black screen with no information for about 10 seconds at the beginning, but it will start later. Unlike other devices, it starts up as soon as it is plugged in.

I'm testing the stability of your firmware by adding the reboot command every 15 minutes in the crontab as below:

*/15 * * * * sudo reboot

Then after several times , the armbian 5.4 is unable to boot.
@ophub do you think this armbian 5.4 is stable to run the 24x7 home server?

@ophub
Copy link
Owner

ophub commented Mar 8, 2022

Several of my devices have never lost connection during use.
s922x-gtk pro
s905x3-x96max+
s905d-n1
s905x-hg680p
But what's the point of this? I'm stable and can't answer your question of whether it's stable. It's like you're asking Apple, can your computer be used 24x7? Or ask Microsoft, can your windows be used 24x7?

Snip20220308_1

My device is updated every Wednesday with all 4 newly released kernels, checking kernel suitability. At least for the past 1 year, when I connect these devices every Wednesday, they are all online, but this still does not answer your question, whether it can be used 7x24 hours, there are many conditions that work together.

@dinhchinh82
Copy link
Author

@ophub thank you for your detail information.

I also have another X96 max+ (4+32, 5.15 kernel) and it seems to be more stable than X96 max+ (2+16, 5.4 kernel).

The X96 max+ (4+32) only got 1 time kernel panic as the photo I sent via other issue. From my opinion, I feel new kernel (5.1x) is more stable than 5.4.

@ophub
Copy link
Owner

ophub commented Mar 8, 2022

The kernels are all good kernels, but the box is a bit naughty. The box just wants to show you TV, you have to make it a server.

@dinhchinh82
Copy link
Author

There is no response at all, indicating that u-boot-x96maxplus.bin is wrong and cannot be booted. You use 5.4 first

Could you suggest how to find the correct u-boot.bin? Is there a way to extract it from original Android stock firmware? Or that file is built by flippy?

Thank you.

@ophub
Copy link
Owner

ophub commented Mar 8, 2022

flippy will do

@ophub ophub closed this as completed Mar 8, 2022
@dinhchinh82
Copy link
Author

flippy will do

I have a stock Android firmware of this box. If you have any guide to extract the u-boot from Android firmware, please give me the suggestion. I have some knowledge about Android and Linux.

As before, I've ever extracted the bootloader.img from X96 max+ Android firmware using dd command after adb to the Android like below but I'm not sure this bootloader.img is u-boot.bin or not.

dd if=/dev/block/bootloader of=/data/local/tmp/bootloader.img

@ophub
Copy link
Owner

ophub commented Mar 8, 2022

He often teaches people how to do it. I've seen it, but I haven't done it. You'd better ask him directly. There is a link to his community on his home page.

@dinhchinh82
Copy link
Author

He often teaches people how to do it. I've seen it, but I haven't done it. You'd better ask him directly. There is a link to his community on his home page.

That's great. I also try to find the guide how to make the u-boot.bin file but not found yet.

I've checked his github (https://github.com/unifreq) but I still not found his home page. Please give me the link if any.

Thank you.

@ophub
Copy link
Owner

ophub commented Mar 8, 2022

At the beginning of the README of the openwrt_packit repository

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