Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to add a package to buildroot, but I'm not having much success. The package I'm trying to add is an autotools package called scew. I've followed the buildroot guidelines about adding packages, and although the package is listed when make menuconfig is run, when I run make the package is missing from the final rootfs.tar.

I've also copied over another simple .mk file that's used to install which, and changed the variable names and URL accordingly. Here is my copy of scew.mk:

SCEW_SITE = http://savannah.nongnu.org/download/scew/

$(eval $(autotools-package))

In the same directory I have Config.in, which looks like:

   bool "scew"
   google scew

I've also added the following lines to package/Config.in:

menu "My Packages"

 menu "Packages I Wrote"
 source "package/MyPackages/packagesIWrote/hello/Config.in"
 source "package/MyPackages/packagesIWrote/helloworld/Config.in"

 menu "External Packages"
 source "package/MyPackages/external-packages/scew/Config.in"


This part seems to work, as the packages are listed and can be selected. The hello and helloworld packages are copies from a guide to adding packages, taken from this website (written in french):Adding Hello Wolrd

The hello world packages also do not work. I'd be glad of any advice at all, as it seems I'm just going around in circles on this one, and I can't see what I'm doing wrong.

share|improve this question

The staging directory is useful for headers and mid step tools needed to build the final image but not needed in the rootfs, it is also used for built stripped libraries and executables.

The copy from staging to the target directory $(TARGET_DIRECTORY) is usually done within the target rootfs configuration you chosen (eg: cramfs, squashfs, etc.), but often the list of the files to be included in the rootfs is in your platform configuration target (eg: generic, platform-something) in a plain text file.

share|improve this answer

I am experiencing what seems to be the same issue: whereas other packages end up building an executable and then stripping it into the directory ./project_build_arm/my_device/root/usr/bin/ , the package I added gets built and then stripped into ./build_arm/staging_dir/usr/bin/ instead.

To work around this problem, currently all I do is copy the stripped binary from the wrong directory to the right one. It's not clever, it's not correct, but it does work (in a Band-Aid kind of way).

It seems as though whatever is going wrong is doing so in a fairly high-level way, so perhaps the above description will be enough for someone with better buildroot experience to diagnose the actual cause of the problem.

...or have you since solved it yourself?

share|improve this answer

take a look at this project there are a realy good examples.

Edit the buildroot-packages/package/Config.in to add your package

menu "buildroot-packages [external repo]"
    source package/hola/Config.in

Add in a folder your .in file buildroot-packages/package/hola/Config.in

    bool "hola"
        hola is an example of a program build with autotools for to be added
        to buildroot


comment "hola no needs any toolchain w/ dynamic library, threads"

add the .mk too buildroot-packages/package/hola/hola.mk

HOLA_SITE = https://bitbucket.org/simonppg/hola
HOLA_DEPENDENCIES = some_package

$(eval $(autotools-package))

and follow the instructions in the same project to install or uninstall the packages in to your buildroot directory.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.