This document provides a complete description of Open Industrial Linux (OpenIL) features, getting started on OpenIL using
NXP OpenIL platforms, and the various software settings involved. It describes in detail the industrial features, which include
NETCONF/YANG, TSN, Xenomai, Preempt-RT, IEEE 1588, OP-TEE, and SELinux. It also includes detailed steps for running the
demos such as Selinux demo, 1-board TSN Demo, 3-board TSN demo, 4G-LTE demo, OTA implementation, BLE Click Board
and BEE Click Board. It also provides a complete description of the OpenIL compilation steps.
1.1 Acronyms and abbreviations
The following table lists the acronyms used in this document.
Table 1. Acronyms and abbreviations
TermDescription
AVBAudio Video Bridging
BCBoundary clock
BLEBluetooth low energy
BMCBest master clock
CAClient application
CANController area network
DEIDrop eligibility indication
DPDisplay port
EtherCATEthernet for control automation technology
FManFrame manager
GPUGeneral Proccesor Unit
ICMPInternet control message protocol
IEEEInstitute of electrical and electronics engineers
IETFInternet engineering task force
IPCInter process communication
KMKey management
LBTLatency and bandwidth tester
MACMedium access control
NFCNear field communication
NMTNetwork management
OCOrdinary clock
OpenILOpen industry Linux
OPCOpen platform communications
Table continues on the next page...
Open Industrial User Guide, Rev. 1.10, 12/2020
User's Guide8 / 263
NXP Semiconductors
Table 1. Acronyms and abbreviations (continued)
TermDescription
OP-TEEOpen portable trusted execution environment
OSOperating system
OTAOver-the-air
OTPMKOne-time programmable master key
PCPPriority code point
PDOProcess data object
PHCPTP hardware clock
PITPacket inter-arrival times
PLCprogrammable logic controller
PTPPrecision time protocol
QSPIQueued serial peripheral interface
RCWReset configuration word
Introduction
REERich execution environment
RPCRemote procedure call
RTTRound-trip times
SABRESmart application blueprint for rapid engineering
SDOService data object
SPISerial periphery interface
SRKSingle root key
TATrusted application
TASTime-aware scheduler
TCPTransmission control protocol
TEETrusted execution environment
TFTPTrivial file transfer protocol
TSNTime sensitive networking
TZASCTrust zone address space controller
UDPUser datagram protocol
VLANVirtual local area network
1.2 Reference documentation
1. Refer to the following documents for detailed instructions on booting up the NXP hardware boards supported by Open IL:
• LS1012ARDB Getting Started Guide
• LS1021AIoT Getting Started Guide
• LS1021ATSN Getting Started Guide
User's Guide9 / 263
.
.
Open Industrial User Guide, Rev. 1.10, 12/2020
NXP Semiconductors
Introduction
• LS1021ATWR Getting Started Guide
• LS1043ARDB Getting Started Guide.
• LS1046ARDB Getting Started Guide.
• LS1046AFRWY Getting Started Guide
• i.MX6 SabreSD Board Quick Start Guide
• LS1028ARDB Quick Start Guide
• LX2160A/LX2160A-Rev2 RDB Quick Start Guide
• i.MX8MM-EVK Quick Start Guide
2. For booting up LS1021A-TSN board, refer to the Section Booting the board of this document.
3. For the complete description of the industrial IoT baremetal framework, refer to the latest available version of Industrial IoT
Baremetal Framework Developer Guide.
1.3 About OpenIL
The OpenIL project (“Open Industry Linux”) is designed for embedded industrial usage. It is an integrated Linux distribution
for industry.
OpenIL is built on buildroot project and provides packages for the industrial market.
• Focus on industry: OpenIL provides key components for industry usage, for example, Time sensitive network (TSN), Netconf,
IEEE 1588, and Xenomai or Preempt-RT.
• Ease of use: OpenIL is a tool that simplifies and automates the process of building a complete Linux system for an embedded
system, using cross-compilation. It follows the buildroot project rules. For more buildroot information, refer to the page:
https://buildroot.org/
• Extensibility: OpenIL provides capabilities of industry usage and standardized Linux system packages. And user can also
easily replicate the same setup on customized packages and devices.
• Lightweight: OpenIL only includes necessary Linux packages and industry packages in order to make the system more
lightweight to adapt to industry usage. Users can customize the package via a configuration file.
• Open Source: OpenIL is an open project. Anyone can participate in the OpenIL development through the Open
Source community.
1.3.1 OpenIL Organization
OpenIL follows the Buildroot directory structure depicted in the following figure. The second and third levels of the directory are
generated during compilation.
Open Industrial User Guide, Rev. 1.10, 12/2020
User's Guide10 / 263
NXP Semiconductors
Figure 1. OpenIL structure
Table 2. Source directories
Introduction
Directory nameDescription
archFiles defining the architecture variants (processor type, ABI, floating point, etc.)
toolchainPackages for generating or using tool-chains
systemContains the rootfs skeleton and options for system-wide features
linuxThe linux kernel package.
packageAll the user space packages (1800+)
fsLogic to generate file system images in various formats
bootBoot-loader packages
configsDefault configuration files for various platforms
After reading this section, user should be able to get the OpenIL source code, build and program the NXP platform images, and
run the OpenIL system on the supported NXP platforms.
2.1 Getting OpenIL
OpenIL releases are available every a few months. The Release Number follows the format 'YYYYMM', for example, 201708.
Release tarballs are available at: https://github.com/openil/openil.
To follow development, make a clone of the Git repository. Use the below command:
$ git clone https://github.com/openil/openil.git
$ cd openil
# checkout to the 2020.12 v1.10 release
$ git checkout OpenIL-v1.10-202012 -b OpenIL-v1.10-202012
2.2 OpenIL quick start
The steps below help the user to build the NXP platform images with OpenIL quickly. Ensure to follow the important notes provided
in the following section.
2.2.1 Host system requirements
OpenIL is designed to build in Linux systems. The following host environments have been verified to build the OpenIL.
• Ubuntu 20.04 (Recommended)
• Ubuntu 18.04
• Ubuntu 16.04
While OpenIL itself builds most host packages it needs for the compilation, certain standard Linux utilities are expected to be
already installed on the host system. The following tables provide an overview of the mandatory and optional packages.
User also can run following script to make sure all packages required have been installed into HOST machine.
$ cd openil
# Run below command to check and install these packages required automatically.
$ ./env_setup.sh
NOTE
Package names listed in the following tables might vary between distributions.
NOTE
When Building i.MX8MMEVK and i.MX8MPEVK images, the Host machine requres Ubuntu-20.04 or later because
gstreamer1.0-1.16.1 needs GLIB 2.29 or later (Ubuntu-18.04 is 2.27). If the host machine is not Ubuntu-20.04,
please refer to chapter 25 "Camera" to disable gstreamer .
Table 6. Host system mandatory packages
Mandatory packagesRemarks
which
Table continues on the next page...
Open Industrial User Guide, Rev. 1.10, 12/2020
User's Guide15 / 263
NXP Semiconductors
Table 6. Host system mandatory packages (continued)
Mandatory packagesRemarks
sed
makeVersion 3.81 or later
binutils
build-essentialOnly for Debian based systems
gccVersion 2.95 or later
g++Version 2.95 or later
bash
patch
gzip
bzip2
perlVersion 5.8.7 or later
tar
Getting started
cpio
pythonVersion 2.6 or later
unzip
rsync
fileMust be in /usr/bin/file
bc
wget
autoconf, dh-autoreconf
openssl, libssl-dev
libmagickwand-dev
(Debian, Ubuntu)
imageMagick-devel (CentOS)
autogen autoconf libtool
pkg-config
python3-pyelftools
python-pyelftools
python3-pycryptodome
python-pycryptodome
binfmt-supportused when building ubuntu-rootfs
qemu-system-commonused when building ubuntu-rootfs
qemu-user-staticused when building ubuntu-rootfs
Table continues on the next page...
Open Industrial User Guide, Rev. 1.10, 12/2020
User's Guide16 / 263
NXP Semiconductors
Table 6. Host system mandatory packages (continued)
Mandatory packagesRemarks
debootstrapused when building ubuntu-rootfs
Table 7. Host system optional packages
Optional packagesRemarks
ncurses5To use the menuconfig interface
qt4To use the xconfig interface
glib2, gtk2 and glade2To use the gconfig interface
Getting started
bazaar
cvs
git
Source fetching tools.
If user enable packages using any of these methods, user need to install the corresponding tool
on the host system
mercurial
scp
javac compilerJava-related packages, if the Java Classpath needs to be built for the target system
jar tool
asciidocDocumentation generation tools
w3m
python with the
argparse module
dblatex
graphvizTo use graph-depends and <pkg>-graph-depends
python-matplotlibTo use graph-build
2.2.2 Creating RAMDISK file system
OpenIL support to generate RAMDISK file system.
• Create Ramdisk root filesystem by using the make menuconfig command.
Filesystem images --->
[*] cpio the root filesystem (for use as an initial RAM filesystem)
[*] Create U-Boot image of the root filesystem
This configuration will generate Ramdisk root filesystem based on CPIO, some files created: rootfs.cpio.uboot,
rootfs.cpio.gz, rootfs.cpio.
2.2.3 Resizing second partition
Resizing the second partition, which is root filesystem.
Open Industrial User Guide, Rev. 1.10, 12/2020
User's Guide17 / 263
NXP Semiconductors
Getting started
• Specify partition size of the storage for the filesystem by using the make menuconfig command.
System configuration --->
(3G) Partition size of the storage for the rootfs
[*] Install rootfs_resize service
This configuration specifies the size of the storage device partition for the building rootfs and currently used by NXP platforms
and SD card device. The default size is 3GB, user can set the size of the partition with 512M, 2G or other values, the target
system can get the specific size of partition space for the using filesystem.
• Another way to modify the space size of second partition: using tool "fdisk" to resize the partition on HOST machine, below
are the example steps.
# First flash sdcard.img to SD card on host machine wiht dd command
~$ sudo dd if=./sdcard.img of=/dev/sdc
# Then list the partitions
~$ sudo fdisk -l /dev/sdc
Disk /dev/sdc: 7.4 GiB, 7948206080 bytes, 15523840 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000
Device Boot Start End Sectors Size Id Type
/dev/sdc1 * 131072 655359 524288 256M c W95 FAT32 (LBA)
/dev/sdc2 655360 1703935 1048576 512M 83 Linux
# Notice: we need this start sectors "655360" of second partition when create new partition.#
# Then, Re-create the second partition and expand to full SD capability
~$ sudo fdisk /dev/sdc
Welcome to fdisk (util-linux 2.31.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): d
Partition number (1,2, default 2):
Partition 2 has been deleted.
Command (m for help): n
Partition type
p primary (1 primary, 0 extended, 3 free)
e extended (container for logical partitions)
Select (default p):
Using default response p.
Partition number (2-4, default 2):
First sector (2048-15523839, default 2048): 655360
Last sector, +sectors or +size{K,M,G,T,P} (655360-15523839, default 15523839):
Created a new partition 2 of type 'Linux' and of size 7.1 GiB.
Partition #2 contains a ext4 signature.
Do you want to remove the signature? [Y]es/[N]o: n
Command (m for help): w
Open Industrial User Guide, Rev. 1.10, 12/2020
User's Guide18 / 263
NXP Semiconductors
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
# Finally, check the second partiton and resize to full SD capability
~$ sudo fsck.ext4 /dev/sdc2
e2fsck 1.44.1 (24-Mar-2018)
/dev/sdc2: clean, 3493/32768 files, 26617/131072 blocks
~$ sudo resize2fs /dev/sdc2
resize2fs 1.44.1 (24-Mar-2018)
Resizing the filesystem on /dev/sdc2 to 1858560 (4k) blocks.
The filesystem on /dev/sdc2 is now 1858560 (4k) blocks long.
~$ sudo fdisk -l /dev/sdc
Disk /dev/sdc: 7.4 GiB, 7948206080 bytes, 15523840 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000
Device Boot Start End Sectors Size Id Type
/dev/sdc1 * 131072 655359 524288 256M c W95 FAT32 (LBA)
/dev/sdc2 655360 15523839 14868480 7.1G 83 Linux
Getting started
2.2.4 Customing Ubuntu file system
OpenIL supports custom Ubuntu as the target root file system. This section describes the steps for customing the Ubuntu root
file system.
Users can download OpenIL and build the target system with an Ubuntu file system. The specific filesystem can be set
conveniently by using the make menuconfig command as shown below.
NOTE
The "sudo" permission is required when building ubuntu root file system.
System configuration --->
Root FS skeleton (custom target skeleton) --->
Custom skeleton via network --->
Currently, there are ten NXP platforms that can support Ubuntu file system:
• **_ubuntu_default: supports basic packages to boot the system.
• **_ubuntu_full_default: supports all packages in **_ubuntu_default and other necessary
packages required by all features.
Getting started
2.2.5 Building the images
For the NXP platforms supported by OpenIL, the default configuration files can be found in the configs directory. The following
table describes the default configuation files for the NXP-supported OpenIL platforms.
The “configs/nxp_xxxx_defconfig” files listed in the preceding table include all the necessary U-Boot, kernel
configurations, and application packages for the filesystem. Based on the files without any changes, user can build a complete
Linux environment for the target platforms.
To build the images for an NXP platform (for example, LS1046ARDB), run the following commands:
$ cd openil
$ make nxp_ls1046ardb-64b_defconfig
$ make
# or make with a log
$ make 2>&1 | tee build.log
NOTE
The make clean command should be implemented before any other new compilation.
The make command generally performs the following steps:
• Downloads source files (as required and at the first instance);
• Configures, builds, and installs the cross-compilation toolchain;
• Configures, builds, and installs selected target packages;
• Builds a kernel image, if selected;
• Builds a bootloader image, if selected;
• Creates the BL2, BL31, BL33 binary from ATF;
• Creates a root filesystem in selected formats.
• Generates the Image file for booting;
Open Industrial User Guide, Rev. 1.10, 12/2020
User's Guide22 / 263
NXP Semiconductors
After the correct compilation, all the images for the platform can be found at output/images.
images/
├── bl2_sd.pbl --- BL2 + RCW
├── fip.bin --- BL31 + BL33 (uboot)
├── rcw_1800_sdboot.bin --- RCW binary
├── boot.vfat
├── fmucode.bin
├── fsl-ls1046a-rdb-sdk.dtb --- dtb file for ls1046ardb
├── rootfs.ext2
├── rootfs.ext4
├── rootfs.tar
├── sdcard.img --- entire image can be programmed into the SD
├── uboot-env.bin
├── u-boot-dtb.bin --- uboot image for ls1046ardb
└── Image --- kernel image for ls1046ardb
NOTE
The image file name used for each configuration are as described below:
• xspi.cpio.img: the image file used for FlexNor flash boot, built by the *xspi_defconfig file.
• sdcard.img: the image file used for SD or eMMC boot, built by default and *emmc_defconfig file.
Getting started
• qspi.cpio.img: the image file used for QSPI flash boot, built by *qspi_defconfig file.
2.2.6 Troubleshooting
• Users can login all platforms through SSH. However, for LS1028ARDB, i.MX8MMEVK and i.MX8MPEVK, Linux-PAM is
enabled, which is required by weston. Hence, if users don't want to follow Linux-PAM policy to login through SSH, the below
steps are necessary:
1> Open file /etc/ssh/sshd_config and comment out the below line:
# UsePAM yes
2> Then, restart SSHD using the command:
$ /etc/init.d/S50sshd restart
• All configurations are built by the nomal user. But, "sudo" permission is required when building ubuntu root file system on
HOST machine. User can enter below line to file "/etc/sudoers" to avoid entering sudo password during building ("username"
should be changed to the true user name):
username ALL=(ALL:ALL) NOPASSWD:ALL
• The PERL_MM_OPT issue: Users might encounter an error message for the PERL_MM_OPT parameter when using the make
command in some host Linux environments as shown below:
You have PERL_MM_OPT defined because Perl local::lib is installed on your system.
Please unset this variable before starting Buildroot, otherwise the compilation of Perl
related packages will fail.
make[1]: *** [core-dependencies] Error 1
make: *** [_all] Error 2
To resolve this issue, just unset the PERL_MM_OPT parameter.
$ unset PERL_MM_OPT
Open Industrial User Guide, Rev. 1.10, 12/2020
User's Guide23 / 263
NXP Semiconductors
2.3 Booting the board
Getting started
Before proceeding further with the instructions in this section, refer to the
Getting Started Guide
of the respective board for detailed
instructions regarding board boot-up. See Reference documentation.
NOTE
• Before booting up the board, user need to install mbed Windows serial port driver in order to obtain the board
console. This is a one time activity. Please ignore this step if user have already installed the mbed driver on
user system (PC or laptop). User can download the mbed Windows serial port driver from the link below:
• Download and install Tera Term on the host computer from the Internet. After installation, a shortcut to the tool
is created on the desktop of the host computer.
• If user is using a Windows 10 machine as a host computer and encountering a serial port unstable issue, then,
disable the
Volume Storage
service of the Windows machine.
All the NXP platforms can be booted up from the SD card or QSPI flash. After the compilation for one platform, the image files
(sdcard.img or qspi.img) are generated in the folder output/images. The following table describes the software settings to be
used while booting up the NXP platforms with the images built from OpenIL.
Table 9. Switch settings for the NXP boards
PlatformBoot modeImage name Board SWITCH Setting (ON = 1)
) includes all the information: RCW, DTB, U-Boot, kernel, rootfs, and
necessary applications.
NOTE
Make sure the board is set to boot up from SD card or QSPI using software configuration. Refer to the preceding
table for the switch settings for the respective platform.
.
Open Industrial User Guide, Rev. 1.10, 12/2020
User's Guide24 / 263
NXP Semiconductors
Getting started
2.3.1 SD card bootup
For platforms that can be booted up from an SD card, following are the steps to program the sdcard.img.into an SD card:
1. Insert one SD card (at least 4G size) into any Linux host machine.
2. Run the below commands:
$ sudo dd if=./sdcard.img of=/dev/sdx
# or in some other host machine:
$ sudo dd if=./sdcard.img of=/dev/mmcblkx
# find the right SD Card device name in user host machine and replace the “sdx” or “mmcblkx”.
3. Now, insert the SD card into the target board (switch the board boot from SD card first) and power on.
2.3.2 QSPI/FlexSPI bootup
For platforms that can be booted up from QSPI (for example, LS1012ARDB), following are the steps to program the qspi.img into
QSPI flash.
Set the board boot from QSPI, then power on, and enter the U-Boot command environment.
FlexSPI (XSPI, image name is xspi.cpio.img) boot has the same commands to make the flash.
# In order to void damage the default bank which will cause the board can NOT bootup, we need to
write the image to altbank for ls1012ardb
# First, select the altbank with below command
=>i2c mw 0x24 0x7 0xfc; i2c mw 0x24 0x3 0xf5
# Then, download the image qspi.cpio.img
=>tftp 0x80000000 qspi.cpio.img
# Last, erase the flash and write the image to flash
=>sf probe 0:0
=>sf erase 0x0 +$filesize
=>sf write 0x80000000 0x0 $filesize
=>reset
2.3.3 eMMC bootup
For platforms that can be booted up from eMMC (for example, ls1028ardb, ls1046ardb), use the following steps to program the
sdcard image into eMMC:
LS1028ARDB eMMC bootup
1. Bootup the ls1028ardb into U-Bootprompt with XSPI or SD boot.
2. Download the image from server.
eMMC boot image is built with nxp_ls1028ardb-64b-emmc_defconfig.
Make sure that the network in U-Boot can access the TFTP server and the eMMC bootup image is ready in this server using
the command:
> tftpboot 0xa0000000 sdcard.img
3. Select eMMC as shown in the steps below:
=> mmc dev 1
=> mmcinfo
Device: FSL_SDHC
Manufacturer ID: 13
OEM: 14e
Open Industrial User Guide, Rev. 1.10, 12/2020
User's Guide25 / 263
NXP Semiconductors
Name: Q2J55
Bus Speed: 52000000
Mode: MMC High Speed (52MHz)
Rd Block Len: 512
MMC version 5.0
High Capacity: Yes
Capacity: 7.1 GiB
Bus Width: 4-bit
Erase Group Size: 512 KiB
HC WP Group Size: 8 MiB
User Capacity: 7.1 GiB WRREL
Boot Capacity: 2 MiB ENH
RPMB Capacity: 4 MiB ENH
4. Flash sdcard.img to eMMC:
First, erase eMMC, the block number is calculated by image-bytes/block-size (usually, the block size is 512).
For example, image bytes is 725191680, the block number is: 725191680 / 512 = 0x159CC6.
In the below example, the image size is assumed to be 725191680 and block number is 0x159CC6, hence parameter
greater than 0x159CC6 can be used, for example 0x160000. Users should change this parameter according to the true size
of the sdcard.img.
Getting started
=> mmc erase 0 0x160000
-> mmc write 0xa0000000 0 0x160000
5. Reset the board to eMMC boot:
=> qixis_reset emmc
Or, power off the ls1028ardb board, change the switch setting SW2[1-4] = 0b'1001, then power on ls1028ardb, the board can be
booted up from eMMC directly.
LS1046ARDB eMMC bootup
1. Build two images with nxp_ls1046ardb-64b-emmc_qspiboot_defconfig and nxp_ls1046ardb-64b-emmcboot_defconfig:
• qspi.cpio.img: built with nxp_ls1046ardb-64b-emmc_qspiboot_defconfig
• sdcard.img: built with nxp_ls1046ardb-64b-emmcboot_defconfig
2. Bootup the ls1046ardb board to uboot prompt with QSPI or SD boot Make sure the U-Boot network can access TFTP server
and these two images are ready in this server.
3. Flash qspi.cpio.img to QSPI to enable eMMC:
=> tftpboot 0xa0000000 qspi.cpio.img
=> sf probe 0:0
=> sf erase 0x0 +$filesize
=> sf write 0xa0000000 0x0 $filesize
4. Remove SD card from SD slot, and reset the board with qspi boot.
=> cpld reset qspi
5. Now the eMMC can be accessed as shown in the console log below:
=> mmcinfo
Device: FSL_SDHC
Manufacturer ID: fe
OEM: 14e
Open Industrial User Guide, Rev. 1.10, 12/2020
User's Guide26 / 263
NXP Semiconductors
Name: P1XXX
Bus Speed: 52000000
Mode : MMC High Speed (52MHz)
Rd Block Len: 512
MMC version 4.5
High Capacity: Yes
Capacity: 3.6 GiB
Bus Width: 4-bit
Erase Group Size: 512 KiB
HC WP Group Size: 4 MiB
User Capacity: 3.6 GiB
Boot Capacity: 2 MiB ENH
RPMB Capacity: 128 KiB ENH
6. Download eMMC bootup image:
=> tftpboot 0xa0000000 sdcard.img
7. Flash this image to eMMC
First, erase eMMC, the block number is calculated by image-bytes/block-size (usually, the block size is 512).
For example, if image bytes is 738197504, the block number is: 738197504 / 512 = 0x160000.
The below steps assume that for the image size of 738197504 and the block number 0x160000, the parameter greater than
0x160000 can be used, for example 0x170000.
Getting started
NOTE
Users should change this parameter according to the actual size of the sdcard image.
=> mmc erase 0 0x170000
-> mmc write 0xa0000000 0 0x170000
8. Reset the board to use eMMC boot:
=> cpld reset sd
Or, power off the ls1046ardb board, set the switch to SD boot, and power on the board.
NOTE
Make sure there is not SD card in the SD card slot if the user wants to perform eMMC boot.
2.3.4 Starting up the board
After programming the sdcard or qspi image, startup the board. Users should see the following information on the console.
Open Industrial User Guide, Rev. 1.10, 12/2020
User's Guide27 / 263
NXP Semiconductors
Getting started
Figure 2. OpenIL system startup
The system will be logged in automatically.
2.4 Basic OpenIL operations
This section describes the commands that can be used for performing basic OpenIL operations.
In OpenIL, all packages used are in directory ./package/, and the package name is the sub-directory name. Linux kernel and
uboot are also packages, the package name for Linux kernel is linux, and package name for u-boot is uboot. Packages "linux"
and "uboot" is not in directory "./package/", the path of package "linux" is "./linux", the path of package "uboot" is "./boot/uboot".
NOTE
Packages linux and uboot are not in directory ./package/.
• The path of package linux is ./linux, and
• The path of package uboot is ./boot/uboot.
Sample usages of the ‘make’ command:
• Displays all commands executed by using the make command:
$ make V=1 <target>
• Displays the list of boards with a defconfig:
$ make list-defconfigs
• Displays all available targets:
$ make help
• Sets Linux configurations:
$ make linux-menuconfig
Open Industrial User Guide, Rev. 1.10, 12/2020
User's Guide28 / 263
NXP Semiconductors
Getting started
• Deletes all build products (including build directories, host, staging and target trees, images, and the toolchain):
$ make clean
• Resets OpenIL for a new target.
• Deletes all build products as well as the configuration (including dl directory):
$ make distclean
NOTE
Explicit cleaning is required when any of the architecture or toolchain configuration options are changed.
• Downloading, building, modifying, and rebuilding a package
Run the below command to build and install a particular package and its dependencies:
$ make <pkg>
For packages relying on the OpenIL infrastructure, there are numerous special make targets that can be called independently
such as the below command:
$ make <pkg>-<target>
The package build targets are listed in the following table.
Table 10. Package build targets
Package TargetDescription
<pkg>Builds and installs a package and all its dependencies
<pkg>-sourceDownloads only the source files for the package
<pkg>-extractExtracts package sources
<pkg>-patchApplies patches to the package
<pkg>-dependsBuilds package dependencies
<pkg>-configureBuilds a package up to the configure step
<pkg>-buildBuilds a package up to the build step
<pkg>-show-dependsLists packages on which the package depends
<pkg>-show-rdependsLists packages which have the package as a dependency
<pkg>-graph-dependsGenerates a graph of the package dependencies
<pkg>-graph-rdependsGenerates a graph of the package's reverse dependencies
<pkg>-dircleanRemoves the package's build directory
<pkg>-reconfigureRestarts the build from the configure step
<pkg>-rebuildRestarts the build from the build step
Thus, a package can be downloaded in the directory dl/, extracted to the directory output/build/<pkg>, and then built in
the directory output/build/<pkg>. User need to modify the code in the output/build/<pkg>, and then run the command,
$make <pkg>-rebuild to rebuild the package.
Open Industrial User Guide, Rev. 1.10, 12/2020
User's Guide29 / 263
NXP Semiconductors
Getting started
For more details about OpenIL operations, refer to the Buildroot document available at the URL: https://buildroot.org/downloads/
manual/manual.html#getting-buildroot.
2.4.1 Building Linux kernel
OpenIL is a tool for building the final flash/SD image, including Linux kernel.
If users want to build the Linux kernel separately, they can follow the below methods:
1. Build Linux kernel in OpenIL without code modified
This is the simple method to build the Linux kernel, using the following command:
# enter openil directory
$ cd openil
# make one default configuration file, for example nxp_ls1028ardb-64b_defconfig
$ make nxp_ls1028ardb-64b_defconfig
# build the Linux kernel image, which will be stored in directory output/images/
$ make linux
2. Build Linux kernel in OpenIL with code modified: If users want to modify the Linux code and build it, follow the below steps:
a. Clone the Linux repos from github.com/openil/linux
$ git clone https://github.com/openil/linux.git
b. Enter "linux" repos and checkout to current release tag or any tag user want, for example