You are not logged in.

#1 2013-05-11 15:35:55

johnpuppa
Member
Registered: 2013-05-11
Posts: 27

compiling kernel archlinux [SOLVED]

Hi everybody, I have just registered on the forum and I'm a new arch user.
I have a couple of problems that I would like to discuss about:

First problem: I downloaded all the base sistem and linux headers to make a new compilation of the kernel and after having prepared my configuration file, when I hit make, I get this message:
linux-3.8.11-1-ARCH]# make -j2
scripts/kconfig/conf --silentoldconfig Kconfig
#
# configuration written to .config
#
scripts/Makefile.build:44:
/usr/src/linux-3.8.11-1-ARCH/arch/x86/syscalls/Makefile: No such file or
directory
make[1]: *** No rule to make target
`/usr/src/linux-3.8.11-1-ARCH/arch/x86/syscalls/Makefile'.  Stop.
make: *** [archheaders] Error 2
make: *** Waiting for unfinished jobs....
I checked the configuration of the kernel and I tried to remove every voice which has something to do with syscalls, but I still get the mistake.
Do you have any idea of the problem?

Second problem:
My boot manager is lilo and the system unfortunaly is configure this way:
   Name        Flags      Part Type  FS Type          [Label]        Size (MB)
------------------------------------------------------------------------------
    sda1        Boot        Primary   ext4                            104858.65*
    sda3                        Primary   ext4                             39999.54*
    sda5                        Logical   swap                              1998.75*
    sda6                        Logical   ntfs                            173213.40*
                                    Pri/Log   Free Space                           2.62*

sda1 is arch linux and the kernel of the other linux distro is basically copied is in /boot of the sda1 partition. <-- is this a good way of operating for booting sda3?

Third problem:
When I boot arch linux I can't see the booting process and this annoy me tremendously, I checked on the the arch wiki for changing the boot debugging optionsbut I think I misunderstood something.
Should I only add this line udev.log_priority=8  to /etc/udev/udev.conf to see the boot debugging?

Thanks guys!

Last edited by johnpuppa (2013-05-13 17:08:23)

Offline

#2 2013-05-11 15:45:59

George
Member
Registered: 2011-05-11
Posts: 165

Re: compiling kernel archlinux [SOLVED]

It sounds like you're trying to recompile the kernel from just the header files, that won't work you need the rest of the source.
You should read up on the Arch Build System (ABS) and use that to make kernel packages -- see https://wiki.archlinux.org/index.php/Ke … ild_System

To make your boot process display you should remove "quiet" from your kernel command line if its there and add "verbose".

Offline

#3 2013-05-11 15:49:18

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,444
Website

Re: compiling kernel archlinux [SOLVED]

Please change the title of this thread to something at least remotely meaningful.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2013-05-11 15:50:53

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: compiling kernel archlinux [SOLVED]

For the first problem, don't do that. You should never build and install packages directly on an Arch system.  Read up on makepkg and PKGBUILDs to learn how to build packages the right way now. It will make your life easier later.

https://wiki.archlinux.org/index.php/Makepkg
https://wiki.archlinux.org/index.php/Pkgbuild

You can get the PKGBUILD for the kernel here (or by using one of the PKGBUILD retriever utilities, e.g. pbget:
i686
x86_64

Aside from ensuring that the resulting file are properly managed by pacman (file tracking, dependency resolution), the PKGBUILD contains the full set of build instructions and will provide a good place to start if you want to customize them.


For the second question, having multiple kernels in the same boot partition is fine, but you need to be careful to prevent one distribution from messing around with the files of the other, e.g. when updating your boot loader. I would probably let one distro fully manage the boot directory and manually copy in kernel images from the other when I need to.

For the third question, does the following answer it? https://wiki.archlinux.org/index.php/Di … t_messages


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#5 2013-05-11 15:51:03

HalosGhost
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,089
Website

Re: compiling kernel archlinux [SOLVED]

Trilby wrote:

Please change the title of this thread to something at least remotely meaningful.

Building on that, please, remember:

not using code tags makes unicorns cry

All the best,

-HG

Offline

#6 2013-05-13 15:19:26

johnpuppa
Member
Registered: 2013-05-11
Posts: 27

Re: compiling kernel archlinux [SOLVED]

George wrote:

It sounds like you're trying to recompile the kernel from just the header files, that won't work you need the rest of the source.
You should read up on the Arch Build System (ABS) and use that to make kernel packages -- see https://wiki.archlinux.org/index.php/Ke … ild_System

To make your boot process display you should remove "quiet" from your kernel command line if its there and add "verbose".

Thanks for repling, but I can't understand how to compile the kernel following the arch style. Should I install the kernel-headers, or no?
what does this mean: $ ABSROOT=. abs core/linux??
where will I find my source and how should I make my configuration file?
I can't actually understand also the part of the PKGBUILD..

I'm used to downloading the source, go into the usr/src/linux and then make my configuration file...

Is there a step by step how-to for the kernel compilation?

I know it might be silly to ask such questions, but I can't follow the arch kernel guide.. so, please give me some hints on where I should start.
Thanks!

Offline

#7 2013-05-13 15:32:34

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: compiling kernel archlinux [SOLVED]

Johnpuppa,

I am curious as to why someone new to the Arch community wants to start with an ambitious project such as a custom kernel.  Arch is a distribution for more experienced Linux users and, even so, most members here have never needed to or tried to compile a custom kernel.  Is there some driver you need?  If so, here may be better ways to get them.

If you are determined, try this Wiki article

Edit:  I cannot help you with LILO, but ensure you are not passing "quiet" on the kernel command line.

Last edited by ewaller (2013-05-13 15:35:10)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#8 2013-05-13 15:48:06

johnpuppa
Member
Registered: 2013-05-11
Posts: 27

Re: compiling kernel archlinux [SOLVED]

Right, maybe I expressed myself in a wrong way. I have actually read that article, plus lilo is fine at the moment, I figured out what the problem was.
I would like to recompile the kernel in the traditional way. I used some other linux distributions and without any problem, I could make a new kernel or add to it other options.
What I need now is to compile the kernel. Is it possible? because I can't find the sources in /usr/src
I tried to install also the kernel 3.9, but even this provide only the kernel and not the source tree..
I installed the linux-headers and even If I try to recompile it I always get that error message that I posted previously.
There must be something wrong in the whole method.
Coming back to the main answer of your question; I must say that, with no ambition people wouldn't have got to the moon... smile
So please if you have some advices I would be greateful.

Offline

#9 2013-05-13 15:52:20

jakobcreutzfeldt
Member
Registered: 2011-05-12
Posts: 1,041

Re: compiling kernel archlinux [SOLVED]

@johnpuppa, all the answers are already in this thread. Read up on the ABS and makepkg, and then the wiki article on compiling the kernel using the ABS.

Last edited by jakobcreutzfeldt (2013-05-13 15:54:53)

Offline

#10 2013-05-13 15:56:46

George
Member
Registered: 2011-05-11
Posts: 165

Re: compiling kernel archlinux [SOLVED]

johnpuppa;
You're highly unlikely to get a step-by-step walkthrough posted here. You also will not get much (any) help building packages without using the proper Arch toolset.

The wiki page linked to by ewaller (and me earlier) will only begin to make sense if you learn about makepkg, PKGBUILDs and abs first (see links posted by Xyne).

Kernel headers are irrelevant here, they're needed by anything which needs to link to the current kernel (e.g. 3rd party kernel modules) and won't help with building a custom kernel.

Also, please read the forum guidelines and fix the title and first post of the thread.

Last edited by George (2013-05-13 16:02:37)

Offline

#11 2013-05-13 17:16:48

johnpuppa
Member
Registered: 2013-05-11
Posts: 27

Re: compiling kernel archlinux [SOLVED]

thanks guys.

Offline

#12 2013-05-13 17:33:10

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: compiling kernel archlinux [SOLVED]

Well, it is possible to grab the source from kernel.org. 
On Arch Linux, I usually unpack it somewhere in my home directory. 
Configure the kernel making sure you use a name that is different from the Arch kernel. 
I usually don't use an initrd when I make a custom kernel, so be sure to bake in all the drivers and filesystems you will need at boot. and do a make followed by a sudo make modules_install
Copy the appropriate kernel to /boot making sure you don't overwrite any other kernel you may need.
Configure your bootloader to add an entry with the new kernel.

This is not the recommended way, but is similar to other distributions (Like Gentoo), except that one does not use /usr/lib/liniux, it uses a directory under $HOME instead.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB