02-Linux_SDK_Compilation
Obtaining the SDK Source Code
Network Disk Download Directory:
Copy the source code archive to the compilation host directory:
Notes:
Do not place the source code in a shared directory for compilation.
Do not use the ROOT account to log in to the compilation host.
Verify file integrity using MD5:
Extract the source code archive:
After extraction, only the
.git
folder will be visible in the source directory. Proceed to the next step to fully restore the source code.
Restore the source code using Git:
Compilation Commands
Ensure the compilation environment has internet access. Required tools will be automatically downloaded during compilation.
Basic compilation:
Compile firmware for creating a bootable SD card:
To disable the auto-burn service after booting from the SD card:
To enable the auto-burn service (enabled by default):
Interactive Build Interface
Run ./build.sh
in the aw-image-build
root directory to enter the interactive build interface:
Options:
Build all step: Full image build (automatically executes step1 to step4).
step1.Build Kernel: Compile the kernel separately.
step2.Build U-boot: Compile U-boot separately.
step3.Build base-rootfs and deb packages: Build the root filesystem and package custom deb files.
step4.Pack image: Package all components into a complete burnable image.
clean source/build/out files: Clean source code, build files, and output images.
For a standard bootable image, select Build all step and press Enter.
Select the target board (e.g., kickpi-k2b Allwinner H618):
Choose the root filesystem distribution and release (e.g., jammy Ubuntu):
Select the root filesystem type (e.g., desktop):
Choose the desktop environment (e.g., Xfce):
Select the desktop configuration profile (default: base configuration):
Select pre-installed software packages using the spacebar, then press Enter to start the build. The output image will be saved in out/images
.
Single-Step Build
For customization (e.g., modifying the kernel or root filesystem), use single-step builds. Run ./build.sh
to access the interactive interface.
step1.Build Kernel
Compile the kernel and generate a deb package.
Select step1.Build Kernel and choose the target board (e.g., kickpi-k2b Allwinner H618).
After compilation, transfer the generated
.deb
file to the board and install it:Reboot the board to apply the new kernel.
Modifying Kernel Configuration
Navigate to the kernel source directory (see Compiler kernel path from build logs):
Modify the configuration:
Save and update the board's kernel configuration:
step2.Build U-boot
Compile U-boot and package it into a deb file.
Select step2.Build U-boot and choose the target board.
Transfer the generated
.deb
to the board and install it:Update the bootloader:
Select 5 Install/Update the bootloader on SD/EMMC, confirm warnings, and reboot.
Compilation Toolchain
The compiled toolchain is located at:
Last updated