u-boot 2017 has a serious problem with fdt, and has dependencies with a host library, specifically it conflicts with
/usr/include/fdt.h
/usr/include/libfdt_env.h
/usr/include/libfdt.h
it "worked" until 2018 with u-boot 2017, but as soon as you update the "dtc" package (1) host files conflict with local definitions. U-boot is written this way, and it's not exactly easy to solve it.
Some improvements come with recent releases, but to make things ever worse, Denx has discontinued support for all the PowerPC chips I need, and I cannot move to anything more updated: I have to stay with u-boot 2017, it's the last stop.
I have already moved to u-boot-2021/ARM for new projects, but I have to support some old PPC projects. I have a backup of what I did 5 years ago, and I still have a VM ready to run, but I'd like to move things to a current 2021 development baseline, if it doesn't take too much time.
I wonder: can I entirely remove the fdt support? For sure I don't need to *pass* any DTB to the kernel since I have already added special to include a copy of of the device tree blob.
The kernel is already OK, and happy with that, so literally all the files related to the "flat device tree" are a waste of time and space for the little flash that I have, that's why I'd like to rid off. Unfortunately there is no option in the .config to avoid to compile them.
You have to massively hack the code. Which is not unusual with u-boot, but getting rid of fdt looks more challenging.
Anyone has already tried to rid off fdt? In case, let me know
(1) "dtc" is a tool required to build device tree blobs; the package description is "
Open Firmware device tree compiler", see
here and
here