Home | Projects | Notes > Linux Device Drivers > Linux Kernel Source Update
Clone the kernel source from BBB official GitHub repository (https://github.com/beagleboard/linux) 
4.14 is used for this project
In the workspace/source/ directory:
xxxxxxxxxx11git clone https://github.com/beagleboard/linux.git linux_bbb_4.14cd to linux_bbb_4.14/ and run git checkout 4.14.
Compile and generate the kernel image from the downloaded kernel image directory (workspace/source/linux_bbb_4.14/)
Step 1:
xxxxxxxxxx11make ARCH=arm distcleanRemoves all the temporary folder, object files, images generated during the previous build.
Also, deletes the
.configfile if created previously.
Step 2:
xxxxxxxxxx11make ARCH=arm bb.org_defconfigCreates a
.configfile by using default config file given by the vendor (Default config file can be found inworkspace/source/linux_bbb_4.14/arch/arm/configs/)
Step 3 (Optional):
xxxxxxxxxx11make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfigRun this command only if you want to change some kernel settings before compilation.
Step 4: Compile kernel source
xxxxxxxxxx11make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage dtbs LOADADDR=0x80008000 -j4Creates a kernel image
uImage.Compiles all device tree source files, and generates
dtbs.
#error New address family defined, please update secclass_map. can be resolved by:
scripts/selinux/genheaders/genheaders.c #include <sys/socket/h>
scrpts/selinux/mdp/mdp.c #include <sys/socket.h>
security/selinux/include/classmap.h #include <linux/socket.h>
fatal error: mpc.h: No such file or directory error may arise, which is caused by the lack of multiple precision complex floating-point library development package libmpc-dev. Resolve this error by running:
xxxxxxxxxx11sudo apt install libmpc-dev Step 5: Build kernel modules
xxxxxxxxxx11make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules -j4Builds and generates in-tree loadable(M) kernel module (
.ko).
Step 6:
xxxxxxxxxx11sudo make ARCH=arm modules_installInstalls all the generated
.kofiles in the default path of the computer (/lib/modules/<kernel_ver>).
Now, you should be able to see /lib/modules/4.14.108+/ directory.
Update the 
To update the kernel image and dtb in the 
Copy workspace/source/linnux_bbb_5.10/arch/arm/boot/uImage to /mdeia/klee/BOOT/ (
Copy workspace/source/linnux_bbb_5.10/arch/arm/boot/dts/am335x-boneblack.dtb to /mdeia/klee/BOOT/ (
Don't forget update dtb! It will hang the boot process at 'Starting kernel ...'.
Select the dtb file whose name matches the one that is present in the
BOOTpartition of theSD card. 
To update the kernel modules in the 
Copy newly installed kernel modules /lib/modules/4.14.108+/ to /media/klee/ROOTFS/lib/modules/ (
Run sync to flush left-over contents in the buffer to the media
Boot the board from the updated 
Check the kernel version after login:
xxxxxxxxxx11uname -rIt should display the updated kernel version. (4.14.108+ in my case)