3

This is my first attempt at compiling a Kernel. I have a fresh minamalist Debian Jessie installation, I then...

sudo apt-get install git fakeroot build-essential ncurses-dev xz-utils
sudo apt-get install kernel-package

Obtained Kernel

cd /mnt/local/btrfs_a/Kernel\ Downloads/
wget https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.2.tar.xz

Extract

tar xvf linux-4.2.tar.xz
cd linux-4.2

Copy existing Kernel Config File

cp /boot/config-$(uname -r) .config

No changes were made in the following lines...

make menuconfig
make-kpkg clean

Compile

fakeroot make-kpkg --initrd --revision=1.0.NAS kernel_image kernel_headers

But this results in:

IHEX    firmware/yam/1200.bin
IHEX    firmware/yam/9600.bin
make[1]: Leaving directory '/mnt/local/btrfs_a/Kernel Downloads/linux-4.2'
COLUMNS=150 dpkg -l 'gcc*' perl dpkg 'libc6*' binutils make dpkg-dev |\
awk '$1 ~ /[hi]i/ { printf("%s-%s\n", $2, $3) }'> debian/stamp/build/info
uname -a >> debian/stamp/build/info
echo using the compiler: >> debian/stamp/build/info
if [ -f include/generated/compile.h ]; then                      \
   grep LINUX_COMPILER include/generated/compile.h |             \
     sed -e 's/.*LINUX_COMPILER "//' -e 's/"$//' >>             \
               debian/stamp/build/info;                                  \
        elif [ -f include/linux/compile.h  ]; then                       \
    grep LINUX_COMPILER include/linux/compile.h |                \
      sed -e 's/.*LINUX_COMPILER "//' -e 's/"$//' >>            \
                debian/stamp/build/info;                                 \
         fi
echo done > debian/stamp/build/kernel
/usr/bin/make -f ./debian/rules         debian/stamp/binary/pre-linux-image-4.2.0
make[1]: Entering directory '/mnt/local/btrfs_a/Kernel Downloads/linux-4.2'
====== making target debian/stamp/install/linux-image-4.2.0 [new prereqs: ]======
This is kernel package version 13.014+nmu1.
rm -f -r .//mnt/local/btrfs_a/Kernel Downloads/linux-4.2/debian/linux-image-4.2.0 .//mnt/local/btrfs_a/Kernel Downloads/linux-4.2/debian/linux-image-4.2.0.deb
install -p -d -o root -g root  -m  755 /mnt/local/btrfs_a/Kernel Downloads/linux-4.2/debian/linux-image-4.2.0/etc/kernel/postinst.d /mnt/local/btrfs_a/Kernel Downloads/linux-4.2/debian/linux-image-4.2.0/etc/kernel/preinst.d \
              /mnt/local/btrfs_a/Kernel Downloads/linux-4.2/debian/linux-image-4.2.0/etc/kernel/postrm.d /mnt/local/btrfs_a/Kernel Downloads/linux-4.2/debian/linux-image-4.2.0/etc/kernel/prerm.d
install -p -d -o root -g root  -m  755 /mnt/local/btrfs_a/Kernel Downloads/linux-4.2/debian/linux-image-4.2.0//boot
install -p -d -o root -g root  -m  755 /mnt/local/btrfs_a/Kernel Downloads/linux-4.2/debian/linux-image-4.2.0/usr/share/doc/linux-image-4.2.0/examples
install -p    -o root -g root  -m  644 debian/changelog /mnt/local/btrfs_a/Kernel Downloads/linux-4.2/debian/linux-image-4.2.0/usr/share/doc/linux-image-4.2.0/changelog.Debian
install: target ‘Downloads/linux-4.2/debian/linux-image-4.2.0/usr/share/doc/linux-image-4.2.0/changelog.Debian’ is not a directory
debian/ruleset/targets/image.mk:34: recipe for target 'debian/stamp/install/linux-image-4.2.0' failed
make[1]: *** [debian/stamp/install/linux-image-4.2.0] Error 1
make[1]: Leaving directory '/mnt/local/btrfs_a/Kernel Downloads/linux-4.2'
debian/ruleset/local.mk:105: recipe for target 'kernel_image' failed
make: *** [kernel_image] Error 2

OK, my initial folder was ../Kernel Downloads/.. On a whim, I've changed it to 'KernelDownloads' (no space) and attempted to re-compile (from the top). It is now asking me a whole load of questions, is this normal? I'm just hitting return to grab the defaults. Is this the right thing to do?

2 Answers 2

1

Being asked a lot of questions is a possible route in making a kernel. My knowledge is a little old, but I tend to start with "make xconfig", and then you can browse around the configuration. It's the same questions, but it feels less relentless.

Going all defaults is reasonable.

1
  • 1
    Yeah, I just hit+held <enter> and eventually it stopped asking questions and got on with it. resulted in a 4.2 kernel now installed. :-) Sep 30, 2015 at 22:52
1

Looks like the issue may have been a space in the folder structure the kernel files were located in. After I removed the space, it was fine!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .