1

I try to compile Raspbian, [ http://hermess.no-ip.org/rpi/index.php ] when I Prime kernel with the old config: make ARCH=arm CROSS_COMPILE=${CCPREFIX} oldconfig I get a lot lot of dialog messages, so is the file .config useless??? enter image description here

1

No, that's the correct behavior of make oldconfig command.

It picks up the available .config, in this case belonging to an older kernel version, and produces a new .config file making the proper corrections where possible and asking to the user whenever new and empty entries are found.

As you can see in your screenshot, the make oldconfig command is giving itself the proper [Y/n/m] answers until it's able to do so. When it encounters the CONFIG_ARPD line and it needs to embed/disable it (the module option is not given for this entry), the script finds that the entry is present in the kernel you want to compile but not in the .config you supplied. Given that the script has no clue of what to do, it asks to the user.

Now the problem is: what answers should I give to the make oldconfig command? Unfortunately there is no simple, algorithmic answer to this question and this is why the Linux kernel compilation is still artisanry. As a general rule of thumb, apart of googling for the simbol name (e.g. what is CONFIG_ARPD?), whenever you encounter a new driver that you never heard of, it's safe to say [m] because modules almost always just increase your kernel size, giving (almost always) no other performance hit until they're actually loaded and used. Conversely, if you say CONFIG_NETFILTER=y or even worst CONFIG_SMP=y you must know that just for enabling one of this (huge) key-features, your Linux kernel will be slower compared to a UP (UniProcessor == non-SMP) kernel with Netfilter disabled, because this kernel entries translate one-to-one to large #ifdef blocks that are enabled, compiled and executed.

  • thanks for your answer, I just press enter for all message and it create a binary file image of 6MB and zimage of 3MB. is it normal size?????. – Makhlouf GHARBI May 17 '14 at 13:06
  • Yes, seems to be a perfectly reasonable size. Pressing just enter you accepted all the defaults proposed by the kernel's scripts. Actually that's the fastest way to obtain a working kernel image. If you don't have any particular need in terms of memory/cpu usage, you probably adopted the best method of configuring a Linux kernel :) – Avio May 17 '14 at 13:23
  • now that I compiled Raspbian source, what shall I do to load it to empty SD card?? can I just copy it to SD card???? – Makhlouf GHARBI May 18 '14 at 10:47
0

Alternatively, if you don't want to create your own .config file you can take it from the RPi with shown below process

On the RPi

zcat /proc/config.gz > .config

and then copy the .config file to your build directory (which you want to cross-compile) or default configuration file is found in your downloaded kernel source at arch/arm/configs/bcmrpi_defconfig you just copy it to build directory to .config file.

Then you can build the kernel

make ARCH=arm CROSS_COMPILE=${CCPREFIX}

it's shown at http://elinux.org/RPi_Kernel_Compilation page, below the Perform the compilation chapter. And there is more things in this page about the cross-compiling of the RPi kernel.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.