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

From Variscite Wiki
Revision as of 11:48, 14 December 2015 by Ron (talk | contribs) (→‎Linux Changes)
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

variscite@rd-ub-14:/ws/yocto-fsl/linux-imx_3.10.x$ make -j6 LOADADDR=0x10008000 ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- modules
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
  CALL    scripts/checksyscalls.sh
  CC [M]  drivers/usb/gadget/printer.o
  LD [M]  drivers/usb/gadget/libcomposite.o
  LD [M]  drivers/usb/gadget/usb_f_acm.o
  LD [M]  drivers/usb/gadget/usb_f_obex.o
  LD [M]  drivers/usb/gadget/usb_f_serial.o
  LD [M]  drivers/usb/gadget/usb_f_ncm.o
  LD [M]  drivers/usb/gadget/usb_f_ss_lb.o
  LD [M]  drivers/usb/gadget/usb_f_ecm.o
  LD [M]  drivers/usb/gadget/usb_f_eem.o
  LD [M]  drivers/usb/gadget/usb_f_ecm_subset.o
  LD [M]  drivers/usb/gadget/usb_f_rndis.o
  LD [M]  drivers/usb/gadget/usb_f_mass_storage.o
  LD [M]  drivers/usb/gadget/usb_f_fs.o
  LD [M]  drivers/usb/gadget/g_zero.o
  LD [M]  drivers/usb/gadget/g_ether.o
  LD [M]  drivers/usb/gadget/gadgetfs.o
  LD [M]  drivers/usb/gadget/g_mass_storage.o
  LD [M]  drivers/usb/gadget/g_serial.o
  LD [M]  drivers/usb/gadget/g_printer.o
  LD [M]  drivers/usb/gadget/g_ncm.o
  Building modules, stage 2.
  MODPOST 78 modules
  LD [M]  drivers/usb/gadget/g_ether.ko
  LD [M]  drivers/usb/gadget/g_mass_storage.ko
  LD [M]  drivers/usb/gadget/g_ncm.ko
  CC      drivers/usb/gadget/g_printer.mod.o
  LD [M]  drivers/usb/gadget/g_serial.ko
  LD [M]  drivers/usb/gadget/g_zero.ko
  LD [M]  drivers/usb/gadget/gadgetfs.ko
  LD [M]  drivers/usb/gadget/libcomposite.ko
  LD [M]  drivers/usb/gadget/usb_f_acm.ko
  LD [M]  drivers/usb/gadget/usb_f_ecm.ko
  LD [M]  drivers/usb/gadget/usb_f_ecm_subset.ko
  LD [M]  drivers/usb/gadget/usb_f_eem.ko
  LD [M]  drivers/usb/gadget/usb_f_fs.ko
  LD [M]  drivers/usb/gadget/usb_f_mass_storage.ko
  LD [M]  drivers/usb/gadget/usb_f_ncm.ko
  LD [M]  drivers/usb/gadget/usb_f_obex.ko
  LD [M]  drivers/usb/gadget/usb_f_rndis.ko
  LD [M]  drivers/usb/gadget/usb_f_serial.ko
  LD [M]  drivers/usb/gadget/usb_f_ss_lb.ko
  LD [M]  drivers/usb/gadget/g_printer.ko
variscite@rd-ub-14:/ws/yocto-fsl/linux-imx_3.10.x$ diff .config arch/arm/configs/imx_v7_var_defconfig 
3359c3359
< CONFIG_USB_G_PRINTER=m
---
> # CONFIG_USB_G_PRINTER is not set
variscite@rd-ub-14:/ws/yocto-fsl/linux-imx_3.10.x$ cp .config arch/arm/configs/imx_v7_var_custom_defconfig 
variscite@rd-ub-14:/ws/yocto-fsl/linux-imx_3.10.x$ 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)
variscite@rd-ub-14:/ws/yocto-fsl/linux-imx_3.10.x$ git diff > custom.patch

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



Add the Linux patch to linux-variscite