RuggedBOARD DevWiki
  • RuggedBOARDs Developer Wiki
  • RB-A5D2x
    • Contents
    • Download BSP and Documents
  • G1: Getting Started
    • RB-Quick Start Guide
    • Test all the RB interfaces in 10 mins in command Line
    • Example Program for Interfaces Using Python 3
  • G2: Programming Guide
    • Software Architecture on RB (Software Stack Diagram)
    • RB Interface/Bus Programming using MRAA
    • RB Peripherals programming using UPM
  • G3: How to Do?
    • Modbus on RB
    • RB as Tiny Web Server
    • MQTT Client on RB
    • SQL Lite DB
    • AWS Green Grass on RB
    • Microsoft Azure on RB
  • G4: Use Cases / Application Notes
    • Smart Energy Meter with AWS cloud
    • IoT Based solution for Plants Water monitoring
    • Weather Monitoring Stations
    • FAQ
  • G5: System development Guide
    • Advance Host setup
    • Flash a Bootable SD Card for Rugged board
    • Flash a NOR with Bootable SD Card For Rugged Board A5d2x
    • Flash the NOR using tftp For Rugged Board A5d2x
    • Yocto Compilation For Rugged Board A5d2x
    • Download the Toolchain for Rugged Board A5d2x
    • How to Add New Package in Yocto(root file system)
    • Generate the SDK(toolchain) using YOCTO
    • How to compile the U-Boot for Rugged Board A5d2x
    • How to compile the kernel for Rugged Board A5d2x
  • RB-i.MX6UL
    • Contents
    • Download BSP and Documents
  • G1: Getting Started
    • RB-Quick Start Guide
    • Test all the RB interfaces in 10 mins in command Line
    • Example Program for Interfaces Using Python 3
  • G2: Programming Guide
    • Software Architecture on RB (Software Stack Diagram)
    • RB Interface/Bus Programming using MRAA
    • RB Peripherals programming using UPM
  • G3: How to Do?
    • Modbus on RB
    • MQTT Client on RB
  • G4: System development Guide
    • Advance Host setup
    • Flash a Bootable SD Card for Rugged board
    • Flash a NAND with Bootable SD Card For Rugged Board i.MX6UL
    • Flash the NAND using tftp For Rugged Board i.MX6UL
    • Yocto Compilation For Rugged Board i.MX6UL
    • Download the Toolchain for Rugged Board i.MX6UL
    • How to Add New Package in Yocto(root file system)
    • Generate the SDK(toolchain) using YOCTO
    • How to compile the Barebox for Rugged Board i.MX6UL
    • How to compile the kernel for Rugged Board i.MX6UL
  • G5 : Help Desk
    • FAQ
Powered by GitBook
On this page
  • Objective:
  • Materials:
  • Hardware:
  • Software:
  • Kernel Information:
  • Procedure:
  • The Build Host Packages:
  • Source Downloading:

Was this helpful?

  1. G4: System development Guide

How to compile the kernel for Rugged Board i.MX6UL

PreviousHow to compile the Barebox for Rugged Board i.MX6ULNextFAQ

Last updated 12 months ago

Was this helpful?

Objective:

This guide describes a method of compile the kernel for rugged board i.MX6UL .

Materials:

Hardware:

  • PC(Personal computer)/System

Software:

  • Ubuntu 20.04 64-bit

Kernel Information:

  • Linux Mainline Kernel v5.15.35 (LTS kernel)

  • Tag : v5.15.35-phy3

Procedure:

The following list shows what you need in order to use a Linux-based build host to build images:

  • Build Host A build host with a minimum of 50 Gbytes of free disk space that is running a supported Linux distribution (i.e. recent releases of Fedora, openSUSE, CentOS, Debian, or Ubuntu).

  • Build Host Packages Appropriate packages installed on the build host.

The Build Host Packages:

The following list shows the required packages needed to build an image.

Ubuntu and Debian:

$ sudo apt-get update

$ sudo apt-get upgrade

$ sudo apt-get install git

$ sudo apt-get install minicom

$ sudo apt-get install build-essential

$ sudo apt-get install libncurses5-dev

$ sudo apt-get install lzop

$ sudo apt-get install libssl-dev

Source Downloading:

Step-1: Create a directory to download the kernel source.

$ mkdir kernel_source
cd kernel_source

Step-2: Clone linux-i.MX6UL with the proper branch.

## write your github email id and you name in below commands : 

$ git config --global user.email "you@example.com"

$ git config --global user.name "Your Name"

$ git clone git://git.phytec.de/linux-mainline

$ cd linux-mainline

$ git branch -a

$ git checkout v5.15.35-phy3

Step-3: Copy the below patch files to the kernel source directory which you got with documents.

  1. 0001-patch-for-ruggedboard.dtsi.patch

  2. 0002-patch_for_kconfig.patch

  3. 0005-patch_for_defconfig.patch

  4. 0006-patch_for_imx6ul-phytec-ruggedboard-rdk.dts.patch

  5. 0007-patch_for_makefile.patch

Step-4: Apply the patch files in the kernel source.

$ git am 0001-patch-for-ruggedboard.dtsi.patch

$ git am 0002-patch_for_kconfig.patch

$ git am 0005-patch_for_defconfig.patch

$ git am 0006-patch_for_imx6ul-phytec-ruggedboard-rdk.dts.patch

$ git am 0007-patch_for_makefile.patch

Step-5: Install the toolchain.

  • The below link,have the script for toolchain.

  • Use the commands given below to download.

$ wget https://download.phytec.de/Software/Linux/BSP-Yocto-i.MX6UL/BSP-
Yocto-Ampliphy-i.MX6UL-PD22.1.0/sdk/ampliphy/phytec-ampliphy-glibc-
x86_64-phytec-qt5demo-image-cortexa7t2hf-neon-vfpv4-toolchain-BSP-
Yocto-Ampliphy-i.MX6UL-PD22.1.0.sh

$ sudo chmod 777 phytec-ampliphy-glibc-x86_64-phytec-qt5demo-image-
cortexa7t2hf-neon-vfpv4-toolchain-BSP-Yocto-Ampliphy-i.MX6UL-
PD22.1.0.sh

$ ./phytec-ampliphy-glibc-x86_64-phytec-qt5demo-image-cortexa7t2hf-
neon-vfpv4-toolchain-BSP-Yocto-Ampliphy-i.MX6UL-PD22.1.0.sh

Step-6: Enable the toolchain.

$ . /opt/ampliphy/BSP-Yocto-Ampliphy-i.MX6UL-PD22.1.0/environment-
setup-cortexa7t2hf-neon-vfpv4-phytec-linux-gnueabi

Step-7: Configure the kernel fo rugged board i.MX6UL.

$ make distclean

$ vim arch/arm/configs/imx6_Rb_defconfig
  • Add the following lines if they are not already present in arch/arm/configs/imx6_Rb_defconfig :

CONFIG_HAVE_GCC_PLUGINS=n

CONFIG_GCC_PLUGINS=n

  • Save and exit.

$ make imx6_Rb_defconfig

Step-8: Compile the device tree.

$ make dtbs

Step-9: Compile the Kernel.

$ make zImage
Rugged Board i.MX6UL
https://download.phytec.de/Software/Linux/BSP-Yocto-i.MX6UL/BSP-Yocto-Ampliphy-i.MX6UL-PD22.1.0/sdk/ampliphy/phytec-ampliphy-glibc-x86_64-phytec-qt5demo-image-cortexa7t2hf-neon-vfpv4-toolchain-BSP-Yocto-Ampliphy-i.MX6UL-PD22.1.0.sh