Many boards like the Odroid-C2 come with optional add on boards. E.g. for the Odroid C2 there is an RTC module. The overlays can be applied by U-Boot using the 'fdt apply' command. For successful application of device tree overlays the dtb files must be built with the environment variable DTC_FLAGS='-@'. This flag adds a __symbols__ section to the dtb file. Unfortunately the flag '-@' is not set for packages linux-image-arm64 and linux-image-armhf. Pleae, adjust the build rules. Best regards Heinrich Schuchardt
Hello, I realise this is quite an old bug, but it would still be of interest to me to get this enabled. The -@ option will increase the size of the compiled device tree blobs somewhat, but on the flipside, u-boot-menu's device tree overlay functionality will actually be useful. In my case, I'm interested in this for PINE64's Quartz64 lineup of ARM devices. Since these are development boards that expose non-enumerating protocols like I2C and SPI, the use of device tree overlays is pretty much required to add additional modules to the board. Kind regards, Nicolas Frattaroli
the menu's The increase is around 30% in average. For the linux-image-6.1.0-10- arm64, we have around 30MB of dtb files (uncompressed). By that, the package would grow by 10MB (uncompressed) or even less when compressed. ARM enumerating On many (if not most) arm based boards, these device tree overlays are very useful. There are also many kernel patches about enabling the symbol support on a per-device basis. However, kernel devs seem to have some mixed feelings about that. A proposed solution is to enable this at distro level [1]. @Ben: Would it be an accepted solution to enable the DTC_FLAGS += -@ for all armhf, armmp, arm64 and riscv devices? Felix [1] https://www.spinics.net/lists/devicetree/msg622660.html
I'm not a kernel maintainer, but I wouldn't expect it to be applied to Debian's Stable kernel, ie the 6.1 series. (Consequently it sounds like a bad idea if Debian would do it) https://lore.kernel.org/all/20220328000915.15041-1-ansuelsmth@gmail.com/ was a renewed attempt at restructuring the various .dts* into vendor directories and with 6.5 that got merged into the upstream kernel. And (AFAIUI) that was seen as a prerequisite to start enabling the "-@" flag on a vendor/directory level, with optionally a subselection if it didn't make sense to enable it for all boards ... pretty much (exactly) as you proposed. Doing it at the distro level was rejected (at least for Debian) with the argument that it should be done upstream. As there is some (?) coordination/synchronization wrt DeviceTrees between the upstream kernel and u-boot, that also seems required for the functionality quoted at the top of this email. You mentioned you proposed it for RISC-V boards and some DDs proposed it for RPi boards and both got accepted. I think/expected that we would see (many?) more such patches getting accepted going forward now that the above mentioned dts directory restructuring has taken place. IOW: I agree with the reasoning you brought up in your patch submission thread and keep targeting inclusion in the upstream kernel. Cheers, Diederik
Control: tags -1 + moreinfo Was there progress here, or what should we further do? If it's not something which is going to land upstream then I would suggest that we close the bug. Regards, Salvatore
That's quite an old one... Upstream still only enables the symbol flag on a per device basis, but for most (all?) relevant boards we now have it. Note, this is only fixed for Trixie (6.12) and bookworm backports kernels, as these kind of patches are not backported. Anyways, feel free to close this. Felix
me@pc:~/dev/kernel.org/linux$ grep -rn "DTC_FLAGS" arch/arm*/boot/dts/ | grep "\-@" But AFA*I*CT, it has not been enabled for the Odroid C2 or for PINE64's Quartz64 lineup of ARM devices, which were the explicit and targeted requests that were made. But I'm not an expert and I don't even fully understand how it can/should work. ``arch/arm64/boot/dts/rockchip/Makefile`` has this: # This will make the <base>.dtb have symbols (like when DTC_FLAGS has -@ passed) # and generate a new DTB (<overlay-application-test>.dtb) which is the # result of the application of <overlay-1>.dtbo and other listed overlays on top # of <base>.dtb. which seems to imply that it can also be enabled in a different way (then ``-@``) and IIRC it was 'inspired' by what some other subsystem did, but I don't recall which that was. So while the above mentioned ``grep`` statement had 87 results, it *may* be available on more boards. What the Debian kernel team does, is up to them. This and my previous reply to this bug was to provide more info to the best of *my* knowledge. Cheers, Diederik