Closed taras-filatov closed 3 weeks ago
https://github.com/unifreq/linux-6.1.y/blob/main/arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts
The meson-sm1-sei610.dts
is a generic file provided by the kernel source, and it is used by many DTS applications. It is not recommended to modify it directly. Instead, you can generate a new DTS file based on this one. For example, as shown in meson-sm1-x96-max-plus-q2.dts
, you can include an existing file and rewrite the sections that differ to create a new DTS file with a different name. It is recommended to create a new file in this manner, perhaps naming it meson-sm1-x96-max-plus-a100.dts
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/dts-v1/;
#include "meson-sm1-sei610.dts"
/ {
compatible = "x96-max-a100", "amlogic,sm1";
model = "X96 MAX+ A100";
memory@0 {
device_type = "memory";
// reg = <0x0 0x0 0x0 0x40000000>;
linux,usable-memory = <0x0 0x100000 0x0 0xf0800000>;
};
};
meson-sm1-x96-max-plus-a100.zip
I tested the compilation, and it works fine. You can extract the files and upload the DTB file to the /boot/dtb/amlogic/
directory of the Armbian system. Then, modify the DTB name in /boot/uEnv.txt
to meson-sm1-x96-max-plus-a100.dtb
, and try rebooting.
yep... "#include" is good idea, when working in large source tree, like openwrt. I do so there while building for modded tplinks. But, I see, you added new model, thanks! Vanilla dtc (from my debian, or maked by me now from git.kernel.org source) cannot cope with #include directive in any way...
Oh, I find it, dts with #include should be preprocessed first with cpp (hope, you know it, I had not)
cpp -nostdinc -I include -I arch -undef -x assembler-with-cpp meson-sm1-x96-max-plus-a100.dts meson-sm1-x96-max-plus-a100.dts.preprocessed
dtc -I dts -O dtb -o meson-sm1-x96-max-plus-a100.dtb meson-sm1-x96-max-plus-a100.dts.preprocessed
And in any case file you send (dtb) still has limit to 1G. And it's because that in order to vanish reg parameter from memory@0 clause original clause (memory@0) shold be deleted first with /delete-node/. So we have:
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2024 taras-filatov, unifreq.
*/
/dts-v1/;
#include "meson-sm1-sei610.dts"
/ {
compatible = "x96-max-a100", "amlogic,sm1";
model = "X96 MAX+ A100";
/delete-node/ memory@0;
memory@0 {
device_type = "memory";
// reg = <0x0 0x0 0x0 0x40000000>;
linux,usable-memory = <0x0 0x100000 0x0 0xf0800000>;
};
};
all fine now. Thank you!
Take a screenshot of the terminal information page where the correctly recognized memory size can be seen.
Take photos of the box, both front and back, and share them.
Does your A100 have an Android system? If so, please provide a download link, and I will save a copy.
Thank you for sharing, the file has been added to the upstream kernel repository.
Photos... Actually my model is "X96Max+ A100", and really corrrespond to described in mode_database.inf, and looks like on photos here https://github.com/ophub/amlogic-s9xxx-armbian/issues/779/ but ok...
Screenshots -- harder, my hdmi is burned out, and I still do not know, how to fire up cvbs on armbian/openwrt. I hope you're really do not want them, but info from device. So I attach logs with android boot and with openwrt boot. android.log openwrt.log
Android --- yes, present. Now is mod by Slimboxtv.ru" based on original fw (only one variant of original i know, available there too). this is "X96Max Plus" page https://slimboxtv.ru/x96max-plus/ here (russian) -- info about detection of modification/variant https://4pda.to/forum/index.php?showtopic=1013103&st=40#entry102780026/ so my var is A100... official fw https://disk.yandex.ru/d/rWmujBT9io2wag/ current slimboxtv 9 fw ATV/AOSP https://disk.yandex.ru/d/lr_HyGGilnzDzw/
don't close thread, I'll check one issue...
Oh! I see, source dtb (meson-sm1-sei610.dtb) is changed. In compare with mine, from your pre-latest release. The main issue is ok -- memory limit removed. But now besides other things, changed paths to wifi devices.... But warnings of dts while decompilng is reduced too.
So that's all, problem solved. Thank you!
Device Information | 设备信息
Issue about corresponding dtb. From model_database.conf: my model: 505 :X96-Max+_A100 my SoC: s905x3 my fdt file: meson-sm1-sei610.dtb
I noticed, that in openwrt/armbian with that dtb (meson-sm1-sei610.dtb) all running good, but available ram less than 1GB. Hardware -- 4GB
in meson-sm1-sei610.dtb decompiled memory description:
thus limiting ram to 1073741824 bytes, 1G.
I extract and decompile dtb from firmware. There are 3 dtb's in one, Amlogic multi dtb. Bootloader make desision while boot and select variant 2 (from 0-1-2):
In that variant:
Same way of memory description is in other dtb's in this bundle, and in dtb's from official armbian, LibreELEC, CoreELEC: defined only linux,usable_memory (memory reservation for kernel recovery purposes, afaik)
And only in device tree from running Android system (not extracted from blob, but from runnning /proc filesystem) we see info about ram size:
It looks lite there is no need to hardcode RAM size in dtb -- system add it for application usage. All difference withing dtb's now is linux,usable-memory. in meson-sm1-sei610.dtb it equals to my orig dtb. But actually it can be ommited as I see no realisation of kernel recovery....
I propose corrected dtb -- without limit of RAM (reg record), hope you add it to build.
meson-sm1-sei610-fullram.dtb.gz meson-sm1-sei610-fullram.dts.gz