Building the kernel requires you to specify the architecture for which it is built, as well as the compiler. That said, it is not necessary for a native build:
ARCH=arm make imx_v6_v7_defconfig
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make zImage -j16
After that, you will see something like:
[...]
LZO arch/arm/boot/compressed/piggy_data
CC arch/arm/boot/compressed/misc.o
CC arch/arm/boot/compressed/decompress.o
CC arch/arm/boot/compressed/string.o
SHIPPED arch/arm/boot/compressed/hyp-stub.S
SHIPPED arch/arm/boot/compressed/lib1funcs.S
SHIPPED arch/arm/boot/compressed/ashldi3.S
SHIPPED arch/arm/boot/compressed/bswapsdi2.S
AS arch/arm/boot/compressed/hyp-stub.o
AS arch/arm/boot/compressed/lib1funcs.o
AS arch/arm/boot/compressed/ashldi3.o
AS arch/arm/boot/compressed/bswapsdi2.o
AS arch/arm/boot/compressed/piggy.o
LD arch/arm/boot/compressed/vmlinux
OBJCOPY arch/arm/boot/zImage
Kernel: arch/arm/boot/zImage is ready
From the kernel build, the result will be a single binary image located in arch/arm/boot/. Modules are built with the following command:
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make modules
You can install them using the following command:
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make modules_install
The modules_install target expects an environment variable, INSTALL_MOD_PATH, which specifies where you should install the modules. If not set, the modules will be installed at /lib/modules/$(KERNELRELEASE)/kernel/. This is discussed in Chapter 2, Device Driver Basis.
i.MX6 processors support device trees, which are files you use to describe the hardware (this is discussed in detail in Chapter 6, The Concept of Device Tree). To compile every ARCH device tree, you can run the following command:
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make dtbs
However, the dtbs option is not available on all platforms that support device tree. To build a standalone DTB, you should use:
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make imx6d- sabrelite.dtb