build kernel_imx fail with "make O=../$(KERNEL_OUT)"

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

build kernel_imx fail with "make O=../$(KERNEL_OUT)"

Jump to solution
1,414 Views
xingruizhu
Contributor III

Dear supporter

We want to redirect the kernel build output to $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ

But the below error info occur:

Copy: out/target/product/em70/root/fstab.Partner

Install: out/host/linux-x86/bin/minigzip

Host Clang TableGen: clang (gen-clang-diags-defs -clang-component=Common) <= external/clang/include/clang/Basic/Diagnostic.td

Host Clang TableGen: clang (gen-clang-diags-defs -clang-component=Frontend) <= external/clang/include/clang/Basic/Diagnostic.td

Host Clang TableGen: clang (gen-clang-diags-defs -clang-component=Driver) <= external/clang/include/clang/Basic/Diagnostic.td

firmware/imx/sdma/sdma-imx6q-to1.bin.gen.S: Assembler messages:

firmware/imx/sdma/sdma-imx6q-to1.bin.gen.S:5: Error: file not found: firmware/imx/sdma/sdma-imx6q-to1.bin

  CC      fs/cramfs/inode.o

  CC      kernel/power/fbearlysuspend.o

=====================  with "make O=" for kernel build =====================================

745 INSTALLED_KERNEL_TARGET := $(PRODUCT_OUT)/kernel

746 TARGET_PREBUILT_KERNEL := $(PRODUCT_OUT)/kernel

747 export KERNEL_OUT := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ

748 KERNEL_CONFIGURE := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/.config

749 KERNEL_ZIMAGE    := $(KERNEL_OUT)/arch/arm/boot/zImage

750 KERNEL_UIMAGE    := $(KERNEL_OUT)/arch/arm/boot/uImage

751 KERNEL_HEADERS_INSTALL := $(KERNEL_OUT)/usr

759 $(KERNEL_CONFIGURE): kernel_imx/arch/arm/configs/$(TARGET_KERNEL_DEFCONF)

761     install -d $(KERNEL_OUT)

762     $(MAKE) -C kernel_imx $(TARGET_KERNEL_DEFCONF) -j$(HOST_PROCESSOR) O=../$(KERNEL_O     UT) $(KERNEL_ENV)

763

764 $(KERNEL_HEADERS_INSTALL): $(KERNEL_CONFIGURE)

766     install -d $(KERNEL_OUT)

767     $(MAKE) -C kernel_imx -j$(HOST_PROCESSOR) O=../$(KERNEL_OUT) $(KERNEL_ENV) headers     _install

768

769 $(TARGET_PREBUILT_KERNEL): $(KERNEL_CONFIGURE)

771     $(MAKE) -C kernel_imx -j$(HOST_PROCESSOR) O=../$(KERNEL_OUT) uImage $(KERNEL_ENV)

772     install -D $(KERNEL_UIMAGE)  $(PRODUCT_OUT)/uImage

773     install -D $(KERNEL_ZIMAGE)  $(PRODUCT_OUT)/kernel

Labels (3)
0 Kudos
1 Solution
874 Views
rajucm
Contributor III

Hi Xingrui zhu,

Me too face similar Issue. Finally, I  have built my kernel @ out_dir with small tweak OR change mentioned as bellow...

Check if it works for you..

@ my  ./build_kernel.sh

---------------------------------------------------------------------------------------------------

# copy sdma-imx6q-to1.bin  to out directory before you compile kernel

cp --parents firmware/imx/sdma/sdma-imx6q-to1.bin $OUT_DIR/

make -j8 ARCH=arm imx6_android_defconfig O=$OUT_DIR

make uImage O=$OUT_DIR

---------------------------------------------------------------------------------------------------

Thanks,

Rajucm

View solution in original post

0 Kudos
3 Replies
874 Views
xingruizhu
Contributor III

add more info:

Another guy suffer the same issue:

http://boundarydevices.com/new-linux-kernels-for-i-mx6/

quote:

"

It doesn’t seem to be a problem with the source tree, bur rather the makefile rules.

The error only occurs if I build into a separate build tree using ‘make O=’

If I build directly in the Linux source tree, it works fine.

I’ll see if I can figure out why and propose a patch.

"

0 Kudos
875 Views
rajucm
Contributor III

Hi Xingrui zhu,

Me too face similar Issue. Finally, I  have built my kernel @ out_dir with small tweak OR change mentioned as bellow...

Check if it works for you..

@ my  ./build_kernel.sh

---------------------------------------------------------------------------------------------------

# copy sdma-imx6q-to1.bin  to out directory before you compile kernel

cp --parents firmware/imx/sdma/sdma-imx6q-to1.bin $OUT_DIR/

make -j8 ARCH=arm imx6_android_defconfig O=$OUT_DIR

make uImage O=$OUT_DIR

---------------------------------------------------------------------------------------------------

Thanks,

Rajucm

0 Kudos
874 Views
xingruizhu
Contributor III

Thank you.

It does work.

0 Kudos