Skip to main content

SDK Buildroot Configuration

1. Introduction to Buildroot

Buildroot is a tool specifically designed for embedded systems, aimed at simplifying the process of building embedded Linux systems. By configuring Buildroot, you can customize the software packages and libraries included in your embedded system to meet specific requirements.
Luckfox Nova

  1. Open the Configuration Interface.Navigate to the root directory of the SDK to launch the Buildroot configuration interface. If the SDK has not been compiled before, please first select the appropriate branch based on the development board you are using.
    ./build.sh lunch
    ./build.sh buildroot-config
  2. Basic operations. / : Browse and select features
    / : Navigate between Select, Exit, etc.
    Enter: Enter submenu
    Y / Space: Select the feature; press twice to deselect
    N: Deselect the feature
    M: Select as a module
    Esc: Double press to return to the previous menu
    ?: View help information
    /: Search

2. Example: Adding a Library in Buildroot

The following example demonstrates how to add the bz2 library for Python in Buildroot:

  1. Open the configuration interface.Navigate to the SDK root directory and launch the Buildroot configuration interface.If the SDK has not been compiled before, first select the corresponding branch according to your development board.
  2. Press the / key, type BZIP2, and press Enter to start searching.
    Luckfox Nova
  3. If only one match is found, press 1 to jump directly to its configuration.If multiple results appear, select the desired component based on its path.
    Luckfox Nova
  4. Press Y or Space to enable bzip2, then select Save to save the configuration.
    Luckfox Nova
  5. The options that need to be added are as follows:
     BR2_PACKAGE_BZIP2=y
    BR2_PACKAGE_PYTHON3_BZIP2=y
  6. Compile the root filesystem:
    ./build.sh rootfs

3. Flashing a Single Partition

  1. Open RKDevTool (Rockchip Writing Tool) and first execute Clear Items.
    Luckfox
  2. Right-click on the blank area and select Load Config.
    Luckfox
  3. After selecting all files, double-click parameter.txt and click Open.The tool will automatically load the partition configuration.
    Luckfox
  4. Load MiniLoaderAll.bin and rootfs.img, and check the corresponding options.Finally, click Run to begin updating the firmware.
    Luckfox
  5. Log in to the development board to verify.
    Luckfox

4. FAQ

  1. The image was successfully compiled once, but adding the Python library afterward didn’t take effect. How can this be resolved?
    Answer: Buildroot caches source code and dependency checks (such as the presence of bzip2) after the first build. If a dependency is enabled later, Buildroot does not automatically recheck it. Deleting the build directory for that package forces reconfiguration and recompilation, allowing it to detect new dependencies and include them properly.
    rm -rf buildroot/output/rockchip_rk3506_luckfox/build/python3-*