Device tree overlays on VIM4

On VIM3 there is a /boot/env.txt file where you can enable and disable different modules defined in Device Tree Overlays. I have compiled an image for VIM4 using fenix and there is no /boot/env.txt file. I can see that there still is no documentation for the Device Tree Overlay for VIM4, but I found that there are some Device Tree Overlays defined for VIM4 here: khadas-linux-kernel-dt-overlays/overlays/vim4/5.4 at main · khadas/khadas-linux-kernel-dt-overlays · GitHub. Is use of Device Tree Overlay not supported on VIM4 yet?


Might have to enable device tree overlay support in the kernel config and try that. We stopped testing the VIM4 and did not get that far into it. This is just a guess.

It is supported now we will release the documentation soon, the confiuration file now is /boot/dtb/amlogic/kvim4.dtb.overlay.env, you can add overlays to node fdt_overlays=

Thank you for the reply. I don’t seem to have that file in my image. The parameters defined in my fenix build is:

Fenix Version:         1.1.1
Khadas Board:          VIM4
Uboot Version:         2019.01
Uboot Configuration:   kvim4_defconfig
Uboot Branch:          khadas-vims-v2019.01
Linux Version:         5.4
Linux Configuration:   kvims_defconfig
Linux DTB:             arch/arm64/boot/dts/amlogic/kvim4.dtb
Linux Branch:          khadas-vims-5.4.y
Distribution:          Ubuntu
Distribution Release:  jammy
Distribution Type:     minimal
Distribution Arch:     arm64
Install Type:          EMMC

I tried adding BOOT_ENV_FILE=“VIM4_env_ext.txt” to fenix/config/boards/VIM4.conf and adding a VIM4_env_ext.txt to fenix/config/bootenv and this gives me a /boot/env.txt file, but the overlays are not enabled. My goal is to enable i2cm_a, i2cm_f uart_e and pwm_f.

If you build image yourself you need to use the latest code from GitHub.

Fenix is syncing against github using the branch: GitHub - khadas/linux at khadas-vims-5.4.y. Is this correct or am I missing something? Do I need to manually enable device tree overlay support in the kernel config as @foxsquirrel mentions?

Are you building server or desktop? Believe it was on master. I did a git pull and it was up to date so I deleted the tree and recloned. Built a server option 1 and 3 jammy and it did not have any code in the server version, uenv.txt file for the dt overlays. I will look at it again tonite and see if it is in desktop.

I am building minimal and jammy. Maybe the minimal option is the problem? I will delete everything tomorrow and try it again. Thanks.

Minimal image will not have such support, please use server image.

1 Like

Thanks, switching to server image solved the issue.