configbusyboxkconfig

Busybox: Patching after run defconfig


Since this reason: tc of busybox has bug, which has not yet been fixed.

I'd like to set

  # CONFIG_TC is not defined

but I don't want to go into menuconfig.

In other words, I want to add Patching command to my build script for build busybox, like here:

make defconfig
# Patching command here #
make

then # Patching command her # will replace CONFIG_TC=y with # CONFIG_TC is not defined in the .config file.

How do I implement # Patching command her #?


Solution

  • This is typically not done through a patch, but rather by specifying a custom busybox config file. As an example, let's assume you're using buildroot to make a rootfs for the LicheePi Zero board. Paths given below are specified relative to your buildroot directory, e.g. ~/buildroot-2024.05.1/.

    You would add the following to configs/sipeed_licheepi_zero_defconfig:

    BR2_PACKAGE_BUSYBOX_CONFIG="board/sipeed/licheepi_zero/my_busybox_config"
    

    Then, you'd copy your current busybox config file (output/build/busybox-x.y.z/.config) to board/sipeed/licheepi_zero/my_busybox_config. Edit the file to so that CONFIG_TC is disabled.

    Then, you can rebuild so the changes are incorporated. See 8.2. Understanding when a full rebuild is necessary of the manual to decide the best approach (either rebuilding just busybox or the entire image). If you're not entirely comfortable then I'd recommend a full rebuild. Per-package rebuilds are very easy to get wrong.

    Please also read Chapter 9. Project-specific customization of the manual.