site  contact  subhomenews

Kernel 4.4.34 compiled for Pi2

November 28, 2016 — BarryK
Tested on the Raspberry Pi2, haven't tried on the Pi3 yet but it is expected to work.

This kernel is in the just-released Quirky 8.1.3:
http://bkhome.org/news/201611/quirky-pi-813-service-pack.html

After upgrading Quirky to 8.1.3, you might be interested in this...

For anyone who would like to compile a 3rd-party kernel driver, you will need the "devx" and kernel-source PETs.

devx PET
The 8.1.2 devx PET is available, after which you will need to install the 8.1.2-to-8.1.3 devx Service Pack (200MB, 157KB):
http://distro.ibiblio.org/quirky/quirky6/armv7/packages/pet_packages-xerus/devx-8.1.2-xerus.pet
http://distro.ibiblio.org/quirky/quirky6/armv7/packages/pet_packages-xerus/devx_service_pack-8.1.2_TO_8.1.3-xerus.pet

Note, whenever you run the Puppy Package Manager, you will (or should) be automatically offered Service Pack upgrades.

Kernel source PET
This source is specifically for the Pi2 and Pi3 (288MB):
http://distro.ibiblio.org/quirky/quirky6/armv7/packages/pet_packages-xerus/kernel_src-4.4.34-rpi2.pet

...after installation, you will find the source in /usr/src.

How to compile the kernel
Just for the record, here is a log of the commands that I executed. Some of these steps are only for my setup, and some are for use with woofQ.
But, for anyone who is interested to compile the kernel themselves, these notes should be helpful:

source downloaded from:

# GIT_SSL_NO_VERIFY=true git clone --depth=1 https://github.com/raspberrypi/linux
in folder /mnt/sda1/0-kernel-source, "extreme" 64GB flash stick.
rename "linux" to "linux-4.4.34-rpi"

# modprobe configs
...ubuntu-mate pi2 kernel, to get /proc/config.gz

# cd /usr
# ln -s /mnt/sda1/0-kernel-source src
# cd /usr/src
# cd linux-4.4.34-rpi
# KERNEL=kernel7

# make mrproper
...copy in .config
# make menuconfig
# make -j3 zImage modules dtbs
# make modules_install
# make headers_install
# cd ..
# cp -a linux-4.4.34-rpi linux-4.4.34-rpiCOMPILED

# cd linux-4.4.34-rpi
# cp -a -f arch/arm/boot/dts/*.dtb /boot/
# mkdir /boot/overlays
# cp arch/arm/boot/dts/overlays/*.dtb* /boot/overlays/
# cp arch/arm/boot/dts/overlays/README /boot/overlays/
# scripts/mkknlimg arch/arm/boot/zImage /boot/$KERNEL.img
# make clean
# make prepare
# mkdir ../kernel_src-4.4.34-rpi2
# mkdir -p ../kernel_src-4.4.34-rpi2/usr/src
# cp -a -f /usr/src/linux-4.4.34-rpi ../kernel_src-4.4.34-rpi2/usr/src/

------------------

then over on my laptop
----------------------

# dir2tgz linux-4.4.34-rpi/
# cp -a /mnt/sde2/lib/firmware out-k4.4.34/
# ln -s linux-4.4.34-rpi linux
# cd linux-4.4.34-rpiCOMPILED/
# cp -a usr/include/* ../out-k4.4.34/linux_headers-4.4.34-rpi2/usr/include/
# KERNELVERSION='4.4.34-rpi2'
# POSTVER=""
# HDRSIZE=$(du -s -k ../out-k${KERNELVERSION}${POSTVER}/linux_headers-${KERNELVERSION}${POSTVER} | cut -f 1)
# echo "linux_headers-${KERNELVERSION}${POSTVER}|linux_headers|${KERNELVERSION}${POSTVER}||BuildingBlock|${HDRSIZE}K||linux_headers-${KERNELVERSION}${POSTVER}.pet||header files for ${KERNELVERSION}${POSTVER} kernel||||" > ../out-k${KERNELVERSION}${POSTVER}/linux_headers-${KERNELVERSION}${POSTVER}/pet.specs
# SDPRE="/mnt/sde2"
# xKERNELVERSION='4.4.34-v7+'
# cp -a -f ${SDPRE}/lib/modules/${xKERNELVERSION} ../out-k${KERNELVERSION}${POSTVER}/
# cp -a .config DOTconfig-${KERNELVERSION}
# cp -f DOTconfig-${KERNELVERSION}${POSTVER} ../out-k${KERNELVERSION}${POSTVER}/
# cp -f System.map ../out-k${KERNELVERSION}${POSTVER}/
# cp -f modules.order ../out-k${KERNELVERSION}${POSTVER}/
# cp -f modules.builtin ../out-k${KERNELVERSION}${POSTVER}/
# cp -f ${SDPRE}/boot/kernel7.img ../out-k${KERNELVERSION}${POSTVER}/
# mkdir ../out-k${KERNELVERSION}${POSTVER}/dtb
# cp -f ${SDPRE}/boot/*.dtb ../out-k${KERNELVERSION}${POSTVER}/dtb/
# cp -f ${SDPRE}/boot/overlays ../out-k${KERNELVERSION}${POSTVER}/dtb/
# cp -a -f ${SDPRE}/boot/overlays ../out-k${KERNELVERSION}${POSTVER}/dtb/
# cd ../out-k${KERNELVERSION}${POSTVER}
# dir2tgz firmware/
# dir2tgz linux_headers-${KERNELVERSION}${POSTVER}
# tgz2pet linux_headers-${KERNELVERSION}${POSTVER}.tar.gz
# dir2tgz ${xKERNELVERSION}
# cd ..

also did some things manually, not recorded here...
# VER="$KERNELVERSION"
# SIZEK="$(du -s -k kernel_src-${VER} | cut -f 1)"
# echo "kernel_src-${VER}|kernel_src|${VER}||Utility;development|${SIZEK}K||kernel_src-${VER}.pet||Complete source of Linux kernel ${VER}, for raspberry pi|ubuntu|xenial||" > kernel_src-${VER}/pet.specs
# dir2tgz kernel_src-${VER}/
# tgz2pet kernel_src-${VER}.tar.gz
<

Tags: linux