Preferred way to compile kernel?
After the discussion here:
http://bbs.archlinux.org/viewtopic.php?t=4057&start=30
I'm wondering which way most people use for compiling their kernel. I've used /usr/src because its simpler and makes me feel more in control. Having an Arch package for the custom kernel has no real value, according to apeiro. Plus, using /usr/src has the kernel headers in place automatically, useful for programs that need it. (This offset by the fact that the kernel package copies the necessary files into place anyway). However, using ABS has the advantage of automating a lot of the task using Arch systems, rather than, for example, a custom shell script. (I'm trying an ABS version right now, for comparison).
Both methods are described in the wiki. I'm going to be cleaning up and expanding both shortly.
I'm asking this question in order to semi-standardize the process. Some people might say that the Arch philosophy is "There is more than one way to do everything", but I believe we could also append "but there is a best way to do it and Arch suggests that way". Now I want to find out which way is best in this case.
I'd be most interested in "I use xyz method because... [valid reason]" statements, rather than just "I use xyz".
Dusty
The 'abs' way was basically my idea - or at least the first wiki entry about it, I don't know if anyone tried it that way before. I thougt it could be a nice automatism, to have a proper kernel configuration once, tweak the PGKBUILD file, and after all is set up, all I had to change was the version number of the package/kernel source or change the config, and run makepkg then. I once made it switching from kernel24 to 26, using my own config. It worked fine. So, I thought it could be helpfull writing it to the wiki.
But this idea has some disadvantages, too. F.e., if you compile a minor upgrade, you may construct a modules mess, as a lot of files are already existing. Therefore, all cases must be thoroughly considered and configurated. Kernel addicts would prefer to patch the kernel instead of fully refetch the source.
After playing around with the idea for a while, I decided the work of configurating all possible eventuallities in compiling kernels by using abs was to difficult. Using the standard procedures seemed straight and easy to me.
So I removed my 'arch way' section in the kernel compiling wiki. Nevertheless, another user started an abs kernel wiki, redevelopping and enhancing my idea.
The idea is still attractive.
Similar Messages
-
How to edit GRUB for boot new compile kernel?
I compile the newest Linux kernel.
I read Archlinux wiki about how to edit GRUB for boot new compile kernel,
but Archlinux wiki do not reference to it.
Who can help me, baby?bangkok_manouel wrote:
how did you build your kernel? traditional way or arch way?
if it's the arch way (TM), here's an example of a custom kernel with -mm patch.
what I have in /boot:
-rw-r--r-- 1 root root 4.3M 2008-12-23 09:52 kernel26mm-fallback.img
-rw-r--r-- 1 root root 668K 2008-12-23 09:52 kernel26mm.img
-rw-r--r-- 1 root root 764K 2008-12-22 18:44 System.map26mm
-rw-r--r-- 1 root root 1.7M 2008-12-22 18:44 vmlinuz26mm
now here's the /boot/grub/menu.lst related entry (you may add the fallback one):
# (2) Arch Linux
title kernel26mm
root (hd0,0)
kernel /vmlinuz26mm root=/dev/sda5 ro vga=773
initrd /kernel26mm.img
Should be traditional way. -
I have compiled a few kernels in an environment in which it's designed to run on - but cross compiling is completely new to me. However - I will persevere because I have wanted to learn this for a while now.
The target system is an arm based board for a NAS. I am using QEMU to install and configure a Debian system but it requires a working kernel in order to boot.
I have installed the arm-elf-gcc-base package (which I assume is the toolchain - am I wrong on this?) but I don't know where to go from there.
How do I invoke this particular toolchain to compile a kernel for the target arch?
Any other pointers or 'gotchas' would be greatly appreciated.
Thank you.Which board is it?
Even if you manage to cross compile, kernel will need some extra configuration or patching to boot in qemu.
I have Raspberry Pi and qemu needs custom kernel to boot RPi images, but it's almost useless since there is
no support for network adapter. I have never cross compiled anything for it, but you might want to read on RPi
kernel cross compilation since there is a lot of documentation and you probably need just a different toolchain.
What I'm doing is distributed cross compiling via distcc. That way most of work gets done on my laptop, but it's
still quite slow because makepkg doesn't support distcc pump for distributing pre-processing.
I'm using toolchain provided by Arch Linux ARM project because I run Arch on RPi. If you can find crosstool config for
your board, making toolchain shouldn't be too difficult. This should get you started. -
What is the preferred way to open a new url in a new window/popup?
Hi Guys,
I have an application that requires me to show another URL (Fedex tracking number) once a button is clicked.
what is the preferred way to do it?
Should I open a new browser or a popup?
I would appreciate if you have a code example I can use.
Thanks,
Itayhi,
For opening a URL , you could also close previous window and open a new browser.
Follow the steps :
-> make an outbound plug in your window.
-> Add URL of type string as a parameter for your outbound plug.
->Do remember to add Component Name in the Properties Tab of View ( othervs Calling Outbound plug of win from view wont b psbl).
Write the below mentioned code to call a URL in the OnAction of button :
DATA lo_zexit TYPE REF TO ig_zexit .
lo_zexit = wd_this->get_zexit_ctr( ).
lo_zexit->fire_out_window_plg(
url = 'http://www.google.com' " string
here replace ig_zexit with your ig<applicatin name>.
Other way around is using Code Wizard ( control _ F7).
Write the below code in the onaction of button :
data lo_window_manager type ref to if_wd_window_manager.
data lo_api_component type ref to if_wd_component.
data lo_window type ref to if_wd_window.lo_api_component = wd_comp_controller->wd_get_api( ).
lo_window_manager = lo_api_component->get_window_manager( ).CALL METHOD lo_window_manager->CREATE_EXTERNAL_WINDOW
EXPORTING
URL = 'http://www.google.co.in/'
MODAL = ABAP_FALSE
HAS_MENUBAR = ABAP_TRUE
IS_RESIZABLE = ABAP_TRUE
HAS_SCROLLBARS = ABAP_TRUE
HAS_STATUSBAR = ABAP_TRUE
HAS_TOOLBAR = ABAP_TRUE
HAS_LOCATION = ABAP_TRUE
RECEIVING
WINDOW = lo_window.lo_window->open( ).
You can choose any way whichever suits your requirements.
I hope it helps.
Thanx. -
Got everything into Aperture but it is a mess. Prefered way of cleanup?
I imported several iPhoto libraries as well as a heap of aperture projects into my new Aperture library that resides on a RAIDed volume. Speed is now OK on my new Mac Pro, but what is the prefered way of sorting out over 31000 pics? How do I use the available tools in Aperture to work out a hierarchy?
Got a partial screencap here for the ones that are interested:
http://valhall.hil.no/aperture_mess.png
All the best,
Kjell Are Refsvik
NorwayThere is an unlimited number of ways to name files. Way back when you only had control of the file name then a lot of us tried to incorporate as much information into the file name as possible. Today things are different. Thanks to Aperture you are now able to add keywords and other metadata to your files, such as artist, location and subject.
Basically you just need to name your files with a unique name, so that two files will not have the same name. A suggestion can be the date and time stamp form when the photo was taken. This information is available from the metadata stored within the file. I use the following format for my own files:
<camera model> <date> <time>
Nikon D2X YYYYMMDD HHMMSS
Nikon D2X 20060923 234478
This way none of my files will every have the same name unless they are taken within the same second, and since I do not shot action this works for me.
As suggested by others, smart albums gives sorting a new dimension. You could theoredically put all your files in one folder and then create all the smart albums you want. You can setup smart albums, so that it include filters based on any metadata stored in your files. Keywords and smart albums makes could substitute long descriptive file names.
Don't forget to use the stacking function in Aperture, which will give you a better overview of your photos if you have many shoots of the same subjects.
Karsten -
Is there any way to compile FLA files into SWF files on the command line?
I am using Adobe Flash CS4 Professional on Windows XP. To facilitate automated nightly builds, I have been searching for a way to compile my SWF files from the FLA files under source control, but without luck. The tools in the Flex SDK looked promising, but we do not use Flex. Thanks!
Seen these?
-
[SOLVED]Compiling kernel fails with segfault
Hi guys,
I'm out of answers.
The situation :
Compiling kernel randomly stops with : "segmentation fault" and never runs through.
Reissuing make will make it continue until it will fail at some other point.
Background:
The system feels completely unstable to say the least, but nothing 100 % reproduceable ( vuze(java) crash, firefox/chromuim flash sites crash every 120 seconds, X crashes once a day , for instance when moving tvtime around, kernel oops daily, sometimes hard lockups, logs of yesterdays oops : http://pastie.org/private/imrqdzdbejdb3jxn4czuw )
But only the kernel compile is 100 % reproduceable so this must be fixed asap.
Specs:
intel e8400,nvidia gtx260, 2 G ddr2,Gigabyte EP45-UD3R, "gigs of space", off. arch kernel 2.6.33-ARCH , x86_64, "bigtime" cooling :
cpu temps 50 C° max during compiling
What configs/packages are important ? I got paranoid and ditched my old makgepkg.conf and used a newer *.pacnew file , I used to have :MAKEFLAGS="-j3" but not in this config :
http://pastie.org/private/4ryshivi2hgyqenjlkicg
local packages:
local/gcc 4.5.0-1 (base-devel)
The GNU Compiler Collection
local/gcc-libs 4.5.0-1 (base)
Runtime libraries shipped by GCC for C and C++ languages
Anything else updated daily.
The blowup:
http://pastie.org/private/hoamev0sli7zapbr0xvpbq
What I tried:
fsck -f: it fixed two inodes, but still the same behavior
badblocks -nvs : three hours of badblock testing, 0 hits
memtest : two passed runs, no errors
stress from AUR, 15 minutes :
stress --cpu 8 --io 4 --vm 2 --vm-bytes 128M --timeout 15m
stress: info: [26841] dispatching hogs: 8 cpu, 4 io, 2 vm, 0 hdd
stress: info: [26841] successful run completed in 900s
Max coretemp was 52 C° during stress.
The usual footnote statement ^_^ :
On w7 _everything_ runs stable.
And not only stable , I'm able to OC this box to 4.5 GHz and game under w7 without a prop for hours, well this is what it was build for at some point.
Conclusion:
So I'd say hardware wise this box kicks ass and now software wise my Arch kicks me in the a**.
I doubt there is a faulty hardware part, but what else could it be ?
Last edited by tuxfusion (2010-05-17 22:48:06)Update:
Trying to compile another big package just to have another result, gcc itself now :
- segfault after 4 m18 s
- segfault after 5 m50 s
Update²:
I think I found a faulty BIOS setting in my non-OC profile concerning DRAM termination, which said "normal" where "auto" would be correct.
My OC-profile has this setting correct and since I run this profile in Arch only it might explain that w7 did not fail.
Still have to verify this but i makes perfect sense, only gcc seems to trigger this. Compiling gcc still running with over 10 minutes in the game now.
After hitting 4.5 GHz with OC I must have reset the non OC-profile wrong.
*slams head on desk*
Last edited by tuxfusion (2010-05-17 13:10:04) -
[SOLVED] error compiling kernel 2.6.29
Hi,
Due to having the DVD-S card mentioned here
http://www.linuxtv.org/pipermail/linux- … 23265.html
I am trying to compile kernel 2.6.29.6 with the above mentioned patch but get an error:
include/sound/soc-dai.h: At top level:
include/sound/soc-dai.h:224:25: error: duplicate member ‘codec’
sound/soc/soc-core.c: In function ‘snd_soc_init_card’:
sound/soc/soc-core.c:1360:18: warning: variable ‘ac97’ set but not used
[-Wunused-but-set-variable]
make[2]: *** [sound/soc/soc-core.o] Error 1
make[1]: *** [sound/soc] Error 2
make: *** [sound] Error 2
bash: vim include/sound/soc-dai.h
/* DAI runtime info */
struct snd_pcm_runtime *runtime;
struct snd_soc_codec *codec;
unsigned int active;
unsigned char pop_wait:1;
void *dma_data;
/* DAI private data */
void *private_data;
/* parent codec/platform */
union {
struct snd_soc_codec *codec;
struct snd_soc_platform *platform;
Note:
I found a solution:
http://mailman.alsa-project.org/piperma … 16949.html
Last edited by casacristo (2011-10-19 07:46:01)I've solved the issue, infact there was a problem with the patch. Now I am able to compile the kernel.
Thanks anyway! -
Update modules with compiling kernel from soure issue.
Compiling kernel from abs or aur take me much time, so i decide compile kernel from source, compilation and installation successfully but make initial RAM disk doesn't update full modules (crypto,lvm...). I specified -c option to /etc/mkinitcpio.conf but the result is the sam, non-autodectec doesn't help too. When i look into /lib/modules directory, 3.6.6-1-ARCH folder contain "kernel" folder which has a lot of things (arch, crypto, net..) and i think this is my extra modules were declared in HOOK array's mkinitcpio.conf. The another one only contain net folder so i can't boot into this kernel without having loaded others.
any suggestion for this problem? tks for reply.am sorry, i re-tried with HOOK array without autodectect and it can load modules but there are two error:
==> ERROR: module not found: `dm-crypt`
==> ERROR: modules not found: `dm-snapshot`
ok i will try to load these modules by manually.
EDIT: i tried to load dm-mod, dm-crypt, dm-snapshot but it isn't helpful. Errors still remain. any suggestion?
Last edited by angelfalls (2012-11-12 23:33:53) -
Hello. I tryed to compile kernel module
/home/das/job/C/foo.c:
#include <linux/module.h>
#include <linux/kernel.h>
int init_module(void)
printk(KERN_INFO "Hello world 1.\n");
return 0;
void cleanup_module(void)
printk(KERN_INFO "Goodbye world 1.\n");
I created /home/das/job/C/Makefile:
obj-m += foo.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
But when i tryed to compile it with command make I take the error:
make -C /lib/modules/2.6.33-ARCH/build M=/home/das/job/C modules
make: *** /lib/modules/2.6.33-ARCH/build: No such file or directory. Stop.
make: *** [all] Error 2
My question is what is wrong and how i can compile module?
Last edited by F1sher (2011-11-01 15:37:51)tomk wrote:Install it somewhere under /lib/modules/2.6.32-lts, run depmod, and modprobe it.
After
depmod -a
modprobe module
I can't start my system. GDM start but keyboard and mice don't work -
What's the easiest way to compile a servlet?
What on earth is the easiest way to compile a servlet? I have ant and I know how to use it, but there has to be an easier way. I write my programs in Textpad and it'll only spit out errors when i try to compile:
C:\projects\WEBDEV\merchandiseServlet.java:2: package javax.servlet does not exist
import javax.servlet.*;
^
C:\projects\WEBDEV\merchandiseServlet.java:3: package javax.servlet.http does not exist
import javax.servlet.http.*;
^
C:\projects\WEBDEV\merchandiseServlet.java:15: cannot resolve symbol
symbol : class HttpServlet
location: class merchandiseServlet
public class merchandiseServlet extends HttpServlet
^
C:\projects\WEBDEV\merchandiseServlet.java:21: cannot resolve symbol
symbol : class HttpServletRequest
location: class merchandiseServlet
protected void doGet(HttpServletRequest request, HttpServletResponse response)
^
C:\projects\WEBDEV\merchandiseServlet.java:21: cannot resolve symbol
symbol : class HttpServletResponse
location: class merchandiseServlet
protected void doGet(HttpServletRequest request, HttpServletResponse response)
^
C:\projects\WEBDEV\merchandiseServlet.java:22: cannot resolve symbol
symbol : class ServletException
location: class merchandiseServlet
throws ServletException, IOException {
^
I have my JAVA_HOME variable set to C:\j2sdk1.4.1_01 and my J2EE_HOME set to C:\j2sdkee1.3.1 and that is exactly where each are installed. How would a person compile a servlet say.. on the command line? It seems there would be an easier way than having to do a build file and all that. Any help would be greatly appreciated. I've written a lot of stuff that works great but for some reason this stuff is giving me fits. thanks in advanceC:\projects\WEBDEV>javac -classpath "C:\j2sdk1.4.1_01\bin; C:\j2sdkee1.3.1\bin;
C:\j2sdkee1.3.1\lib\j2ee.jar" merchandiseServlet.java
merchandiseServlet.java:2: package javax.servlet does not exist
import javax.servlet.*;
^
merchandiseServlet.java:3: package javax.servlet.http does not exist
import javax.servlet.http.*;
^
I got 7 total errors that time, more than before, all of them dealing with packages in the j2ee. The classpath is 100% correct for the way I installed everything; I have checked it about three hundred times. Could htere be some other small detail I missed? -
[solved] Preferred way to install & update Gnome extensions
Hello there,
What is the preferred way to install and update Gnome extensions?
Do you
a) install the respective extensions from the AUR
b) or do you use the https://extensions.gnome.org/local/ page for that purpose?
What are the advantages and disadvantages of both ways?
Thanks!
Last edited by orschiro (2013-06-13 10:10:48)Unia wrote:
Thaodan wrote:Why add an extra interface if your package manager already does the job?
Because if you use the AUR, you depend on the respective maintainers to update their PKGBUILD when a newer version is out. If they don't update, you will not receive a notification that a newer version of your extension is available.
With extensions.gnome.org/local, you do not depend on anyone else. It has no harm to your system to manage extensions like this; they get installed for just your user (in $HOME/.local/share/gnome-shell/extensions).
I know which method I prefer.
Hmm true, despite the bad effects of using the AUR prefer to use it cause I don't like to add extra interfaces for every app. But I think that is just an opinion... -
A PKGBUILD that helps you compile kernel from local source tree
I don't know if someone did this beofore. Hours ago I wrote a PKGBUILD file for compiling kernel,
it is different than the one from abs. It allows you
compile a kernel from a exiting kernel source tree and leave it clean.
honor the Archway, this means you have a clean filesystem
It is acutally because I'm currently playing with The Eudyptula Challenge.
and I'm tied our compress/decompress a kernel tree all the time. If you are kernel developer, you
may also find it useful.
The PKGBUILD file worked on my machine, I will add headers and docs later.
Oh, almost forgot: here is my PKGBUILD:
#So we will have a clean src tree
pkgbase=linux-test
_kernel_bin=kernel_build
#the variable you have to provide
_builddir=kernel_build
kernel_src_dir='/home/developer/Courses/kernel-base'
_srcname=kernel_tree
#end the variable you have to provide
pkgver=3.8.1
pkgrel=1
pkgdesc="The Linux kernel and modules"
depends=('coreutils' 'linux-firmware' 'kmod' 'mkinitcpio>=0.7')
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc')
optdepends=('crda: to set the correct wireless channels of your country')
provides=("kernel26${_kernelname}=${pkgver}")
conflicts=("kernel26${_kernelname}")
replaces=("kernel26${_kernelname}")
arch=('i686' 'x86_64')
url="http://www.kernel.org/"
license=('GPL2')
source=(#if we provide this, means kernel compile progress is already done
"${_kernel_bin}.tar.xz"
'linux.preset'
sha256sums=('65847bc847344434657db729d2dde4a408e303ea29ae1409520cecee8da6fc3d'
'2c2e8428e2281babcaf542e246c2b63dea599abb7ae086fa482081580f108a98')
#this one strip the linux off
_kernelname=${pkgbase#linux}
prepare() {
#XXX:checked
#build dir has to be the same as kernel_bin files, then builddir is created
#automatically by tar
if [ "${kernel_src_dir}" == "" ];then
return 1
fi
#provide kernel source tree for compile and move modules
ln -s ${kernel_src_dir} ${srcdir}/${_srcname}
mkdir -p "${srcdir}/${_srcname}"
#we need to check here if there exist kernel bin files
if [ "${_kernel_bin}" == "" ]; then
make O="${srcdir}/${_builddir}" menuconfig
fi
build() {
#XXX:checked
cd "${srcdir}/${_srcname}"
#we need to check here if there exist kernel bin files
if [ "${_kernel_bin}" == "" ]; then
#return 1
make O="${srcdir}/${_builddir}" bzImage modules
fi
#otherwise this step is done already done
_package() {
#we dont need to worry about mkinitcpio, depmod thing, They are done by
#install script, we need to provide a preset and install file instead.
#we build kernel objs on _builddir, and install them in pkgdir
#install binary files, this means we have a compiled binary tree
cd "${srcdir}/${_srcname}"
#echo "$(pwd)"
KARCH=x86
install=linux.install
# get kernel version
_kernver="$(make O="${srcdir}/${_builddir}" kernelrelease)"
_kernver=$(echo "${_kernver}" | sed -n 2p -)
#strip the -dirty away
_kernver=${_kernver%-*}
_basekernel=${_kernver%%-*}
_basekernel=${_basekernel%.*}
mkdir -p "${pkgdir}"/{lib/modules,lib/firmware,boot}
make O="${srcdir}/${_builddir}" INSTALL_MOD_PATH="${pkgdir}" modules_install
cp "${srcdir}/${_builddir}"/arch/$KARCH/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}"
# set correct depmod command for install
cp -f "${startdir}/${install}" "${startdir}/${install}.pkg"
true && install=${install}.pkg
sed -e "s/KERNEL_NAME=.*/KERNEL_NAME=${_kernelname}/" -i "${startdir}/${install}"
sed "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/" -i "${startdir}/${install}"
# install mkinitcpio preset file for kernel
install -D -m644 "${srcdir}/linux.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
sed \
-e "1s|'linux.*'|'${pkgbase}'|" \
-e "s|ALL_kver=.*|ALL_kver=\"/boot/vmlinuz-${pkgbase}\"|" \
-e "s|default_image=.*|default_image=\"/boot/initramfs-${pkgbase}.img\"|" \
-i "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
# remove build and source links
rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build}
# remove the firmware
rm -rf "${pkgdir}/lib/firmware"
# gzip -9 all modules to save 100MB of space
find "${pkgdir}" -name '*.ko' -exec gzip -9 {} \;
# make room for external modules
ln -s "../extramodules-${_basekernel}${_kernelname:--ARCH}" "${pkgdir}/lib/modules/${_kernver}/extramodules"
# add real version for building modules and running depmod from post_install/upgrade
mkdir -p "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--ARCH}"
echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--ARCH}/version"
# Now we call depmod...
#echo "Call Depmod"
cp "${srcdir}/${_builddir}/System.map" System.map
depmod -b "${pkgdir}" -F System.map "${_kernver}"
#echo "Called Depmod"
# move module tree /lib -> /usr/lib
mkdir -p "${pkgdir}/usr"
mv "${pkgdir}/lib" "${pkgdir}/usr/"
# add vmlinux
install -D -m644 "${srcdir}/${_builddir}/"vmlinux "${pkgdir}/usr/lib/modules/${_kernver}/build/vmlinux"
pkgname=("${pkgbase}")
for _p in ${pkgname[@]}; do
eval "package_${_p}() {
_package${_p#${pkgbase}}
done
and here is the address of it on github
Last edited by xedchou (2014-12-23 12:41:55)Based on the title alone I almost reflexively binned this thread. Please rename this thread to *something* relating to what you're actually posting.
-
Hi,
I want to use Arch to mess with the source of linux 3.2.7. Unfortunately, I cannot even get the regular 3.2.7 kernel to boot.
I basically followed the guide at:
https://wiki.archlinux.org/index.php/Ke … raditional
I downloaded the source, did make mrproper, make menuconfig, make all and make modules_install. I copied arch/x86/bzImage to /boot as well as System.map and created a cpio ramdisk using mkinitcpio using
mkinitcpio -g /boot/initramfs-test.img -k 3.2.7-test
In the end my /boot contained:
initramfs-test.img
vmlinuz-test
System.map-test
I tried booting with Syslinux, GRUB and GRUB2 modifying the options for all of them appropriately.
For Syslinux and GRUB if use a UUID in the root field for their respective config files I get the error that the root device cannot be found during boot. If I use root=/dev/sda4 (which is my root partition, checked it using stat /dev/sda4) I successfully mount the root partition but get an error that /sbin/init does not exist. That's weird since /sbin/init is there. I believe both of these errors have something to do with ramdisk but not sure what.
With GRUB2 booting just freezes at "Loading init ramdisk".
I read a ton on these errors online and tried all kinds of stuff and could not get it to work. Any help will be greatly appreciated!
ThanksThanks tomk and sorry for the ambiguous post.
I actually managed to get it finally running, I basically screwed up my .config file. This was not obvious to me at all (total noob at compiling kernels). I just used my current arch config file instead of messing with menuconfig myself and it worked. I still don't know why it works, so if you could point me to a source of enlightenment I would appreciate that. Right now compilation time is atrocious even with the -j option for make.
Regarding your question, I want to screw around with the latest pax patch and add some hooks of my own to security.h which is why I need 3.2.7.
Thanks again -
Questions about compiling kernel on archlinux
hi...i'm new of this forum and new of archlinux
i'm tryng to compiling a custom kernel in order not to replace the kernel26 package.. i prefere to make it with abs for managing it with pacman.. i followed the wiki but something went wrong.... i used both the pkgbuild i found on the wiki but nothing...can someone help me please??if it can be of any help, this works for me too. actually, it's the official arch kernel PKGBUILD (maybe not the latest one) that I've just changed according to my needs:
# $Id: PKGBUILD 17203 2008-10-26 20:28:29Z tpowa $
# Maintainer: Tobias Powalowski <[email protected]>
# Maintainer: Thomas Baechler <[email protected]>
pkgname=kernel26mm
_basekernel=2.6.27
pkgver=2.6.28
pkgrel=5
_patchname="patch-${pkgver}-${pkgrel}-ARCH"
pkgdesc="The Linux Kernel and modules"
arch=(i686 x86_64)
license=('GPL2')
groups=('base')
url="http://www.kernel.org"
backup=(etc/mkinitcpio.d/${pkgname}.preset)
depends=('coreutils' 'module-init-tools' 'mkinitcpio>=0.5.18')
# pwc, ieee80211 and hostap-driver26 modules are included in kernel26 now
# nforce package support was abandoned by nvidia, kernel modules should cover everything now.
# kernel24 support is dropped since glibc24
replaces=('kernel24' 'kernel24-scsi' 'kernel26-scsi'
'alsa-driver' 'ieee80211' 'hostap-driver26'
'pwc' 'nforce' 'squashfs' 'unionfs' 'ivtv'
'zd1211' 'kvm-modules' 'iwlwifi' 'rt2x00-cvs'
'gspcav1')
install=kernel26mm.install
source=(ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_basekernel.tar.bz2
ftp://ftp.kernel.org/pub/linux/kernel/v2.6/testing/patch-2.6.28-rc2.bz2
http://kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.28-rc2/2.6.28-rc2-mm1/2.6.28-rc2-mm1.bz2
# the main kernel config files
config config.x86_64
iosched-bfq-03-update-kconfig-kbuild.patch
iosched-bfq-02-add-bfq-scheduler.patch
iosched-bfq-01-prepare-iocontext-handling.patch
zen.git-aircrack.patch
march-native.patch
# standard config files for mkinitcpio ramdisk
kernel26mm.preset)
build() {
KARCH=x86
cd $startdir/src/linux-$_basekernel
# Add -ARCH patches
# See http://projects.archlinux.org/git/?p=linux-2.6-ARCH.git;a=summary
patch -Np1 -i $startdir/src/patch-2.6.28-rc2 || return 1
patch -Np1 -i $startdir/src/2.6.28-rc2-mm1 || return 1
patch -Np1 -i $startdir/src/iosched-bfq-01-prepare-iocontext-handling.patch || return 1
patch -Np1 -i $startdir/src/iosched-bfq-02-add-bfq-scheduler.patch || return 1
patch -Np1 -i $startdir/src/iosched-bfq-03-update-kconfig-kbuild.patch || return 1
patch -Np1 -i $startdir/src/zen.git-aircrack.patch || return 1
patch -Np1 -i $startdir/src/march-native.patch || return 1
sed -i 's|^EXTRAVERSION = .*$|EXTRAVERSION =|g' Makefile
if [ "$CARCH" = "x86_64" ]; then
cat ../config.x86_64 >./.config
else
cat ../config >./.config
fi
# build the full kernel version to use in pathnames
. ./.config
### next line is only needed for rc kernels
#_kernver="2.6.25${CONFIG_LOCALVERSION}"
_kernver="2.6.28${CONFIG_LOCALVERSION}"
# load configuration
make menuconfig
# build!
# stop here
# this is useful to configure the kernel
#msg "Stopping build"
#return 1
make bzImage modules || return 1
mkdir -p $startdir/pkg/{lib/modules,boot}
make INSTALL_MOD_PATH=$startdir/pkg modules_install || return 1
cp System.map $startdir/pkg/boot/System.map26mm
cp arch/$KARCH/boot/bzImage $startdir/pkg/boot/vmlinuz26mm
install -D -m644 Makefile \
$startdir/pkg/usr/src/linux-${_kernver}/Makefile
install -D -m644 kernel/Makefile \
$startdir/pkg/usr/src/linux-${_kernver}/kernel/Makefile
install -D -m644 .config \
$startdir/pkg/usr/src/linux-${_kernver}/.config
mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/include
for i in acpi asm-{generic,x86} config linux math-emu media net pcmcia scsi sound video; do
cp -a include/$i $startdir/pkg/usr/src/linux-${_kernver}/include/
done
# copy files necessary for later builds, like nvidia and vmware
cp Module.symvers $startdir/pkg/usr/src/linux-${_kernver}
cp -a scripts $startdir/pkg/usr/src/linux-${_kernver}
# fix permissions on scripts dir
chmod og-w -R $startdir/pkg/usr/src/linux-${_kernver}/scripts
#mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/.tmp_versions
mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/arch/$KARCH/kernel
cp arch/$KARCH/Makefile $startdir/pkg/usr/src/linux-${_kernver}/arch/$KARCH/
if [ "$CARCH" = "i686" ]; then
cp arch/$KARCH/Makefile_32.cpu $startdir/pkg/usr/src/linux-${_kernver}/arch/$KARCH/
fi
cp arch/$KARCH/kernel/asm-offsets.s $startdir/pkg/usr/src/linux-${_kernver}/arch/$KARCH/kernel/
# add headers for lirc package
mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/drivers/media/video
cp drivers/media/video/*.h $startdir/pkg/usr/src/linux-${_kernver}/drivers/media/video/
for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102 usbvideo zc0301; do
mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/drivers/media/video/$i
cp -a drivers/media/video/$i/*.h $startdir/pkg/usr/src/linux-${_kernver}/drivers/media/video/$i
done
# add dm headers
mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/drivers/md
cp drivers/md/*.h $startdir/pkg/usr/src/linux-${_kernver}/drivers/md
# add inotify.h
mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/include/linux
cp include/linux/inotify.h $startdir/pkg/usr/src/linux-${_kernver}/include/linux/
# add CLUSTERIP file for iptables
mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/net/ipv4/netfilter/
# add wireless headers
mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/net/mac80211/
cp net/mac80211/*.h $startdir/pkg/usr/src/linux-${_kernver}/net/mac80211/
# add dvb headers for external modules
# in reference to:
# http://bugs.archlinux.org/task/9912
mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-core
cp drivers/media/dvb/dvb-core/*.h $startdir/pkg/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-core/
# add dvb headers for external modules
# in reference to:
# http://bugs.archlinux.org/task/11194
mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/include/config/dvb/
cp include/config/dvb/*.h $startdir/pkg/usr/src/linux-${_kernver}/include/config/dvb/
# add xfs and shmem for aufs building
mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/fs/xfs
mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/mm
cp fs/xfs/xfs_sb.h $startdir/pkg/usr/src/linux-${_kernver}/fs/xfs/xfs_sb.h
# add vmlinux
cp vmlinux $startdir/pkg/usr/src/linux-${_kernver}
# copy in Kconfig files
for i in `find . -name "Kconfig*"`; do
mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/`echo $i | sed 's|/Kconfig.*||'`
cp $i $startdir/pkg/usr/src/linux-${_kernver}/$i
done
cd $startdir/pkg/usr/src/linux-${_kernver}/include && ln -s asm-$KARCH asm
chown -R root.root $startdir/pkg/usr/src/linux-${_kernver}
find $startdir/pkg/usr/src/linux-${_kernver} -type d -exec chmod 755 {} \;
cd $startdir/pkg/lib/modules/${_kernver} && \
(rm -f source build; ln -sf ../../../usr/src/linux-${_kernver} build)
# install fallback mkinitcpio.conf file and preset file for kernel
install -m644 -D $startdir/src/${pkgname}.preset $startdir/pkg/etc/mkinitcpio.d/${pkgname}.preset || return 1
# set correct depmod command for install
sed -i -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" $startdir/kernel26mm.install
echo -e "# DO NOT EDIT THIS FILE\nALL_kver='${_kernver}'" > ${startdir}/pkg/etc/mkinitcpio.d/${pkgname}.kver
# remove unneeded architectures
rm -rf $startdir/pkg/usr/src/linux-${_kernver}/arch/{alpha,arm,arm26,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,mips,mn10300,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,um,v850,xtensa}
just replace all the kernel26mm by kernel26mycustomkernelname. same below with the install file and of course in your kernel config.
# arg 1: the new package version
# arg 2: the old package version
KERNEL_VERSION=2.6.28-mm
post_install () {
# updating module dependencies
echo ">>> Updating module dependencies. Please wait ..."
depmod $KERNEL_VERSION > /dev/null 2>&1
# generate init ramdisks
echo ">>> MKINITCPIO SETUP"
echo ">>> ----------------"
echo ">>> If you use LVM2, Encrypted root or software RAID,"
echo ">>> Ensure you enable support in /etc/mkinitcpio.conf ."
echo ">>> More information about mkinitcpio setup can be found here:"
echo ">>> http://wiki.archlinux.org/index.php/Mkinitcpio"
echo ""
echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..."
/sbin/mkinitcpio -p kernel26mm
post_upgrade() {
pacman -Q grub &>/dev/null
hasgrub=$?
pacman -Q lilo &>/dev/null
haslilo=$?
# reminder notices
if [ $haslilo -eq 0 ]; then
echo ">>>"
if [ $hasgrub -eq 0 ]; then
echo ">>> If you use the LILO bootloader, you should run 'lilo' before rebooting."
else
echo ">>> You appear to be using the LILO bootloader. You should run"
echo ">>> 'lilo' before rebooting."
fi
echo ">>>"
fi
if grep "/boot" /etc/fstab 2>&1 >/dev/null; then
if ! grep "/boot" /etc/mtab 2>&1 >/dev/null; then
echo "WARNING: /boot appears to be a seperate partition but is not mounted"
echo " This is most likely not what you want. Please mount your /boot"
echo " partition and reinstall the kernel unless you are sure this is OK"
fi
fi
# updating module dependencies
echo ">>> Updating module dependencies. Please wait ..."
depmod -v $KERNEL_VERSION > /dev/null 2>&1
echo ">>> MKINITCPIO SETUP"
echo ">>> ----------------"
echo ">>> If you use LVM2, Encrypted root or software RAID,"
echo ">>> Ensure you enable support in /etc/mkinitcpio.conf ."
echo ">>> More information about mkinitcpio setup can be found here:"
echo ">>> http://wiki.archlinux.org/index.php/Mkinitcpio"
echo ""
echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..."
if [ "`vercmp $2 2.6.19`" -lt 0 ]; then
/sbin/mkinitcpio -p kernel26mm -m "ATTENTION:\nIf you get a kernel panic below
and are using an Intel chipset, append 'earlymodules=piix' to the
kernel commandline"
else
/sbin/mkinitcpio -p kernel26mm
fi
if [ "`vercmp $2 2.6.21`" -lt 0 ]; then
echo ""
echo "Important ACPI Information:"
echo ">>> Since 2.6.20.7 all possible ACPI parts are modularized."
echo ">>> The modules are located at:"
echo ">>> /lib/modules/$(uname -r)/kernel/drivers/acpi"
echo ">>> For more information about ACPI modules check this wiki page:"
echo ">>> 'http://wiki.archlinux.org/index.php/ACPI_modules'"
fi
op=$1
shift
$op $*
Last edited by bangkok_manouel (2009-01-27 13:55:34)
Maybe you are looking for
-
How to find out, if a dynamic genereated structure already exists in DDIC?
Good morning developers, can you help me with that above mentioned problem? I'm about to write a report which manages to change tablecontrol(s) to alvgrids. My current problem is, that i read all fields of a tablecontrol and generate its <b>structure
-
I am migrating acrobat 8 from PC to Mac. I have the acrobat 8 code. It is an upgrade, download. I do not have the original installation code. How can i get this to work?
-
We have a presentation that is currently in SharePoint MOSS 2007. Users that are currently on Windows 7 and 32 bit IE cannot view the video. But when they use 64 bit IE it works perfectly fine. Anyone know how to fix this? Thanks in advance
-
Help battery to charge or just run plugged in?
I am new to the ibook. All I know is I can stay on the computer awhile and before I know it the batteryis run down then I charge it. If I am going to use it for a long period of time, should I just take the battery out and plug it in? Can I just plug
-
Successful install and restart but failed to restart again, fan loud
My Mac would not boot up. It showed a grey screen with a no entry logo and the fan sounded like it was going to take off. I switched it off and tried again (3x) no good. I used my husband's pc to read the discussions and tried BobP1776's advice to sw