Closed araczkowski closed 1 year ago
https://github.com/unifreq/linux-6.1.y/tree/main/arch/arm64/boot/dts/amlogic
Thank you for your sharing.
Compress the xxx.dtb
file into a xxx.tar
or xxx.zip
format, and then you can upload it. Simply drag and drop it into the text box for the current post content, and after a few seconds, the upload will be complete. Then, you can proceed to submit.
The above is the source code of the kernel's Device Tree Source (DTS). What modifications have you made to the original version in your Device Tree Binary (DTB) file? It might be better to create a new dedicated DTS file, which would make maintenance and updates easier compared to using a fixed DTB file.
I took the dts file from here: https://github.com/danboid/meson-sm1-sei610-qca9377-bt/blob/main/meson-sm1-sei610-qca9377-bt.dts
the only change I did was to change the bluetooth section:
I named the file meson-sm1-x88pro-x3.dts
and I compiled it to dtb via:
dtc -I dts -O dtb -f meson-sm1-x88pro-x3.dts -o meson-sm1-x88pro-x3.dtb
the ziped dts and dtb files are attached
meson-sm1-x96-max-plus-q2.dtb
Based on the information you provided, there is no need to add a new DTB (Device Tree Blob). The original DTB file included in the kernel, meson-sm1-x96-max-plus-q2.dtb
is the one you need. This applies to device number 508
, which is the same as X96-Max+Q2 and X96-Air-Q1000.
You can modify the name of the DTB in /boot/uEnv.txt
and then restart to test the changes.
unfortunatelly no boot on the meson-sm1-x96-max-plus-q2.dtb
Please see the screen with log errors (sory I do not have working uart/debug connection to this board)
This is the source code of q2, he just made the same modification as the bluetooth chip. According to the post you posted above, danboid also introduced in his warehouse, you can use my q2 directly, no need to use his modified files anymore.
danboid
has already reported this q2 device here, These are 2 identical files.
https://github.com/ophub/amlogic-s9xxx-armbian/issues/366
You download other series or different kernel firmware try the q2
I red the https://github.com/ophub/amlogic-s9xxx-armbian/issues/366 according to this the meson-sm1-x96-max-plus-q2.dtb
is almost identical to the meson-sm1-h96-max.dtb
. To check this, I decompiled thes dtb-s, and it is true:
I compare the dtb-s meson-sm1-x96-max-plus-q2.dts
with meson-sm1-x88pro-x3.dts
the files has some parts in comon but there is a lot of diferences
I run a box on meson-sm1-x96-max-plus-q2.dtb
Boot -> with problems reported on the picture above
ethernet NOK
wifi NOK
HDMI OK
I run a box on meson-sm1-x88pro-x3.dtb
dtb from danboid
Boot OK
ethernet OK
wifi OK
BT almost OK
hdmi OK
I run a box on meson-sm1-x96-max-plus-q2.dtb
Boot -> with problems reported on the picture above
ethernet NOK
wifi NOK
hdmi OK
I run a box on meson-sm1-x88pro-x3.dtb
dtb from danboid
Boot OK
ethernet OK
wifi OK
BT almost OK
hdmi OK
meson-sm1-x96-max-plus-q2.dtb
Boot OK
ethernet NOK
wifi OK
BT NOK
hdim OKmeson-sm1-x88pro-x3.dtb
dtb from danboid
Boot OK
ethernet OK
wifi OK
BT almost OK
hdim OKmeson-sm1-x96-max-plus-q2.dtb
Boot OK
ethernet NOK
wifi OK
BT NOK
hdim OK
Memory 3.24G NOKmeson-sm1-x88pro-x3.dtb
dtb from danboid
Boot OK
ethernet OK
wifi OK
BT almost OK
hdim OK
Memory 3.24G NOKI checked each dtb for s905x in /boot/dtb/amlogic
for many the boot works, and for some there was a wifi connection, but there was no dtb on which I had the ethernet
meson-sm1-x88pro-x3.dtb
dtb from danboid works with each kernel
@ophub what do think about this ?
Your DTS file is not the source file; it's a decompiled file. It cannot be compiled within the kernel. It can only be adjusted at specific points through decompilation. This kind of Device Tree Blob (DTB) has been tested in the current version, but there is no guarantee it will work correctly in future kernel versions. It's advisable to identify the differences, follow the kernel's DTS writing conventions, and create a dedicated DTS file. You can refer to the writing style in meson-sm1-x96-max-plus-q2.dts
. Incorporate the existing DTS, reconfiguring only the differing nodes. This way, you'll inherit the existing file while retaining only the differences.
I've placed meson-sm1-x88-pro-x3.dtb
in the repository. I compiled one for you to download and test. In the installation options, it's listed as 524
, board named s905x3-x88-pro-x3
.
@ophub Thanks for explanation concerning DTS, I will try to learn more about DT, if I will be able I will prepare real DTS based on existing dts in kernel and orginal dts from android.
I tested the build that you attached - everything works OK (Boot, HDMI, Ethernet. WiFi, BT)
Before I tried the installation I noticed that my DTBs on device is encrypted DTB read partitions and report: Unrecognizable DTB, magic 9d8c8056
I followed this description https://7ji.github.io/crack/2023/01/08/decrypt-aml-dtb.html and I was able to decrypt it,
See the partition Information on this link -> partition Information from ampart-web-reporter
after decryption I run the armbian-install
then I select id 524
:
The installation was successful:
But the box is not butting from eMMC, black screen without even start logo(this time), sorry I could not provide boot logs because on my board there are no paths from RX TX to SoC: https://github.com/Raxone/amlogic-usbdl_s905x3/issues/2
Do you have any idea how to improve the installation script based on information from the link -> partition Information from ampart-web-reporter
let me know please then I will do an installation test. Thanks :+1:
armbian-install -m yes
armbian-install -m yes
no boot, logs from installation below:
root@armbian:~# armbian-install -m yes
[ STEPS ] Installing Armbian to internal eMMC...
[ STEPS ] Checking dependencies...
[ INFO ] Dependency check completed. Proceeding installation...
[ STEPS ] Initializing the environment...
[ INFO ] Use mainline u-boot: [ yes ]
[ INFO ] Using ampart tool: [ yes ]
[ INFO ] Show all lists: [ no ]
[ INFO ] Internal eMMC : [ /dev/mmcblk2 ]
[ STEPS ] Start selecting device...
--------------------------------------------------------------------------------------
ID SOC MODEL DTB
--------------------------------------------------------------------------------------
501 s905x3 X96-Max+_100Mb meson-sm1-x96-max-plus-100m.dtb
502 s905x3 X96-Max+_1GB meson-sm1-x96-max-plus.dtb
503 s905x3 X96-Max+(OverClock) meson-sm1-x96-max-plus-oc.dtb
504 s905x3 X96-Max+(IP1001M) meson-sm1-x96-max-plus-ip1001m.dtb
505 s905x3 X96-Max+_A100 meson-sm1-sei610.dtb
506 s905x3 X96-Max+_2101 meson-sm1-x96-max-plus-2101.dtb
507 s905x3 X96-Max+Q1 meson-sm1-x96-max-plus-q1.dtb
508 s905x3 X96-Max+Q2,X96-Air-Q1000 meson-sm1-x96-max-plus-q2.dtb
509 s905x3 X96-Air-1Gb meson-sm1-x96-air-gbit.dtb
510 s905x3 X96-Air,X96-Max+100W,100Mb meson-sm1-x96-air.dtb
--------------------------------------------------------------------------------------
511 s905x3 Tencent-Aurora-3Pro meson-sm1-skyworth-lb2004-a4091.dtb
512 s905x3 HK1-Box,Vontar-X3 meson-sm1-hk1box-vontar-x3.dtb
513 s905x3 HK1-Box(OverClock) meson-sm1-hk1box-vontar-x3-oc.dtb
514 s905x3 H96-Max-X3,Infinity-B32 meson-sm1-h96-max-x3.dtb
515 s905x3 H96-Max-X3(OverClock),B32 meson-sm1-h96-max-x3-oc.dtb
516 s905x3 Ugoos-X3 meson-sm1-ugoos-x3.dtb
517 s905x3 Ugoos-X3(OverClock) meson-sm1-ugoos-x3-oc.dtb
518 s905x3 TX3-1Gb meson-sm1-tx3-qz.dtb
519 s905x3 TX3-1Gb(OverClock) meson-sm1-tx3-qz-oc.dtb
520 s905x3 TX3-100Mb meson-sm1-tx3-bz.dtb
--------------------------------------------------------------------------------------
521 s905x3 TX3-100Mb(OverClock) meson-sm1-tx3-bz-oc.dtb
522 s905x3 A95XF3-Air-1Gb meson-sm1-a95xf3-air-gbit.dtb
523 s905x3 A95XF3-Air-100Mb meson-sm1-a95xf3-air.dtb
524 s905x3 X88-Pro-X3,X99-Max+,Transpeed-X3+ meson-sm1-x88-pro-x3.dtb
525 s905x3 Whale meson-sm1-x96-max-plus.dtb
0 Other Customize Enter-custom-dtb-name
--------------------------------------------------------------------------------------
[ OPTIONS ] Please Input ID: 524
[ INFO ] Input Box ID: [ 524 ]
[ INFO ] Model Name: [ X88-Pro-X3,X99-Max+,Transpeed-X3+ ]
[ INFO ] FDTFILE: [ meson-sm1-x88-pro-x3.dtb ]
[ INFO ] MAINLINE_UBOOT: [ x96maxplus-u-boot.bin.sd.bin ]
[ INFO ] BOOTLOADER_IMG: [ hk1box-bootloader.img ]
[ INFO ] UBOOT_OVERLOAD: [ u-boot-x96maxplus.bin ]
[ INFO ] NEED_OVERLOAD: [ yes ]
[ STEPS ] Which type of filesystem do you want for your root?
-----------------------------------------------
ID TYPE
-----------------------------------------------
1 ext4
2 btrfs
-----------------------------------------------
[ OPTIONS ] Please Input ID (1/2): 1
[ INFO ] Input Type ID: [ 1 ]
[ INFO ] Type of filesystem: [ ext4 ]
[ STEPS ] Partitioning eMMC...
[ INFO ] Start backing up the default bootloader.
4+0 records in
4+0 records out
4194304 bytes (4.2 MB, 4.0 MiB) copied, 3.92158 s, 1.1 MB/s
[ INFO ] Delete the existing [ 2 ] partitions.
[ STEPS ] Successfully partitioned internal eMMC with amaprt.
[ INFO ] Start create MBR and partittion.
[ INFO ] 01. Write Mainline bootloader: [ x96maxplus-u-boot.bin.sd.bin ]
444+0 records in
444+0 records out
444 bytes copied, 0.00513928 s, 86.4 kB/s
2170+1 records in
2170+1 records out
1111408 bytes (1.1 MB, 1.1 MiB) copied, 0.133986 s, 8.3 MB/s
[ STEPS ] Processing BOOTFS partition...
[ INFO ] Formatting BOOTFS partition...
mkfs.fat 4.2 (2021-01-31)
mount: (hint) your fstab has been modified, but systemd still uses
the old version; use 'systemctl daemon-reload' to reload.
[ INFO ] Copying BOOTFS ...
[ INFO ] Update the [ uEnv.txt ] file.
[ INFO ] Copy [ u-boot-x96maxplus.bin ] to u-boot.emmc
[ STEPS ] Start processing the rootfs partition...
[ INFO ] Formatting ROOTFS ...
/dev/mmcblk2p2 contains a ext4 file system labelled 'ROOTFS_EMMC'
last mounted on /ddbr/install on Fri Aug 18 13:34:26 2023
mount: (hint) your fstab has been modified, but systemd still uses
the old version; use 'systemctl daemon-reload' to reload.
[ INFO ] Copying ROOTFS ...
[ INFO ] Copying [ etc ] ...
[ INFO ] Copying [ home ] ...
[ INFO ] Copying [ lib64 ] ...
[ INFO ] Copying [ opt ] ...
[ INFO ] Copying [ root ] ...
[ INFO ] Copying [ selinux ] ...
[ INFO ] Copying [ srv ] ...
[ INFO ] Copying [ usr ] ...
[ INFO ] Copying [ var ] ...
[ INFO ] Generate the new fstab file.
[ INFO ] Update the relevant parameters.
[ SUCCESS ] Installation successful. Run [ poweroff ], remove the installation media then re-insert the power supply to boot new system.
root@armbian:~# poweroff
what else can we try?
I just tried to flash it back using Amlogic USB Burning Tool, I tried 4 times, the same error in the same address The box has 128GB of eMMC @ophub do you there is a way to recover it?
Hi @ophub I'm back :)
I flashed the box via Amlogic USB Bourning tool, with unchecked erase checkboxes and it was successful, then I flashed again with checked erase checkboxes it was successful too.
Now I'm on 5.15.127-ophub, as you can see memory is wrong
the DTB is again encrypted
What we are doing now - standard installation? Or I should I firs make DTB non-encrypted to use ampart?
In the absence of mainline u-boot support, armbian can only recognize more than 3G, not the perfect 3.7G, which is normal.
If you want to recognize 3.7 G, you can see how to compile amlogic u-boot in the document
It seems that the current bootloader of the Android system can only boot from the usb, but cannot boot from the emmc. Before solving u-boot and dtb, use it in usb first.
Another potential reason for the failure to boot from eMMC is writing to an insecure partition location. Firstly, restore your device to the Android system. Then, following the partition identification method outlined in the repository, verify the location and modify the armbian-install script to include the dedicated partition.
https://github.com/ophub/amlogic-s9xxx-armbian/tree/main/documents
Refer to section 12.10 of the documentation.
Hi @ophub thanks for the tip
according to this report -> ampart-web-reporter
I tried wit these settings
I assumed that 1.09375GB is 1120MB
Unfortunately there is no boot, only logo appears...
I will test this more Have a good day! :+1:
Hi @ophub I made it :) my "hello world" dts:
I will test this dts more then I will put it to the https://github.com/unifreq/linux-6.1.y/tree/main/arch/arm64/boot/dts/amlogic
ok, thanks
Hi @ophub I created u-boot for box x88-pro-x3 - I did all according to the instruction -> How to build the u-boot file
Now I have files in the u-boot root directory and in the fip directory. I would like to write the u-boot to eMMC for testing, could you please advice me what files I should write to eMMC?
OK I made it :)
I did:
cp u-boot/fip/u-boot.bin.sd.bin /media/andrzej/ROOTFS/usr/lib/u-boot/x96maxplus-u-boot.bin.sd.bin
armbian-install -m yes -a no
it works!
@ophub let me know what files should I send you to add it to the repo?
Thank you for sharing. Please send me the file: u-boot/fip/u-boot.bin.sd.bin
It may not be possible to directly upload the bin file, so please compress it into a zip
format before uploading it to a folder.
Alternatively, you can submit it here: https://github.com/ophub/u-boot/tree/main/u-boot/amlogic/bootloader
Name it: x88prox3-u-boot.bin.sd.bin
Rename 6.MAINLINE_UBOOT: x96maxplus-u-boot.bin.sd.bin
with the number 524
to x88prox3-u-boot.bin.sd.bin
https://github.com/ophub/amlogic-s9xxx-armbian/blob/main/build-armbian/armbian-files/common-files/etc/model_database.conf
Thanks @ophub ! 2 pull requests added: https://github.com/ophub/u-boot/pull/8 https://github.com/ophub/amlogic-s9xxx-armbian/pull/1822
I will test the build after these pull requests merge
Translation: All boxes that can use the Armbian system can also use the OpenWrt system. The contents of the /boot partition are the same for both systems, and the method of using u-boot and the model configuration table are also the same.
The production process for both systems is also basically the same. OpenWrt: https://github.com/ophub/amlogic-s9xxx-openwrt/blob/777c567bb4b2aa21bda49bff8ff447b1c831d701/make-openwrt/openwrt-files/common-files/etc/model_database.conf#L165
Hi @ophub I checked the builds and it works but only on X88 Pro Pro X3 box with 100MB Ethernet I have a second X88 Pro Pro X3 with a 1GB Ethernet and on this box booting from eMMC does not work
To be 100% sure I created u-boot again taking the bootloader.bin
from the box with 1GB Ethernet and I tried many times unfortunately no success.
Is there any way to make it works, do you have any advice how I can start the Armbian from eMMC? How it is possible that box is starting from SD card and pendrive but it is not able to start from eMMC, maybe there is a way do do this?
Thanks in advance for your comments!
When booting from an SD card, it uses the bootloader from the eMMC. However, when you write to the eMMC, using the "-m yes" parameter overwrites the Android bootloader with the mainline u-boot. Therefore, when booting from the eMMC again, it requires the correct mainline u-boot.
Can your box with the Gigabit Ethernet card boot using the unmodified original u-boot? If it can, you can modify the configuration to have two lines, one for the 100MB and one for the Gigabit Ethernet, making it easier to differentiate. Please provide photos of the appearance and bottom model codes of your two boxes to help distinguish them. If you have photos of the motherboard, including the short-circuit rescue point, please provide those as well. If you have the Android system firmware, please provide a download link for others to test.
Hi @ophub !
When booting from an SD card, it uses the bootloader from the eMMC. However, when you write to the eMMC, using the "-m yes" parameter overwrites the Android bootloader with the mainline u-boot. Therefore, when booting from the eMMC again, it requires the correct mainline u-boot.
Thank you for the explanation - now it is clear :)
Can your box with the Gigabit Ethernet card boot using the unmodified original u-boot?
No, unfortunately I can not boot from eMMC on 1GB Ethernet version, I tried all the possibilities - no success :(
Please provide photos of the appearance and bottom model codes of your two boxes to help distinguish them.
Please see the photos below, the only difference I can see is in the Ethernet part:
If you have the Android system firmware, please provide a download link for others to test. Below is the link to Android system for 1GB version
https://drive.google.com/file/d/1H-bRELInEf1hTpEEKZr0Bc55-h3GiLJF/view?usp=drive_link
@ophub please let me know if you have any idea how we can boot this 1GB from eMMC. Thanks!
The kernel of version 6.1.y requires a correct u-boot bootloader. If the emmc is not working, further testing and adjustment of the u-boot are necessary.
I have one of this but it seems like has fake ram and after playing around with this a bit I got it stuck on boot. I still trying to understand if I can "unbrick", using android or any linux based distro. I was able to boot from the usb (not the sd card port) I am not sure how find the issue, but seems like something wrong with the emmc
I am wondering if this is not caused by different hardware I think mine has a different label
Is a bit strange because there no bad sectors but low level format reports errors
Hi Guys,
I've got a similar board, where the labels are the same on the main PCB, but this DTB did not have a good ethernet&BLE driver or memory size for me. All the other parts are OK.
However, when I tried the sei610.dtb version, it started perfectly for eth0 and BLE as well, but the memory size is still just half of the total. So I have remained on that dtb since I've spent a whole day playing with dts editing to get a working one based on this x88 version. I think my eth chip is only a 100M version and not a 1Gb one ... sadly.
I've checked the memory chips as well, there are 8 pieces from K4B4G0446D HYH9 which seems real for the 4GB RAM. I cannot figure out how to maximize the usage of all the mem chips. I have searched for ways to find config problems or anything limiting the RAM size but without any success.
When this issue is cleared I wish to move the system to the internal eMMC. Have you got any idea for this RAM mismatch?
Device Information | 设备信息
Armbian Version | 系统版本
Describe the bug | 问题描述
How can I share my dts/dtb to add this box to the supported devices? Any help how to fix reported problems below will be appreciated.
Please provide a detailed description of the issue and, if necessary, attach a screenshot.
I was able to run the lunar on mainline kernel 6.1.42 on X88 Pro Pro X3 4/128GB using my dtb file. I can share this file and we can add this box to supported devices list.
Almost all works correctly except the LED Screen Display, Bluetooth and eMMC Installation, but I can work on this.
LED Screen Display -> NOK
I tried to control the display according to the instruction led_screen_display_control.md but it doesn't work, the error is:
Bluetooth -> NOK
It partly works but the pairing is not possible.
eMMC Installation -> NOK
after this, the box is not starting from eMMC
What works :)
SSH -> OK
HDMI -> OK
WiFi -> OK
Ethernet -> OK
USB -> OK
Home Assistant Supervisor -> OK
to support docker cgroup v1 I added
systemd.unified_cgroup_hierarchy=0
parameter setting in cmdline thanks for the description How to Modify cmdline Settings :+1:aditonally to solve this
I added this to the Linux kernel boot parameters
apparmor=1 security=apparmor
and now it is OK
The pictures of the board
Thanks :heart:
@ophub you are my hero :)
Any tips how to fix problems (installation on eMMC, LED Screen Display and BT) will be appreciated :+1: