User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

pi_kernel_operations [2018/09/14 00:28] (current)
vk3smb created
Line 1: Line 1:
 +====== Note ======
 +This information is WAY out of date and is kept for historical purposes only.
 +===== Getting ready =====
 +Go to [[https://​​raspberrypi/​linux]] and download the tarball of the kernel source to your home folder.
 +Run the following after it has downloaded:
 +<​code>​tar -zxvf your_filename.tar.gz</​code>​
 +Now update the sytem as follows:
 +apt-get update
 +apt-get -y dist-upgrade
 +apt-get -y install gcc make bc screen ncurses-dev watchdog</​code>​
 +Clean the build folder by running:
 +<​code>​make mrproper</​code>​
 +To get the correct config for the PI2/3:
 +make bcm2709_defconfig
 +===== Compile the Kernel=====
 +In the build folder, run the following to set the configs and then generate a menu:
 +<​code>​make menuconfig</​code>​
 +This where we have to check that the OSS modules are installed. ​ (By using the .config it should). ​ But it also gives us a chance to unload any crap we do not need from the kernel to streamline it.
 +We also need to disable the frequency scaling and power saving. ​ Both of these affect the audio on the dongle. ​ Find the option //Disable watchdog shutdown on close//​. ​ This will mean on a reboot and there is a hang, it will force a reboot.
 +After this is complete, make the modules and headers required to compile other software:
 +<​code>​make -j4 zImage modules dtbs
 +make scripts
 +=====Install the Kernel=====
 +So both the Kernel and the source is the same, we have to install the new kernel. ​ If you are upgrading Kernels, you will need to update the firmware too.
 +Install the Kernel modules and overwrite the lib folder as required:
 +<​code>​make modules_install
 +make headers_install
 +sudo cp arch/​arm/​boot/​dts/​*.dtb /boot/
 +sudo cp arch/​arm/​boot/​dts/​overlays/​*.dtb* /​boot/​overlays/​
 +sudo cp arch/​arm/​boot/​dts/​overlays/​README /​boot/​overlays/​
 +sudo scripts/​mkknlimg arch/​arm/​boot/​zImage /​boot/​$KERNEL.img
 +=====Watchdog setup=====
 +Edit the /​etc/​modules file
 +<​code>​nano /​etc/​modules</​code>​
 +Enter the following in the last line of the file:
 +Save that file.  Now we need to edit the /​etc/​watchdog.conf. ​ Uncomment the lines:
 +<​code>#​max-load-1 ​  = 24
 +#​watchdog-device = /​dev/​watchdog</​code>​
 +Finally we need to make sure it starts on boot:
 +<​code>​update-rc.d watchdog enable</​code>​
 +Save this file and Reboot the pi.
pi_kernel_operations.txt ยท Last modified: 2018/09/14 00:28 by vk3smb