[Buildroot] Q: Modifying package builds?

Ulf Samuelsson ulf.samuelsson at atmel.com
Wed Jun 11 05:37:08 UTC 2008

> **My primary question(s) for this group is**: How can I change the
> configuration of packages before they are built? 

The build of a package <package> is goverened by

Ensure that this file contains the target:

<package>-unpacked:    <package>-source

The target should be completed when the package has been decompressed
in "build_arm/<package>" and any patched present in 
"<buildroot>/packages/<package>/" has been applied.

Unpack and apply the existing patches with:

$ make <package>-unpacked
$ cd build_arm
$ mv <package> <package>-0rig
$ cd ..
$ make <package>-unpacked

Now you have both 
"build_arm/<package>" and "build_arm/<package>-0rig"

Make any modifications to "build_arm/<package>" and create a patch

$ cd build_arm
$ diff -urN <package>-0rig <package>    >    <package>-###.patch
$ mv <package>-###.patch ../packages/<package>

"###" should ensure that the new patch is applied after all existing patches.

This will handle one package at a time.

It might be a good idea to have a generic target which unpacks and patches
all packages but I am not aware that this exist and can't check right now.
Most of the packages support "make source", but very few support
"make unpacked".

Best Regards
Ulf Samuelsson 

More information about the buildroot mailing list