Jump to content

Recommended Posts

Posted

Hi @KrzyPacu

 

I can only provide basic instructions without any support regarding loading overlays. It's not supported on every device (and I personally don't own a device which supports this). You can always search for other posts on device tree overlay for your device if you absolutely want to use overlays.

 

Though, you can easily embed the device tree overlay into your dtb instead. This is what I do personally.

 

You can check instructions of Option 2: Create an updated dtb at https://github.com/jefflessard/tm16xx-display/blob/main/README.md#configure-the-device-tree

Posted (edited)

$ make meson-sm1-x96-air-gbit_mod.dtb ORIGINAL_DTB=meson-sm1-x96-air-gbit.dtb
make: *** No rules for object execution 'meson-sm1-x96-air-gbit_mod.dtb'. Stop.

https://github.com/jefflessard/tm16xx-display/blob/main/README.md#configure-the-device-tree

I can't do option 1 because I don't have the "/boot/armbianEnv.txt" file .

Where do I add the entry "user_overlays=tm16xx"

Edited by KrzyPacu
Posted

@KrzyPacu

Start by copying your original dtb into tm16xx-display folder:

 

cd tm16xx-display

cp meson-sm1-x96-air-gbit.dtb original.dtb

# or alternatively run: make extract-dtb

 

Then, assuming the corresponding device tree source overlay in the "devices" subfolder is "x96-max-1gbit.dtso", build the updated dtb:

 

make x96-max-1gbit.dtb # <-- same name as the dtso file in devices subfolder but with dtb extension

 

Finally, replace the original dtb of your boot path with the updated one (first keep a copy of your original dtb somewhere else, just in case) and reboot:

 

cp release/x96-max-1gbit.dtb /boot/dtb/{YOUR_DTB_PATH}.dtb

reboot

 

Posted

@KrzyPacu  The Amlogic TV Box builds use extlinux.conf.  So you should add your overlay info in that file (/boot/extlinux/extlinux.conf).

I believe the syntax for extlinux is:

OVERLAYS /dtb/amlogic/overlay/...

(I'd recommend placing it just below the FDT line)

(Note: I've never tried to load an overlay through extlinux, but have been intending to try it some day.  Let us know how it goes)

Posted

I managed to build "meson-sm1-x96-air-gbit.dtb" using the method described by @Jean-Francois Lessard but I haven't added anything to the "extlinux.conf" file yet.

Then I issued the command "$ make module" and it seems to me that the compilation went correctly.

Then I did "$ sudo make module-install" and here are the errors:

 

$ sudo make module-install
make -C /lib/modules/6.12.33-current-meson64/build M= modules_install INSTALL_MOD_PATH=/
make[1]: Enter the directory '/usr/src/linux-headers-6.12.33-current-meson64'
  SYMLINK //lib/modules/6.12.33/build
make[3]: *** No rules to make an object 'modules.order', required by '//lib/modules/6.12.33/modules.order'. Stop.
make[2]: *** [/usr/src/linux-headers-6.12.33-current-meson64/Makefile:1853: modules_install] Error 2
make[1]: *** [Makefile:224: __sub-make] Error 2
make[1]: Leaving the directory '/usr/src/linux-headers-6.12.33-current-meson64'
make: *** [Makefile:35: module-install] Error 2

 

Posted

@KrzyPacu it seems there is an issue with your kernel source code (or minimal headers).

 

Ensure to install kernel headers for your distribution/version first 

 

If it still doesn't point to your headers/source path, you can pass it as a variable when executing make. Something like:

 

sudo make module-install KDIR=/path/to/your/headers/build

Posted

Nothing helped so I reinstalled the system.

Can you tell me now how and what I should install.

Up until now I installed the kernel headers via armbian-config.

But maybe there is a better way?

Posted

Looking back at your previous output, I've just noticed something wrong. I've should have seen it first instead of pointing you to kernel headers issue.

 

13 hours ago, KrzyPacu said:
make -C /lib/modules/6.12.33-current-meson64/build M= modules_install

 

Here M should be pointing to your path to the tm16xx-display folder. I think the PWD environment variable is affected by sudo.

 

You can specify the PWD variable explicitly when calling make:

 

sudo make PWD=$(pwd) module-install

 

That should make it.

 

 

Posted

I managed to install it but the display doesn't work.

 

# display-utils -c
cat: /sys/class/leds/display/num_digits: There is no such file or directory
# display-utils -a
cat: /sys/class/leds/display/num_digits: There is no such file or directory

 

Posted (edited)

# modprobe -r tm16xx
modprobe: ERROR: ../libkmod/libkmod-module.c:856 kmod_module_remove_module() could not remove 'tm16xx': Device or resource busy
# dmesg

# modprobe tm16xx

# modprobe -r tm16xx
modprobe: ERROR: ../libkmod/libkmod-module.c:856 kmod_module_remove_module() could not remove 'tm16xx': Device or resource busy
 

 

Edited by KrzyPacu
Posted

There should have been an exception on first load that now prevent removing the module. You can force removal of the module but that can create unstable kernel side effects.

 

You are better to reboot the device (you may need to unplug power if kernel refuses to reboot). Then after boot, check dmesg kernel messages (do not clear them first!)

 

something like dmesg | grep tm16xx

Posted
# dmesg | grep tm16xx
[   21.189046] tm16xx: loading out-of-tree module taints kernel.
[   21.190997] tm16xx 1-0024: Failed to set brightness: -6
[   21.194407] tm16xx 1-0024: Failed to initialize display: -6

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines