LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   configure and build the kernel 4.9 (https://www.linuxquestions.org/questions/linux-newbie-8/configure-and-build-the-kernel-4-9-a-4175597131/)

rahuls333369 01-10-2017 12:35 AM

configure and build the kernel 4.9
 
Hello All,

I am following README that comes with package.I run following command to configure and build
make O=/home/name/build/kernel menuconfig

I didnt changed any parameter and went for default settings.After running following command
make O=/home/name/build/kernel

I got this issue:
make[1]: Entering directory `/home/rahul/build/kernel'
arch/x86/Makefile:140: CONFIG_X86_X32 enabled but no binutils support
GEN ./Makefile
HOSTCC scripts/kconfig/conf.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf --silentoldconfig Kconfig
#
# configuration written to .config
#
make[1]: Leaving directory `/home/rahul/build/kernel'
make[1]: Entering directory `/home/rahul/build/kernel'
HOSTCC arch/x86/tools/relocs_32.o
HOSTCC arch/x86/tools/relocs_64.o
HOSTCC arch/x86/tools/relocs_common.o
HOSTLD arch/x86/tools/relocs
CHK include/config/kernel.release
Using /home/rahul/linux-4.9 as source for kernel
Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR: -fstack-protector not supported by compiler
make[1]: *** [prepare-compiler-check] Error 1
make[1]: Leaving directory `/home/rahul/build/kernel'
make: *** [sub-make] Error 2

I installed binutils:
binutils 2.24-5ubuntu14.1
binutils-aarch64-linux-gnu 2.24-5ubuntu14cross0.11.2
binutils-arm-linux-gnueabi 2.24-5ubuntu13cross1.97.1

GCC compiler version is:gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4

hazel 01-10-2017 01:53 AM

You have some kernel flags set which do not match your system. You need to use the menuconfig stage of the build to unset these two flags before building.

When you are in menuconfig, enter a / and then type the name of the flag you wish to change.
Code:

/CONFIG_X86_X32
You will be taken automatically to the right part of the menu. Unset both flags, then try make again.

rahuls333369 01-10-2017 03:21 AM

Hello Hazel,

I tried but it simply gives "No matches found".

rahuls333369 01-10-2017 03:25 AM

one more input i want to compile linux 4.9 and i am having following version
linux 3.19.0-25-generic #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Is it due to version i am getting issue??

hazel 01-10-2017 05:52 AM

Quote:

Originally Posted by rahuls333369 (Post 5652812)
Hello Hazel,

I tried but it simply gives "No matches found".

That's strange! I just tried it out with 4.7.9 kernel source and found both flags without difficulty. The search isn't even case-sensitive.

The X86_X32 flag is in the "Executable file formats" section. The other one comes under "General setup".


All times are GMT -5. The time now is 02:34 PM.