Showing posts with label kernel 3.7. Show all posts
Showing posts with label kernel 3.7. Show all posts

15 January 2013

319. Collection of errors when compiling kernel 3.7.x on AMD FX 8150

Update 20th Feb 2013:  Kernel 3.8 compiles fine on AMD FX 8150. Just ignore kernel 3.7.

Original post:

This is a collection of errors
(although you can obviously compile the kernel this way -- just not on AMD FX 8150...)

It does not hold any solutions

See here for how to compile kernel 3.7.0 to 3.7.1:
http://verahill.blogspot.com.au/2012/12/compiling-kernel-37-on-debian.html
and here for how to patch 3.7.1
http://verahill.blogspot.com.au/2012/12/patching-kernel-371-to-fix.html

See here for how to compile 3.7.2 and 3.7.3:
http://verahill.blogspot.com.au/2013/01/321-compiling-kernel-372-on-debian.html

Post continues:
Normally this wouldn't merit its own post, but because I've been annoyed over the inability to compile
kernels on my AMD FX 8150 I decided to collect as much data on the errors as possible.

Basically, kernel 3.7.x fails to build on AMD FX 8150, while kernels 3.6.3 and 3.5 build just fine.
Here's the lspci -n hardware profile for my system, although I'm fairly certain it's due to AMD FX 8150:
00:00.0 0600: 1002:5a14 (rev 02) 00:04.0 0604: 1002:5a18 00:09.0 0604: 1002:5a1c 00:11.0 0106: 1002:4390 (rev 40) 00:12.0 0c03: 1002:4397 00:12.2 0c03: 1002:4396 00:13.0 0c03: 1002:4397 00:13.2 0c03: 1002:4396 00:14.0 0c05: 1002:4385 (rev 42) 00:14.1 0101: 1002:439c (rev 40) 00:14.2 0403: 1002:4383 (rev 40) 00:14.3 0601: 1002:439d (rev 40) 00:14.4 0604: 1002:4384 (rev 40) 00:14.5 0c03: 1002:4399 00:15.0 0604: 1002:43a0 00:15.1 0604: 1002:43a1 00:15.2 0604: 1002:43a2 00:15.3 0604: 1002:43a3 00:16.0 0c03: 1002:4397 00:16.2 0c03: 1002:4396 00:18.0 0600: 1022:1600 00:18.1 0600: 1022:1601 00:18.2 0600: 1022:1602 00:18.3 0600: 1022:1603 00:18.4 0600: 1022:1604 00:18.5 0600: 1022:1605 01:00.0 0300: 10de:0a65 (rev a2) 01:00.1 0403: 10de:0be3 (rev a1) 02:00.0 0c03: 1b6f:7023 (rev 01) 03:06.0 0200: 10ec:8169 (rev 10) 04:00.0 0200: 10ec:8168 (rev 06)

The lower number of errors for kernel 3.7 below is because I did -j1 (so fewer threads to finish), not because it's any better.

Compilation (-O1 example)
mkdir ~/tmp
cd ~/tmp
wget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.7.2.tar.bz2
tar xvf linux-3.7.2.tar.bz2
cd linux-3.7.2/
cat /boot/config-`uname -r`>.config
make oldconfig
make-kpkg clean
find -name Makefile|xargs -I {} sed -i 's/\-O2/\-O1/g' {}
time fakeroot make-kpkg -j9 --initrd kernel_image kernel_headers

Errors:

-O2 on kernel 3.7.2 with AMD FX 8150:
net/mac80211/mesh_hwmp.c:1224:1: internal compiler error: in dwarf2out_finish, at dwarf2out.c:22603 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. The bug is not reproducible, so it is likely a hardware or OS problem. make[3]: *** [net/mac80211/mesh_hwmp.o] Error 1 make[2]: *** [net/mac80211] Error 2 make[2]: *** Waiting for unfinished jobs.... net/netfilter/xt_esp.c:94:1: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. The bug is not reproducible, so it is likely a hardware or OS problem. make[3]: *** [net/netfilter/xt_esp.o] Error 1 make[2]: *** [net/netfilter] Error 2 make[1]: *** [net] Error 2 make[1]: *** Waiting for unfinished jobs.... /home/me/tmp/linux-3.7.2/arch/x86/include/asm/msr-index.h:1:0: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. The bug is not reproducible, so it is likely a hardware or OS problem. make[6]: *** [drivers/net/wireless/ath/ath9k/ar5008_phy.o] Error 1 make[6]: *** Waiting for unfinished jobs.... make[5]: *** [drivers/net/wireless/ath/ath9k] Error 2 make[4]: *** [drivers/net/wireless/ath] Error 2 make[3]: *** [drivers/net/wireless] Error 2 make[3]: *** Waiting for unfinished jobs.... /home/me/tmp/linux-3.7.2/arch/x86/include/asm/elf.h:78:1: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. The bug is not reproducible, so it is likely a hardware or OS problem. make[4]: *** [drivers/tty/ipwireless/main.o] Error 1 make[3]: *** [drivers/tty/ipwireless] Error 2 make[3]: *** Waiting for unfinished jobs.... drivers/tty/serial/jsm/jsm_neo.c: In function 'neo_intr': drivers/tty/serial/jsm/jsm_neo.c:1244:1: internal compiler error: Aborted Please submit a full bug report, with preprocessed source if appropriate. See for instructions. The bug is not reproducible, so it is likely a hardware or OS problem. make[5]: *** [drivers/tty/serial/jsm/jsm_neo.o] Error 1 make[4]: *** [drivers/tty/serial/jsm] Error 2 make[3]: *** [drivers/tty/serial] Error 2 make[2]: *** [drivers/tty] Error 2 make[2]: *** Waiting for unfinished jobs.... drivers/staging/silicom/bp_proc.c:74:31: warning: 'bp_procfs_dir' defined but not used [-Wunused-variable] drivers/staging/silicom/bp_proc.c:76:31: warning: 'proc_getdir' defined but not used [-Wunused-function] {standard input}: Assembler messages: {standard input}:37643: Error: can't resolve `.LVL231' {*UND* section} - `.Ltext0' {.text section} {standard input}:37739: Error: can't resolve `.LVL231' {*UND* section} - `.Ltext0' {.text section} {standard input}:37743: Error: can't resolve `.LVL231' {*UND* section} - `.Ltext0' {.text section} {standard input}:37783: Error: can't resolve `.LVL231' {*UND* section} - `.Ltext0' {.text section} make[4]: *** [drivers/staging/speakup/kobjects.o] Error 1 make[3]: *** [drivers/staging/speakup] Error 2 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [drivers/staging] Error 2 make[2]: *** [drivers/net] Error 2 In file included from include/linux/genhd.h:65:0, from include/linux/blkdev.h:9, from include/scsi/scsi_cmnd.h:5, from drivers/scsi/sym53c8xx_2/sym_glue.h:58, from drivers/scsi/sym53c8xx_2/sym_hipd.c:44: include/linux/fs.h:1550:49: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. The bug is not reproducible, so it is likely a hardware or OS problem. make[4]: *** [drivers/scsi/sym53c8xx_2/sym_hipd.o] Error 1 make[3]: *** [drivers/scsi/sym53c8xx_2] Error 2 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [drivers/scsi] Error 2 make[1]: *** [drivers] Error 2 make: *** [debian/stamp/build/kernel] Error 2

and finally
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd)[0x2b377411eead] /usr/lib/gcc/x86_64-linux-gnu/4.7/cc1[0x4d2f51] ======= Memory map: ======== 00400000-00fd3000 r-xp 00000000 08:01 1312897 /usr/lib/gcc/x86_64-linux-gnu/4.7/cc1 011d2000-011dd000 rw-p 00bd2000 08:01 1312897 /usr/lib/gcc/x86_64-linux-gnu/4.7/cc1 011dd000-0133c000 rw-p 00000000 00:00 0 01df7000-020b7000 rw-p 00000000 00:00 0 [heap] 2b3772f20000-2b3772f40000 r-xp 00000000 08:01 11800025 /lib/x86_64-linux-gnu/ld-2.13.so 2b3772f40000-2b3772f42000 rw-p 00000000 00:00 0 2b377313f000-2b3773140000 r--p 0001f000 08:01 11800025 /lib/x86_64-linux-gnu/ld-2.13.so 2b3773140000-2b3773141000 rw-p 00020000 08:01 11800025 /lib/x86_64-linux-gnu/ld-2.13.so 2b3773141000-2b3773142000 rw-p 00000000 00:00 0 2b3773148000-2b3773151000 r-xp 00000000 08:01 2233201 /usr/lib/x86_64-linux-gnu/libfakeroot/libfakeroot-sysv.so 2b3773151000-2b3773351000 ---p 00009000 08:01 2233201 /usr/lib/x86_64-linux-gnu/libfakeroot/libfakeroot-sysv.so 2b3773351000-2b3773352000 rw-p 00009000 08:01 2233201 /usr/lib/x86_64-linux-gnu/libfakeroot/libfakeroot-sysv.so 2b377336b000-2b377336c000 rw-p 00000000 00:00 0 2b3773370000-2b3773384000 r-xp 00000000 08:01 1321607 /usr/lib/x86_64-linux-gnu/libmpc.so.2.0.0 2b3773384000-2b3773584000 ---p 00014000 08:01 1321607 /usr/lib/x86_64-linux-gnu/libmpc.so.2.0.0 2b3773584000-2b3773585000 rw-p 00014000 08:01 1321607 /usr/lib/x86_64-linux-gnu/libmpc.so.2.0.0 2b3773588000-2b37735e3000 r-xp 00000000 08:01 1321605 /usr/lib/x86_64-linux-gnu/libmpfr.so.4.1.0 2b37735e3000-2b37737e3000 ---p 0005b000 08:01 1321605 /usr/lib/x86_64-linux-gnu/libmpfr.so.4.1.0 2b37737e3000-2b37737e5000 rw-p 0005b000 08:01 1321605 /usr/lib/x86_64-linux-gnu/libmpfr.so.4.1.0 2b37737e8000-2b377384f000 r-xp 00000000 08:01 1321603 /usr/lib/x86_64-linux-gnu/libgmp.so.10.0.5 2b377384f000-2b3773a4f000 ---p 00067000 08:01 1321603 /usr/lib/x86_64-linux-gnu/libgmp.so.10.0.5 2b3773a4f000-2b3773a57000 rw-p 00067000 08:01 1321603 /usr/lib/x86_64-linux-gnu/libgmp.so.10.0.5 2b3773a57000-2b3773a58000 rw-p 00000000 00:00 0 2b3773a58000-2b3773a5a000 r-xp 00000000 08:01 11800014 /lib/x86_64-linux-gnu/libdl-2.13.so 2b3773a5a000-2b3773c5a000 ---p 00002000 08:01 11800014 /lib/x86_64-linux-gnu/libdl-2.13.so 2b3773c5a000-2b3773c5b000 r--p 00002000 08:01 11800014 /lib/x86_64-linux-gnu/libdl-2.13.so 2b3773c5b000-2b3773c5c000 rw-p 00003000 08:01 11800014 /lib/x86_64-linux-gnu/libdl-2.13.so 2b3773c60000-2b3773c76000 r-xp 00000000 08:01 11796562 /lib/x86_64-linux-gnu/libz.so.1.2.7 2b3773c76000-2b3773e75000 ---p 00016000 08:01 11796562 /lib/x86_64-linux-gnu/libz.so.1.2.7 2b3773e75000-2b3773e76000 r--p 00015000 08:01 11796562 /lib/x86_64-linux-gnu/libz.so.1.2.7 2b3773e76000-2b3773e77000 rw-p 00016000 08:01 11796562 /lib/x86_64-linux-gnu/libz.so.1.2.7 2b3773e78000-2b3773ef9000 r-xp 00000000 08:01 11800003 /lib/x86_64-linux-gnu/libm-2.13.so 2b3773ef9000-2b37740f8000 ---p 00081000 08:01 11800003 /lib/x86_64-linux-gnu/libm-2.13.so 2b37740f8000-2b37740f9000 r--p 00080000 08:01 11800003 /lib/x86_64-linux-gnu/libm-2.13.so 2b37740f9000-2b37740fa000 rw-p 00081000 08:01 11800003 /lib/x86_64-linux-gnu/libm-2.13.so 2b37740fa000-2b37740fb000 rw-p 00000000 00:00 0 2b3774100000-2b3774280000 r-xp 00000000 08:01 11796538 /lib/x86_64-linux-gnu/libc-2.13.so 2b3774280000-2b3774480000 ---p 00180000 08:01 11796538 /lib/x86_64-linux-gnu/libc-2.13.so 2b3774480000-2b3774484000 r--p 00180000 08:01 11796538 /lib/x86_64-linux-gnu/libc-2.13.so 2b3774484000-2b3774485000 rw-p 00184000 08:01 11796538 /lib/x86_64-linux-gnu/libc-2.13.so 2b3774485000-2b377448d000 rw-p 00000000 00:00 0 2b3774490000-2b3774681000 r--p 00000000 08:01 1310939 /usr/lib/locale/locale-archive 2b3774681000-2b377469e000 rw-p 00000000 00:00 0 2b37746a3000-2b37750d8000 rw-p 00000000 00:00 0 2b3775119000-2b3776444000 rw-p 00000000 00:00 0 2b3776460000-2b3776475000 r-xp 00000000 08:01 11796737 /lib/x86_64-linux-gnu/libgcc_s.so.1 2b3776475000-2b3776675000 ---p 00015000 08:01 11796737 /lib/x86_64-linux-gnu/libgcc_s.so.1 2b3776675000-2b3776676000 rw-p 00015000 08:01 11796737 /lib/x86_64-linux-gnu/libgcc_s.so.1 2b3778000000-2b3778021000 rw-p 00000000 00:00 0 2b3778021000-2b377c000000 ---p 00000000 00:00 0 7ffffd08f000-7ffffd0b2000 rw-p 00000000 00:00 0 [stack] 7ffffd200000-7ffffd201000 r-xp 00000000 00:00 0 [vdso] ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]


-O1; kernel 3.7.2; AMD FX 8150
fs/ecryptfs/keystore.c:1168:28: warning: 'payload_len' may be used uninitialized in this function [-Wmaybe-uninitialized] sound/pci/hda/patch_cmedia.c:777:1: internal compiler error: in size_of_die, at dwarf2out.c:7795 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. The bug is not reproducible, so it is likely a hardware or OS problem. make[4]: *** [sound/pci/hda/patch_cmedia.o] Error 1 make[3]: *** [sound/pci/hda] Error 2 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [sound/pci] Error 2 make[1]: *** [sound] Error 2 make[1]: *** Waiting for unfinished jobs.... In file included from drivers/mtd/chips/cfi_cmdset_0001.c:35:0: drivers/mtd/chips/cfi_cmdset_0001.c: In function 'cfi_intelext_write_words': include/linux/mtd/map.h:331:11: warning: 'r.x[0]' may be used uninitialized in this function [-Wmaybe-uninitialized] drivers/media/usb/gspca/topro.c:4968:1: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. The bug is not reproducible, so it is likely a hardware or OS problem. make[5]: *** [drivers/media/usb/gspca/topro.o] Error 1 make[4]: *** [drivers/media/usb/gspca] Error 2 make[3]: *** [drivers/media/usb] Error 2 make[3]: *** Waiting for unfinished jobs.... drivers/net/ethernet/amd/nmclan_cs.c: In function 'nmclan_config': drivers/net/ethernet/amd/nmclan_cs.c:625:3: warning: 'pcmcia_request_exclusive_irq' is deprecated (declared at include/pcmcia/ds.h:201) [-Wdeprecated-declarations] make[2]: *** [drivers/media] Error 2 make[2]: *** Waiting for unfinished jobs.... drivers/net/ethernet/intel/ixgb/ixgb_ee.c:604:1: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. The bug is not reproducible, so it is likely a hardware or OS problem. make[6]: *** [drivers/net/ethernet/intel/ixgb/ixgb_ee.o] Error 1 make[6]: *** Waiting for unfinished jobs.... make[5]: *** [drivers/net/ethernet/intel/ixgb] Error 2 make[4]: *** [drivers/net/ethernet/intel] Error 2 make[3]: *** [drivers/net/ethernet] Error 2 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [drivers/net] Error 2 make[1]: *** [drivers] Error 2 make: *** [debian/stamp/build/kernel] Error 2

-O0, kernel 3.7.2, AMD FX 8150
exec make kpkg_version=12.036+nmu3 -f /usr/share/kernel-package/ruleset/minimal.mk debian INITRD=YES exec debian/rules INITRD=YES kernel_image kernel_headers Setup is 16988 bytes (padded to 17408 bytes). System is 2884 kB CRC f8376713 drivers/isdn/hardware/eicon/divasi.c:577:1: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. The bug is not reproducible, so it is likely a hardware or OS problem. make[5]: *** [drivers/isdn/hardware/eicon/divasi.o] Error 1 make[4]: *** [drivers/isdn/hardware/eicon] Error 2 make[4]: *** Waiting for unfinished jobs.... make[3]: *** [drivers/isdn/hardware] Error 2 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [drivers/isdn] Error 2 make[2]: *** Waiting for unfinished jobs.... fs/reiserfs/bitmap.c: In function 'scan_bitmap_block.constprop.9': fs/reiserfs/bitmap.c:236:9: warning: 'next' may be used uninitialized in this function [-Wmaybe-uninitialized] make[1]: *** [drivers] Error 2 make[1]: *** Waiting for unfinished jobs.... make: *** [debian/stamp/build/kernel] Error 2

Error messages when compiling kernel 3.7 on AMD FX 8150 with -O2 or -O1

exec make kpkg_version=12.036+nmu3 -f /usr/share/kernel-package/ruleset/minimal.mk debian INITRD=YES exec debian/rules INITRD=YES kernel_image kernel_headers net/xfrm/xfrm_sysctl.c:75:1: internal compiler error: in pop_scope, at c-decl.c:1244 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. The bug is not reproducible, so it is likely a hardware or OS problem. make[3]: *** [net/xfrm/xfrm_sysctl.o] Error 1 make[2]: *** [net/xfrm] Error 2 make[1]: *** [net] Error 2 make: *** [debian/stamp/build/kernel] Error 2


Kernel 3.7 with -O0 on AMD FX 8150
exec make kpkg_version=12.036+nmu3 -f /usr/share/kernel-package/ruleset/minimal.mk debian INITRD=YES exec debian/rules INITRD=YES kernel_image kernel_headers In file included from include/acpi/platform/aclinux.h:59:0, from include/acpi/platform/acenv.h:141, from include/acpi/acpi.h:56, from drivers/acpi/acpica/exmisc.c:45: include/linux/sched.h:1352:9: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. The bug is not reproducible, so it is likely a hardware or OS problem. make[4]: *** [drivers/acpi/acpica/exmisc.o] Error 1 make[3]: *** [drivers/acpi/acpica] Error 2 make[2]: *** [drivers/acpi] Error 2 make[1]: *** [drivers] Error 2 make: *** [debian/stamp/build/kernel] Error 2

19 December 2012

295. Patching kernel 3.7.1 to fix the azx_runtime_suspend bug

(For a general approach to compiling kernel 3.7,see http://verahill.blogspot.com.au/2012/12/compiling-kernel-37-on-debian.html )

Note that it is NOT necessary to patch version 3.7.2

If you're seeing the following error messages during boot of kernel 3.7.0:
azx_runtime_suspend
pci_pcm_runtime_suspend
snd_hda_intel returns -11
you will want to patch your kernel. Technically I should be patching 3.7, but we might as well go straight for kernel 3.7.1.

So, here's how to patch it:
wget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.7.1.tar.bz2
tar xvf linux-3.7.1.tar.bz2
cd linux-3.7.1/
cat /boot/config-`uname -r`>.config
make oldconfig
wget https://patchwork.kernel.org/patch/1865521/raw/
mv index.html hda_intel.patch
patch -i hda_intel.patch -p 1
patching file sound/pci/hda/hda_intel.c Hunk #1 succeeded at 2557 (offset -134 lines). Hunk #2 succeeded at 2571 (offset -134 lines).
make-kpkg clean time fakeroot make-kpkg -j3 --initrd --revision=3.7.1 --append-to-version=-amd64 kernel_image kernel_headers

Once building is complete
mv ../*3.7.1*.deb .
sudo dpkg -i *.deb
and reboot.

Tried it and it works.

12 December 2012

290. Compiling Kernel 3.7.* on Debian (Wheezy/testing)

Update 19/12/2012
On one of my seven boxes I'm having problems with the new kernel, receiving messages such as
pci_pcm_runtime_suspend()
azx_runtime_suspend
[snd_hda_intel] returns -11
This is a known bug (https://patchwork.kernel.org/patch/1865521/), but as can be seen in that message the patch might not be included until kernel 3.8 (although one of the authors call for a backport to kernel 3.6). Again, this happened only on one out of seven computers tested so far so it might not be a universal problem. See here for how to fix it yourself: http://verahill.blogspot.com.au/2012/12/patching-kernel-371-to-fix.html

Note
 vboxdrv 4.1.18 and nvidia 304.48-1 dkms packages do not seem to play well with 3.7. This is perhaps not that surprising given that wheezy is frozen since June 2012.

* The virtualbox-dkms/vboxdrv (4.1.18-dfsg-1.1) isn't playing ball on 3.7. See e.g. https://forums.virtualbox.org/viewtopic.php?f=7&t=53031 and http://www.kubuntuforums.net/showthread.php?61234-Kernel-update-video-drivers-and-virtualbox

I solved it by going to the virtualbox website and installing their .deb package:
wget http://download.virtualbox.org/virtualbox/4.2.4/virtualbox-4.2_4.2.4-81684~Debian~wheezy_amd64.deb
sudo apt-get autoremove virtualbox virtualbox-qt virtualbox-dkms
sudo dpkg -i virtualbox-4.2_4.2.4-81684~Debian~wheezy_amd64.deb
sudo /etc/init.d/vboxdrv setup

This works absolutely fine under 3.7 and 3.7.1

* I'm also having issues with building the nvidia dkms module on this kernel. It seems to be a bug which is resolved by upgrading to a newer nvidia driver. http://www.mail-archive.com/desktop-packages@lists.launchpad.net/msg184146.html

Given that Wheezy is frozen since the end of June I suspect that we won't be seeing any fix for this. Instead I ended up installing nvidia-current (310.19) using smxi (smxi.org) and it's working fine (the alt+prtscrn screenshot bug doesn't seem to be resolved though).



Original post:
Be aware that starting with kernel 3.6 you will need to explicitly include compilation of various drivers for multimedia and webcams -- see e.g.
http://verahill.blogspot.com.au/2012/10/compiling-kernel-36-on-debian.html
http://verahill.blogspot.com.au/2012/10/leadtek-dtv-1000s-in-kernel-36-debian.html

Other than that, compiling kernel 3.7.* is pretty straightforward. The ncurses packages are needed only for 'make menuconfig'

sudo apt-get install kernel-package fakeroot build-essential ncurses-bin ncurses-dev
mkdir ~/tmp
cd ~/tmp
wget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.7.1.tar.bz2
tar xvf linux-3.7.1.tar.bz2
cd linux-3.7.1/
cat /boot/config-`uname -r`>.config
make oldconfig

and answer the questions (see bottom of the post for a list of new features).

If you want to specifically include a driver, then the easiest thing to do is:

make menuconfig

and navigating through (or search -- hit / ). E.g. saa7134 is found under Device drivers/Multimedia support/Media PCI adapters/Philips SAA7134 support. Don't forget to compile in remote control support as well if needed.

Continue (replace 4 with whatever is suitable for the number of cores on your system):
make-kpkg clean
time fakeroot make-kpkg -j4 --initrd --revision=3.7.1 --append-to-version=-amd64 kernel_image kernel_headers

This took 20 minutes on a four-core i5-2400..

mv ../linux*3.7*.deb .
sudo dpkg -i *.deb

Building failed completely on an AMD 8150FX 8 core system (See bottom of the post). It built fine on first try on all other systems.



Changes (if in doubt, hit enter for the default option):

* CPU/Task time and stats accounting
*
Cputime accounting
> 1. Simple tick based cputime accounting (TICK_CPU_ACCOUNTING) (NEW)
  2. Fine granularity task level IRQ time accounting (IRQ_TIME_ACCOUNTING)
choice[1-2]: 1
Consider userspace as in RCU extended quiescent state (RCU_USER_QS) [N/y/?] (NEW)
Module signature verification (MODULE_SIG) [N/y/?] (NEW)
Legacy cpb sysfs knob support for AMD CPUs (X86_ACPI_CPUFREQ_CPB) [Y/n/?] (NEW)
Packet: sockets monitoring interface (PACKET_DIAG) [N/m/y/?] (NEW)
IPv6: GRE tunnel (IPV6_GRE) [N/m/y/?] (NEW) 
IPv4 NAT (NF_NAT_IPV4) [N/m/?] (NEW)
IPv6 NAT (NF_NAT_IPV6) [N/m/?] (NEW)
OMAP OCP2SCP DRIVER (OMAP_OCP2SCP) [N/m/y/?] (NEW) 
 Maximum expected bad eraseblock count per 1024 eraseblocks (MTD_UBI_BEB_LIMIT) [20] (NEW)
UBI Fastmap (Experimental feature) (MTD_UBI_FASTMAP) [N/y/?] (NEW)
Calxeda Highbank SATA support (SATA_HIGHBANK) [N/m/?] (NEW)
Virtual eXtensible Local Area Network (VXLAN) (VXLAN) [N/m/y/?] (NEW) 
PCH PTP clock support (PCH_PTP) [N/y/?] (NEW)
Solarflare SFC9000-family PTP support (SFC_PTP) [Y/n/?] (NEW)
Drivers for Atheros AT803X PHYs (AT803X_PHY) [N/m/?] (NEW)
MAX310X support (SERIAL_MAX310X) [N/y/?] (NEW)
SCCNXP serial port support (SERIAL_SCCNXP) [N/m/y/?] (NEW)
TPM HW Random Number Generator support (HW_RANDOM_TPM) [M/n/?] (NEW)
TPM Interface Specification 1.2 Interface (I2C - Infineon) (TCG_TIS_I2C_INFINEON) [N/m/?] (NEW)
NXP SC18IS602/602B/603 I2C to SPI bridge (SPI_SC18IS602) [N/m/?] (NEW)
OMAP HDQ driver (HDQ_MASTER_OMAP) [N/m/?] (NEW)
Analog Devices ADT7410 (SENSORS_ADT7410) [N/m/?] (NEW)
Maxim MAX197 and compatibles (SENSORS_MAX197) [N/m/y/?] (NEW)
generic cpu cooling support (CPU_THERMAL) [N/y/?] (NEW)
Fairchild FAN53555 Regulator (REGULATOR_FAN53555) [N/m/?] (NEW)
Media USB Adapters (MEDIA_USB_SUPPORT) [N/y/?] (NEW) 
STK1160 USB video capture support (VIDEO_STK1160) [N/m/?] (NEW)
STK1160 AC97 codec support (VIDEO_STK1160_AC97) [N/y/?] (NEW)   
Enable debug for the B2C2 FlexCop drivers (DVB_B2C2_FLEXCOP_USB_DEBUG) [N/y/?] (NEW)
Media PCI Adapters (MEDIA_PCI_SUPPORT) [N/y/?] (NEW)
Enable debug for the B2C2 FlexCop drivers (DVB_B2C2_FLEXCOP_PCI_DEBUG) [N/y/?] (NEW)
Media test drivers (V4L_TEST_DRIVERS) [N/y] (NEW)
ISA and parallel port devices (MEDIA_PARPORT_SUPPORT) [N/y/?] (NEW)
Autoselect tuners and i2c modules to build (MEDIA_SUBDRV_AUTOSELECT) [Y/n/?] (NEW)
Maximum debug level (NOUVEAU_DEBUG) [5] (NEW)
Default debug level (NOUVEAU_DEBUG_DEFAULT) [3] (NEW)
Backlight Driver for LM3630 (BACKLIGHT_LM3630) [N/m/?] (NEW)
Backlight Driver for LM3639 (BACKLIGHT_LM3639) [N/m/?] (NEW)
Sony PS3 BD Remote Control (HID_PS3REMOTE) [N/m/?] (NEW)
HID Sensors framework support (HID_SENSOR_HUB) [N/m/?] (NEW)
ZTE USB serial driver (USB_SERIAL_ZTE) [N/m/?] (NEW)
Functions for loading firmware on EZUSB chips (USB_EZUSB_FX2) [M/y/?] (NEW)
LED support for LM3642 Chip (LEDS_LM3642) [N/m/?] (NEW)
LED support for LM355x Chips, LM3554 and LM3556 (LEDS_LM355x) [N/m/?] (NEW)
LED CPU Trigger (LEDS_TRIGGER_CPU) [N/y/?] (NEW)
Dallas DS2404 (RTC_DRV_DS2404) [N/m/y/?] (NEW)
Silicom devices (NET_VENDOR_SILICOM) [Y/n/?] (NEW)
Silicom BypassCTL library support (SBYPASS) [N/m/?] (NEW)
Silicom BypassCTL net support (BPCTL) [N/m/?] (NEW)
Cambridge Electronic Design 1401 USB support (CED1401) [N/m/?] (NEW)
Digi Realport driver (DGRP) [N/m/y/?] (NEW) *
STE-Modem remoteproc support (STE_MODEM_RPROC) [N/m/y/?] (NEW)
SMB2 network file system support (EXPERIMENTAL) (CIFS_SMB2) [N/y/?] (NEW)
Red-Black tree test (RBTREE_TEST) [N/m/?] (NEW)
Interval tree test (INTERVAL_TREE_TEST) [N/m/?] (NEW)
CAST5 (CAST-128) cipher algorithm (x86_64/AVX) (CRYPTO_CAST5_AVX_X86_64) [N/m/y/?] (NEW)
CAST6 (CAST-256) cipher algorithm (x86_64/AVX) (CRYPTO_CAST6_AVX_X86_64) [N/m/y/?] (NEW)
Asymmetric (public-key cryptographic) key type (ASYMMETRIC_KEY_TYPE) [N/m/y/?] (NEW)
Asymmetric public-key crypto algorithm subtype (ASYMMETRIC_PUBLIC_KEY_SUBTYPE) [N/m/?] (NEW)
RSA public-key algorithm (PUBLIC_KEY_ALGO_RSA) [N/m/?] (NEW)
X.509 certificate parser (X509_CERTIFICATE_PARSER) [N/m/?] (NEW)


AMD FX 8150
My AMD FX8150 is causing no end of problems when it comes to compiling the kernel e.g.

In file included from include/linux/dynamic_debug.h:100:0,
                 from include/linux/kernel.h:14,
                 from include/linux/sched.h:15,
                 from include/linux/blkdev.h:4,
                 from drivers/scsi/lpfc/lpfc_sli.c:22:
include/linux/string.h:23:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See  /usr/share/doc/gcc-4.7/README.Bugs for instructions.
  CC [M]  drivers/scsi/lpfc/lpfc_ct.o
[..]
  LD [M]  drivers/scsi/osd/osd.o
  CC [M]  drivers/scsi/mpt2sas/mpt2sas_ctl.o
The bug is not reproducible, so it is likely a hardware or OS problem.
make[4]: *** [drivers/scsi/lpfc/lpfc_sli.o] Error 1
make[3]: *** [drivers/scsi/lpfc] Error 2
make[3]: *** Waiting for unfinished jobs....