overlays


g00d
 Share

0

Recommended Posts

Hello all,

 

my boot partition contains following file structure:


# ls -lh
insgesamt 20M
drwxr-xr-x 3 root root 4,0K 11. Nov 16:27 ./
drwxr-xr-x 3 root root 4,0K 16. Nov 09:24 ../
-rw-r--r-- 1 root root  38K  8. Okt 22:10 boot.bmp
-rw-r--r-- 1 root root  14K 27. Okt 16:52 boot.ini
lrwxrwxrwx 1 root root   21  8. Okt 22:10 dtb -> dtb-5.4.151-odroidxu4/
drwxr-xr-x 3 root root 4,0K  8. Okt 22:10 dtb-5.4.151-odroidxu4/
-rw-r--r-- 1 root root    0  8. Okt 22:10 .next
lrwxrwxrwx 1 root root   25 27. Okt 16:58 uInitrd -> uInitrd-5.4.151-odroidxu4
-rw-r--r-- 1 root root  13M 27. Okt 16:58 uInitrd-5.4.151-odroidxu4
-rwxr-xr-x 1 root root 7,0M  8. Okt 21:52 vmlinuz-5.4.151-odroidxu4*
lrwxrwxrwx 1 root root   25  8. Okt 22:10 zImage -> vmlinuz-5.4.151-odroidxu4*

 

# ls -lh dtb-5.4.151-odroidxu4/*


-rw-r--r-- 1 root root  41K  8. Okt 21:52 dtb-5.4.151-odroidxu4/exynos3250-artik5-eval.dtb
-rw-r--r-- 1 root root  52K  8. Okt 21:52 dtb-5.4.151-odroidxu4/exynos3250-monk.dtb
-rw-r--r-- 1 root root  57K  8. Okt 21:52 dtb-5.4.151-odroidxu4/exynos3250-rinato.dtb
-rw-r--r-- 1 root root  59K  8. Okt 21:52 dtb-5.4.151-odroidxu4/exynos4210-origen.dtb
-rw-r--r-- 1 root root  56K  8. Okt 21:52 dtb-5.4.151-odroidxu4/exynos4210-smdkv310.dtb
-rw-r--r-- 1 root root  61K  8. Okt 21:52 dtb-5.4.151-odroidxu4/exynos4210-trats.dtb
-rw-r--r-- 1 root root  63K  8. Okt 21:52 dtb-5.4.151-odroidxu4/exynos4210-universal_c210.dtb
-rw-r--r-- 1 root root 100K  8. Okt 21:52 dtb-5.4.151-odroidxu4/exynos4412-i9300.dtb
-rw-r--r-- 1 root root 100K  8. Okt 21:52 dtb-5.4.151-odroidxu4/exynos4412-i9305.dtb
-rw-r--r-- 1 root root  74K  8. Okt 21:52 dtb-5.4.151-odroidxu4/exynos4412-itop-elite.dtb
-rw-r--r-- 1 root root  97K  8. Okt 21:52 dtb-5.4.151-odroidxu4/exynos4412-n710x.dtb
-rw-r--r-- 1 root root  72K  8. Okt 21:52 dtb-5.4.151-odroidxu4/exynos4412-odroidu3.dtb
-rw-r--r-- 1 root root  72K  8. Okt 21:52 dtb-5.4.151-odroidxu4/exynos4412-odroidx2.dtb
-rw-r--r-- 1 root root  72K  8. Okt 21:52 dtb-5.4.151-odroidxu4/exynos4412-odroidx.dtb
-rw-r--r-- 1 root root  71K  8. Okt 21:52 dtb-5.4.151-odroidxu4/exynos4412-origen.dtb
-rw-r--r-- 1 root root  63K  8. Okt 21:52 dtb-5.4.151-odroidxu4/exynos4412-smdk4412.dtb
-rw-r--r-- 1 root root  62K  8. Okt 21:52 dtb-5.4.151-odroidxu4/exynos4412-tiny4412.dtb
-rw-r--r-- 1 root root 100K  8. Okt 21:52 dtb-5.4.151-odroidxu4/exynos4412-trats2.dtb
-rw-r--r-- 1 root root  62K  8. Okt 21:52 dtb-5.4.151-odroidxu4/exynos5250-arndale.dtb
-rw-r--r-- 1 root root  58K  8. Okt 21:52 dtb-5.4.151-odroidxu4/exynos5250-smdk5250.dtb
-rw-r--r-- 1 root root  63K  8. Okt 21:52 dtb-5.4.151-odroidxu4/exynos5250-snow.dtb
-rw-r--r-- 1 root root  63K  8. Okt 21:52 dtb-5.4.151-odroidxu4/exynos5250-snow-rev5.dtb
-rw-r--r-- 1 root root  60K  8. Okt 21:52 dtb-5.4.151-odroidxu4/exynos5250-spring.dtb
-rw-r--r-- 1 root root  23K  8. Okt 21:52 dtb-5.4.151-odroidxu4/exynos5260-xyref5260.dtb
-rw-r--r-- 1 root root  44K  8. Okt 21:52 dtb-5.4.151-odroidxu4/exynos5410-odroidxu.dtb
-rw-r--r-- 1 root root  33K  8. Okt 21:52 dtb-5.4.151-odroidxu4/exynos5410-smdk5410.dtb
-rw-r--r-- 1 root root  78K  8. Okt 21:52 dtb-5.4.151-odroidxu4/exynos5420-arndale-octa.dtb
-rw-r--r-- 1 root root  86K  8. Okt 21:52 dtb-5.4.151-odroidxu4/exynos5420-peach-pit.dtb
-rw-r--r-- 1 root root  72K  8. Okt 21:52 dtb-5.4.151-odroidxu4/exynos5420-smdk5420.dtb
-rw-r--r-- 1 root root  81K  8. Okt 21:52 dtb-5.4.151-odroidxu4/exynos5422-odroidhc1.dtb
-rw-r--r-- 1 root root  87K  8. Okt 21:52 dtb-5.4.151-odroidxu4/exynos5422-odroidxu3.dtb
-rw-r--r-- 1 root root  87K  8. Okt 21:52 dtb-5.4.151-odroidxu4/exynos5422-odroidxu3-lite.dtb
-rw-r--r-- 1 root root  86K  8. Okt 21:52 dtb-5.4.151-odroidxu4/exynos5422-odroidxu4.dtb
-rw-r--r-- 1 root root  87K  8. Okt 21:52 dtb-5.4.151-odroidxu4/exynos5800-peach-pi.dtb

dtb-5.4.151-odroidxu4/overlays:
insgesamt 40K
-rw-r--r-- 1 root root 1,7K  8. Okt 21:52 ads7846.dtbo
-rw-r--r-- 1 root root 1,3K  8. Okt 21:52 hktft32.dtbo
-rw-r--r-- 1 root root 1,8K  8. Okt 21:52 hktft35.dtbo
-rw-r--r-- 1 root root 1,5K  8. Okt 21:52 hktft-cs-ogst.dtbo
-rw-r--r-- 1 root root  224  8. Okt 21:52 i2c0.dtbo
-rw-r--r-- 1 root root  226  8. Okt 21:52 i2c1.dtbo
-rw-r--r-- 1 root root  417  8. Okt 21:52 onewire.dtbo
-rw-r--r-- 1 root root  691  8. Okt 21:52 spi0.dtbo
-rw-r--r-- 1 root root  792  8. Okt 21:52 sx865x-i2c1.dtbo
-rw-r--r-- 1 root root  227  8. Okt 21:52 uart0.dtbo

 

 

the boot.ini contains following part:

 


if test "${cs2enable}" = "true"; then
    fdt resize 8192

    setenv overlays "i2c0 i2c1 hktft-cs-ogst"
    for overlay in ${overlays}; do
        ext4load mmc 0:1 0x60000000 /boot/dtb/overlays/${overlay}.dtbo
        fdt apply 0x60000000
    done
fi

 

can anyone explain to me in simple words what these overlays are good for? are they needed, what is their job? I tried commenting out the line here


#        ext4load mmc 0:1 0x60000000 /boot/dtb/overlays/${overlay}.dtbo

and the system still booted normally without any noticeable difference during boot and operation. Can anyone shed some light onto, please? thanks

Link to post
Share on other sites

Armbian is a community driven open source project. Do you like to contribute your code?

Hi tparys,

 

thanks for the link that was kinda helpful but I still have some questions. As I showed in my initial posting my boot.ini loads three overlay files when variable cs2enable is set to true. Those three overlay are

setenv overlays "i2c0 i2c1 hktft-cs-ogst"

 

A) how do I know what these overlay are good for and used for? The default boot.ini does NOT load them. They are loaded only if I set cs2enable=true, the comments in boot.ini says that this is only needed when using a CloudShell2 enclosure to enable TFT LCD and FAN control via i2c bus. Well, in my case I don't have a CloudShell2 because I am using simply a ODROID-HC2 (equivalent to odroidxu4 board). If understood correctly I can leave cs2enable to default setting "false" and thus don't need loading those overlay. Is this correct?

 

B) the boot.ini of my ODROID-HC2 installation does not match any more lines with search pattern "overlay". Does that mean that none of the rest overlay files are important in my case?

 

dtb-5.4.151-odroidxu4/overlays:
insgesamt 40K
-rw-r--r-- 1 root root 1,7K  8. Okt 21:52 ads7846.dtbo
-rw-r--r-- 1 root root 1,3K  8. Okt 21:52 hktft32.dtbo
-rw-r--r-- 1 root root 1,8K  8. Okt 21:52 hktft35.dtbo
-rw-r--r-- 1 root root 1,5K  8. Okt 21:52 hktft-cs-ogst.dtbo
-rw-r--r-- 1 root root  224  8. Okt 21:52 i2c0.dtbo
-rw-r--r-- 1 root root  226  8. Okt 21:52 i2c1.dtbo
-rw-r--r-- 1 root root  417  8. Okt 21:52 onewire.dtbo
-rw-r--r-- 1 root root  691  8. Okt 21:52 spi0.dtbo
-rw-r--r-- 1 root root  792  8. Okt 21:52 sx865x-i2c1.dtbo
-rw-r--r-- 1 root root  227  8. Okt 21:52 uart0.dtbo

 

- how do I know what the rest of the overlays are good for? I wasn't able to find any hint in the link you posted or on the comments. There is also no README.<soc-id>-overlays on my installation under /boot/dtb/overlay/ (32-bit SoCs) or /boot/dtb/allwinner/overlay/ (64-bit SoCs) and this link doesn't reveal any information about the overlays and what they are useful for for which boards, etc. Can anyone tell me please, which overlays are possibly interesting for the ODROID-HC2 ?

 

thanks to all!

Link to post
Share on other sites

At a glance, overlays are "patches" to the kernel Device Tree, which tells the kernel what hardware is available.

 

For example, it's helpful to do these sorts of things:

  1. Select the intended purpose of a multifunction pin on a ARM SoC
  2. Tell the kernel to use a PWM output as a fan, and how to use it to cool the system
  3. Tell the kernel to load an RTC device on an I2C bus, not native to the board

In this case, those are probably activating kernel support for the devices present in your Cloudshell.

 

USB is plug and play. I2C and SPI are not.

 

So if you're curious what the other overlays are, decompile them with dtc. The man pages will tell you how to use it.

Link to post
Share on other sites

thanks for all the information provided. Honestly said I am not familiar in decompiling and reading such code. If anyone else can provide some more answers to my previous questions related to the ODROID-HC2 board in this matter, please let me know. Thanks in advance.

 

As I am not using a special housing like cloudshell and unless there is no advantage,  I will leave the settings cs2 to default off so the mentioned overlay are not loaded at system boot.

Link to post
Share on other sites

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...
 Share

0