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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
1,846 次查看
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

标签 (3)
0 项奖励
回复
1 解答
1,306 次查看
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 项奖励
回复
3 回复数
1,306 次查看
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 项奖励
回复
1,307 次查看
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 项奖励
回复
1,306 次查看
xingruizhu
Contributor III

Thank you.

It does work.

0 项奖励
回复