Another Problem With Kernel Build

I am sorry but i have another problems with kernel build.

When I do sudo make colibri_vf_defconfig command it return

Can't find default configuration "arch/x86/configs/colibri_vf_defconfig"!

But I added export ARCH=arm

Than when I do sudo make -j3 zImage | tee build.log command it return

 make: *** No rule to make target 'zimage'.

Please help.)

A few notes:

  • There’s no reason to compile as root, so I suggest dropping the use of sudo.

  • Be sure to follow the documentation to setup the toolchain and cross build environment. You seemed to catch part of it when you entered export ARCH=arm. Just be sure you setup the rest of the toolchain and environment as documented. Note: Exported environment variables will only persist within the shell session (or subsequent derivative sessions), so if you want to build in a new shell session, they need to be re-exported.

  • Make sure you cloned/checked out the correct kernel branch. For Vybrid, you probably want to use the toradex_vf_4.4 branch.

  • Once the environment is properly setup and the correct kernel branch is checked out, start from the beginning with the make commands, ie: make colibri_vf_defconfig, etc…

Note: Exported environment variables will only persist within the shell session, so if you want to build in a new shell session, they need to be re-exported.

That’s not quite true as exporting is exactly what makes environment variables persist across forks aka child processes as well. However what does not just preserve those user environment variables is doing sudo at least not unless done with the -E aka --preserve-env argument. But as @brandon.tx correctly pointed out building/compiling stuff as root is highly discouraged.

I see but when I compile whithout sudo appears the following mistake

/bin/sh: 1: cannot create include/config/kernel.release.tmp: Permission denied

You probably did the git clone/checkout as root aka using sudo as well, not?

I suspect that you are no longer using the same shell to do make colibri_vf_defconfig as you previously did export ARCH=arm in. Please note that environment variables are not preserved across reboots or unrelated shells.

Thank you for answer.

I check environment it`s all ok. I do

git clone -b toradex_vf_4.4 git://git.toradex.com/linux-toradex.git

export ARCH=arm

export PATH=~/toradex/linaro/gcc-linaro/bin/:$PATH

export CROSS_COMPILE=arm-linux-gnueabihf-

I follow the Build U-Boot and Linux Kernel from Source Code document

Then when I make make colibri_vf_defconfig

Returned Can't find default configuration "arch/x86/configs/colibri_vf_defconfig"!

But when I use make ARCH=arm colibri_vf_defconfig command all configured right.

Yes, I did.)