summaryrefslogtreecommitdiff
path: root/cmd/virtio.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-03-24 20:40:51 +0300
committerSimon Glass <sjg@chromium.org>2021-03-26 07:03:08 +0300
commit8490c578f4fa04e93cff220722b5ce3f7e756f62 (patch)
tree25c4aca2b2aad4c1ae2cba6d178e9c8269ae8c10 /cmd/virtio.c
parent13d71152f1e1323e0a5caf3a78b7a457fff58257 (diff)
downloadu-boot-8490c578f4fa04e93cff220722b5ce3f7e756f62.tar.xz
dtoc: Only generate the required files
At present all possible files are generated, even if some of them just have a header and an empty body. It is better to generate only the files that are needed, so that the two types of build (based on the setting of OF_PLATDATA_INST) can be mutually exclusive. This is intended to fix a strange problem sometimes found with CI: Building current source for 1 boards (1 thread, 40 jobs per thread) sandbox: + sandbox_spl +drivers/built-in.o: In function `dm_setup_inst': +drivers/core/root.c:135: undefined reference to `_u_boot_list_2_udevice_2_root' +dts/dt-uclass.o:(.u_boot_list_2_uclass_2_serial+0x10): undefined reference to `_u_boot_list_2_udevice_2_serial' ... This likely happens when switching from !OF_PLATDATA_INST to OF_PLATDATA_INST since running 'make xxx_defconfig" does not currently cause any change in which files are generated. With !OF_PLATDATA_INST the dt-device.c file has no declarations and this is assumed to be the starting state. The error above seems to indicate that, after changing to OF_PLATDATA_INST, the dt-uclass.c file is regenerated but the dt-device.c files is not. This does not seem possible from the relevant Makefile.spl rule: u-boot-spl-platdata := $(obj)/dts/dt-plat.o $(obj)/dts/dt-uclass.o $(obj)/dts/dt-device.o cmd_dtoc = $(DTOC_ARGS) -c $(obj)/dts -C include/generated all include/generated/dt-structs-gen.h $(u-boot-spl-platdata_c) &: \ $(obj)/$(SPL_BIN).dtb @[ -d $(obj)/dts ] || mkdir -p $(obj)/dts $(call if_changed,dtoc) It seems that this cannot regenerate dt-uclass.c without dt-device.c since 'dtoc all' is used. So here the trail ends for now. In any case it seems better to generate files that are uses and not bother with those that serve no purpose. So update dtoc to do this automatically. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'cmd/virtio.c')
0 files changed, 0 insertions, 0 deletions