Linux 5.10.98_User’s Compilation Manual Initial Version_V1.0
Copyright
The copyright of this manual belongs to Baoding Folinx Embedded Technology Co., Ltd. Without the written permission of our company, no organizations or individuals have the right to copy, distribute, or reproduce any part of this manual in any form, and violators will be held legally responsible.
Forlinx adheres to copyrights of all graphics and texts used in all publications in original or license-free forms.
The drivers and utilities used for the components are subject to the copyrights of the respective manufacturers. The license conditions of the respective manufacturer are to be adhered to. Related license expenses for the operating system and applications should be calculated/declared separately by the related party or its representatives.
Overview
This manual is designed to help you quickly understand the compilation process and become familiar with the compilation methods for Forlinx Embedded products. Before running applications on the development board, they must be cross-compiled on a Linux operating system. By following the methods outlined in this manual and engaging in hands-on exercises, you will be able to compile their own software code.
It will explain the environment setup process. Some unpredictable issues may arise during environment setup, so it is recommended that beginners directly use the pre-configured development environment Forlinx provide to get started quickly and reduce development time.
There are three installation methods: dual-boot on a physical machine, single-boot on a physical machine, or in a virtual machine. Each installation method has its advantages and disadvantages. This manual only provides a method for setting up Ubuntu in a virtual machine. Hardware Requirements: A minimum of 16GB of RAM is recommended. This will allow you to allocate 8GB or more to the virtual machine while still performing other tasks in Windows. Using less RAM may negatively impact the performance of Windows.
There are total 4 chapters:
Chapter 1. covers the installation of VMware, specifically version VMware® Workstation 15 Pro 15.5.6. VMware must be installed before setting up the Ubuntu development environment;
Chapter 2. explains how to load the Ubuntu development environment provided by Feilin. The environment is based on 64-bit Ubuntu 20.04;
Chapter 3. outlines the process of setting up a new Ubuntu development environment. This section takes the 64-bit Ubuntu 20.04 as an example to describe in detail the process of setting up an Ubuntu development environment. Due to the varied configurations of individual computers, unexpected issues may arise during the setup process. Therefore, it is recommended that beginners directly use our pre-configured development environment for more efficient subsequent work.
Chapter 4. explains how to compile source code for the development board.
Additionally, the manual includes explanations of some symbols and formats.
Format |
Meaning |
|---|---|
// |
Explanation of input commands or output information: |
Username@Hostname |
root@OK-x-UP4:Development board serial login credentials |
Example: After packaging the file system, use the ls command to view the generated files.
forlinx@ubuntu:~/work$ ls //List the files in this directory
OK-x-UP4-source OK-x-UP4-source.tar.bz2
forlinx@ubuntu: The username is forlinx, and the hostname is ubuntu, indicating that the operation is being performed in the development environment on Ubuntu.
//: Explanation of the command. No need to enter this when typing the command.
Application Scope
This hardware manual applies to Forlinx OK3562J-UP4 development board (version 1.3 and above) and FET3562J-UP4 SoM (version 1.1 and above Linux5.10.198).
Revision History
Date |
Version |
Revision History |
|---|---|---|
11/06/2026 |
V1.0 |
User’s Compilation Manual Initial Version |
1. VMware Virtual Machine Software Installation
This chapter mainly introduces the installation of the VMware virtual machine, using VMware Workstation 15 Pro v15.5.6 as an example to demonstrate the operating system installation and configuration process.
1.1 Downloading and Purchasing VMware Software
Visit the VMware official website at VMware Global Website (English)to download Workstation Pro and obtain the product key. VMware is paid software that requires individual purchase, or you can choose to use a trial version.

After the download is complete, double-click the setup file to launch the installer.
1.2 VMware Software Installation
Double-click the setup file to enter the installation wizard.

Click “Next.”

Check “I accept the terms in the license agreement” and click “Next.”

Modify the installation location to the partition on your computer where software is typically installed, then click “Next.”

Check, then click “Next.”

Check “Add shortcuts” and click “Next.”

Click “Install.”

Wait for the installation to complete.

After clicking “Finish,” you can start the trial. For long-term use, please purchase from the official website and enter the license key.
2. Loading an Existing Ubuntu Development Environment
Note:
It is recommended that beginners directly use the virtual machine environment pre-configured by Forlinx, which already has the cross-compiler and Qt environment installed. After reviewing this chapter, you can skip directly to the compilation chapters;
The provided development environment has a regular user account: forlinx, with password: forlinx. The superuser account is: root, with password: root;
You can access software and hardware documentation, source code, and the development environment via the cloud storage link provided by Forlinx. Please ask your sales representative for the download link.
There are two ways to use the virtual machine environment in VMware: one is to directly load an existing environment, and the other is to create a new environment. First explain how to load an existing environment.
First, download the development environment provided by Forlinx. The development environment package will include an MD5 checksum file. After downloading the package, you should perform an MD5 checksum verification on the compressed file using the MD5 checksum tool for Windows, which you can find at User Data\Software Tools\3-Tools\md5sums-1.2.zip.
Generate the checksum and compare it with the value in the checksum file. If the checksums match, the downloaded file is valid. If they do not match, the file may be corrupted, and you should download it again.

Select all the compressed packages and right click to extract them to the current folder or your own directory:

Once the extraction is complete, you will obtain a folder named “3568 Development Environment.”
Note: The Ubuntu 22.04 development environment for models 3562 and 3568 is the same.
The file “3568.vmx” in the “3568 Development Environment” folder is the virtual machine file that needs to be opened.
Open the installed virtual machine software.

Navigate to the directory where the “3568.vmx” file was extracted, and double-click to open the startup file.

Once it has finished loading, click to start the virtual machine, and you will be able to run it and enter the system interface.

The provided development environment is set to automatically log in to the account forlinx on startup by default.
3. Setting Up a New Ubuntu Development Environment
Note: It is not recommended for beginners to build the system by themselves. It is recommended to use the existing virtual machine environment. This section can be skipped if there is no need to build the environment.
This chapter mainly explains the setup process of the Ubuntu system and the installation of Qt Creator. If QT is not used, the installation of Qt Creator can be ignored.
3.1 Ubuntu System Setup
The installed Ubuntu version is 22.04, and all the introductions and development in this manual were carried out on Ubuntu 22.04. First, go to the Ubuntu official website to obtain the Ubuntu 22.04 64-bit image. The download address is: https://releases.ubuntu.com/22.04/
Download the “ubuntu-22.04.6-desktop-amd64.iso” version (the specific version to download can be based on your own needs; here we use version 22.04.6 as an example).

3.1.1 Creating an Ubuntu Virtual Machine
Step 1: Open the VMware software and click “Create a New Virtual Machine”. On the following screen, check “Custom (advanced)” and click “Next”:

Step 2: Select the compatibility for the corresponding VMware version (you can view the version under Help -> About VMware Workstation). After confirming, click “Next”:

Choose “Installer disc image file (iso)” and click “Next”:

Enter the full name, username, and password, then click “Next”:

Enter the virtual machine name and configure the installation location, then click “Next”:

Configure the number of cores, then click “Next”:

Configure at least 8GB of memory and select “Next”:

Set the network type, use the default NAT networking, and click “Next”. Subsequent steps remain at their default values until the disk capacity step is specified.

Use the recommended I/O controller and click “Next”:

Use the recommended disk type and click “Next”:

Use the default option, “Create a new virtual disk”, and click “Next”:

Allocate a disk size of 200GB and choose “Split virtual disk into multiple files”, then click “Next”:

Use the default settings and click “Next”:

Click “Finish”:


At this point, the virtual machine creation is complete.
Afterward, click “Power on this virtual machine” to start installing the image. Please wait patiently.
With the above, the Ubuntu system installation is complete.
3.1.2 Ubuntu Basic Configuration
3.1.2.1 VMware Tools Installation
VMware Tools should be installed automatically after creating the virtual machine. If it is not successful, install it according to the following steps.
Without this tool installed, you cannot use copy and paste or drag and drop files between the Windows host and the virtual machine.
First, click “Virtual Machine” on the VMware navigation bar, then click “Install VMware Tools” in the dropdown menu.

After completion, enter Ubuntu. A VMware Tools CD will appear on the desktop; click to enter it.

After entering, you will see a compressed file VMware Tools-10.3.10-12406962. tar. gz (different virtual machine versions may be different), and copy the file to the home directory (that is, the directory of the home personal user name).

Press [Ctrl+Alt+T] to bring up the terminal command interface and enter the command to extract it:
forlinx@ubuntu:~$ sudo tar xvf VMwareTools-10.3.10-12406962.tar.gz

After extraction completes, a folder named “vmware-tools-distrib” will appear.

Return to the terminal and type: cd vmware-tools-distrib to enter the directory.
Then type: sudo ./vmware-install.pl and press Enter. Enter your password and the installation will begin. When prompted, type yes; otherwise, just press Enter to install the default settings.

After VMware Tools installation is complete, file copy-paste between Windows and Ubuntu will be enabled.
3.1.2.2 Virtual Machine Full-Screen Display
If the virtual machine cannot display in full screen, you can click on “View”, select “Auto-Adjust Size”, and then click “Autofit Guest” to resolve the full-screen issue.

Most system settings can be configured in the location shown in the figure. Many settings requirements on Ubuntu can be completed here.

3.1.2.3 Virtual Machine Sleep Settings
Additionally, the default sleep setting is 5 minutes. If you do not want the system to go to sleep, go to Settings -> Power -> Blank Screen and set it to “Never”.

3.1.3 Virtual Machine Swapfile Configuration
When creating the virtual machine, 8GB of memory was allocated. If 8GB of memory is insufficient during compilation, you need to modify the size of the swapfile.
forlinx@ubuntu:~$ sudo swapoff /swapfile
forlinx@ubuntu:~$ sudo dd if=/dev/zero of=/swapfile bs=1M count=16384
forlinx@ubuntu:~$ sudo mkswap /swapfile
forlinx@ubuntu:~$ sudo swapon /swapfile
3.1.4 Virtual Machine Network Configuration
3.1.4.1 NAT Connection Mode
By default, after the virtual machine installation is complete, the network connection mode is set to NAT, as shown in the figure below, sharing an IP address with the host machine. This setting does not need to be changed when installing dependency packages, compiling code, etc.
In the virtual machine, when the VMware virtual network adapter is set to NAT mode, the network in the Ubuntu environment should be set to dynamic IP. In this mode, the virtual NAT device connects and communicates with the host’s network card for internet access. This is the most commonly used method for the virtual machine to access the external network.

3.1.4.2 Bridged Connection Mode
When the VMware virtual network adapter device is in bridged mode, the host network card and the virtual machine network card communicate through a virtual network bridge. In the Ubuntu environment, you need to set a network IP in the same subnet as the host. To access the external network, you need to set the DNS to be consistent with the host network card. If using servers like TFTP or SFTP, you need to set the virtual machine’s network connection to Bridged Mode.

3.2 Installing Toolkits
To install the necessary toolkits required for compiling, please execute the following commands. Ensure the network is functioning normally and can access the external internet before installation:
forlinx@ubuntu:~$ sudo apt-get update
forlinx@ubuntu:~$ sudo apt-get install openssh-server vim git fakeroot make automake autoconf libtool libssl-dev bc dosfstools mtools parted iproute2 kmod libyaml-dev device-tree-compiler python-pip flex bison build-essential u-boot-tools libncurses-dev lib32stdc++6 lib32z1 libc6:i386 e2fsprogs scons libgmp-dev libmpc-dev
3.3 Qt Creator Installation
Path:-Software Data \ 3-Tools \ qt-opensource-linux-x64-5.12.9.run
Copy qt-opensource-linux-x64-5.12.9.run to any directory under the home directory of the current user, and execute:
forlinx@ubuntu:~$ chmod 777 qt-opensource-linux-x64-5.12.9.run
forlinx@ubuntu:~$ ./qt-opensource-linux-x64-5.12.9.run
The following interface will pop up. Click “Next” to enter the next step:

Click “Next”:

In the following screen, click “Browse …” Select the installation path of Qtcreator, and then click “Next” to enter the next step:

Click “Next”:

Agree to the license agreement and click “Next”:

Click “Install”:

After the installation is completed, the following interface will be displayed. Uncheck the option “Launch Qt Creator” “and click “ Finish” to complete the installation of Qt Creator:

Navigate to the actual Qt Creator installation directory: /home/forlinx/Qt5.12.9/Tools/QtCreator/bin/
forlinx@ubuntu:~$ cd /home/forlinx/Qt5.12.9/Tools/QtCreator/bin/
Start Qt Creator:
forlinx@ubuntu: ~/Qt5.12.9/Tools/QtCreator/bin $ sudo ./qtcreator
[sudo] password for forlinx: forlinx //输入forlinx用户的密码,无回显
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'

The Qt Creator tool interface will appear. Qt Creator installation is now complete.
3.4 Qt Compilation Environment Configuration
Software Resources/3-Tools/aarch64-buildroot-linux-gnu_sdk-buildroot.tar.gz
The libraries and cross-compilation tools required to compile Qt programs are located in aarch64-buildroot-linux-gnu_sdk-buildroot.tar.gz. The configuration steps are as follows:
Extract the compilation environment archive
Because the qmake tool depends on a local path, this toolkit must be placed in a fixed path: /opt/
Extract the toolkit.
forlinx@ubuntu:~$ sudo tar -xf aarch64-buildroot-linux-gnu_sdk-buildroot.tar.gz -C /opt/
forlinx@ubuntu:~$ cd /opt/aarch64-buildroot-linux-gnu_sdk-buildroot
forlinx@ubuntu: /opt/aarch64-buildroot-linux-gnu_sdk-buildroot $ sudo ./relocate-sdk.sh
Qt Creator Environment Configuration
First, open the Qt Creator software.
Execute:
Navigate to the actual Qt Creator installation directory: /home/forlinx/Qt5.12.9/Tools/QtCreator/bin/
forlinx@ubuntu:~$ cd /home/forlinx/Qt5.12.9/Tools/QtCreator/bin/
Start Qt Creator:
forlinx@ubuntu: ~/Qt5.12.9/Tools/QtCreator/bin $ sudo ./qtcreator
[sudo] password for forlinx: forlinx //输入forlinx用户的密码,无回显
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
Start the Qt Creator program and click Tools- > option:

Enter the Options interface, click “Kits” on the left, then click the “Compilers” tab on the top of the middle, and click “Add-> GCC-> C + +” on the right, as shown in the figure:

Locate “aarch64-linux-g++” in the /opt/aarch64-buildroot-linux-gnu_sdk-buildroot/bin directory, select it, click “Open”, and change the “Name”.
Add the GCC compiler using the same method, and click “Add->GCC->C” on the right, as shown in the image:

Locate “aarch64-linux-gcc” in the /opt/aarch64-buildroot-linux-gnu_sdk-buildroot/bin directory, select it, click “Open”, and change the Name.
Click the “Qt Versions” tab, then click “Add”:

Locate “qmake” in the /opt/aarch64-buildroot-linux-gnu_sdk-buildroot/bin directory, select it and click “Open”. Once added, the screen will appear as shown below; click “Apply”.
Click the “Kits” tab, click “Add” on the right to add a new Kit. Modify the contents according to the figure below and click “Apply”






