#Compiling a custom Linux kernel
# Install required tools
sudo apt-get install ncurses-dev
# Download Linux source
sudo apt-get install linux-source
cd /usr/src/
# Extract Linux source
tar xf linux-source-*.tar.xz
cd linux-source-*/
# Copy default config
cp /boot/config-* .config
This is where you should install any patches you want to add to the kernel
# Configure the kernel
# You can learn more about configuration at http://www.linux.org/threads/4274/
make menuconfig
# Build the kernel (This will take a LONG time)
make
# Build the kernel modules (This MIGHT take a long time)
make modules
# Install modules
make modules_install
# Install kernel
make install
@Klubuntu your GCC has the PIE on by default - most distros don't do that.
Try editing the
Makefile
- find a line similar to this:EXTRA_CFLAGS += $(CFLAGS_EXTRA)
and edit it like so:
EXTRA_CFLAGS += $(CFLAGS_EXTRA) -fno-pie
.Depending on the kernel version you're compiling that like might look a bit different - just search for
CFLAGS_EXTRA
.