~ $ ls -la /usr/src/ total 20 drwxr-xr-x 5 root root 4096 Oct 20 20:22 . drwxr-xr-x 17 root root 4096 Aug 4 22:01 .. -rw-r--r-- 1 root root 0 Jun 6 00:52 .keep lrwxrwxrwx 1 root root 19 Oct 20 15:52 linux -> linux-3.10.7-gentoo drwxr-xr-x 25 root root 4096 Oct 20 22:12 linux-3.10.7-gentoo drwxr-xr-x 24 root root 4096 Aug 25 13:03 linux-3.8.13-gentoo drwxr-xr-x 2 root root 4096 Oct 20 21:39 nvidia-325.15 lrwxrwxrwx 1 root root 28 Sep 11 21:36 vboxhost-4.2.18 -> /opt/VirtualBox/src/vboxhost ~ $ ls -la /usr/src/linux/ total 81960 drwxr-xr-x 25 root root 4096 Oct 20 22:12 . drwxr-xr-x 5 root root 4096 Oct 20 20:22 .. -rw-r----- 1 root root 105863 Oct 20 20:54 .config -rw-r--r-- 1 root root 105852 Oct 20 13:07 .config.old -rw-r--r-- 1 root root 1091 Jun 30 19:13 .gitignore -rw-r--r-- 1 root root 4465 Jun 30 19:13 .mailmap -rw-r--r-- 1 root root 668 Oct 20 21:09 .missing-syscalls.d -rw-r--r-- 1 root root 2990201 Oct 20 21:30 .tmp_System.map -rw-r----- 1 root root 1625680 Oct 20 21:30 .tmp_kallsyms1.o -rw-r----- 1 root root 1625680 Oct 20 21:30 .tmp_kallsyms2.o drwxr-xr-x 2 root root 24576 Oct 20 21:30 .tmp_versions -rwxr-x--- 1 root root 20102957 Oct 20 21:30 .tmp_vmlinux1 -rwxr-x--- 1 root root 22200109 Oct 20 21:30 .tmp_vmlinux2 -rw-r----- 1 root root 2 Oct 20 21:30 .version -rw-r--r-- 1 root root 75 Oct 20 21:30 .vmlinux.cmd -rw-r--r-- 1 root root 18693 Jun 30 19:13 COPYING -rw-r--r-- 1 root root 95317 Jun 30 19:13 CREDITS drwxr-xr-x 100 root root 12288 Aug 22 21:53 Documentation -rw-r--r-- 1 root root 2536 Jun 30 19:13 Kbuild -rw-r--r-- 1 root root 277 Aug 22 21:53 Kconfig -rw-r--r-- 1 root root 255053 Aug 22 21:53 MAINTAINERS -rw-r--r-- 1 root root 48424 Aug 22 21:53 Makefile -rw-r--r-- 1 root root 548540 Oct 20 21:31 Module.symvers -rw-r--r-- 1 root root 18736 Jun 30 19:13 README -rw-r--r-- 1 root root 7485 Jun 30 19:13 REPORTING-BUGS -rw-r--r-- 1 root root 2990201 Oct 20 21:30 System.map drwxr-xr-x 33 root root 4096 Aug 24 21:21 arch drwxr-xr-x 3 root root 4096 Oct 20 21:16 block drwxr-xr-x 4 root root 20480 Oct 20 21:31 crypto drwxr-xr-x 2 root root 4096 Aug 22 21:54 distro drwxr-xr-x 112 root root 4096 Oct 20 21:24 drivers drwxr-xr-x 36 root root 4096 Oct 20 21:25 firmware drwxr-xr-x 73 root root 12288 Oct 20 21:16 fs drwxr-xr-x 28 root root 4096 Aug 24 21:00 include drwxr-xr-x 2 root root 4096 Oct 20 21:30 init drwxr-xr-x 2 root root 4096 Oct 20 21:16 ipc drwxr-xr-x 11 root root 12288 Oct 20 21:12 kernel drwxr-xr-x 9 root root 20480 Oct 20 21:32 lib drwxr-xr-x 2 root root 12288 Oct 20 21:12 mm -rw-r--r-- 1 root root 8920 Oct 20 21:30 modules.builtin -rw-r--r-- 1 root root 24416 Oct 20 21:30 modules.order drwxr-xr-x 55 root root 4096 Oct 20 21:30 net drwxr-xr-x 12 root root 4096 Aug 22 21:54 samples drwxr-xr-x 13 root root 4096 Oct 20 21:09 scripts drwxr-xr-x 9 root root 4096 Oct 20 21:16 security drwxr-xr-x 22 root root 4096 Oct 20 21:25 sound drwxr-xr-x 17 root root 4096 Aug 22 21:54 tools drwxr-xr-x 2 root root 4096 Oct 20 21:09 usr drwxr-xr-x 3 root root 4096 Aug 22 21:54 virt -rwxr-x--- 1 root root 22200109 Oct 20 21:30 vmlinux -rw-r----- 1 root root 25068651 Oct 20 21:30 vmlinux.o -------------------- bbswitch build log The complete build log is located at '/var/log/portage/elog/sys-power:bbswitch-0.7:20131022-223026.log' ~ # cat /var/log/portage/elog/sys-power:bbswitch-0.7:20131022-223026.log * Package: sys-power/bbswitch-0.7 * Repository: gentoo * Maintainer: pacho@gentoo.org mva@mva.name,rei4dan@gmail.com,proxy-maint@gentoo.org * USE: amd64 elibc_glibc kernel_linux userland_GNU * FEATURES: ccache preserve-libs sandbox userpriv usersandbox * Determining the location of the kernel source code * Found kernel source directory: * /usr/src/linux * Found kernel object directory: * /lib/modules/3.10.7-gentoo/build * Found sources for kernel version: * 3.10.7-gentoo >>> Unpacking source... >>> Unpacking bbswitch-0.7.tar.gz to /var/tmp/portage/sys-power/bbswitch-0.7/work >>> Source unpacked in /var/tmp/portage/sys-power/bbswitch-0.7/work >>> Preparing source in /var/tmp/portage/sys-power/bbswitch-0.7/work/bbswitch-0.7 ... >>> Source prepared. >>> Configuring source in /var/tmp/portage/sys-power/bbswitch-0.7/work/bbswitch-0.7 ... >>> Source configured. >>> Compiling source in /var/tmp/portage/sys-power/bbswitch-0.7/work/bbswitch-0.7 ... ln: failed to create symbolic link ‘Module.symvers’: File exists * Preparing bbswitch module make -j5 HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- 'LDFLAGS=-m elf_x86_64' KVERSION=3.10.7-gentoo default make -C /lib/modules/3.10.7-gentoo/build M="$(pwd)" modules make: *** /lib/modules/3.10.7-gentoo/build: Permission denied. Stop. make: *** [default] Error 2 * ERROR: sys-power/bbswitch-0.7::gentoo failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=sys-power/bbswitch-0.7::gentoo'`, * the complete build log and the output of `emerge -pqv '=sys-power/bbswitch-0.7::gentoo'`. * The complete build log is located at '/var/log/portage/elog/sys-power:bbswitch-0.7:20131022-223026.log'. * The ebuild environment file is located at '/var/tmp/portage/sys-power/bbswitch-0.7/temp/environment'. * Working directory: '/var/tmp/portage/sys-power/bbswitch-0.7/work/bbswitch-0.7' * S: '/var/tmp/portage/sys-power/bbswitch-0.7/work/bbswitch-0.7'