Hi all,

After commit 986d9deb3b24bc72e9e7ecf93affbc3f188bb926 ("build: allow calling append-dtb from image build commands"), layerscape targets do not build correctly anymore.

The failure is on DTB compilation, where an attempt is made to place the DTB in a non-existent path:

make[5]: Entering directory '/home/matt/lede-source/target/linux/layerscape/image'
make[5]: Nothing to be done for 'compile'.
aarch64-openwrt-linux-musl-cpp -nostdinc -x assembler-with-cpp -I/home/matt/lede-source/build_dir/target-aarch64_generic_musl/linux-layerscape_armv8_64b/linux-4.9.58/arch/arm64/boot/dts -I/home/matt/lede-source/build_dir/target-aarch64_generic_musl/linux-layerscape_armv8_64b/linux-4.9.58/arch/arm64/boot/dts/include -I/home/matt/lede-source/build_dir/target-aarch64_generic_musl/linux-layerscape_armv8_64b/linux-4.9.58/include/ -undef -D__DTS__ -o /home/matt/lede-source/build_dir/target-aarch64_generic_musl/linux-layerscape_armv8_64b/image-../../../arm64/boot/dts/freescale/fsl-ls1043a-rdb-sdk.dtb.tmp /home/matt/lede-source/build_dir/target-aarch64_generic_musl/linux-layerscape_armv8_64b/linux-4.9.58/arch/arm64/boot/dts/../../../arm64/boot/dts/freescale/fsl-ls1043a-rdb-sdk.dts cc1: fatal error: opening output file /home/matt/lede-source/build_dir/target-aarch64_generic_musl/linux-layerscape_armv8_64b/image-../../../arm64/boot/dts/freescale/fsl-ls1043a-rdb-sdk.dtb.tmp: No such file or directory
compilation terminated.
Makefile:112: recipe for target '/home/matt/lede-source/build_dir/target-aarch64_generic_musl/linux-layerscape_armv8_64b/image-../../../arm64/boot/dts/freescale/fsl-ls1043a-rdb-sdk.dtb' failed

image.mk wants the compiled DTB to be at $(KDIR)/image-$(DEVICE_DTS).dtb, but this does not work on arm64 targets, as the boot/dts structure is organized by vendor, i.e arch/arm64/boot/dts/freescale,..boot/dts/marvell/ etc, instead of having everything in one directory like arch/arm/boot/dts/

I have managed to work around this by setting under the (target/layerscape/image.mk) Device/default:

  DEVICE_DTS_DIR := $(LINUX_DIR)/arch/arm64/boot/dts/freescale
  DTS_DIR := $$(DEVICE_DTS_DIR)

And for each target:
        DEVICE_DTS = fsl-ls1043a-rdb-sdk
        DEVICE_DTS = fsl-ls1046a-rdb-sdk

(I tried DEVICE_DTS = freescale/fsl-ls1043a-rdb-sdk but this also fails, it tries to generate build_dir/target-aarch64_generic_musl/linux-layerscape_armv8_64b/image-freescale/fsl-ls1043a-rdb-sdk.dtb.tmp )

I'm not sure setting DEVICE_DTS_DIR and DTS_DIR to point to dts/freescale is the best approach, yet alone the need to force the path to be under $(LINUX_DIR).

Does anyone have suggestions on how this could be (better) handled?

Regards,
Matt



_______________________________________________
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev

Reply via email to