VAR-SOM-MX6 Yocto Fido R2 Customize linux-variscite

From Variscite Wiki
VAR-SOM-MX6 - Customize linux-variscite

Introduction

We deliver a complete Linux in source code adopted to our development platforms. Our customers may require additional changes. Yocto is not the best environment to do Linux kernel development. We recommend to start with building the Linux out of Yocto tree and using NFS development environment to test the changes. Once you have the changes ready create a patch and copy it to the linux-variscite in the Yocto source code. re build your Yocto and you will have a complete Yocto with your Linux kernel changes.

Linux out of tree and NFS

Please start with:

Linux Changes

Make your kernel changes and test them. Most of the changes will be in Linux kernel configuration. For example:

Add a printer gadget
$ make -j6 ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- menuconfig

Add module.png

Changes made:

 diff .config arch/arm/configs/imx_v7_var_defconfig 
3359c3359
< CONFIG_USB_G_PRINTER=m
---
> # CONFIG_USB_G_PRINTER is not set

Create a new config file

$ cp .config arch/arm/configs/imx_v7_var_custom_defconfig 
$ git status
On branch imx_3.14.38_6qp_ga_var01
Untracked files:
  (use "git add <file>..." to include in what will be committed)

	arch/arm/configs/imx_v7_var_custom_defconfig

nothing added to commit but untracked files present (use "git add" to track)
$ git diff > custom.patch

Copy patch file to Yocto

$ mkdir ~/var-som-mx6-yocto-fido/sources/meta-variscite-mx6/recipes-kernel/linux/linux-variscite
$ cp custom.patch ~/var-som-mx6-yocto-fido/sources/meta-variscite-mx6/recipes-kernel/linux/linux-variscite

Modify linux-variscite_3.14.38.bb:

SRC_URI += "file://custom.patch \
	   "

FSL_KERNEL_DEFCONFIG = "imx_v7_var_custom_defconfig"

Build the system.