poky.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
From: enok@lysator.liu.se
To: poky@lists.yoctoproject.org
Subject: Re: [PATCH] kernel-fitimage: dtb sections named by their filenames and one config section for each dtb
Date: Tue, 12 Mar 2024 03:52:44 -0700	[thread overview]
Message-ID: <4511.1710240764565121572@lists.yoctoproject.org> (raw)
In-Reply-To: <1489764783-11522-1-git-send-email-fw@javox-solutions.com>

[-- Attachment #1: Type: text/plain, Size: 4042 bytes --]

I added some .dtso overlay files to KERNEL_DEVICETREE in order to have them added to my fitimage file through the kernel-fitimage.class.

This seems to work, as long as corresponding .dtso files are added to the right subdir with SRC_URI in the linux kernel recipe. The dtbo becomes included in the fitimage. config sections are emitted.

However, the config sections in the fitimage become weird. One config section is emitted for each dtb or dtbo file. Does this make sense? Shouldn't there be one config section for each .dtb file, and then dtbo references be added to these sections? The most simple alternative would be to add every .dtbo file in KERNEL_DEVICETREE to ever .dtb config section, but probably there should be some way to select which overlays to add to each dtb.

It currently looks like this:
```
        configurations {
                default = "conf-rk3588s-rock-5a.dtb";
                conf-rk3588s-rock-5a.dtb {
                        description = "1 Linux kernel, FDT blob";
                        
                        kernel = "kernel-1";
                        fdt = "fdt-rk3588s-rock-5a.dtb";
                        
                        
                        
                        hash-1 {
                                algo = "sha256";
                        };
                };
                
                conf-rock-5a-radxa-camera-4k.dtbo {
                        description = "0 FDT blob";
                        
                        
                        fdt = "fdt-rock-5a-radxa-camera-4k.dtbo";
                        
                        
                        
                        hash-1 {
                                algo = "sha256";
                        };
                };
        };
```
but I would have expected it to look like this:
```
        configurations {
                default = "conf-rk3588s-rock-5a.dtb";
                conf-rk3588s-rock-5a.dtb {
                        description = "1 Linux kernel, FDT blob";
                        
                        kernel = "kernel-1";
                        fdt = "fdt-rk3588s-rock-5a.dtb", "fdt-rock-5a-radxa-camera-4k.dtbo";;
                        
                        
                        
                        hash-1 {
                                algo = "sha256";
                        };
                };
        };
```

As in this example from u-boot/doc/uImage.FIT/overlay-fdt-boot.txt:
```
	/dts-v1/;
	/ {
		images {
			kernel {
				data = /incbin/("./zImage");
				type = "kernel";
				arch = "arm";
				os = "linux";
				load = <0x82000000>;
				entry = <0x82000000>;
			};
			fdt-1 {
				data = /incbin/("./foo.dtb");
				type = "flat_dt";
				arch = "arm";
				load = <0x87f00000>;
			};
			fdt-2 {
				data = /incbin/("./reva.dtbo");
				type = "flat_dt";
				arch = "arm";
				load = <0x87fc0000>;
			};
			fdt-3 {
				data = /incbin/("./revb.dtbo");
				type = "flat_dt";
				arch = "arm";
				load = <0x87fc0000>;
			};
			fdt-4 {
				data = /incbin/("./bar.dtbo");
				type = "flat_dt";
				arch = "arm";
				load = <0x87fc0000>;
			};
			fdt-5 {
				data = /incbin/("./baz.dtbo");
				type = "flat_dt";
				arch = "arm";
				load = <0x87fc0000>;
			};
		};

		configurations {
			default = "foo-reva.dtb;
			foo-reva.dtb {
				kernel = "kernel";
				fdt = "fdt-1", "fdt-2";
			};
			foo-revb.dtb {
				kernel = "kernel";
				fdt = "fdt-1", "fdt-3";
			};
			foo-reva-bar.dtb {
				kernel = "kernel";
				fdt = "fdt-1", "fdt-2", "fdt-4";
			};
			foo-revb-bar.dtb {
				kernel = "kernel";
				fdt = "fdt-1", "fdt-3", "fdt-4";
			};
			foo-revb-baz.dtb {
				kernel = "kernel";
				fdt = "fdt-1", "fdt-3", "fdt-5";
			};
			foo-revb-bar-baz.dtb {
				kernel = "kernel";
				fdt = "fdt-1", "fdt-3", "fdt-4", "fdt-5";
			};
			bar {
				fdt = "fdt-4";
			};
			baz {
				fdt = "fdt-5";
			};
		};
	};
```

[-- Attachment #2: Type: text/html, Size: 4775 bytes --]

      reply	other threads:[~2024-03-12 10:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-17 15:33 [PATCH] kernel-fitimage: dtb sections named by their filenames and one config section for each dtb Florian Wickert
2024-03-12 10:52 ` enok [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4511.1710240764565121572@lists.yoctoproject.org \
    --to=enok@lysator.liu.se \
    --cc=poky@lists.yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).