-
Notifications
You must be signed in to change notification settings - Fork 3
Updating package recipes
A package recipe defines how packages are built. The general package build steps are:
- fetch
- patch
- configure
- make
- install
For autoconf-based packages that follow the "configure, make, make install" sequence, the recipe can be as simple as defining the URL of the source. It is common for a package recipe to include patches or extra configure options in order to workaround cross-compilation problems. A recipe may also divide an installation into multiple packages so that documentation can be separated from the essential binaries and libraries.
Note: this example refers to 4.x-stable branch. The openssl bitbake recipe is located in ltp5903-packages/recipes/openssl/openssl_1.0.0d.bb
There are several patches to this version of openssl in the openssl-1.0.0d/ directory.
-
If you haven't done this already since logging-in, setup the build environment.
cd ltp5903-packages . oe-setup.sh
-
Clean out the old version. This cleans up packages and build directories used to create the old version.
bitbake -c clean openssl
-
Copy the existing openssl files as a template for starting the new version
cp recipes/openssl/openssl_1.0.0d.bb recipes/openssl/openssl_1.0.0r.bb cp -r recipes/openssl/openssl-1.0.0d recipes/openssl/openssl_1.0.0r
-
Update any version-specific references in .bb file. In this openssl recipe, there aren't any. Lucky you!
-
Try building the package. Often when there are only minor changes in the original source, the same patch files will work. Other times, you'll have to find and solve conflicts in the patches.
bitbake openssl
-
If the package builds successfully, the resulting .ipk file(s) will be the deploy directory. You may need one or more of these, depending on what you wish to upgrade.
ls tmp/deploy/glibc/ipk/armv5te/openssl*.ipk
bash 3.2 is installed on the LTP5903. The bash updates are distributed as patches to be applied to the bash 3.2 source.
The bash recipe is located in ltp5903-packages/recipes/bash/bash_3.2.bb
-
If you haven't done this already since logging-in, setup the build environment.
cd ltp5903-packages . oe-setup.sh
-
Clean out the old version.
bitbake -c clean bash
-
Update the bash recipe, edit bash_3.2.bb
- Update the PR variable to bump the package revision, eg from r9 to r10
- Notice in the bash recipe that updates are distributed as patch files that are applied to the previous (patched) source
- Add new line(s) to the list of patches with the subsequent patch numbers. Leave
patch=x
andpnum=x
unchanged from previous lines. You can find the available patch files for bash 3.2 on http://ftp.gnu.org/gnu/bash/bash-3.2-patches/.
-
Build the new bash package. You should see bitbake download and apply the newly listed patch file(s).
bitbake bash
-
If the package builds successfully, the resulting .ipk file(s) will be in the deploy directory. You may need one or more of these, depending on what you wish to upgrade. In the case of bash, only the primary
bash_3.2-r9.1_armv5te.ipk
file is necessary.ls tmp/deploy/glibc/ipk/armv5te/bash*.ipk