Recompile ubuntu kernel

Bug #280173 reported by Patrick

This bug report was converted into a question: question #200552: Recompile ubuntu kernel.

12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: linux-source-2.6.27

Hi there

I've installed the linux-source-2.6.27 package and now I'm trying to recompile it. Why? I want to enable the pci express power savings and want to patch it to enable tux on ice.

To recompile I do: S
make oldconfig
make xconfig
make-kpkg clean
make-kpkg --inititrd --append-to-version=-patrick kernel_image kernel_headers

I've compiled succesfullly various kernels before, but in intrepid I am unable to do it. When I do make-kpkg clean I get this error:

patrick@patrick-laptop:~/Escriptori/linux-source-2.6.27$ sudo make-kpkg clean
exec make -f /usr/share/kernel-package/ruleset/minimal.mk clean
====== making target minimal_clean [new prereqs: ]======
Cleaning.
test ! -f .config || cp -pf .config config.precious
test ! -e stamp-building || rm -f stamp-building
test ! -f Makefile || \
            make ARCH=xen distclean
make[1]: Entering directory `/home/patrick/Escriptori/linux-source-2.6.27'
Makefile:528: /home/patrick/Escriptori/linux-source-2.6.27/arch/xen/Makefile: No such file or directory
make[1]: *** No rule to make target `/home/patrick/Escriptori/linux-source-2.6.27/arch/xen/Makefile'. Stop.
make[1]: Leaving directory `/home/patrick/Escriptori/linux-source-2.6.27'
make: *** [minimal_clean] Error 2

I've tried with a 2.6.26.5 kernel from kernel.org and it works fine. After make-kpkg clean I get this:

patrick@patrick-laptop:~/Escriptori/linux-2.6.26.5$ make-kpkg clean
exec make -f /usr/share/kernel-package/ruleset/minimal.mk clean
====== making target minimal_clean [new prereqs: ]======
Cleaning.
test ! -f .config || cp -pf .config config.precious
test ! -e stamp-building || rm -f stamp-building
test ! -f Makefile || \
            make ARCH=x86_64 distclean
make[1]: Entering directory `/home/patrick/Escriptori/linux-2.6.26.5'
  CLEAN scripts/basic
  CLEAN scripts/kconfig
  CLEAN include/config
  CLEAN .config .config.old include/linux/autoconf.h
make[1]: Leaving directory `/home/patrick/Escriptori/linux-2.6.26.5'
test ! -f config.precious || mv -f config.precious .config
rm -f modules/modversions.h modules/ksyms.ver conf.vars scripts/cramfs/cramfsck scripts/cramfs/mkcramfs applied_patches stamp-build stamp-configure stamp-image stamp-headers stamp-src stamp-diff stamp-doc stamp-manual stamp-patch stamp-buildpackage stamp-debian

I believe it's having trouble with arch. The 27 ubuntu kernel outputs ARCH=xen and the 26.5 ARCH=x86_64

Am I doing something wrong or is it a bug?

thanks for you time

description: updated
description: updated
Revision history for this message
Patrick (patrick-voegeli) wrote :

Some update: I'm having the exact same problem with the 2.6.27 kernel downloaded from kernel.org.

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Hi Patrick,

Where/how did you get the Ubuntu kernel source? I'd recommend cloning straight from the git tree. I'm not seeing any errors on my machine here:

ogasawara@emiko:/tmp/ubuntu-intrepid$ sudo make-kpkg clean
[sudo] password for ogasawara:
exec make -f /usr/share/kernel-package/ruleset/minimal.mk clean
====== making target minimal_clean [new prereqs: ]======
Cleaning.
test ! -f .config || cp -pf .config config.precious
test ! -e stamp-building || rm -f stamp-building
test ! -f Makefile || \
            make ARCH=i386 distclean
test ! -f config.precious || mv -f config.precious .config
rm -f modules/modversions.h modules/ksyms.ver conf.vars scripts/cramfs/cramfsck scripts/cramfs/mkcramfs applied_patches stamp-build stamp-configure stamp-image stamp-headers stamp-src stamp-diff stamp-doc stamp-manual stamp-patch stamp-buildpackage stamp-debian

The following wiki might also be helpful - https://help.ubuntu.com/community/Kernel/Compile . Thanks.

Changed in linux:
status: New → Incomplete
Revision history for this message
Patrick (patrick-voegeli) wrote :

what I did:

sudo apt-get install linux-source-2.6.27
extract the source under /usr/src
cd /usr/src/kernel-dir
sudo make oldconfig
sudo make-kpkg clean

error appears.

Anyway, I just solved it: if I do sudo make xconfig and there untick Paravirtualized guest support, under Processor types and features, save and then do sudo make-kpkg clean it just works, I get ARCH=x86_64 and the kernel compiles just fine.

I still don't understand why it doesn't compile using the same config as the standard ubuntu kernel.

Thank you and sorry

Revision history for this message
quoderat (fullyawake) wrote :

I experience the same bug as Patrick.

I downloaded the kernel source straight from kernel.org, as found here:

http://ubuntuforums.org/showthread.php?t=311158

I've compiled my kernel this way probably two dozen times.

If I uncheck "Paravirtualized guest support," it compiles just fine.

Revision history for this message
mavant (matthew-avant) wrote :

Rather belated response, but I just ran into this bug today while trying to patch wifi for aircrack.

I don't know why this is, but a good solution is to specify the arch with "make-kpkg --arch i386 clean", for example. Just specify any arch name in the source/arch directory and you're good (though you'll want to pick the arch your machine runs on).

Revision history for this message
mavant (matthew-avant) wrote :

Typo: "--arch=i386" not "--arch i386".

Revision history for this message
Tarek Eldeeb (tarekeldeeb) wrote :

Same problem ..

but adding "--arch=x86_64" did the trick for both clean and make

salam

era (era)
Changed in linux:
status: Incomplete → Confirmed
Revision history for this message
penalvch (penalvch) wrote :

Patrick, thank you for taking the time to report this issue and helping to make Ubuntu better. Examining the information you have given us, this does not appear to be a bug report so we are closing it and converting it to a question in the support tracker. We understand the difficulties you are facing, but it is better to raise problems you are having in the support tracker at https://answers.launchpad.net/ubuntu if you are uncertain if they are bugs. You can also find a valid help posting your problem in the support forum of your local Ubuntu's community http://loco.ubuntu.com/ or asking at http://askubuntu.com. For help on reporting bugs, see https://help.ubuntu.com/community/ReportingBugs.

Changed in linux (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.