In this article, we will guide you through the process of downloading and compiling the SP7350 code. The source code for SP7350 is automatically updated on both GitHub and Gitee every day, ensuring users have access to the latest developments.
It's recommended to have the latest version of Ubuntu installed on your computer. This choice is optimal for compatibility and ensures a seamless compilation process. Additionally, to enhance performance and reduce compilation time, your PC should be equipped with a minimum of 4 GB DRAM.
Contents
Table of Contents | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Install
...
Necessary Software Packages
Before downloading or compiling the SP7350 code, ensure the following software packages, libraries, and Python3 packages are installed:
Packages:
git
make
u-boot-tools
openssl
bison
flex
mtd-utils
python3-pip
pv
Libraries:
libssl-dev
libmpc-dev
libgmp-dev
Python3
...
Packages:
pycryptodomex
pyelftools
crypto
...
Code Block |
---|
sudo apt install git make u-boot-tools openssl bison flex mtd-utils python3-pip pv sudo apt install libssl-dev libmpc-dev libgmp-dev pip install pycryptodomex pyelftools crypto |
Download
...
Code from GitHub or Gitee.
Clone the repository from GitHub:
...
This structure confirms that you have successfully updated the Q654 codebase, and your development environment is now aligned with the latest changes.
Configure
...
Building Environment
Navigate to the top folder of your Q654 project. Run the following command to initiate the configuration menu.
...
Once you have completed the configuration selections in the menu, the system will start configuring the building environment. This process may take tens seconds or even a few minutes, depending on your computer's performance. Please wait patiently for the configuration process to conclude.
Please note that the system takes additional time to complete its initial run during the configuration process, as it requires the download of the toolchain.
Configure X-Boot
...
Features (optional)
If you want to activate additional features or deactivate specific ones within the X-Boot, run the following command to initiate the configuration menu of X-Boot.
...
Once you have made the necessary adjustments in the menu, please ensure to save the changes before exiting the menu.
Configure U-Boot
...
Features (optional)
To customize U-Boot settings, run the following command to initiate the configuration menu of U-Boot.
...
After making the necessary adjustments in the menu, please be sure to save the changes before exiting.
Configure Linux
...
Kernel Features (optional)
For those who want to configure specific features in the Linux kernel, run the following command to initiate the configuration menu of Linux kernel.
...
After making the necessary adjustments in the menu, please ensure to save the changes before exiting.
Build
...
Code
After completing all configurations, you are ready to initiate the code build. Execute the following command to commence the build process:
...
The screenshot provides details about two partitions created in the SD card image. The first partition spans from sector 2,048 to sector 526,335, with a size of 256 MB and a W95 FAT file system. The second partition extends from sector 526,336 to sector 1,627,959, with a size of 537.9 MB and a Linux (ext4) file system.
Resulting
...
Images for SD
...
Card
Upon completion of the build process, the resulting image files are stored in the out/boot2linux_SDcard/
directory. Refer to the list below:
...
ISPBOOOT.BIN: Binary file storing X-Boot, the first-stage boot-loader responsible for DDR SDRAM initialization and training, loading images of TF-A, OP-TEE, U-Boot, and initiating the execution of TF-A.
fip.img: Image file comprising images of Trusted Firmware-A (TF-A) and Open Portable Trusted Execution Environment (OP-TEE).
u-boot.img: Image file of the U-Boot boot-loader, the second-stage boot-loader responsible for loading and running the Linux kernel image.
uEnv.txt: Environment file for U-Boot. U-Boot imports environment variables from this file after initialization. If the uenvcmd command is defined in uEnv.txt, U-Boot executes the specified command after importing uEnv.txt.
uImage: Image file of the compressed Linux kernel with the U-Boot header.
ISP_SD_BOOOT.img: Image file for burning an SD card, containing all files in both partitions.
Create SD
...
Card
To create your SD card for booting SP7350 platforms, you can copy ISP_SD_BOOOT.img to SD card directly using the dd command. For instance:
...
Depend on system you are using, you may need to unmount the SD card:
umount /dev/sda
Booting
...
Your SP7350
...
Platform
After creating your SD card, insert it into the SD card socket on your SP7350 platform.
Set the boot-switch to "Boot from SD card".
Connect the cable of your UART console.
Power on your SP7350 platform.
The platform will initiate booting from the SD card.
Once booted, you can enter your commands in the console.
For boot-switch selection guidance, please consult:
For example, if you are using SP7350 Evaluation Board, please set boot-selection switch SW2 to all OFF (1111) and SW3 to OFF-OFF-ON-ON (1100) for booting from SD card.
...
In-system
...
Programming a
...
Flash Device and
...
Booting from
...
It.
If you intend to in-system program a flash device (e.g., eMMC) on the SP7350 platform and boot from it, please refer to:
A guide to in-system programming flash devices on the SP7350 platforms
Log of
...
Booting from SD
...
Card
Refer to the log generated during the system booting from the SD card. After the boot process is complete, the 'df -hT' command is issued to display disk space usage on your SP7350 platform.
...