Linux 6.12.58_User’s Compilation Manual_V1.0
Document classification: □ Top secret □ Secret □ Internal information ■ Open
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 the compilation methods. 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.
The manual 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 there 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 6GB of RAM is recommended. This will allow you to allocate 2GB 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 17 Pro v17.0.0. 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 22.04;
Chapter 3. outlines the process of setting up a new Ubuntu development environment. This section takes the 64-bit Ubuntu 22.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 |
|---|---|
Note |
Note or particularly important information must be read carefully. |
📚 |
Relevant explanations regarding the testing section |
️️️🛤️ ️ |
Related paths. |
Blue font on gray background |
Refers to the command entered on the command line, which needs to be entered manually. |
Black font on a gray background |
Serial output information after command input |
Black Bold font on a gray background |
Key information in the serial output: |
// |
Explanation of input commands or output information: |
Username@Hostname |
root@ok3572-buildroot:/# : Development board serial port and network login account information, Ubuntu account information. |
Example: After packaging the file system, use the ls command to view the generated files.
forlinx@ubuntu:~/3572$ ls //List the files in this directory
OK3572-linux-source.tar.bz2 OK3572-linux-source.tar.bz2.00 OK3572-linux-source.tar.bz2.01
OK3572-linux-source.tar.bz2.02 OK3572-linux-source.tar.bz2.03 OK3572-linux-source.tar.bz2.04
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.
ls: blue font with gray background, indicating the relevant command that needs to be entered manually
OK3572-linux-source.tar.bz2: The output information after inputting the command is shown in black font, and the key information is in bold font. In this case, it refers to the packaged file system.
Application Scope
This software manual is designed for the OK3572 platform running Linux6.12.58. While other platforms may also reference this manual, there could be differences that require adjustments for the specific use.
Revision History
Date |
Version |
Revision History |
|---|---|---|
16/06/2026 |
V1.0 |
Initial Version |
1. VMware Virtual Machine Software Installation
This chapter mainly introduces the installation of the VMware virtual machine, using VMware Workstation 17 Pro v17.0.0 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 https://www.vmware.com/cn.html 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 programme to launch the installation wizard, then 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;
Development Environment Account: forlinx; password: forlinx;
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 includes an MD5 checksum file. After downloading the package, you should verify the integrity of the compressed file by performing an MD5 checksum check. You can either use an online MD5 verification tool or download a dedicated MD5 verification tool, depending on your preference. Compare the checksum that you generate with the one listed in the checksum file. If they match, the downloaded file is intact. If they do not match, the file may be corrupted, and you will need to download it again.

Select all the compressed packages and right click to extract them to the current folder or your own directory: After extraction, you will obtain the development environment folder 35XX.
The file 35XX.vmx in the OK35XX-linux6.1-VM17-ubuntu22.04 development environment folder is the file that the virtual machine needs to open.
Open the installed virtual machine software.

Select the directory where the newly extracted - OK35XX-linux6.1-VM17-ubuntu22.04 virtual machine file is located, and double-click the startup file to open it

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

Development Environment Account: forlinx; password: forlinx

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.
3.1 Ubuntu System Setup
3.1.1 Creating an Ubuntu Virtual Machine
Open the VMware software and click “Create a New Virtual Machine”. Enter the following interface:

Select ‘’Custom’’ and click ‘’Next.’’

Select the compatibility with the corresponding version of VMware, which can be found in Help->About VMware Workstation, and click “Next”.

Select Install the operating system later and click “Next”.

Keep the default settings and click ‘’Next.’’

Modify the virtual machine’s name and installation location, then click ‘’Next.’’

Set the number of processors according to your needs.

Similarly, set the memory size according to your needs. It is recommended to use 16GB.

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

Choose the default LSI for the IO controller type.

Similarly, select SCSI as the default here.

Choose to create a new virtual disk:

Set the disk size to 200GB and select the disk’s format, then click “Next” to complete.

Specify the disk file, the default setting is fine here.

Click ‘’Finish’’ by default to complete.
At this point, the virtual machine creation is complete.
The installation process on a physical machine is similar to the one on a virtual machine, but here we will focus on installing Ubuntu in the virtual machine. Here’s how to install Ubuntu in a virtual machine
3.1.2 System Installation
The installed Ubuntu version is 22.04. First, go to the official Ubuntu website to download the 64-bit image. The download link is: https://old-releases.ubuntu.com/releases/22.04.4/. Download the version ubuntu-22.04.4-desktop-amd64.iso.
Right-click the Ubuntu 64-bit virtual machine that was created and select “Settings” from the context menu.

The “Virtual Machine Settings Menu” will pop up as shown in the image below.

Click on CD/DVD (SATA), select Use ISO image file, then browse and select the previously downloaded Ubuntu ISO image, and click “OK”.

After configuring the image, ensure that the network is working, and then start the virtual machine to begin installing the Ubuntu image.

Once the virtual machine starts, wait for the installation interface to appear as shown below.

Select the language on the left side and click “Install Ubuntu.” A language selection screen will pop up.
By default, Ubuntu’s language is English, but you can also select Chinese. The selected language can be changed later during the installation. Once you’ve selected the language, click “Continue”.

Next, choose the default option, click Continue to proceed with the installation. The process will take some time. Then click Continue again.

Click Install Now by default, and a prompt will appear. Click Continue to proceed.


Choose your timezone. Here, you can click Shanghai or type Shanghai to select the timezone (choose a different timezone based on your location if needed), and click Continue. Finally, set up your username and password. Click Continue, and the installation will begin automatically.

The installation process is shown in the figure below. If the network is not good, you can skip it without affecting the installation.

After installation is complete, the screen will look like the image below. Click “Restart Now” to reboot (or click “Restart Guest”).

After restarting and logging in, the system interface is as shown below:

3.1.3 Basic Configuration of Ubuntu
After installing the Ubuntu 22.04 operating system, some configurations need to be done.
VMware Tools Installation:
sudo apt update
sudo apt install open-vm-tools open-vm-tools-desktop
Basic Configuration:
Most system settings can be configured in the location shown in the figure. Many settings requirements on Ubuntu can be completed here.

3.1.4 Network Configuration of Ubuntu
NAT Mode
Before using the network, make sure that your virtual machine can connect to the internet. Open the virtual machine settings, and change the network adapter’s network bridging mode to NAT Mode:

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 and the host network card are connected. This is the most commonly used method to connect the virtual machine to the external network. This is the most commonly used method for the virtual machine to access the external network.

The network is set to dynamic IP.

Bridge Mode:
If using servers like TFTP or SFTP, you need to set the virtual machine’s network connection to Bridged Mode. When Vmware virtual network card is set to bridged mode, the host network card and the virtual machine network card communicate through a virtual bridge, and you need to ensure that the IP address of Ubuntu is in the same subnet as the host machine.


Set the static IP. At this time, the Ubuntu IP and the host IP should be set in the same network segment.


Note: The IP and DNS settings mentioned in the network configuration section should be configured based on the user’s actual environment. The manual provides examples for illustration.
3.1.5 USB Device Loading
Open the virtual machine settings, go to USB Controller, and in the compatibility section, choose USB 3.0, then click OK. As shown below, most modern computers support USB 3.0 ports. If not configured, the USB 3.0 device will not be connected to the virtual machine when inserted. As shown in the figure:

After the virtual machine starts, insert the USB flash drive. An icon similar to a “USB drive” will appear in the lower-right corner of the virtual machine. Right-click it and select Connect. Then, you should see a new directory in the file system, indicating that the USB drive has been successfully loaded, as shown below:


3.1.6 Basic Library Installation for the Virtual Machine
Before development, some other necessary libraries need to be installed. Use the following commands to install them one by one. Make sure the network is functioning properly and can connect to the internet before installing.
forlinx@ubuntu:~$ sudo apt-get update // Updates download source information
forlinx@ubuntu:~$ sudo apt-get install build-essential // Provides a list of essential packages for compiling programs
forlinx@ubuntu:~$ sudo apt-get install libncurses* // Used for generating text-based user interfaces
forlinx@ubuntu:~$ sudo apt-get install lzop // A compression/decompression tool based on the Lzo library
forlinx@ubuntu:~$ sudo apt-get install net-tools // Network configuration tools
3.1.7 Installation of Necessary Libraries for Compiling OK3572 Linux Source Code
forlinx@ubuntu:~$ sudo apt-get update //Update the apt-get download sources
forlinx@ubuntu:~$ sudo apt-get install openssh-server vim git fakeroot libsqlite3-dev //Install essential tool packages
forlinx@ubuntu:~$ sudo apt-get update && sudo apt-get install git ssh make gcc libssl-dev \
liblz4-tool expect expect-dev g++ patchelf chrpath gawk texinfo chrpath \
diffstat binfmt-support qemu-user-static live-build bison flex fakeroot \
cmake gcc-multilib g++-multilib unzip device-tree-compiler ncurses-dev \
libgucharmap-2-90-dev bzip2 expat gpgv2 cpp-aarch64-linux-gnu libgmp-dev \
libmpc-dev bc python-is-python3 python2 \
gettext scons curl
These libraries are required when setting up the 3572 Linux compilation environment and preparing to compile the Linux source code. If you’re not setting up the OK3572 Linux development environment, you can skip this step.
3.2 Installing the Cross-compilation Toolchain
Software Resources/3-Tools/aarch64-buildroot-linux-gnu_sdk-buildroot.tar.gz
Copy the above compressed file to the /home/forlinx/ directory in the development environment, and extract it there:
forlinx@ubuntu:~$ tar -zvxf aarch64-buildroot-linux-gnu_sdk-buildroot.tar.gz
Enter aarch64-buildroot-linux-gnu_sdk-buildroot and execute relocate-sdk.sh.
forlinx@ubuntu:~/aarch64-buildroot-linux-gnu_sdk-buildroot$ ./relocate-sdk.sh