Custom device tree - make can't find target

I have a custom dts that I want to compile. Referencing your “Build U-Boot and Linux Kernel from Source Code” and “Device Tree Customization” documents, I simply want to do similar to this:

oe-core/build/tmp-glibc/work-shared/colibri-imx7/kernel-source/arch/arm/boot/dts$ make imx7d-colibri-aster.dtb

but it reponds with “No rule to make target”. (I have my own dts for and added it into the Makefile, but I figure any existing target in the file should work)

I’ve also already looked at: iMX6DL customized device tree compile - Technical Support - Toradex Community, which describes a user with the same make-related problem.

As pointed out in that post, I made sure to use your steps to get the latest compiler:
Toolchain for Hard Float Calling Convention
Beginning with image 2.7b2, as part of our OpenEmbedded Morty update we transitioned to using version 6.2 of the gcc compiler. Linaro releases well tested binary toolchains which can be used to cross compile software for our modules (choose gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf.tar.xz):
https://releases.linaro.org/components/toolchain/binaries/6.2-2016.11/arm-linux-gnueabihf/

But then here is another statement just below this in your instructions. I’m confused if I needed the above compiler anyway:
"Alternatively, if you did an OpenEmbedded build, you can use the toolchain generated as part of the build by entering the following:
export ARCH=arm
export PATH=~/oe-core/build/tmp-glibc/sysroots/x86_64-linux/usr/bin:~/oe-core/build/tmp-glibc/sysroots/x86_64-linux/usr/bin/arm-angstrom-linux-gnueabi/:$PATH
export CROSS_COMPILE=arm-angstrom-linux-gnueabi-
"

Here is my environment:

dtc -v
Version: DTC 1.4.0

echo $ARCH
arm

echo $PATH
/home/carloval/oe-core/build/tmp-glibc/sysroots/x86_64-linux/usr/bin:/home/carloval/oe-core/build/tmp-glibc/sysroots/x86_64-linux/usr/bin/arm-angstrom-linux-gnueabi/:/home/carloval/gcc-linaro/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

echo $CROSS_COMPILE
arm-angstrom-linux-gnueabi-

What have I done wrong?

Hi

The kernel make system requires you to run it from the kernel source tree’s root directory. e.g. try:

cd oe-core/build/tmp-glibc/work-shared/colibri-imx7/kernel-source/
make imx7d-colibri-aster.dtb

Max

P.S.:

Note that the using OE’s tmp-glibc/work* directories are quite volatile. Any develpement done with these source filesr may be (or may not be) overwritten at the next run of bitbake. You put yourself on more stable ground by checking out the kernel sources somewhere else. E.g. check this developer page for a kernel development workflow.