Thursday, September 15, 2016

How to rebuild package in Buildrot

Hi Folks! Welcome to my Blog. 

Most of the developers have this question, "How to rebuild a given package without rebuilding everything from scratch" as it is time consuming.
 
Buildroot doesn’t keep track of which package installs what files in the output/staging and output/target directories. However, implementing clean package removal is on the TODO-list of Buildroot developers.

Here are the steps do the rebuild of a package.

let us change directory to buildroot source root directory

$cd buildroot

Here we take an example of modifying raw.c file available in the util-linux package, and compile the package alone to get our new changes into the binary raw.
 
Step1: Modify the Source

In the buildroot/output/build directory you find the source of the package util-linux-<version no> lets say util-linux-2.26.2 is the package we are interested to re-compile

$gedit ./output/build/util-linux-2.26.2/disk-utils/raw.c

Save and exit after the modifications
 
Step2: Build the package
 
make <package>-rebuild, followed by make or make <package>

$ make util-linux-rebuild
$ make

This completes the build if no compilation errors. The freshly built executable is 
 
Step3: Use the new binary
 
Binary compiled with the new changes is available at path buildroot/output/build/util-linux-2.26.2/raw which you can copy to sbin folder of your root file-system. 
 
For more details refer to Buildroot Documentation

please leave your comments, it will be encouraging :)

3 comments:

  1. This blog aware me about different programs which can become very useful for our friends and kids. Few websites provide combined courses and few of the are separately for single subject. Glad to get this information.
    ซักโซฟา

    ReplyDelete
  2. Packers and Movers Bangalore - Reliable and Verified Household Shifting Service Providers Give Reasonable ###Packers and Movers Charges. Cheap and Best Office Relocation Compare Quotation for Assurance for Local and Domestic House Shifting and Get estimates today to save upto 20%, ***Read Customer Reviews - @ https://packersmoversbangalore.in/

    ReplyDelete