OK3506J-S/OK3506J-C_Linux6.1.99_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 enable you to quickly understand the compilation process of the products and familiarize yourself with the compilation methods of Forlinx products. The application program needs to be cross-compiled on the Linux operating system before it can run on the development board. According to the method in the compilation manual, you can compile your own software code through practical operation.
The manual will provide instructions for setting up the environment but there may be some unforeseen issues during the environment setup process. For beginners, it is recommended to use the pre-configured development environment provided by us. This will allow you to quickly get started and reduce development time.
Linux systems are typically installed in three ways: dual system on a real machine, single system on a real machine, and virtual machine. Different installation methods have their advantages and disadvantages. This manual only provides methods to build ubuntu in a virtual machine.
Hardware requirements: It is recommended to have at least 6GB of memory or more, so that you can allocate some memory to run the virtual machine (the virtual machine is recommended to have more than 2GB) and still do other operations on Windows, otherwise it will affect the performance of Windows.
The manual is mainly divided into four chapters:
Chapter 1. is mainly about the installation of VMware, and the version used is VMware Workstation 15 Pro15.1.0. You need to install VMware before using the ubuntu development environment;
Chapter 2. mainly introduces the method of loading the ubuntu development environment provided by Forlinx, and the development environment is 64-bit ubuntu22.04;
Chapter 3. mainly introduces the method of building a new ubuntu development environment; this section uses 64-bit Ubuntu 22.04 as an example to describe the creation of Ubuntu. Due to different computer configurations, there may be unexpected problems in the building process. It recommended that beginners directly use the environment we have built;
Chapter 4. mainly introduces the methods of compiling the source code related to the development board.
A description of some of the symbols and formats associated with this manual:
Format |
Meaning |
---|---|
Note |
Note or information that requires special attention, be sure to read carefully. |
📚 |
Relevant notes on the test chapters. |
️🛤️️ |
Indicates the related path. |
Blue font on gray background |
Refers to commands entered at the command line (Manual input required). |
Black font |
Serial port output message after entering a command |
Bold black |
Key information in the serial port output message |
// |
Interpretation of input instructions or output information |
Username@Hostname |
root@ok3506-buildroot: Development board serial port login account information; forlinx@ok3506-buildroot: Development board network login account information; forlinx@ubuntu: Development environment Ubuntu account information. You can determine the environment for function operation through this information. |
After packaging the file system, you can use the “ls” command to view the generated files.
forlinx@ubuntu:~/3506$ ls //List the files in this directory
OK3506_Linux_Source OK3506_Linux_Source.tar.bz2.00 OK3506_Linux_Source.tar.bz2.01
forlinx@ubuntu: the username is forlinx and the hostname is ubuntu, indicating that the operation is performed in the development environment ubuntu.
// :Explanation of operation commands is required, but command input is not needed.
ls: blue font on a gray background, indicating relevant commands that need to be entered manually.
OK3506_Linux_Source:The bottom black font represents the output information after entering the command, with the bold font indicating the key information, and the packed file system is here.
Revision History
Date |
Manual Version |
Revision History |
---|---|---|
26/02/2025 |
V1.0 |
OK3506 User’s Compilation Manual (Version 1.0); Note: This Compilation Manual is only applicable to the OK3506 development board. |
1. VMware Virtual Machine Software Installation
This chapter mainly introduces the installation of VMware virtual machines, using VMware Workstation 15 Pro v15.5.6 as an example to demonstrate the installation and configuration process of the operating system.
1.1 VMware Software Downloads and Purchase
Go to the VMware website https://www.vmware.com/cn.html to download Workstation Pro and get the product key. VMware is a paid software that requires purchasing, or you can choose to use a trial version.
After the download is complete, double-click the installation file to start the installation program.
1.2 VMware Software Installation
Double-click the startup program to enter the installation wizard.
Click on “Next”.
Check the terms in the license agreement that I accept, then click “Next”.
Modify the installation location to the partition where you want to install the software on your computer, then click ‘“Next”.
Check and click on “Next”.
Check the box to add a shortcut, then click “Next”.
Click “Installation”.
Wait for the installation to complete.
Click “Finish” to try it out. If users need to use it for a long time, they need to buy it from the official and fill in the license.
2. Loading the Existing Ubuntu Development Environment
Note:
It is recommended for beginners to directly use the pre-built virtual machine environment provided by Forlinx, which already includes installed cross-compiler and Qt environment. After understanding this chapter, you can directly jump to the compilation chapter for further study;
The development environment provided for general users is: forlinx (username), forlinx (password). The superuser is: root (username), root (password);
Please ask your sales representative for the download link.
There are two ways to use a virtual machine environment in VMware: One is to directly load an existing environment, and the other is to create a new environment. First talk about how to load an existing environment.
First, download the development environment provided by Forlinx. There is an MD5 verification file in the development environment data. After downloading the development environment data, first performs MD5 verification on the compressed package of the development environment (the tool for viewing the MD5 code on windows: 02-User Data \ Software Data \ 3-Tool \ md5sums-1.2.zip). Check whether the verification code is consistent with the verification code in the verification file. If they are consistent, the downloaded file is normal; otherwise, the file may be damaged and needs to be downloaded again.
Select all compressed files, right-click and extract to the current folder or your own directory:
After unzipping, you will get the folder “3568 Development Environment”.
Note: The Ubuntu 22.04 development environment is the same for 3506, 3562, and 3568.
The file 3568. vmx in the 3568 Development Environment folder is the file that the virtual machine needs to open.
Open the installed virtual machine.
Select the directory where the newly decompressed “3568. vmx” file is located, double-click to open the startup file.
Turn on this virtual machine after loading is complete to run it and enter the system’s interface.
The default login account for automatic login in the development environment is “forlinx”.
3. New Ubuntu Development Environment Setup
Note: Beginners are not recommended to set up a system on their own. It is recommended to use an existing virtual machine environment. If you do not need to set up the environment, you can skip this section.
This chapter mainly explains the process of setting up the Ubuntu system and installing Qt Creator. If the user is not using Qt, the installation of Qt Creator can be ignored.
3.1 Ubuntu System Setup
The version of Ubuntu we chose to install is 22.04, and the introduction and development in this maual are all carried out on Ubuntu22.04. Download “Ubuntu-22.04.6-desktop-amd64.iso” (you can download the version that you actually need; this is just an example with 22.04.6). Download address is: https://releases.ubuntu.com/22.04/.
3.1.1 Ubuntu Virtual Machine Setup
Step 1: Open the VMware software and click on “Create New Virtual Machine”; enter the following interface, check “Customize (Advanced)” and click “Next”:
Step 2: Select the compatibility of the corresponding VMware version. The version can be viewed in Help-> About VMware Workstation. Click “Next” after confirmation:
Select “Install program from disc image file”, then click “Next”;
Enter full name, user name and password and click “Next”:
Enter the virtual machine name and configuration installation location, and click “Next”:
Configure the number of cores, click “Next”:
Configure at least 8GB of memory, select “Next”:
Set the network type, use the default NAT form for networking, and click “Next”. Keep the default values for the remaining steps until you reach the step to specify the disk capacity.
Use the recommended I/O controller, click “Next”:
Use the recommended disk type, click “Next”:
Use the default options, create a new virtual disk and click “Next”:
Allocate a disk size of 200G and divide the virtual disk into multiple files, and click “Next”:
Click “Next” by default:
Click “Finish”:
The virtual machine creation is now complete. Then click “Open this virtual machine” to start installing the image and wait patiently. The ubuntu system installation is complete.
3.1.2 Ubuntu Basic Configuration
3.1.2.1 VMware Tools Installation
VMware Tools will be installed automatically after the virtual machine is created. If it is not successful, follow the steps below. If you do not install the tool, you cannot use copy-paste file drag and drop between the Windows host and the virtual machine. First click on “Virtual Machines” on the VMware navigation bar, then click “Install VMware Tools” in the drop-down box.
Once done, enter Ubuntu and the VMware Tools CD will appear on your desktop and click into it.
Enter and see a compressed file VMwareTools-10.3.10-12406962.tar.gz (it may be different for different VM versions); copy the file under the home directory (i.e. the directory with the home personal username).
Press [Ctrl+Alt+T] to bring up the Terminal Command Interface and enter the command:
After the extraction is complete, a file named “vmware-tools-distrib” will appear.
Go back to the terminal and type cd vmware-tools-distrib to enter the directory. Enter: sudo ./vmware-install.pl followed by pressing Enter. Then, enter your password and the installation process will begin. When prompted, you can input “yes” and press Enter to proceed. For any other inquiries, simply press Enter to go with the default installation settings.
Once the VMware tools is complete, we can implement file copy and paste between Windows and Ubuntu.
3.1.2.2 Virtual Machine Full Screen Display
If the virtual machine is not able to be displayed in full screen, you can resolve this issue by clicking on “View” and selecting “Autofit Guest.” This will adjust the display to fit the screen automatically, enabling you to have a full-screen experience in the virtual machine.
3.1.2.3 Virtual Machine Hibernation Settings
Also, the default hibernation is 5min, if you don’t want to set hibernation, just set it to Never by setting Power->Blank screen.
3.1.3 VM Swapfile Settings
The memory allocated when creating the virtual machine is 8GB. If the 8GB memory is not enough during compilation, the size of the swapfile needs to be modified.
3.1.4 Network Settings for Virtual Machines
3.1.4.1 NAT Connection Method
By default, after the virtual machine is installed, the network connection method is set to NAT, which shares the host machine’s IP address. This configuration does not need to be changed when performing tasks like installing dependencies or compiling code. When the VMware virtual NIC is set to NAT mode in a virtual machine, the network in the Ubuntu environment can be set to dynamic IP. In this mode the virtual NAT device and the host NIC are connected to communicate for Internet access. This is the most common way for VM to access the external network.
3.1.4.2 Connection for Bridges
When the VMware virtual NIC device is in bridge mode, the host NIC and the virtual machine NIC communicate through the virtual bridge, and the network IP and the host need to be set in the same network segment in the Ubuntu environment. If accessing an external network, you need to set the DNS to be consistent with the host NIC. If TFTP, SFTP and other servers are used, the network contact mode of the virtual machine needs to be set as the bridge mode.