These instructions build the Linux kernel from Linaro with drivers specific to the sensors used in this class. This step is necessary as the vanilla kernel from Linaro does not include certain kernel drivers necessary for using our sensors on the board, such as the uvc_camera drivers drivers necessary to use a webcam. These instructions will rebuild the kernel with the necessary USB Video Class drivers, and will generate a custom zImage that you will use to update the boot image provided by Linaro.
NOTE: The resultant kernel will be missing many of the drivers that are taken for granted on a desktop Ubuntu system. This means that some sensors or other peripherals will not work with this build. If you are using a sensor that requires a driver not included in this version of the kernel, the kernel will need to be rebuilt to include the driver. However, there is no guarantee that this rebuilt kernel will automatically work on the DragonBoard. For the purposes of this class, you should not need to build anything else into the kernel not documented here.
These instructions assume that you're building the kernel on a desktop computer (or virtual machine) running Ubuntu 14.04. You may encounter library errors with other versions of Ubuntu. We'll build from Linaro kernel version 14.05 as SD card support is broken in all later versions.
Checkout the kernel source:
git clone https://git.linaro.org/landing-teams/working/qualcomm/kernel.git
Change to this new directory:
cd kernel
Checkout the tag for the 14.05 build:
git checkout ubuntu-ifc6410-14.05
Also download the toolchain binaries for 14.05 from: http://releases.linaro.org/14.05/components/toolchain/binaries/gcc-linaro-arm-linux-gnueabihf-4.9-2014.05_linux.tar.xz
Untar the toolchain by running:
tar xf gcc-linaro-arm-linux-gnueabihf-4.9-2014.05_linux.tar.xz
From the toplevel kernel directory, configure to use the default configuration for the IFC6410:
LD_LIBRARY_PATH=<path_to_toolchain_directory>/arm-linux-gnueabihf/lib make ARCH=arm CROSS_COMPILE=<path_to_toolchain_directory>/bin/arm-linux-gnueabihf- defconfig ifc6410_defconfig
Next, bring up the kernel configuration menu:
LD_LIBRARY_PATH=<path_to_toolchain_directory>/arm-linux-gnueabihf/lib make ARCH=arm CROSS_COMPILE=<path_to_toolchain_directory>/bin/arm-linux-gnueabihf- menuconfig
In the menu config the "*" means a driver will be built into the kernel, an "M" means the driver will be loaded as a kernel module. We want to build everything into the kernel as the Snapdragon has had trouble loading the drivers as modules. Select "Y" on an option to include it and "ENTER" to go to a submenu.
Select the following kernel options:
Build the kernel image:
LD_LIBRARY_PATH=<path_to_toolchain_directory>/arm-linux-gnueabihf/lib make ARCH=arm CROSS_COMPILE=<path_to_toolchain_directory>/bin/arm-linux-gnueabihf- -j8 zImage
The custom Boot Image of our new Linux kernel is called zImage
and is located in the kernel/arch/arm/boot
folder.
You will use this custom zImage in the next step to update the boot image for the DragonBoard.