From patchwork Thu Sep 18 19:39:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas De Schampheleire X-Patchwork-Id: 390952 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id E239014001A for ; Fri, 19 Sep 2014 05:42:34 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 2483F922AA; Thu, 18 Sep 2014 19:42:34 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7IgsPuU3tYY5; Thu, 18 Sep 2014 19:42:28 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 694F592245; Thu, 18 Sep 2014 19:41:54 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 325DF1C21AF for ; Thu, 18 Sep 2014 19:41:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 2F7BE95665 for ; Thu, 18 Sep 2014 19:41:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id c1GsBpA1255D for ; Thu, 18 Sep 2014 19:41:40 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by hemlock.osuosl.org (Postfix) with ESMTPS id 59DA394C49 for ; Thu, 18 Sep 2014 19:41:40 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id ge10so1852649lab.13 for ; Thu, 18 Sep 2014 12:41:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:content-transfer-encoding:subject :message-id:in-reply-to:references:user-agent:date:from:to; bh=Z909XD5KUOg91BqqJUYf1s/1biDBJwf9Xm1yLTE91lo=; b=DYxqFk9y0dERpgLC5cQnFH4kiGT/HK2MVrbDAopnR6QUzUehBodm4BEQVY1VhsUW/Y ZNJp1/aBrQA5IrqXVN2+WmGX47y6z0HfQATdpsRh4NJNJmx8pdENO12DbP8vLWGLgxDF TDBnXjLLzJtG9dIg1voSFd5IWwLb3G/5ITIkr8eAmqpHtzUkf/kh5wCZBZg5kDitjGs0 4LrCrYHSt/D/tgx/Zjpsd3Hu3FwGU1vRewKbquXkVTFEwdpUlngllVUaSxx2y2mjKkC0 dXU0NfJL8KyKR4Uu2luXYxUCUFUVZbuD8P4bFkJEgT0XIKaGjI+KoHauyQDRBHmlPBnB /79A== X-Received: by 10.152.43.18 with SMTP id s18mr1968675lal.68.1411069298560; Thu, 18 Sep 2014 12:41:38 -0700 (PDT) Received: from [127.0.0.1] (d54c62eeb.access.telenet.be. [84.198.46.235]) by mx.google.com with ESMTPSA id z6sm7162995laj.31.2014.09.18.12.41.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Sep 2014 12:41:37 -0700 (PDT) MIME-Version: 1.0 X-Mercurial-Node: 493dc449feeaa92bce5c971a3b73c0059ea01fe8 X-Mercurial-Series-Index: 10 X-Mercurial-Series-Total: 13 Message-Id: <493dc449feeaa92bce5c.1411069173@localhost> X-Mercurial-Series-Id: <2bb6dc67d3355451ba41.1411069164@localhost> In-Reply-To: References: User-Agent: Mercurial-patchbomb/3.1 Date: Thu, 18 Sep 2014 21:39:33 +0200 From: Thomas De Schampheleire To: buildroot@buildroot.org Subject: [Buildroot] [PATCH 10 of 13] manual/user guide/customization: add section on project-specific packages X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This patch adds a new section to chapter 'Project-specific customization' to describe how to add project-specific packages from a project-specific directory. The principle was already described in the presentation 'Using Buildroot for real projects' but was never documented in official Buildroot documentation. Signed-off-by: Thomas De Schampheleire --- docs/manual/customize-packages.txt | 71 ++++++++++++++++++++++++++++++ docs/manual/customize.txt | 2 + 2 files changed, 73 insertions(+), 0 deletions(-) diff --git a/docs/manual/customize-packages.txt b/docs/manual/customize-packages.txt new file mode 100644 --- /dev/null +++ b/docs/manual/customize-packages.txt @@ -0,0 +1,71 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +[[customize-packages]] +=== Adding project-specific packages + +In general, any new package should be added directly in the +package+ +directory and submitted to the Buildroot upstream project. How to add +packages to Buildroot in general is explained in full detail in +xref:adding-packages[] and will not be repeated here. However, your +project may need some proprietary packages that cannot be upstreamed. +This section will explain how you can keep such project-specific +packages in a project-specific directory. + +As shown in xref:customize-dir-structure[], the recommended location for +project-specific packages is +package//+. If you are using the ++BR2_EXTERNAL+ feature (see xref:outside-br-custom[]) the recommended +location is +$(BR2_EXTERNAL)/package/+. + +However, Buildroot will not be aware of the packages in this location, +unless we perform some additional steps. As explained in +xref:adding-packages[], a package in Buildroot basically consists of two +files: a +.mk+ file (describing how to build the package) and a ++Config.in+ file (describing the configuration options for this +package). + +Buildroot will automatically include the +.mk+ files in first-level +subdirectories of the +package+ directory (using the pattern ++package/\*/*.mk+). If we want Buildroot to include +.mk+ files from +deeper subdirectories (like +package//package1/+) then we +simply have to add a +.mk+ file in a first-level subdirectory that +includes these additional +.mk+ files. Therefore, create a file ++package//.mk+ with following contents (assuming you +have only one extra directory level below +package//+): + +----- +include $(sort $(wildcard package//*/*.mk)) +----- + +If you are using +BR2_EXTERNAL+, create a file ++$(BR2_EXTERNAL)/external.mk+ with following contents (again assuming only +one extra level): + +----- +include $(sort $(wildcard $(BR2_EXTERNAL)/package/*/*.mk)) +----- + +For the +Config.in+ files, create a file +package//Config.in+ +that includes the +Config.in+ files of all your packages. An exhaustive +list has to be provided since wildcards are not supported in the source command of kconfig. +For example: + +----- +source "package//package1/Config.in" +source "package//package2/Config.in" +----- + +Include this new file +package//Config.in+ from ++package/Config.in+, preferably in a company-specific menu to make +merges with future Buildroot versions easier. + +If you are using +BR2_EXTERNAL+, create a file ++$(BR2_EXTERNAL)/Config.in+ with similar contents: + +----- +source "$BR2_EXTERNAL/package/package1/Config.in" +source "$BR2_EXTERNAL/package/package2/Config.in" +----- + +You do not have to add an include for this +$(BR2_EXTERNAL)/Config.in+ +file as it is included automatically. diff --git a/docs/manual/customize.txt b/docs/manual/customize.txt --- a/docs/manual/customize.txt +++ b/docs/manual/customize.txt @@ -55,4 +55,6 @@ include::customize-patches.txt[] +include::customize-packages.txt[] + include::customize-store.txt[]