<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mediawiki.compulab.com/w/index.php?action=history&amp;feed=atom&amp;title=UCM-iMX7%3A_Linux%3A_Kernel</id>
	<title>UCM-iMX7: Linux: Kernel - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mediawiki.compulab.com/w/index.php?action=history&amp;feed=atom&amp;title=UCM-iMX7%3A_Linux%3A_Kernel"/>
	<link rel="alternate" type="text/html" href="https://mediawiki.compulab.com/w/index.php?title=UCM-iMX7:_Linux:_Kernel&amp;action=history"/>
	<updated>2026-09-02T08:18:16Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://mediawiki.compulab.com/w/index.php?title=UCM-iMX7:_Linux:_Kernel&amp;diff=3358&amp;oldid=prev</id>
		<title>Grinberg: /* See also */</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.compulab.com/w/index.php?title=UCM-iMX7:_Linux:_Kernel&amp;diff=3358&amp;oldid=prev"/>
		<updated>2017-06-19T11:31:02Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;See also&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Overview ==&lt;br /&gt;
The Linux kernel for UCM-iMX7 provides support for on-board peripherals/interfaces of UCM-iMX7 system-on-module (SoM) and SBC-UCM-iMX7 Single Board Computer. &lt;br /&gt;
It is recommended to use the most recent Linux package released. It can be downloaded from the product [http://www.compulab.com/products/computer-on-modules/ucm-imx7-nxp-i-mx-7-ultra-miniature-system-on-module/#devres web page]. &lt;br /&gt;
Unzip the downloaded Linux package to a directory on your host workstation. The following discussion uses {{filename|/path/to/ucm-imx7-linux/}} template for this location. Please use the real path to the Linux package instead.&lt;br /&gt;
&lt;br /&gt;
== Building kernel for UCM-iMX7 ==&lt;br /&gt;
&lt;br /&gt;
=== Getting kernel sources ===&lt;br /&gt;
Linux git tree can be cloned or downloaded as a tarball from [http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/ Freescale public git repository].&lt;br /&gt;
The instructions below assume that the {{filename|/home/development/ucm-imx7/kernel}} directory has been created for UCM-iMX7 kernel development.&lt;br /&gt;
==== Snapshot download ====&lt;br /&gt;
* Download [http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/snapshot/linux-2.6-imx-rel_imx_4.1.15_1.2.0_ga.tar.gz rel_imx_4.1.15_1.2.0_ga] snapshot with your web browser.&lt;br /&gt;
&lt;br /&gt;
* Extract the downloaded archive {{filename|linux-2.6-imx-rel_imx_4.1.15_1.2.0_ga.tar.gz}}&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /home/development/ucm-imx7/kernel&lt;br /&gt;
tar xpf /path/to/downloaded/linux-2.6-imx-rel_imx_4.1.15_1.2.0_ga.tar.gz&lt;br /&gt;
mv linux-2.6-imx-rel_imx_4.1.15_1.2.0_ga linux-ucm-imx7&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Apply the UCM-iMX7 patch&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /home/development/ucm-imx7/kernel/linux-ucm-imx7&lt;br /&gt;
patch -p1 &amp;lt; /path/to/ucm-imx7-linux/kernel/linux-4.1.15-ucm-imx7-*.patch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Git clone ====&lt;br /&gt;
* Install [http://git-scm.com/ git] version control system.&lt;br /&gt;
* Create a clone of the FreeScale Linux kernel tree&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /home/development/ucm-imx7/kernel&lt;br /&gt;
git clone git://git.freescale.com/imx/linux-2.6-imx.git linux-ucm-imx7&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Create a branch for UCM-iMX7 development. The UCM-iMX7 patches are generated vs. [http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/commit/?id=77f61547834c4f127b44b13e43c59133a35880dc rel_imx_4.1.15_1.2.0_ga] tag in the Linux tree. It is recommended to use exactly the same baseline to avoid merge conflicts. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /home/development/ucm-imx7/kernel/linux-ucm-imx7&lt;br /&gt;
git checkout -b development rel_imx_4.1.15_1.2.0_ga&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Apply the UCM-iMX7 patch&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git am /path/to/ucm-imx7-linux/kernel/patches/*.patch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Building the kernel ===&lt;br /&gt;
The following discussion assumes a [[Linux: Setting up a development environment|development environment]] is set up on your host workstation and Linaro GCC 5 crosstoolchain with the prefix '''arm-linux-gnueabihf-''' is installed on on it and its location is found in the '''PATH'''. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /home/development/ucm-imx7/kernel/linux-ucm-imx7&lt;br /&gt;
export ARCH=arm&lt;br /&gt;
export CROSS_COMPILE=arm-linux-gnueabihf-&lt;br /&gt;
export DTB=&amp;quot;imx7d-*ucm-imx7.dtb&amp;quot;&lt;br /&gt;
make ucm_imx7_defconfig&lt;br /&gt;
make menuconfig&lt;br /&gt;
make zImage modules ${DTB} &amp;amp;&amp;amp; INSTALL_MOD_PATH=/home/development/ucm-imx7/rootfs make modules_install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example above:&lt;br /&gt;
* Linux kernel image ({{filename|zImage}}) will be created in {{filename|/home/development/ucm-imx7/kernel/linux-ucm-imx7/arch/arm/boot}}&lt;br /&gt;
* device tree blobs will be created in {{filename|/home/development/ucm-imx7/kernel/linux-ucm-imx7/arch/arm/boot/dts}}&lt;br /&gt;
* loadable kernel modules will be installed into the {{filename|/home/development/ucm-imx7/rootfs/lib/modules}} directory.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
When the UCM-iMX7 is booted with the kernel image created as described above and with networked root filesystem at {{filename|/home/development/ucm-imx7/rootfs/}}, the system will be able to load the kernel modules properly, thus avoiding module version problems.&lt;br /&gt;
&lt;br /&gt;
==== zImage, DTB files and modules locations  ====&lt;br /&gt;
&lt;br /&gt;
* In the example above, the Linux kernel image ({{filename|zImage}}) will be created in the {{filename|/home/development/ucm-imx7/kernel/linux-ucm-imx7/arch/arm/boot}} directory.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ls -al /home/development/ucm-imx7/kernel/linux-ucm-imx7/arch/arm/boot/zImage&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* DTB files&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /home/development/ucm-imx7/kernel/linux-ucm-imx7/arch/arm/boot/dts/&lt;br /&gt;
# ls -al ${DTB}&lt;br /&gt;
# cd -&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The loadable kernel modules will be installed into the {{filename|/home/development/ucm-imx7/rootfs/lib/modules}} directory.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ls -al /home/development/ucm-imx7/rootfs/lib/modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Kernel Version  ====&lt;br /&gt;
&lt;br /&gt;
* In the example above, the Linux kernel release version number will be saved in {{filename|/home/development/ucm-imx7/kernel/linux-ucm-imx7/include/config/kernel.release}}&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /home/development/ucm-imx7/kernel/linux-ucm-imx7/include/config/kernel.release&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Prepare kernel and modules tarball  ====&lt;br /&gt;
&lt;br /&gt;
* In the example below, the Linux kernel and modules are packed into the tar archive for deploying onto the UCM-iMX7.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir -p /home/development/ucm-imx7/rootfs/boot&lt;br /&gt;
# cp -v /home/development/ucm-imx7/kernel/linux-ucm-imx7/arch/arm/boot/zImage /home/development/ucm-imx7/rootfs/boot/&lt;br /&gt;
# cd /home/development/ucm-imx7/kernel/linux-ucm-imx7/arch/arm/boot/dts/&lt;br /&gt;
# cp -v ${DTB} /home/development/ucm-imx7/rootfs/boot/ &lt;br /&gt;
# cd -&lt;br /&gt;
# tar -C /home/development/ucm-imx7/rootfs -czvf /home/development/ucm-imx7/linux-image-ucm-imx7.tar.gz .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Basic platform support ==&lt;br /&gt;
&lt;br /&gt;
The UCM-iMX7 basic platform support is implemented in the {{filename|imx7d-ucm-imx7.dtb}} file of the Linux kernel source tree.&lt;br /&gt;
The extended interface support depends on carrier board used and thus is implemented in the Single Board Computer device tree files:&lt;br /&gt;
* {{filename|imx7d-sbc-ucm-imx7.dtb}} - for SBC-UCM-iMX7 Single Board Computer&lt;br /&gt;
&lt;br /&gt;
These files contain:&lt;br /&gt;
* default setup of multi-functional pins;&lt;br /&gt;
* registration of the devices integrated in the UCM-iMX7 module;&lt;br /&gt;
* definitions of platform-specific configuration for these devices.&lt;br /&gt;
&lt;br /&gt;
== Deploying the UCM-iMX7 kernel and modules ==&lt;br /&gt;
&lt;br /&gt;
* Boot up the UCM-iMX7 computer.&lt;br /&gt;
* Copy the previously created {{filename|linux-image-ucm-imx7.tar.gz}} to {{filename|/root}} directory of the UCM-iMX7.&lt;br /&gt;
&lt;br /&gt;
==== Mount boot partition ====&lt;br /&gt;
* Use the below command to mount the boot partition for installing the UCM-iMX7 Linux kernel binary:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# boot_partition=`cat /proc/cmdline | awk '{ for (i=1;i&amp;lt;=NF;i++) { if($i~/^root=/) { print substr($i,6,length($i)-6)&amp;quot;1&amp;quot; } } }'`&lt;br /&gt;
# mount $boot_partition /boot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Back up old kernel ====&lt;br /&gt;
* It is essential to backup the old (known to work) kernel binary.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /boot/`uname -r`&lt;br /&gt;
# mv /boot/zImage* /boot/*.dtb /boot/`uname -r`/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Installing kernel and modules ====&lt;br /&gt;
Assuming that the {{filename|linux-image-ucm-imx7.tar.gz}} tar ball has been copied to the UCM-iMX7 {{filename|/root}} directory.&lt;br /&gt;
* Extract and install the Linux kernel binary:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# tar -C / -xvf /root/linux-image-ucm-imx7.tar.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== U-Boot Environment ==&lt;br /&gt;
=== MMC Boot Parameters ===&lt;br /&gt;
To boot from MMC/SD card type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setenv mmcdev 0&lt;br /&gt;
setenv mmcblk mmcblk0p2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Continue to the [[#Common Boot Parameters | Common Boot Parameters]].&lt;br /&gt;
&lt;br /&gt;
=== eMMC Boot Parameters ===&lt;br /&gt;
To boot from internal eMMC storage type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setenv mmcdev 2&lt;br /&gt;
setenv mmcblk mmcblk2p2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Continue to the [[#Common Boot Parameters | Common Boot Parameters]].&lt;br /&gt;
&lt;br /&gt;
=== Device Tree Blob ===&lt;br /&gt;
* For SBC-UCM-iMX7 Single Board computer type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setenv fdt_file imx7d-sbc-ucm-imx7.dtb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Common Boot Parameters ===&lt;br /&gt;
To boot Linux type: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setenv loadaddr 0x80800000&lt;br /&gt;
setenv fdt_addr 0x83000000&lt;br /&gt;
setenv image zImage&lt;br /&gt;
setenv bootargs console=ttymxc0,115200 root=/dev/${mmcblk} rw rootwait&lt;br /&gt;
mmc dev ${mmcdev}&lt;br /&gt;
load mmc ${mmcdev} ${loadaddr} ${image}&lt;br /&gt;
load mmc ${mmcdev} ${fdt_addr} ${fdt_file}&lt;br /&gt;
bootz ${loadaddr} - ${fdt_addr}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== NFS Boot Parameters ===&lt;br /&gt;
To boot via network interface type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dhcp&lt;br /&gt;
setenv loadaddr 0x80800000&lt;br /&gt;
setenv fdt_addr 0x83000000&lt;br /&gt;
setenv image zImage&lt;br /&gt;
setenv nfsserver &amp;lt;nfs server ip address&amp;gt;&lt;br /&gt;
setenv tftpserver &amp;lt;tftp server ip address&amp;gt;&lt;br /&gt;
setenv bootargs console=ttymxc0,115200 root=/dev/nfs rw ip=dhcp nfsroot=${nfsserver}:${nfsroot}&lt;br /&gt;
tftpboot ${loadaddr} ${tftpserver}:${image}&lt;br /&gt;
tftpboot ${fdt_addr} ${tftpserver}:${fdt_file}&lt;br /&gt;
bootz ${loadaddr} - ${fdt_addr}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[UCM-iMX7: Evaluation Kit: Getting Started]]&lt;br /&gt;
* [[UCM-iMX7: Evaluation Kit: Hardware Guide]]&lt;br /&gt;
* [[UCM-iMX7: Linux: Automatic Installation]]&lt;br /&gt;
* [[UCM-iMX7: Linux: Manual Installation]]&lt;br /&gt;
* [[UCM-iMX7: Linux: Debian]]&lt;br /&gt;
* [[Linux: Development for ARM modules]]&lt;br /&gt;
* [[Linux: Debian: Minimal ARM filesystem]]&lt;br /&gt;
* [http://www.debian.org/doc/manuals/reference/index.en.html Debian Reference]&lt;br /&gt;
&lt;br /&gt;
[[Category:Linux]]&lt;br /&gt;
[[Category:UCM-iMX7]]&lt;/div&gt;</summary>
		<author><name>Grinberg</name></author>
		
	</entry>
</feed>