Embedded Linux Kernel Internal Package -------------------------------------- This self-extracing package extracts out a Templates folder, by executing the file ./elki_xm_package.sh + Templates directory contains the following sub-directories: -Kernel |- Patches - Contains the patches to be applied to the kernel & the configuration file. Note: These patches are for the kernel version 3.2.8. -Sources |- App - Applications to be used for testing the driver |- Driver - Driver source codes used in the workshop |- KernelModule - Contains the simple driver to get started. These code templates are used in the Linux Kernel Internals workshop conducted at SysPlay eLearning Academy for You. For details on the various workshops, check out at https://sysplay.in/index.php?pagefile=weekend_workshops, or contact us at For the slide sets from the workshop, visit: https://sysplay.in/index.php?pagefile=elki_workshop_slides + In order to compile the modules, we need to prepare the kernel source code. Below are the steps for the same: - Download the kernel source code from below link: ftp://ftp.kernel.org/pub/linux/kernel/v3.x/linux-3.2.8.tar.bz2 - untar it with 'tar -jxvf linux-3.2.8.tar.bz2'. - Copy the Patches folder in kernel source code directory as per below command: > cp -r Patches /patches. - Apply the patches to the kernel. Execute the following command in kernel source directory: > quilt push -a - Configure the kernel with below steps: + Copy the Patches/linux-3.2.8.conifg as .config in kernel top level directory. + make ARCH=arm menuconfig + Copy the Patches/Module.symvers to Kernel directory. + Execute the following command to prepare the kernel for compiling the moduels. > make ARCH=arm modules_prepare + Next step is to build the kernel module using the kernel source code. Below are the steps: + cd Templates/Sources/Driver/ + Open the Makefile & update the 'KERNEL_SOURCE' variable with the path of kernel directory. + Update the 'CROSS_COMPILE' with your toolchain prefix say 'arm-linux-'. + Execute 'make' and this should generate the .ko file. Transfer this to the board using tftp or scp. + Once transferred, insert the module with 'insmod '.