Skip to content

ARMBIAN_SDK COMPILATION

SDK Introduction

SDK (Software Development Kit) is a collection of development tools provided for a specific software framework, hardware platform, or operating system, designed to help developers create applications more efficiently.

Compilation Host Configuration

Install Ubuntu on a PC to perform SDK compilation.

  • Hardware: PC must meet RAM ≥ 32 GB, CPU cores ≥ 4, Hard Drive ≥ 500GB
  • Software: Ubuntu 22.04 64-bit, x86 architecture, allocate ≥ 200GB disk space for virtual machines.

Obtaining SDK Source Code

Note

1. The SDK cannot be compiled in a shared directory.
2. The compilation host cannot log in using the ROOT account.

1. Download the Armbian SDK and the release_sdk.sh script. Typically, download the file with the latest date suffix.

2. Place the tar.gz package, md5sum file, and release_sdk.sh file in the same directory on the compilation host.

kickpi-armbian-*.tar.gz
kickpi-armbian-*.md5sum
release_sdk.sh

3. Run the script to restore the SDK source code.

chmod +x ./release_sdk.sh
./release_sdk.sh

Schematic diagram:

K7_RESET_SDK

Graphical Interface Compilation

Note

Graphical Interface Instructions:
1. Use the arrow keys to navigate options, the spacebar to select/deselect, and the Enter key to confirm.
2. Supports quick search by initial letter; pressing the first letter of an option will jump to it.

1. Run the following command to enter the graphical compilation selection interface.

./compile.sh

Schematic diagram:

K7_ARMBIAN_BUILD

Individual Compilation

Compile Kernel Individually

./compile.sh kernel

Compile DTS Individually

./compile.sh kernel-dtb

Configure Kernel config

./compile.sh kernel-config

Official Armbian Compilation Guide

Q&A

  • Slow compilation speed for Armbian source code?

The default compilation thread count for kickpi-armbian source code is currently set to 16. Modify the compilation thread count in the source code as shown below.

--- a/lib/functions/compilation/distcc.sh
+++ b/lib/functions/compilation/distcc.sh
@@ -49,7 +49,7 @@ function prepare_distcc_compilation_config() {

                DISTCC_CROSS_COMPILE_PREFIX=("distcc")

-        DISTCC_MAKE_J_PARALLEL=("-j16")
+        DISTCC_MAKE_J_PARALLEL=("-j64")
                #DISTCC_MAKE_J_PARALLEL=("-j$((total_distcc_cores * 2))") # Use double the total distcc cores

                display_alert "DISTCC_TARGETS_SEGMENTS" "${DISTCC_TARGETS_SEGMENTS[*]}" "warn"
@@ -58,7 +58,7 @@ function prepare_distcc_compilation_config() {
                [[ -z "${CTHREADS}" ]] && exit_with_error "CTHREADS is not set in prepare_distcc_compilation_config"
                DISTCC_MAKE_J_PARALLEL=("${CTHREADS}")

-        DISTCC_MAKE_J_PARALLEL=("-j16")
+        DISTCC_MAKE_J_PARALLEL=("-j64")
        fi

        return 0