1

I am trying to compile a linux kernel (2.6.32.70) for an ARM board (versatilepb), it is my first steps in embedded linux.

At the end of the compilation, two compressed kernel images are generated inside /arch/x86/boot and /arch/i386/boot directories, and not inside /arch/arm/boot. So it looks like that it doesn't compile for an ARM guest.

First, i call make versatile_defconfig in order to generate a default configuration file. I also type make menuconfig to enable the option Use the ARM EABI to compile the kernel. Then i use make V=1 with root privilege for compilation (it doesn't work without). In my environment, these two variables are defined : $ARCH=arm and $CROSS_COMPILE=arm-linux-gnueabi-.

Is it normal to have a lot of questions during the compilation process, even after generating the configuration file ? Questions are about the kernel compression mode, processor family, ... And for this last one, answers seem to be only x86 an similar cpu !

closed as off-topic by Gilles, cuonglm, Anthon, garethTheRed, Jakuje Mar 11 '16 at 8:40

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Gilles, cuonglm, Anthon, garethTheRed, Jakuje
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Get more info unix.stackexchange.com/a/268884/153195 – GAD3R Mar 10 '16 at 11:57
  • My compiler is not gcc-arm-linux-gnueabihf, it's arm-linux-gnueabi-gcc generated from ELDK. – Burrich Mar 10 '16 at 12:54
  • 1
    You should not need root privileges, and that may be the source of your problem: files with bad permissions because they were created by root instead of you, causing some file not to be written at some point. Just check out/unpack the kernel in a clean directory and start again, never using the root account. – Gilles Mar 10 '16 at 22:31
  • Thanks for the tip, i know it' bad but i couldn't compile without root privilege. As you can read below, i've solved the problem by unpacking the kernel archive and restarting the compilation process. – Burrich Mar 10 '16 at 22:58
0

Finally it works, it seems that my kernel directory was not so clean, even after a make clean && make mrproper.

After restarting from kernel sources extracted from the archive, i can do a make V=1 without root privilege and there isn't any questions asked. And the directory /arch/arm/boot contains an image of the compressed kernel too (zImage).

  • Glad you've solved it, but chown -R yourname:yourname . residing in kernel directory and then make distclean would work for you. – user140866 Mar 11 '16 at 5:12
  • Root directories permissions seemed to be fine. But of course, maybe some subfolders needed root privilege, i didn't check recursively. And i didn't know the distclean command, thanks. – Burrich Mar 11 '16 at 9:53
  • No directories or files inside Linux kernel source tree are necessary to have root privileges set in order to successfully compile the kernel. Short: forget about root when building Linux kernel at all. Regular user is able to build a functioning kernel. Of course root can compile kernel, why not, but mixing user and root if you're not an experienced Unix user is going to get you into troubles later. – user140866 Mar 11 '16 at 14:38

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