You are not logged in.

#1 2005-04-18 11:43:04

KENTOSI
Member
From: Sydney, Australia
Registered: 2005-02-27
Posts: 69
Website

Error compiling distro-default kernel

Ok here's what I did:

[root@nazgul linux-2.6.11.3-ARCH]# cd /usr/src/linux-2.6.11.3-ARCH
[root@nazgul linux-2.6.11.3-ARCH]# cp .config .config.original
[root@nazgul linux-2.6.11.3-ARCH]# cp /boot/kconfig26 .config

[root@nazgul linux-2.6.11.3-ARCH]# make menuconfig
--> Change system to Pentium 4
--> Disable toshiba laptop extensions
--> Convert IPv6 into a module rather than built in to the kernel

[root@nazgul linux-2.6.11.3-ARCH]# make bzImage

and I get the following:

[root@nazgul linux-2.6.11.3-ARCH]# make
  CHK     include/linux/version.h
  SPLIT   include/linux/autoconf.h -> include/config/*
  CHK     include/asm-i386/asm_offsets.h
  CC      scripts/mod/empty.o
  MKELF   scripts/mod/elfconfig.h
  HOSTCC  scripts/mod/file2alias.o
  HOSTCC  scripts/mod/modpost.o
  HOSTCC  scripts/mod/sumversion.o
  HOSTLD  scripts/mod/modpost
scripts/Makefile.build:13: init/Makefile: No such file or directory
make[1]: *** No rule to make target `init/Makefile'.  Stop.
make: *** [init] Error 2

~gautam

Offline

#2 2005-04-18 13:19:34

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Error compiling distro-default kernel

Well, I don't know what's the problem here, but I'd anyway suggest you to use ABS to build a new kernel. Just go to /var/abs/kernels/kernel26, change 'make config' at line 39 in PKGBUILD to 'make menuconfig' and run 'makepkg' ;-)

Offline

#3 2005-04-18 13:26:27

fetreney2000
Member
From: Malaysia
Registered: 2005-02-01
Posts: 81

Re: Error compiling distro-default kernel

The included kernel source code in the /usr/src/{default-kernel} is not a complete source IMO. You need to download the complete kernel source from kernel.org to compile a custom kernel.
It will be even better if you can build your custom kernel "The Arch Way" by using Arch Build System (ABS). You can learn about it from Arch Linux Wiki.

Here is a very basic and crude kernel PKGBUILD :

pkgname=
pkgver=
pkgrel=
pkgdesc=""
url="http://www.kernel.org"
source=('')
md5sums=('')

build()
  {
    mkdir -p $startdir/pkg/lib/modules
    mkdir -p $startdir/pkg/boot
    mkdir -p $startdir/pkg/usr/src
    cp $startdir/.config $startdir/src/linux-$pkgver
    cd $startdir/src/linux-$pkgver
    make xconfig || return 1
    make bzImage || return 1
    make modules || return 1
    make INSTALL_MOD_PATH=$startdir/pkg modules_install || return 1
    cp $startdir/src/linux-$pkgver/System.map $startdir/pkg/boot/System.map
    cp $startdir/src/linux-$pkgver/arch/i386/boot/bzImage $startdir/pkg/boot/vmlinuz
    make clean
    rm .config.old
    cp -r $startdir/src/linux-$pkgver $startdir/pkg/usr/src
    cd $startdir/pkg/lib/modules/$pkgver-$pkgname
    rm -f build source
    ln -sf /usr/src/linux-$pkgver build
    ln -sf /usr/src/linux-$pkgver source
  }

You can get a complex and sophiscated PKGBUILD with tutorial and kernel patching support from the wiki BTW.

Offline

#4 2005-04-18 15:06:01

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Error compiling distro-default kernel

run abs and then go to the /var/abs/kernels/kernel26 directory.... modify the PKGBUILD file to your liking and run "makepkg" - that is the distro default kernel

Offline

#5 2005-04-18 18:39:32

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: Error compiling distro-default kernel

I just copied the .config file in /usr/src/linux~ to the abs build file and rename it to config (after backing up the orignal). You'll have to modify the PKGBUILD to accept the md5sum for the new config file. Before that, run makepkg and verify all the rest of the md5sums went through ok then modify it by running

makepkg -g >>PKGBUILD

This will insert the new md5sums at the bottom of the PKGBUILD. Just cut and paste to the right spot from there.

Offline

Board footer

Powered by FluxBB