From patchwork Mon Jul 29 20:19:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 1138642 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="pD1G83l5"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45y9zN5Xvmz9sBt for ; Tue, 30 Jul 2019 06:20:16 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 0D39020491; Mon, 29 Jul 2019 20:20:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id l58hB3S0O2Av; Mon, 29 Jul 2019 20:20:09 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id E7B0D2046A; Mon, 29 Jul 2019 20:20:08 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id EBFD41BF2BD for ; Mon, 29 Jul 2019 20:20:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id E8C54877D1 for ; Mon, 29 Jul 2019 20:20:07 +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 IQN+2vz-5rfo for ; Mon, 29 Jul 2019 20:20:07 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by hemlock.osuosl.org (Postfix) with ESMTPS id 0CB418778F for ; Mon, 29 Jul 2019 20:20:07 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id n4so63317806wrs.3 for ; Mon, 29 Jul 2019 13:20:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=O17s4aL9l9DPn9HJ8WyUkO/1glUG9Vza9RiHBSzr9oE=; b=pD1G83l5jlgHCDaf//sSv1oOoD19EgLKbKsQVcyBKRRVkZWZz+RWtL0SAEtglJvwaL lLcQM3pc5fygLM6l3SavW1K4TRo5vN43Htgnvl6RvkE0pNS1HP0SA3Db19fgaE8QgYK6 vZlkjk5qTeGO7c3E3wFTeampngAyrij6kBnWR2fDCc6peSXaKQNCAkG3yrNFLVfZGEkk Y7d7al1IwMIZt8b87Adl2yPzyDEzoViPE/N8rUcqWU8KjwaM/XMx5SpwJ7KBIunK+58/ 0jxUJpGQ3xyJSnCiZa0BiOuW2JXSlIqhllJ/ZfUZRbljnrFMvKlbLEdAkVEBsiKHw6VF Ccdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=O17s4aL9l9DPn9HJ8WyUkO/1glUG9Vza9RiHBSzr9oE=; b=MlCrx2RPNVvRRYoTIQSYNyoU7Lyx36iDCsWGu3v+01EgfCeYLAxeEgrnKd9XQ06FnD T2uDphr2kVGMnkmj7bxyCN/jf2jx5zrmB1tOtDQCtJWofC40xoPT8bmyzmjFvJwad5bu TtFu5PkBfUg2bMrlJDxm+2w5UHdQiEUtfPphWtgUJESSD7ifiX1uzPh0wyRVUHadSi21 oEiiKAaBhwzkBhcAQsLVOF/MZKMOM7t9HnW0Sh8P56NAn08gPIPUEY+MNFvbMuX2U0m0 Ge0cmxgEr98OtzjesqNs1YJYr9dFVQLHfQz0gXpa7aEzLXF2WFC7aIz1QOsDyeMJXMgN fsXA== X-Gm-Message-State: APjAAAWFfP2yDsouzzhIIonVyyfPA8P2f5bkeeK+/ImakUsuk3Kz1b88 lhdOd1Le7igu0uXAh3Ng20JGxBCv X-Google-Smtp-Source: APXvYqyvJJCYGwodZnlYmkNCYXr6mo0bxZqMcDwiItsB5P0LH8PCa/TIY7K6e2jug54zuWFrulYc0Q== X-Received: by 2002:a05:6000:9:: with SMTP id h9mr31703904wrx.271.1564431605381; Mon, 29 Jul 2019 13:20:05 -0700 (PDT) Received: from scaer.home ([2a01:cb19:829a:2800:9142:e193:e0af:96f]) by smtp.gmail.com with ESMTPSA id z1sm63562317wrp.51.2019.07.29.13.20.04 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 29 Jul 2019 13:20:04 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Mon, 29 Jul 2019 22:19:51 +0200 Message-Id: <13072f388441fc50176afb83d877b33fe5cad833.1564431589.git.yann.morin.1998@free.fr> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [Buildroot] [PATCH 01/13 v2] supports/scripts: declare missing local variables X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vadim Kochan , "Yann E. MORIN" , Ricardo Martincoski Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Commit b14b02698 (core/br2-external: restore compatibility with old distros) switched to using 'eval' to emulate assocviative arrays, for those distros too old to have bash-4+. In so doing, it forgot to declare the new local variables in the respective helper functions. Signed-off-by: "Yann E. MORIN" Cc: Vadim Kochan Cc: Arnout Vandecappelle Cc: Ricardo Martincoski --- Changes v1 -> v2; - add another missing variable --- support/scripts/br2-external | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/support/scripts/br2-external b/support/scripts/br2-external index 00cb57d1ed..5097d617f3 100755 --- a/support/scripts/br2-external +++ b/support/scripts/br2-external @@ -119,7 +119,7 @@ do_validate_one() { # Generate the .mk snippet that defines makefile variables # for the br2-external tree do_mk() { - local br2_name br2_ext + local br2_name br2_desc br2_ext printf '#\n# Automatically generated file; DO NOT EDIT.\n#\n' printf '\n' @@ -155,7 +155,7 @@ do_mk() { # Generate the kconfig snippet for the br2-external tree. do_kconfig() { - local br2_name br2_ext + local br2_name br2_desc br2_ext printf '#\n# Automatically generated file; DO NOT EDIT.\n#\n' printf '\n' From patchwork Mon Jul 29 20:19:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 1138641 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="g6i+DKOA"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45y9zN1j00z9s8m for ; Tue, 30 Jul 2019 06:20:13 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 5A11C8578B; Mon, 29 Jul 2019 20:20:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HQnBT-ZSpZiS; Mon, 29 Jul 2019 20:20:10 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id C43A785751; Mon, 29 Jul 2019 20:20:10 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id F2F051BF2BD for ; Mon, 29 Jul 2019 20:20:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id EB6B920491 for ; Mon, 29 Jul 2019 20:20:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id x8xSXMdXz+1g for ; Mon, 29 Jul 2019 20:20:08 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by silver.osuosl.org (Postfix) with ESMTPS id 2F6D6203FC for ; Mon, 29 Jul 2019 20:20:08 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id p17so63217739wrf.11 for ; Mon, 29 Jul 2019 13:20:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Z+ezsDUW4bWBimhtz9CtugIOW5O9VOAd8mb9etNY5yY=; b=g6i+DKOAPPFnUBQPC40x7I3FOhEBp7I+JSD6qqFq1JzOjRy4f1euxKJ9AG4JJYvKSi wWAe4478ZMS9mfnPdd5WDcsa+fV+IIfxtMZuVL7koQ3mLNpYpM+oKny5O2hpXBGMXJch dkTaMVLP7J95aycoN8JZzncO89wqr1+hfIvWJaTthPMhBxWihmGS4c4S9XPmDpV2hKij ltVX88Z/2d2CD2/UfKW2QZDGIR3eUHJ2QgM1H4H8GEMPKev1du/QTG8sHU+O1hlLWXox MshCoE5r+cSPw+WeqQqvQh/5wATwqIzRep90EBFE2F4QtJbZePJKxAdKX/SivgvL3Jng AHPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Z+ezsDUW4bWBimhtz9CtugIOW5O9VOAd8mb9etNY5yY=; b=BgCx0u1irZ4pJONONqmrxrvMSkGbOhY9C7tnT5KsjqS+qnUogSSOGHSnyRrmph0Ix4 q9mZIdZDu+V+LqmQU4Yf9EnO4F9/P/wm0jh6D08x7trkhJR1vDQ30sOSermXEpL9Xq7e MHBJa0eNCxepdrubUsxU5fT6FYhjNS0GIyTSJaGTRmtmL9NR1Kdzk7dqd4kXxeXn1/iY 7EoYUVIJ7agAlHpb5p6Fyw9jUB8Q09haEIIgOq/X74SZpETziIHxn5k97MG7jdM1JzQI 7LDiv+ssd9jbxi8hIHkhTbC+/ccMApYm+ItDHiiiLz8O4K6al3NMrY8miPK0fzPSQTm/ 9SHw== X-Gm-Message-State: APjAAAUMkYT5IVX3j2qUH28Z95g1fxCix5yi1vqM0FgCJUtR5zjvmgYK fi+UEId2V7SqMYp5iFYaF0aPP/4/ X-Google-Smtp-Source: APXvYqzQ6Y4TU7JjiPlMM6tD/aSz20GFay+QuGqGDRnZ4AjfuANy8lFEuHCRerqqygibW+Pned4rVg== X-Received: by 2002:adf:fe09:: with SMTP id n9mr128052863wrr.41.1564431606246; Mon, 29 Jul 2019 13:20:06 -0700 (PDT) Received: from scaer.home ([2a01:cb19:829a:2800:9142:e193:e0af:96f]) by smtp.gmail.com with ESMTPSA id z1sm63562317wrp.51.2019.07.29.13.20.05 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 29 Jul 2019 13:20:05 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Mon, 29 Jul 2019 22:19:52 +0200 Message-Id: <9ea503f0c9ac25fb22bf3406b2679965d236804b.1564431589.git.yann.morin.1998@free.fr> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [Buildroot] [PATCH 02/13 v2] support/scripts: drop help for internal helper script X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vadim Kochan , "Yann E. MORIN" Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" We do not usually provide help for our internal scripts. Besides, such help has a tendency to bitrot pretty quickly anyway. Signed-off-by: "Yann E. MORIN" Cc: Vadim Kochan --- support/scripts/br2-external | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/support/scripts/br2-external b/support/scripts/br2-external index 5097d617f3..26a5d230ab 100755 --- a/support/scripts/br2-external +++ b/support/scripts/br2-external @@ -16,9 +16,8 @@ main() { local OPT OPTARG local br2_ext ofile ofmt - while getopts :hkmo: OPT; do + while getopts :kmo: OPT; do case "${OPT}" in - h) help; exit 0;; o) ofile="${OPTARG}";; k) ofmt="kconfig";; m) ofmt="mk";; @@ -188,36 +187,6 @@ do_kconfig() { printf "endmenu # User-provided options\n" } -help() { - cat <<-_EOF_ - Usage: - ${my_name} <-m|-k> -o FILE PATH - - With -m, ${my_name} generates the makefile fragment that defines - variables related to the br2-external trees passed as positional - arguments. - - With -k, ${my_name} generates the kconfig snippet to include the - configuration options specified in the br2-external trees passed - as positional arguments. - - Using -k and -m together is not possible. The last one wins. - - Options: - -m Generate the makefile fragment. - - -k Generate the kconfig snippet. - - -o FILE - FILE in which to generate the kconfig snippet or makefile - fragment. - - Returns: - 0 If no error - !0 If any error - _EOF_ -} - error() { local fmt="${1}"; shift; printf "BR2_EXTERNAL_ERROR = ${fmt}" "${@}"; exit 1; } my_name="${0##*/}" From patchwork Mon Jul 29 20:19:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 1138643 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="i6ciPlu0"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45y9zT0vnzz9sNy for ; Tue, 30 Jul 2019 06:20:20 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 1BE912052A; Mon, 29 Jul 2019 20:20:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5h1xq8SVuBBF; Mon, 29 Jul 2019 20:20:17 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 470C32046C; Mon, 29 Jul 2019 20:20:17 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 389971BF2BD for ; Mon, 29 Jul 2019 20:20:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 221F720494 for ; Mon, 29 Jul 2019 20:20:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ys97NxIV1Ffo for ; Mon, 29 Jul 2019 20:20:09 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by silver.osuosl.org (Postfix) with ESMTPS id C4492203AC for ; Mon, 29 Jul 2019 20:20:08 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id p17so63217783wrf.11 for ; Mon, 29 Jul 2019 13:20:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WXoRsgg87B4M9toH5NN3VkBM4z+RzPyCLrEdlB063L0=; b=i6ciPlu0cbsX6zR5vi9krtD3pqCNObSdAT0NDf1fxWqHD4hLT8JFCGvvobB86ew4JE UIwbK75rgkWgaAbeAYrg8XT6eHFl4xiBKIfWtpfRbLr/2h48TyB+wOsy1/mleW/etYMf oqZJvo6jOMUzgFbYp5xcWaE5w0MOikypXXuwSUWWO6OEWB7/meszzzSrGD8S2DO9eHvJ jQL8JjfCf6aNFj6Lk91hluLbVZ7fNXZZfdIC12Acr7y2fDoTM5l5LvG+RkS9NZtSIS5f PMslN0P5MtA1oFE8oZrPe34CfPiepJuU13V3zO2XnbJqLSPgWzqt128t5aY6hnoRyEnD jlaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=WXoRsgg87B4M9toH5NN3VkBM4z+RzPyCLrEdlB063L0=; b=m8VDYMFEMNVkxQ3FYkQNPNlnxw5VydQnEvX6EnzhPiGel/zdXGE4VhV7vJMy9aqmYs U5GM92u+u2yywMpRG2dNOEYmB4nuhO6F5nKRLkUBelK2J6GQom08fNcJfnNuRRH3upYS F5VLfNr2ENnjGWW64krrsTwukZnJaSUSJ0GFnCWZW6s9IUjeuOJUBPoI76c99+UWn4LO iXqaybqqoNdqis+ESqPg2/5q7wfpzgpJR5Op9/opETXipgW4iBYOptRunMVGl1mFNOZh acg5+mcEkr+d7I/pFtRucWKEbcDSpJAOHEXc//psCWSrOZKvCNbe8jo96mi3/7CECV0W bfng== X-Gm-Message-State: APjAAAUrfuBW3LDO5lhjrxLlqDcoTfv5xdAvE0q+eE2nlS0CL2kU+JcU rm035N1Nkxl3CMAfHbvPZzHnHsw+ X-Google-Smtp-Source: APXvYqzJGZz596miKM9BZNfhv0NNGjsJtFRxlee12QsK9gbFbDnoeQpVtHeQcGgUeQnBT5KEqkYKVA== X-Received: by 2002:adf:f591:: with SMTP id f17mr109241088wro.119.1564431607096; Mon, 29 Jul 2019 13:20:07 -0700 (PDT) Received: from scaer.home ([2a01:cb19:829a:2800:9142:e193:e0af:96f]) by smtp.gmail.com with ESMTPSA id z1sm63562317wrp.51.2019.07.29.13.20.06 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 29 Jul 2019 13:20:06 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Mon, 29 Jul 2019 22:19:53 +0200 Message-Id: X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [Buildroot] [PATCH 03/13 v2] core: move generated .br2-external kconfig file to $(BASE_DIR) X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vadim Kochan , "Yann E. MORIN" Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Currently, that file is generated rather late in the configuration process, so BUILD_DIR is known (and exists) by then. We're soon to generate that file much earlier, at a point where BUILD_DIR is not yet known, so we have two options: 1- declare BUILD_DIR earlier; 2- generate the file in an already-known location. We go with the second solution, as we're already generating a br2-external related file in BASE_DIR, so we can as well generate all br2-external files in the same place. Signed-off-by: "Yann E. MORIN" Cc: Vadim Kochan --- Config.in | 6 +++--- Makefile | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Config.in b/Config.in index 757ad1ca40..c611bb7dec 100644 --- a/Config.in +++ b/Config.in @@ -14,9 +14,9 @@ config BR2_HOSTARCH string option env="HOSTARCH" -config BR2_BUILD_DIR +config BR2_BASE_DIR string - option env="BUILD_DIR" + option env="BASE_DIR" # Hidden config symbols for packages to check system gcc version config BR2_HOST_GCC_VERSION @@ -865,4 +865,4 @@ source "package/Config.in.host" source "Config.in.legacy" -source "$BR2_BUILD_DIR/.br2-external.in" +source "$BR2_BASE_DIR/.br2-external.in" diff --git a/Makefile b/Makefile index 9cce934990..a7af04fb4b 100644 --- a/Makefile +++ b/Makefile @@ -934,7 +934,7 @@ HOSTCFLAGS = $(CFLAGS_FOR_BUILD) export HOSTCFLAGS .PHONY: prepare-kconfig -prepare-kconfig: outputmakefile $(BUILD_DIR)/.br2-external.in +prepare-kconfig: outputmakefile $(BASE_DIR)/.br2-external.in $(BUILD_DIR)/buildroot-config/%onf: mkdir -p $(@D)/lxdialog @@ -952,7 +952,7 @@ COMMON_CONFIG_ENV = \ KCONFIG_TRISTATE=$(BUILD_DIR)/buildroot-config/tristate.config \ BR2_CONFIG=$(BR2_CONFIG) \ HOST_GCC_VERSION="$(HOSTCC_VERSION)" \ - BUILD_DIR=$(BUILD_DIR) \ + BASE_DIR=$(BASE_DIR) \ SKIP_LEGACY= xconfig: $(BUILD_DIR)/buildroot-config/qconf prepare-kconfig @@ -1034,8 +1034,8 @@ endif # Even though the target is a real file, we mark it as PHONY as we # want it to be re-generated each time make is invoked, in case the # value of BR2_EXTERNAL is changed. -.PHONY: $(BUILD_DIR)/.br2-external.in -$(BUILD_DIR)/.br2-external.in: $(BUILD_DIR) +.PHONY: $(BASE_DIR)/.br2-external.in +$(BASE_DIR)/.br2-external.in: $(BUILD_DIR) $(Q)support/scripts/br2-external -k -o "$(@)" $(BR2_EXTERNAL) # printvars prints all the variables currently defined in our @@ -1066,7 +1066,7 @@ ifeq ($(O),$(CURDIR)/output) rm -rf $(O) endif rm -rf $(TOPDIR)/dl $(BR2_CONFIG) $(CONFIG_DIR)/.config.old $(CONFIG_DIR)/..config.tmp \ - $(CONFIG_DIR)/.auto.deps $(BR2_EXTERNAL_FILE) + $(CONFIG_DIR)/.auto.deps $(BR2_EXTERNAL_FILE) $(BASE_DIR)/.br2-external.in .PHONY: help help: From patchwork Mon Jul 29 20:19:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 1138644 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="jAlj+I6w"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45y9zS6dM5z9sLt for ; Tue, 30 Jul 2019 06:20:20 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id A95DB86186; Mon, 29 Jul 2019 20:20:16 +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 rgVh31W475Qf; Mon, 29 Jul 2019 20:20:13 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id C75C58614D; Mon, 29 Jul 2019 20:20:13 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 720CB1BF2BD for ; Mon, 29 Jul 2019 20:20:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 6E20B85701 for ; Mon, 29 Jul 2019 20:20:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jGEhOeWy7VXh for ; Mon, 29 Jul 2019 20:20:09 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by fraxinus.osuosl.org (Postfix) with ESMTPS id A54918578B for ; Mon, 29 Jul 2019 20:20:09 +0000 (UTC) Received: by mail-wr1-f65.google.com with SMTP id n4so63317929wrs.3 for ; Mon, 29 Jul 2019 13:20:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OZFTTeOuXUY7lAMeP48J0GxkuAHsY5b30hdmvXx2Zig=; b=jAlj+I6wJ2MZCYx1EOTp6OeZ5j0zFXyzYJXDfRjta15QgtlJA+DOQdKu48sE+YhQ/I G8XyURHYoyBhaw7VJSGVHICGWv/8dd3afPJd/fDx5ziWZtKjiTXhOdd7xbeh//HoiLM7 0E7zdFuTIzlNXGC0q/vwKxiBcuipGYwogzGwUD8mnK2lmDp/D5rYLKRN3JcXjcQjPZZ6 feNwF/rA+qinDq4mVDxW8K8hKTNemnG7ufJONo3UU6Kf/8q3hHbCKiX56Xa47aFPgi31 dP/9mVrqGNHDgkOVC0yFBSnzE606UVuZgGvcNGfBKVoDeEVVrt+CxGM7rn4/dyENWJrO LPrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=OZFTTeOuXUY7lAMeP48J0GxkuAHsY5b30hdmvXx2Zig=; b=FSnNj/7iadQBOiZi5EovtgwWMupkCeg6ZVBq7ghvlgWn5l+HnY4rBxqNoSkF90n+2N BFc3MKXpuO3nTEhQVDIvLTZduDrEmiSRhQ59hruNX66fI1/AFQysVrrUIFOtnkNvzFAM JDGY2pYTYDqEDXz71DDbCw4gJDRcxta4oy2MI3i2XLJ5MGhXTTw6kMpdDTz3Q8id3ej8 ugYkl4hsDy4S0FPyjSTeSRt+nD1qDkiuxPR+oivACeq1jOmBmCdZaqalOXn6N5mwNUvm Mx7Rhk/A7fWAT6g15CzraRrojxmExA0lz48MYx5+jVXe/q/spOa6df5qvYvvnpNS5gP7 8K/w== X-Gm-Message-State: APjAAAWOR69gqRU83YBx+vMsE2ltrAmSPKRgZ8euf6lC9e3T2jjz7bqI B3gfGlxecbyDy30XxbIStzUaQNUj X-Google-Smtp-Source: APXvYqzVORAEDCtWnfZyvQ8LCZ7lI2ijQQfSkUEPYmJOXY8yL/F0AtbvpN1Ams63e+TExeXcaYnwJA== X-Received: by 2002:a5d:6408:: with SMTP id z8mr105702602wru.246.1564431607926; Mon, 29 Jul 2019 13:20:07 -0700 (PDT) Received: from scaer.home ([2a01:cb19:829a:2800:9142:e193:e0af:96f]) by smtp.gmail.com with ESMTPSA id z1sm63562317wrp.51.2019.07.29.13.20.07 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 29 Jul 2019 13:20:07 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Mon, 29 Jul 2019 22:19:54 +0200 Message-Id: X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [Buildroot] [PATCH 04/13 v2] core: rename generated .br-external.mk file X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vadim Kochan , "Yann E. MORIN" Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Now that the two (all of them!) br2-external related files are generated in the same location, it makes sense they are named after the same pattern. When initial support for (then single) br2-external trees was added back in a4239f7fd1 (core: introduce the BR2_EXTERNAL variable), it was not clear-cut why that file was not named with a br2 prefix. So rename it now. Signed-off-by: "Yann E. MORIN" Cc: Vadim Kochan --- Changes v1 -> v2: - update manual accordingly --- The reason for the original naming is probably because of the long undocumented (except buried in an old dev-days report) and mostly never-obeyed rule that internal variables should be prefixed with BR_ not BR2_, the latter being reserved for user-facing variables, and thus the same was thought for the generated file. Or maybe not... --- Makefile | 2 +- docs/manual/customize-outside-br.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index a7af04fb4b..8bca4bafd0 100644 --- a/Makefile +++ b/Makefile @@ -179,7 +179,7 @@ $(if $(BASE_DIR),, $(error output directory "$(O)" does not exist)) # still be overridden on the command line, therefore the file is re-created # every time make is run. -BR2_EXTERNAL_FILE = $(BASE_DIR)/.br-external.mk +BR2_EXTERNAL_FILE = $(BASE_DIR)/.br2-external.mk -include $(BR2_EXTERNAL_FILE) $(shell support/scripts/br2-external \ -m -o '$(BR2_EXTERNAL_FILE)' $(BR2_EXTERNAL)) diff --git a/docs/manual/customize-outside-br.txt b/docs/manual/customize-outside-br.txt index b1eed326aa..353b2ed75f 100644 --- a/docs/manual/customize-outside-br.txt +++ b/docs/manual/customize-outside-br.txt @@ -22,7 +22,7 @@ place project-specific customizations in two locations: One can tell Buildroot to use one or more br2-external trees by setting the +BR2_EXTERNAL+ make variable set to the path(s) of the br2-external tree(s) to use. It can be passed to any Buildroot +make+ invocation. It -is automatically saved in the hidden +.br-external.mk+ file in the output +is automatically saved in the hidden +.br2-external.mk+ file in the output directory. Thanks to this, there is no need to pass +BR2_EXTERNAL+ at every +make+ invocation. It can however be changed at any time by passing a new value, and can be removed by passing an empty value. From patchwork Mon Jul 29 20:19:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 1138645 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="brVfku4o"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45y9zS1fYwz9sNm for ; Tue, 30 Jul 2019 06:20:19 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 63FF98778F; Mon, 29 Jul 2019 20:20:16 +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 Cw19lvVXnQ8T; Mon, 29 Jul 2019 20:20:16 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id DB659877D1; Mon, 29 Jul 2019 20:20:15 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 00C5A1BF2BD for ; Mon, 29 Jul 2019 20:20:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id EC4C48589A for ; Mon, 29 Jul 2019 20:20:11 +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 mrW1jmAo9L72 for ; Mon, 29 Jul 2019 20:20:10 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by whitealder.osuosl.org (Postfix) with ESMTPS id 588BE85693 for ; Mon, 29 Jul 2019 20:20:10 +0000 (UTC) Received: by mail-wm1-f66.google.com with SMTP id x15so55017468wmj.3 for ; Mon, 29 Jul 2019 13:20:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DTMw1QMGg1MTdPG5/1cASwCGuK4LcS7DeJL1CsbNuAs=; b=brVfku4o0BewqogDpTzBa9u5li9K2NB2mliPYNeFm2hlWNnjBG7HnjlQyBcBGavlLb 9A6Pl9JdlomZW2Ppe/1Ni0mQ0j+mcmeWVSYbO3Rpfi9OTeTuT95pauZPACGJYoMpj8hd jUSaVkA88OpMn3EXeXmJPmeL1tiBr6Dq4RwHYAdh6k4iTBa7E9zxDCNz3+wBnEhFyb9k tWFwZVwsExZ9U3268Fd5l6obUfk7Ix6aozg65qEnwJ4hgfx6DexfpgSHaAxuZZJemqqe UaUImNjQ0ErGVAVZxr3zTuM1aQhsauAd6IYhBixelSCkPVTlxkIW3xwkJSEBuF61m1eg /Teg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=DTMw1QMGg1MTdPG5/1cASwCGuK4LcS7DeJL1CsbNuAs=; b=oBA/NB8Rw8yM/UYKfYNrtt+Z9i9Mam3sdD+A+fzNXjI/zeT7SGii5HtxgpP131gaid pzTwLAY6w/7MIhmpQ3amoMhPbdE1xO9AElMz2TIZtuG62GVqdykja1w0NdJEL9frZUUm EPDTt+NUboojqDZgi5bjKsx3MEmOdNwLuJaPuNye7hc0dUDlCexrvZIZ/bCO3nProFy+ ECn+alxiI1kligm7zOVFt5lzm3eFvIq2j5H/MGaQM9LrVdT/ykw7K9dYecx7MY+njXaE hZJCuX/vUgbqvmskSjltdZsZaXmBBbX6oOsl0y8AGXM2y965MG3hPR/XNNUZv7sYmqKH v+Pg== X-Gm-Message-State: APjAAAVZ7aW9yD/l0ClKj8FENso5kAZAYV4MdD72IwAx1qyJh+RthKZY zLvLONmHE+3ZKOByPDe9bjTss0O6 X-Google-Smtp-Source: APXvYqzVWFrOo286LFnKIwcPkRb3GgPmdmqQO/yGygk3JWn+wyOzioq3dQKIK0gAcPVaiHkvtk6lWA== X-Received: by 2002:a05:600c:1007:: with SMTP id c7mr96467694wmc.161.1564431608688; Mon, 29 Jul 2019 13:20:08 -0700 (PDT) Received: from scaer.home ([2a01:cb19:829a:2800:9142:e193:e0af:96f]) by smtp.gmail.com with ESMTPSA id z1sm63562317wrp.51.2019.07.29.13.20.07 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 29 Jul 2019 13:20:08 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Mon, 29 Jul 2019 22:19:55 +0200 Message-Id: <91a8b2ab88cdfc6421b6348ca45d3c375c9fabfa.1564431589.git.yann.morin.1998@free.fr> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [Buildroot] [PATCH 05/13 v2] core: simplify removal of generated br2-external files X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vadim Kochan , "Yann E. MORIN" Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Now that all the br2-external generated files are named after the same pattern, it gets easier to remove them all using a glob. Furthermore, we're on the verge of introducing more such generated files, so removing them at one fell swoop will be simpler too. Signed-off-by: "Yann E. MORIN" Cc: Vadim Kochan --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8bca4bafd0..24cb6be85e 100644 --- a/Makefile +++ b/Makefile @@ -1066,7 +1066,7 @@ ifeq ($(O),$(CURDIR)/output) rm -rf $(O) endif rm -rf $(TOPDIR)/dl $(BR2_CONFIG) $(CONFIG_DIR)/.config.old $(CONFIG_DIR)/..config.tmp \ - $(CONFIG_DIR)/.auto.deps $(BR2_EXTERNAL_FILE) $(BASE_DIR)/.br2-external.in + $(CONFIG_DIR)/.auto.deps $(BASE_DIR)/.br2-external.* .PHONY: help help: From patchwork Mon Jul 29 20:19:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 1138649 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="NwUJyoUf"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45y9zd4KC3z9sPG for ; Tue, 30 Jul 2019 06:20:27 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 320778620F; Mon, 29 Jul 2019 20:20:26 +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 tYZT7jpYNSr0; Mon, 29 Jul 2019 20:20:23 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 0C30D8614D; Mon, 29 Jul 2019 20:20:23 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 5D9281BF2BD for ; Mon, 29 Jul 2019 20:20:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id D3BF12046C for ; Mon, 29 Jul 2019 20:20:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YRdmsWXx6lBZ for ; Mon, 29 Jul 2019 20:20:12 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by silver.osuosl.org (Postfix) with ESMTPS id 3528F20466 for ; Mon, 29 Jul 2019 20:20:11 +0000 (UTC) Received: by mail-wr1-f52.google.com with SMTP id f9so63209646wre.12 for ; Mon, 29 Jul 2019 13:20:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xP0zHuBfiUBQe2xKDGEqfHrIrj2TJO4f3iuzc3k3kQM=; b=NwUJyoUfKdJX7JCbJfDnzxEai+djRZwkhHers6K91S2TPJJPky2XIKFfnCwyjmwcP7 5u2w5B4+id8gbXUs17kxeACdaUVxdF0EepsTdHfVYagmclfrjLgh5P61UA8MHoRWHbXs LHxcJJ3zqg7w56iXrJhUSe4PJT+RMLOBPSTx6tIN4r5U6z+18lcmFENhNF+1TDxr+TSm BdZKy+ij5qspauGD9QRDBvR5+0vuJgyDtpRvONLjPHRxGbh/cHMY6XhL67iSYW1H8+43 QjMRu27FnvSpQzj1AncMXsJkgN2w0I1o/lxR4kdhnGzgl4C+HpLN6JbIN4qXwsAszOhE 02eA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=xP0zHuBfiUBQe2xKDGEqfHrIrj2TJO4f3iuzc3k3kQM=; b=cTrEvhH3i9gYMkBAeloJ+wUwRU4/69FRuakAoXUYnPVvibYDIFxtjhDUNqpstuBWGE b3be7MdfB3hDKJurqD7RmMmh4h+KvPQWgOcangIUzmqwFZW6x4+BmzxbkPV/xtu54nny +lUnaB0+xFrHk40bJSk77Ewnr4Hk9dzVU33McUz/EVrQJnys6xXZ3jz36RPO3RYQASfc RlIuwbRcTDkkFPyHP5nPTdRukxqwlVkl6qrvgThvG/ZeW1WVPiDoiJmYfRPj8snUQYKm ey9rDnM6RPAit1G4CxiETz2EyeqJqvuFJS7cNeRgU/Syy44WSBodMedIYsBCm3AAjePX N3jQ== X-Gm-Message-State: APjAAAWSKcCB5rpa2MvIlb2pQvYIj/pb+ERdioH6HLrwpGdBj9ukPEiL pQVO1AhK1TnHhUsstd1e40iss+aH X-Google-Smtp-Source: APXvYqxMhbNv2WAZ0QEmSBY6BFhpOmSzWSc2g8LuVrL3QZkcGa9whQkEAVV83OqbONK8DEY9TW+2bQ== X-Received: by 2002:a05:6000:12c2:: with SMTP id l2mr7163529wrx.65.1564431609483; Mon, 29 Jul 2019 13:20:09 -0700 (PDT) Received: from scaer.home ([2a01:cb19:829a:2800:9142:e193:e0af:96f]) by smtp.gmail.com with ESMTPSA id z1sm63562317wrp.51.2019.07.29.13.20.08 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 29 Jul 2019 13:20:09 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Mon, 29 Jul 2019 22:19:56 +0200 Message-Id: <5578c81c1007dc2654d886c5de7c3c390845d905.1564431589.git.yann.morin.1998@free.fr> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [Buildroot] [PATCH 06/13 v2] core: generate all br2-external files in one go X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vadim Kochan , "Yann E. MORIN" Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" When we introduced support for multiple br2-external trees, we introduced two files, one on the Makefile side, needed very early, and one on the kconfig side, needed later in the configuration process. We naturally introduced a two-step generation, as it looked like the simplest and most obvious way. But now, we are on the verge of generating more files on the kconfig side, and it does not make sense to add even more steps to generate them. And even better yet, we can generate both the Makefile-side and kconfig-side files at the same time, in fact. Make it so. Signed-off-by: "Yann E. MORIN" Cc: Vadim Kochan --- Makefile | 12 ++---------- support/scripts/br2-external | 23 ++++++++--------------- 2 files changed, 10 insertions(+), 25 deletions(-) diff --git a/Makefile b/Makefile index 24cb6be85e..78a89f6830 100644 --- a/Makefile +++ b/Makefile @@ -181,8 +181,7 @@ $(if $(BASE_DIR),, $(error output directory "$(O)" does not exist)) BR2_EXTERNAL_FILE = $(BASE_DIR)/.br2-external.mk -include $(BR2_EXTERNAL_FILE) -$(shell support/scripts/br2-external \ - -m -o '$(BR2_EXTERNAL_FILE)' $(BR2_EXTERNAL)) +$(shell support/scripts/br2-external -d '$(BASE_DIR)' $(BR2_EXTERNAL)) BR2_EXTERNAL_ERROR = include $(BR2_EXTERNAL_FILE) ifneq ($(BR2_EXTERNAL_ERROR),) @@ -934,7 +933,7 @@ HOSTCFLAGS = $(CFLAGS_FOR_BUILD) export HOSTCFLAGS .PHONY: prepare-kconfig -prepare-kconfig: outputmakefile $(BASE_DIR)/.br2-external.in +prepare-kconfig: outputmakefile $(BUILD_DIR)/buildroot-config/%onf: mkdir -p $(@D)/lxdialog @@ -1031,13 +1030,6 @@ ifeq ($(NEED_WRAPPER),y) $(Q)$(TOPDIR)/support/scripts/mkmakefile $(TOPDIR) $(O) endif -# Even though the target is a real file, we mark it as PHONY as we -# want it to be re-generated each time make is invoked, in case the -# value of BR2_EXTERNAL is changed. -.PHONY: $(BASE_DIR)/.br2-external.in -$(BASE_DIR)/.br2-external.in: $(BUILD_DIR) - $(Q)support/scripts/br2-external -k -o "$(@)" $(BR2_EXTERNAL) - # printvars prints all the variables currently defined in our # Makefiles. Alternatively, if a non-empty VARS variable is passed, # only the variables matching the make pattern passed in VARS are diff --git a/support/scripts/br2-external b/support/scripts/br2-external index 26a5d230ab..1840cc937b 100755 --- a/support/scripts/br2-external +++ b/support/scripts/br2-external @@ -14,13 +14,11 @@ MANUAL_URL='https://buildroot.org/manual.html\#br2-external-converting' main() { local OPT OPTARG - local br2_ext ofile ofmt + local br2_ext outputdir - while getopts :kmo: OPT; do + while getopts :d: OPT; do case "${OPT}" in - o) ofile="${OPTARG}";; - k) ofmt="kconfig";; - m) ofmt="mk";; + d) outputdir="${OPTARG}";; :) error "option '%s' expects a mandatory argument\n" "${OPTARG}";; \?) error "unknown option '%s'\n" "${OPTARG}";; esac @@ -28,23 +26,18 @@ main() { # Forget options; keep only positional args shift $((OPTIND-1)) - case "${ofmt}" in - mk|kconfig) - ;; - *) error "no output format specified (-m/-k)\n";; - esac - if [ -z "${ofile}" ]; then - error "no output file specified (-o)\n" + if [ -z "${outputdir}" ]; then + error "no output directory specified (-d)\n" fi - exec >"${ofile}" - # Trap any unexpected error to generate a meaningful error message trap "error 'unexpected error while generating ${ofile}\n'" ERR do_validate ${@//:/ } - do_${ofmt} + mkdir -p "${outputdir}" + do_mk >"${outputdir}/.br2-external.mk" + do_kconfig >"${outputdir}/.br2-external.in" } # Validates the br2-external trees passed as arguments. Makes each of From patchwork Mon Jul 29 20:19:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 1138646 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="GvyoR6JO"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45y9zW05rvz9sP2 for ; Tue, 30 Jul 2019 06:20:22 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 070D085727; Mon, 29 Jul 2019 20:20:20 +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 e2dRJxTx4LO1; Mon, 29 Jul 2019 20:20:18 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 9C51786165; Mon, 29 Jul 2019 20:20:18 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 0C4781BF2BD for ; Mon, 29 Jul 2019 20:20:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 047BC858C9 for ; Mon, 29 Jul 2019 20:20:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3EfpW_9UhX5W for ; Mon, 29 Jul 2019 20:20:12 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 00E2C85701 for ; Mon, 29 Jul 2019 20:20:11 +0000 (UTC) Received: by mail-wm1-f68.google.com with SMTP id p74so54975304wme.4 for ; Mon, 29 Jul 2019 13:20:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TrwZHnEqIebBaejlnq4ddZRWxuo8vKxpoItGPzk42yA=; b=GvyoR6JOIMjWEiO3ukYMg4P+ZM2T11hosnmj61R5OTi2ilSrHcTnaeDAQC6m3BeM7y oYoTKzFffbjDxGvhdZqqgCcGKf3fqZYtL15+DeW6sHpmpDRVEWSMAZieaEgNqYXbeWki Nh5kn3MCKNkgGj6/R/9IXLG7TibRl9hBdvRInszsndAZtf5eL8HayTZoGtD6HoJRh4PK YCvSLFZCQgwONB4BPNb5436zdSDJGaTeb4adU5XgpvUCWFohIPUlYRGrdnR9d0vtmnDN 04RPUB6n1Orak82ifiuS8kdRSAfPRNNcAzcLDpUn33dtJPXxN123E24gjEEjPukH7HRV N8Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=TrwZHnEqIebBaejlnq4ddZRWxuo8vKxpoItGPzk42yA=; b=J2cnViIu4eRCZHQZdfvRjoFVFcIZl20HMbChuWAJ6vFcKvceL7OPOR0+tYjKynPPU3 upUCjxSHDwfcSUZUFU8DJmZ+NlgBQwyjclevv+jpDzGp2n///kC4Ppdr3q/vyFKpGdZ+ r84rAqT8c6n0Bs1uPSYsETq94SV/ksjASCJOo+RCxkr8X5qPn2p+GA5P8JnHUO4Eb+t7 Y2MjV4Fc08fmLFI9L+C+u8oyVzx6OvTG9yfsMgvCzG9WxMPhZNyG2RqjwV5gqqB/v2tu vJc3ym7yb2EHcUQOJcWFbG/lwTZIiC8D3hC34ZLbtBs9XbtySJt0pNmV9q6wB4hLJtW5 jcuQ== X-Gm-Message-State: APjAAAVrt2pEf0Pt1fdlc3peLhqbcqhmACjmz2HZANEdgQ9KbwCRn5fc VmQihOrPn0z4V2xQORAYaoOG9K8G X-Google-Smtp-Source: APXvYqyDYKhRs0oshYuipOj0OC3rrz34y3uYHKWzTbiVOp14+IkD3e/1p0HUqyxSX4J17PtwE5VUWA== X-Received: by 2002:a05:600c:20c1:: with SMTP id y1mr104030394wmm.10.1564431610273; Mon, 29 Jul 2019 13:20:10 -0700 (PDT) Received: from scaer.home ([2a01:cb19:829a:2800:9142:e193:e0af:96f]) by smtp.gmail.com with ESMTPSA id z1sm63562317wrp.51.2019.07.29.13.20.09 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 29 Jul 2019 13:20:09 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Mon, 29 Jul 2019 22:19:57 +0200 Message-Id: <0890af03dbffa2d14498dcb5b819a390a7c195a6.1564431589.git.yann.morin.1998@free.fr> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [Buildroot] [PATCH 07/13 v2] core: drop now-useless prepare-kconfig rule X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vadim Kochan , "Yann E. MORIN" Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This rule was added back in 9429e7b698 (core: introduce an intermediate rule before the configurators) when the kconfig-side br2-external file was generated separately from the Makefile-side one. Now that they are generated together very early in the Makefile, we no longer need this intermediate rule. Drop it. Signed-off-by: "Yann E. MORIN" Cc: Vadim Kochan --- Makefile | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 78a89f6830..bc5329bde3 100644 --- a/Makefile +++ b/Makefile @@ -932,9 +932,6 @@ endif # ifeq ($(BR2_HAVE_DOT_CONFIG),y) HOSTCFLAGS = $(CFLAGS_FOR_BUILD) export HOSTCFLAGS -.PHONY: prepare-kconfig -prepare-kconfig: outputmakefile - $(BUILD_DIR)/buildroot-config/%onf: mkdir -p $(@D)/lxdialog PKG_CONFIG_PATH="$(HOST_PKG_CONFIG_PATH)" $(MAKE) CC="$(HOSTCC_NOCCACHE)" HOSTCC="$(HOSTCC_NOCCACHE)" \ @@ -954,19 +951,19 @@ COMMON_CONFIG_ENV = \ BASE_DIR=$(BASE_DIR) \ SKIP_LEGACY= -xconfig: $(BUILD_DIR)/buildroot-config/qconf prepare-kconfig +xconfig: $(BUILD_DIR)/buildroot-config/qconf outputmakefile @$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN) -gconfig: $(BUILD_DIR)/buildroot-config/gconf prepare-kconfig +gconfig: $(BUILD_DIR)/buildroot-config/gconf outputmakefile @$(COMMON_CONFIG_ENV) srctree=$(TOPDIR) $< $(CONFIG_CONFIG_IN) -menuconfig: $(BUILD_DIR)/buildroot-config/mconf prepare-kconfig +menuconfig: $(BUILD_DIR)/buildroot-config/mconf outputmakefile @$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN) -nconfig: $(BUILD_DIR)/buildroot-config/nconf prepare-kconfig +nconfig: $(BUILD_DIR)/buildroot-config/nconf outputmakefile @$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN) -config: $(BUILD_DIR)/buildroot-config/conf prepare-kconfig +config: $(BUILD_DIR)/buildroot-config/conf outputmakefile @$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN) # For the config targets that automatically select options, we pass @@ -974,11 +971,11 @@ config: $(BUILD_DIR)/buildroot-config/conf prepare-kconfig # no values are set for the legacy options so a subsequent oldconfig # will query them. Therefore, run an additional olddefconfig. -randconfig allyesconfig alldefconfig allnoconfig: $(BUILD_DIR)/buildroot-config/conf prepare-kconfig +randconfig allyesconfig alldefconfig allnoconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile @$(COMMON_CONFIG_ENV) SKIP_LEGACY=y $< --$@ $(CONFIG_CONFIG_IN) @$(COMMON_CONFIG_ENV) $< --olddefconfig $(CONFIG_CONFIG_IN) >/dev/null -randpackageconfig allyespackageconfig allnopackageconfig: $(BUILD_DIR)/buildroot-config/conf prepare-kconfig +randpackageconfig allyespackageconfig allnopackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile @grep -v BR2_PACKAGE_ $(BR2_CONFIG) > $(CONFIG_DIR)/.config.nopkg @$(COMMON_CONFIG_ENV) SKIP_LEGACY=y \ KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \ @@ -986,15 +983,15 @@ randpackageconfig allyespackageconfig allnopackageconfig: $(BUILD_DIR)/buildroot @rm -f $(CONFIG_DIR)/.config.nopkg @$(COMMON_CONFIG_ENV) $< --olddefconfig $(CONFIG_CONFIG_IN) >/dev/null -oldconfig syncconfig olddefconfig: $(BUILD_DIR)/buildroot-config/conf prepare-kconfig +oldconfig syncconfig olddefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile @$(COMMON_CONFIG_ENV) $< --$@ $(CONFIG_CONFIG_IN) -defconfig: $(BUILD_DIR)/buildroot-config/conf prepare-kconfig +defconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile @$(COMMON_CONFIG_ENV) $< --defconfig$(if $(DEFCONFIG),=$(DEFCONFIG)) $(CONFIG_CONFIG_IN) define percent_defconfig # Override the BR2_DEFCONFIG from COMMON_CONFIG_ENV with the new defconfig -%_defconfig: $(BUILD_DIR)/buildroot-config/conf $(1)/configs/%_defconfig prepare-kconfig +%_defconfig: $(BUILD_DIR)/buildroot-config/conf $(1)/configs/%_defconfig outputmakefile @$$(COMMON_CONFIG_ENV) BR2_DEFCONFIG=$(1)/configs/$$@ \ $$< --defconfig=$(1)/configs/$$@ $$(CONFIG_CONFIG_IN) endef @@ -1002,7 +999,7 @@ $(eval $(foreach d,$(call reverse,$(TOPDIR) $(BR2_EXTERNAL_DIRS)),$(call percent update-defconfig: savedefconfig -savedefconfig: $(BUILD_DIR)/buildroot-config/conf prepare-kconfig +savedefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile @$(COMMON_CONFIG_ENV) $< \ --savedefconfig=$(if $(DEFCONFIG),$(DEFCONFIG),$(CONFIG_DIR)/defconfig) \ $(CONFIG_CONFIG_IN) From patchwork Mon Jul 29 20:19:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 1138648 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="s+hDmWJx"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45y9zZ4dMfz9s8m for ; Tue, 30 Jul 2019 06:20:26 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id D051120466; Mon, 29 Jul 2019 20:20:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Dqwl9IAHxlAJ; Mon, 29 Jul 2019 20:20:21 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 7265C20494; Mon, 29 Jul 2019 20:20:21 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id BE02D1BF2BD for ; Mon, 29 Jul 2019 20:20:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id A832D858F5 for ; Mon, 29 Jul 2019 20:20:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EVWUUc9HIZ2t for ; Mon, 29 Jul 2019 20:20:13 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by fraxinus.osuosl.org (Postfix) with ESMTPS id CCB6E857FB for ; Mon, 29 Jul 2019 20:20:12 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id 31so63271689wrm.1 for ; Mon, 29 Jul 2019 13:20:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wd2jzJvXYy30prIKo+ediyb/pJwhsQLmJ0k42xz4vOA=; b=s+hDmWJxxwFObgWi0lOZUFhTbWllA80MohBC9ytnlYBCn0XRBC9TYLEVeKb1XHPUVk SxcpQJdQ2I5jv9q1TqYAv3yjo1PxyfKrGgTvTbPIVmLYlIf1o/tXO7fonnaG7fFjiyFn gMDQFhn2lrrTJv3GI3+CZKed1qudvUl5qZdpRv3DwOvZjsHhY4EMvNA4lQbUmJ1gkaj5 kd7+aNUCiiRlZyYlBpHrpQElAVbDQsIaMya0shwImtC+wJiYi4WpAG9wcjNuSfymiESz TzMjgvlRE7xtYp/xkQttS1TJbFR3WFGanSdh6SHXndsJATNelOgu39ZHDkVxysrQKtPI 3IDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=wd2jzJvXYy30prIKo+ediyb/pJwhsQLmJ0k42xz4vOA=; b=XhamEuo9zHtfTjtDoIeQDKecnspIBecbrgSzkDvSrh6IEmuCMzQ0VjWLtyISnGSPfK zRhnuPwKUHZuT7bQXiV8GepG9+uoW0wfFtZ9aWwy8TTQiXtd9vSJcjQHQLZ0HzSmP238 M/q4nGTAGKEgvntB6jfG7pVwfsLtpxK4ibbYt7i15/wRtZPJE6vBij5RQfeVjXZ2IcnL 1nPpQ+NlNysdDs47cIBtZTjX9Wdo5lJzlcQN6OO4dSeG7cdyCDHjybwMUjdtBLS8hraE cxhJMsb5q+6Zi4rh4AQlupwIstI0q/WRV1e441/H52iGoVhMIfGOicWDSqWFdmngRqJF CY5g== X-Gm-Message-State: APjAAAXxHc1pXIXsjTHROCtJf0YwVlD7P9O5gBVnvLcJ3TAkHamPVZ1G Egv0WAEn2t5P9Zg5PPdwYnDIEtZv X-Google-Smtp-Source: APXvYqxJJik/N6bM/W47Ze9Z89x1Tzm3y7SBw0SszFxu+rLN2APaH94D7QOtKC0sGIH+G55tc6UTpg== X-Received: by 2002:adf:f6cb:: with SMTP id y11mr36680903wrp.245.1564431611091; Mon, 29 Jul 2019 13:20:11 -0700 (PDT) Received: from scaer.home ([2a01:cb19:829a:2800:9142:e193:e0af:96f]) by smtp.gmail.com with ESMTPSA id z1sm63562317wrp.51.2019.07.29.13.20.10 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 29 Jul 2019 13:20:10 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Mon, 29 Jul 2019 22:19:58 +0200 Message-Id: <2795810574c68f60b6017a52f1cd63d4d0b12e87.1564431589.git.yann.morin.1998@free.fr> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [Buildroot] [PATCH 08/13 v2] core: prepare for generating multiple kconfig fragments X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vadim Kochan , "Yann E. MORIN" Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" We currently redirect the output of each helper function. This was nice as long as we were generating single .mk and .in fragments. But we are soon to need more .in fragments. So, do the redirection inside the .in helpers. We do not (currently) need to generate more than one .mk fragment, but for consistency, do the redirection in the .mk helper too. Signed-off-by: Yann E. MORIN Cc: Vadim Kochan --- support/scripts/br2-external | 112 ++++++++++++++++++----------------- 1 file changed, 59 insertions(+), 53 deletions(-) diff --git a/support/scripts/br2-external b/support/scripts/br2-external index 1840cc937b..0b83cf69ff 100755 --- a/support/scripts/br2-external +++ b/support/scripts/br2-external @@ -36,8 +36,8 @@ main() { do_validate ${@//:/ } mkdir -p "${outputdir}" - do_mk >"${outputdir}/.br2-external.mk" - do_kconfig >"${outputdir}/.br2-external.in" + do_mk "${outputdir}" + do_kconfig "${outputdir}" } # Validates the br2-external trees passed as arguments. Makes each of @@ -111,73 +111,79 @@ do_validate_one() { # Generate the .mk snippet that defines makefile variables # for the br2-external tree do_mk() { + local outputdir="${1}" local br2_name br2_desc br2_ext - printf '#\n# Automatically generated file; DO NOT EDIT.\n#\n' - printf '\n' + { + printf '#\n# Automatically generated file; DO NOT EDIT.\n#\n' + printf '\n' - printf 'BR2_EXTERNAL ?=' - for br2_name in "${BR2_EXT_NAMES[@]}"; do - eval br2_ext="\"\${BR2_EXT_PATHS_${br2_name}}\"" - printf ' %s' "${br2_ext}" - done - printf '\n' + printf 'BR2_EXTERNAL ?=' + for br2_name in "${BR2_EXT_NAMES[@]}"; do + eval br2_ext="\"\${BR2_EXT_PATHS_${br2_name}}\"" + printf ' %s' "${br2_ext}" + done + printf '\n' - printf 'BR2_EXTERNAL_NAMES = \n' - printf 'BR2_EXTERNAL_DIRS = \n' - printf 'BR2_EXTERNAL_MKS = \n' + printf 'BR2_EXTERNAL_NAMES = \n' + printf 'BR2_EXTERNAL_DIRS = \n' + printf 'BR2_EXTERNAL_MKS = \n' - if [ ${#BR2_EXT_NAMES[@]} -eq 0 ]; then - printf '\n' - printf '# No br2-external tree defined.\n' - return - fi + if [ ${#BR2_EXT_NAMES[@]} -eq 0 ]; then + printf '\n' + printf '# No br2-external tree defined.\n' + return + fi - for br2_name in "${BR2_EXT_NAMES[@]}"; do - eval br2_desc="\"\${BR2_EXT_DESCS_${br2_name}}\"" - eval br2_ext="\"\${BR2_EXT_PATHS_${br2_name}}\"" - printf '\n' - printf 'BR2_EXTERNAL_NAMES += %s\n' "${br2_name}" - printf 'BR2_EXTERNAL_DIRS += %s\n' "${br2_ext}" - printf 'BR2_EXTERNAL_MKS += %s/external.mk\n' "${br2_ext}" - printf 'export BR2_EXTERNAL_%s_PATH = %s\n' "${br2_name}" "${br2_ext}" - printf 'export BR2_EXTERNAL_%s_DESC = %s\n' "${br2_name}" "${br2_desc}" - done + for br2_name in "${BR2_EXT_NAMES[@]}"; do + eval br2_desc="\"\${BR2_EXT_DESCS_${br2_name}}\"" + eval br2_ext="\"\${BR2_EXT_PATHS_${br2_name}}\"" + printf '\n' + printf 'BR2_EXTERNAL_NAMES += %s\n' "${br2_name}" + printf 'BR2_EXTERNAL_DIRS += %s\n' "${br2_ext}" + printf 'BR2_EXTERNAL_MKS += %s/external.mk\n' "${br2_ext}" + printf 'export BR2_EXTERNAL_%s_PATH = %s\n' "${br2_name}" "${br2_ext}" + printf 'export BR2_EXTERNAL_%s_DESC = %s\n' "${br2_name}" "${br2_desc}" + done + } >"${outputdir}/.br2-external.mk" } # Generate the kconfig snippet for the br2-external tree. do_kconfig() { + local outputdir="${1}" local br2_name br2_desc br2_ext - printf '#\n# Automatically generated file; DO NOT EDIT.\n#\n' - printf '\n' - - if [ ${#BR2_EXT_NAMES[@]} -eq 0 ]; then - printf '# No br2-external tree defined.\n' - return - fi - - printf 'menu "External options"\n' - printf '\n' + { + printf '#\n# Automatically generated file; DO NOT EDIT.\n#\n' + printf '\n' - for br2_name in "${BR2_EXT_NAMES[@]}"; do - eval br2_desc="\"\${BR2_EXT_DESCS_${br2_name}}\"" - eval br2_ext="\"\${BR2_EXT_PATHS_${br2_name}}\"" - if [ ${#BR2_EXT_NAMES[@]} -gt 1 ]; then - printf 'menu "%s"\n' "${br2_desc}" - fi - printf 'comment "%s (in %s)"\n' "${br2_desc}" "${br2_ext}" - printf 'config BR2_EXTERNAL_%s_PATH\n' "${br2_name}" - printf '\tstring\n' - printf '\tdefault "%s"\n' "${br2_ext}" - printf 'source "%s/Config.in"\n' "${br2_ext}" - if [ ${#BR2_EXT_NAMES[@]} -gt 1 ]; then - printf 'endmenu # %s\n' "${br2_name}" + if [ ${#BR2_EXT_NAMES[@]} -eq 0 ]; then + printf '# No br2-external tree defined.\n' + return fi + + printf 'menu "External options"\n' printf '\n' - done - printf "endmenu # User-provided options\n" + for br2_name in "${BR2_EXT_NAMES[@]}"; do + eval br2_desc="\"\${BR2_EXT_DESCS_${br2_name}}\"" + eval br2_ext="\"\${BR2_EXT_PATHS_${br2_name}}\"" + if [ ${#BR2_EXT_NAMES[@]} -gt 1 ]; then + printf 'menu "%s"\n' "${br2_desc}" + fi + printf 'comment "%s (in %s)"\n' "${br2_desc}" "${br2_ext}" + printf 'config BR2_EXTERNAL_%s_PATH\n' "${br2_name}" + printf '\tstring\n' + printf '\tdefault "%s"\n' "${br2_ext}" + printf 'source "%s/Config.in"\n' "${br2_ext}" + if [ ${#BR2_EXT_NAMES[@]} -gt 1 ]; then + printf 'endmenu # %s\n' "${br2_name}" + fi + printf '\n' + done + + printf "endmenu # User-provided options\n" + } >"${outputdir}/.br2-external.in" } error() { local fmt="${1}"; shift; printf "BR2_EXTERNAL_ERROR = ${fmt}" "${@}"; exit 1; } From patchwork Mon Jul 29 20:19:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 1138650 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="eTwPwR8K"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45y9zd0TTVz9sNC for ; Tue, 30 Jul 2019 06:20:26 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 7EA81878EA; Mon, 29 Jul 2019 20:20:25 +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 o9tIrqq203Hr; Mon, 29 Jul 2019 20:20:24 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id AC49987861; Mon, 29 Jul 2019 20:20:24 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 2934D1BF2BD for ; Mon, 29 Jul 2019 20:20:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 1D7C985F53 for ; Mon, 29 Jul 2019 20:20:15 +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 iNFiPRZJ0vfX for ; Mon, 29 Jul 2019 20:20:14 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by whitealder.osuosl.org (Postfix) with ESMTPS id AAEBA8609F for ; Mon, 29 Jul 2019 20:20:13 +0000 (UTC) Received: by mail-wm1-f66.google.com with SMTP id s3so54983923wms.2 for ; Mon, 29 Jul 2019 13:20:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PADY/kGmLTTIau+wmkLbyHBjJd0/s/U9ITmjkQCV+hE=; b=eTwPwR8KTsLL8jUIE3558ea8JVxp5N1dlcscASRdC35KeRqULFFch/PdMHbNyZcvZh XG+Gu5bftyusOA/exoZmwWJwF0HflDUTrW6llR7l+oLRovz4E4XyjMrV3ha3uy03UI6H XcJoiaKDR1EqMYzFIvW7EUtcP5D/3ayRYgVyItIYFd5VxamZdNbfNH7bFyFM/Z0TqhV0 ltT74XZJBicCpeIiUF9bgq/lN1ztFM9Serv5zZX7BEjKXT/NIlCvmDOyMg2APCU82LU+ s+6SM9MQpMeGmgtWxyitfqrf9digMipFrACHkAMgVbg0iCsu6/xR82V0N0ulbnWTAz5l d7DA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=PADY/kGmLTTIau+wmkLbyHBjJd0/s/U9ITmjkQCV+hE=; b=iKZ0vgo93CpMmYNmjZfMiFpKR8P4KhSHU1J+l4pGsViVjlvtjw7U9Ve3eK6bSbwQEi lt03LHjJGqk/vQqOG7al8YjYz6hp5G+6wfsFEirKSLpeFBid+VwDN046p+nKn+ia3kRo hW84nJ5avvWcCQnx31/hYH+NDGTSX07IHySE3MvDHpkYoDRBNtdZTjIksKhG9ZUDPTIi bzm6USuwn7xBS3yOEqf61QgPDSe+95h/FY4r9di4thhENYNSNtaB85seysMm40SAQZBh W7tJZozdM2dPaRf0ueiHmplk9mVJfJTw12q6kzytclNo18xZFKGpMoEXJS5TtX+m1591 VuVA== X-Gm-Message-State: APjAAAVGVEZ7bWnDO17m+rjEUqJXWrwvzYF6yZ6YOvh0PMfeQe8fJuLD OEyjhez4J2lW3NZBJ8Obdhs6Kx60 X-Google-Smtp-Source: APXvYqwIZNh6fr1zlBfkvGWQiYxqaCMR0L2vWPFi1pBHy0ghVNI+CUVMmZVNaFh+gIMV4z8EOAmO4g== X-Received: by 2002:a05:600c:224d:: with SMTP id a13mr56699552wmm.62.1564431611949; Mon, 29 Jul 2019 13:20:11 -0700 (PDT) Received: from scaer.home ([2a01:cb19:829a:2800:9142:e193:e0af:96f]) by smtp.gmail.com with ESMTPSA id z1sm63562317wrp.51.2019.07.29.13.20.11 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 29 Jul 2019 13:20:11 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Mon, 29 Jul 2019 22:19:59 +0200 Message-Id: <5e1ebdbbc317cee7cc2fbb727589dc4a4ae8d1da.1564431589.git.yann.morin.1998@free.fr> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [Buildroot] [PATCH 09/13 v2] core: split generated kconfig file X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vadim Kochan , "Yann E. MORIN" Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Currently, the kconfig part contains two things: the kconfig option with the paths to br2-external trees, and the kconfig menus for the br2-external trees. When we want to include more kconfig files from the br2-external tree (e.g. to get definitions for pre-built toolchains), we will need to have the paths defined earlier, so they can be used from the br2-external tree to include files earlier than the existing menus. Split the generated kconfig file in two: one to define the paths, which gets included early in our main Config.in, and one to actually define the existing menus, which still gets included at the same place they currently are. Signed-off-by: "Yann E. MORIN" Cc: Vadim Kochan --- Changes v1 -> v2: - redirection is changed in its own patch now --- Config.in | 6 +++- support/scripts/br2-external | 63 ++++++++++++++++++++++-------------- 2 files changed, 44 insertions(+), 25 deletions(-) diff --git a/Config.in b/Config.in index c611bb7dec..512b5d003f 100644 --- a/Config.in +++ b/Config.in @@ -18,6 +18,9 @@ config BR2_BASE_DIR string option env="BASE_DIR" +# br2-external paths definitions +source "$BR2_BASE_DIR/.br2-external.in.paths" + # Hidden config symbols for packages to check system gcc version config BR2_HOST_GCC_VERSION string @@ -865,4 +868,5 @@ source "package/Config.in.host" source "Config.in.legacy" -source "$BR2_BASE_DIR/.br2-external.in" +# br2-external menus definitions +source "$BR2_BASE_DIR/.br2-external.in.menus" diff --git a/support/scripts/br2-external b/support/scripts/br2-external index 0b83cf69ff..da315d5c1d 100755 --- a/support/scripts/br2-external +++ b/support/scripts/br2-external @@ -148,42 +148,57 @@ do_mk() { } >"${outputdir}/.br2-external.mk" } -# Generate the kconfig snippet for the br2-external tree. +# Generate the kconfig snippets for the br2-external tree. do_kconfig() { local outputdir="${1}" - local br2_name br2_desc br2_ext - - { - printf '#\n# Automatically generated file; DO NOT EDIT.\n#\n' - printf '\n' - - if [ ${#BR2_EXT_NAMES[@]} -eq 0 ]; then - printf '# No br2-external tree defined.\n' - return - fi - - printf 'menu "External options"\n' - printf '\n' - - for br2_name in "${BR2_EXT_NAMES[@]}"; do - eval br2_desc="\"\${BR2_EXT_DESCS_${br2_name}}\"" - eval br2_ext="\"\${BR2_EXT_PATHS_${br2_name}}\"" - if [ ${#BR2_EXT_NAMES[@]} -gt 1 ]; then - printf 'menu "%s"\n' "${br2_desc}" + local br2_name br2_desc br2_ext br2 + local -a items + + items=( + paths + menus + ) + + for br2 in "${items[@]}"; do + { + printf '#\n# Automatically generated file; DO NOT EDIT.\n#\n' + printf '\n' + if [ ${#BR2_EXT_NAMES[@]} -eq 0 ]; then + printf '# No br2-external tree defined.\n' fi - printf 'comment "%s (in %s)"\n' "${br2_desc}" "${br2_ext}" + } >"${outputdir}/.br2-external.in.${br2}" + done + if [ ${#BR2_EXT_NAMES[@]} -eq 0 ]; then + return + fi + + printf 'menu "External options"\n\n' >>"${outputdir}/.br2-external.in.menus" + + for br2_name in "${BR2_EXT_NAMES[@]}"; do + eval br2_desc="\"\${BR2_EXT_DESCS_${br2_name}}\"" + eval br2_ext="\"\${BR2_EXT_PATHS_${br2_name}}\"" + + { printf 'config BR2_EXTERNAL_%s_PATH\n' "${br2_name}" printf '\tstring\n' printf '\tdefault "%s"\n' "${br2_ext}" + printf '\n' + } >>"${outputdir}/.br2-external.in.paths" + + { + if [ ${#BR2_EXT_NAMES[@]} -gt 1 ]; then + printf 'menu "%s"\n' "${br2_desc}" + fi + printf 'comment "%s (in %s)"\n' "${br2_desc}" "${br2_ext}" printf 'source "%s/Config.in"\n' "${br2_ext}" if [ ${#BR2_EXT_NAMES[@]} -gt 1 ]; then printf 'endmenu # %s\n' "${br2_name}" fi printf '\n' - done + } >>"${outputdir}/.br2-external.in.menus" + done - printf "endmenu # User-provided options\n" - } >"${outputdir}/.br2-external.in" + printf 'endmenu\n' >>"${outputdir}/.br2-external.in.menus" } error() { local fmt="${1}"; shift; printf "BR2_EXTERNAL_ERROR = ${fmt}" "${@}"; exit 1; } From patchwork Mon Jul 29 20:20:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 1138647 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="DR8O9DyF"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45y9zd4KChz9sPJ for ; Tue, 30 Jul 2019 06:20:29 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id E10EC85992; Mon, 29 Jul 2019 20:20:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CVO3LWOwMP4F; Mon, 29 Jul 2019 20:20:26 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 923E18577C; Mon, 29 Jul 2019 20:20:26 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 2ED7D1BF96B for ; Mon, 29 Jul 2019 20:20:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 2C4A1877D1 for ; Mon, 29 Jul 2019 20:20:15 +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 ffYSmQ+9W7tz for ; Mon, 29 Jul 2019 20:20:14 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by hemlock.osuosl.org (Postfix) with ESMTPS id 63D648778F for ; Mon, 29 Jul 2019 20:20:14 +0000 (UTC) Received: by mail-wr1-f65.google.com with SMTP id c2so60031233wrm.8 for ; Mon, 29 Jul 2019 13:20:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8A43DlZxxXaZpJuVbz6CIqdvR9fprWa/gxSJnZLic5M=; b=DR8O9DyF8I/4V5pfj56A8wTV5CoVqKh5XfPNkcdm7WkOTeS/1bGr+Z5FHnOvxplvh+ lQ0cNkcuQ+iyDRsCZyBLdsR1n9u6wIeFnRRXXoA9VUiCxEimrdhIiR1eV+F57nwbKJSb C2EgDeMLRto1QV65MQqOAww+mj4m+dh2fcaYZeziyYWNTUX8XlOM6nRgueiwxGoukzBx agjkchw1t4j+VE4D80M8Mt6+04+y9LAOklDDc5G4Ksiug8COH3ZUP1QekRypJqujR07Z zv1fvrt3bjreD/ULK9YntZIheoZpSCF4IgZ2YUCcOKr1v3zrRyH2SofOspzNIZ4T8KgV SNUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=8A43DlZxxXaZpJuVbz6CIqdvR9fprWa/gxSJnZLic5M=; b=uOCiAsmwjSlIbj+D0QxgOxjsA44muBZczZcmtGO6fdDX+y69noLBXHX84jcyHpGjGl Zwexb7E7L+iuwomxb+warWJXET6FIOiX0Bc0j8wIBdqLK37qbN1raZrhDJN71wgOhnoI aA/2DXCbthZ9LeEg8qZfoMXH4yVeKLZocFpHwWQpuJnkUIkvCaJOgdNNriHs++1rCBeW Zq3/ZA9i8iC3gYMKJfx4fX/TJS0dYxCEls5uuBq8o0209CefYHjXnMe3SUoSe3FVcNz0 eLMQFe9bMcpytN4rnCiTwRPyrcYzGe/ECKTkpFS9vrw9zJKsPw6dMiQrGRsjB574zTee H4Ww== X-Gm-Message-State: APjAAAXJ/PKaBM3/xCwmpFG6Gym0cAcVYqvx1eNbsZU3E/7+c08EjdjK hhvt5dkFb+mcon3DKCOUv7+UvcST X-Google-Smtp-Source: APXvYqz1n+8fbsvqxWYSVjjV9YBhHugwppW+FaeQ4Z1MTtjJn3SPF50w+/6Ylfk1LX1Hsc81LKdybw== X-Received: by 2002:a5d:5510:: with SMTP id b16mr85829655wrv.267.1564431612727; Mon, 29 Jul 2019 13:20:12 -0700 (PDT) Received: from scaer.home ([2a01:cb19:829a:2800:9142:e193:e0af:96f]) by smtp.gmail.com with ESMTPSA id z1sm63562317wrp.51.2019.07.29.13.20.11 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 29 Jul 2019 13:20:12 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Mon, 29 Jul 2019 22:20:00 +0200 Message-Id: <48603fc1a6fab9f9e4c635fc76cf04c859a608f5.1564431589.git.yann.morin.1998@free.fr> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [Buildroot] [PATCH 10/13 v2] core: allow br2-external trees to provide pre-configured toolchains X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vadim Kochan , "Yann E. MORIN" Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Since we have a choice for the pre-configured pre-built toolchains, there is no p[ossbility for a br2-external to provide its own. The only solution so far for defconfigs in br2-external trees is to use BR2_TOOLCHAIN_EXTERNAL_CUSTOM and define all the bits by itself... This is not so convemient, so offer a way for br2-external trees to provide such pre-configured toolchains. To allow for this, we now scan each br2-external tree and look for a specific file, provides.toolchains.in. We generate a kconfig file that sources each such file, and that generated file is sourced from within the toolchain choice, thus making the toolchains from a br2-external tree possible and available in the same location as the ones known to Buildroot: Toolchain ---> Toolchain type (External toolchain) ---> Toolchain ---> (X) Arm ARM 2019.03 ( ) Linaro ARM 2018.05 ( ) Custom toolchain *** Toolchains from my-br2-ext-tree: *** ( ) My custom ARM toolchain *** Toolchains from another-br2-ext-tree: *** ( ) Another custom ARM toolchain ( ) A third custom ARM toolchain Signed-off-by: "Yann E. MORIN" Cc: Vadim Kochan --- support/scripts/br2-external | 9 +++++++++ toolchain/toolchain-external/Config.in | 5 ++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/support/scripts/br2-external b/support/scripts/br2-external index da315d5c1d..b08b77bd33 100755 --- a/support/scripts/br2-external +++ b/support/scripts/br2-external @@ -157,6 +157,7 @@ do_kconfig() { items=( paths menus + toolchains ) for br2 in "${items[@]}"; do @@ -196,6 +197,14 @@ do_kconfig() { fi printf '\n' } >>"${outputdir}/.br2-external.in.menus" + + if [ -f "${br2_ext}/provides/toolchains.in" ]; then + printf 'comment "Toolchains from: %s"\n' "${br2_desc}" + printf 'source "%s/provides/toolchains.in"\n' "${br2_ext}" + printf '\n' + else + printf '# No toolchain from: %s\n\n' "${br2_desc}" + fi >>"${outputdir}/.br2-external.in.toolchains" done printf 'endmenu\n' >>"${outputdir}/.br2-external.in.menus" diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in index d234c1c552..128bea257e 100644 --- a/toolchain/toolchain-external/Config.in +++ b/toolchain/toolchain-external/Config.in @@ -47,9 +47,12 @@ source "toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Confi # Kept last, so it remains the non-default choice, unless there isn't # any available toolchain profile for the currently selected -# architecture. +# architecture, but before toolchains from br2-external trees. source "toolchain/toolchain-external/toolchain-external-custom/Config.in" +# Toolchains from br2-external trees, if any +source "$BR2_BASE_DIR/.br2-external.in.toolchains" + endchoice choice From patchwork Mon Jul 29 20:20:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 1138653 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="a13KHBIP"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45y9zk5b01z9sPY for ; Tue, 30 Jul 2019 06:20:34 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 25956861E7; Mon, 29 Jul 2019 20:20:33 +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 SRK1uucXn5m1; Mon, 29 Jul 2019 20:20:27 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 7A091861A7; Mon, 29 Jul 2019 20:20:27 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id CF17B1BF2BD for ; Mon, 29 Jul 2019 20:20:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id CC1E085792 for ; Mon, 29 Jul 2019 20:20:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 40dghfbB9d9t for ; Mon, 29 Jul 2019 20:20:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 2B3798575B for ; Mon, 29 Jul 2019 20:20:15 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id g17so63237256wrr.5 for ; Mon, 29 Jul 2019 13:20:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VNdK2MYmdcVaRWnUjv76wi4nwDAbI87aIdlLbOQ4lF4=; b=a13KHBIPSND5O8D/JmfeJolBtWaBY0zheFBSYyDbeJXD7NfkWuzvPDkhbHs5WhCGYJ OliuLBs8HXJ9UPHLbJkVqIfEqarruI0bZf1PHxE2TMYaNXLseDNZ+iepXCPIOvMdWv7e yxKfdxqeuvxbjU8uwfirGv6te8MhweI5WbH4SSJh8+M/DFzg8Id4qSbSu5d4jx5F6Dfm mhnxPB6iB5fUV1NoiIy7ow3dZHkW2cB6gTeqHyWgIX/F1l/QiQSNpXdDSvIi8KoPIC9P 17GyWvQ3/eK6785OKejNswmV3yWlV3JMgE84KSjrRD4j5ujGcseh6lzre9Hzgtr+EOFm 9c1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=VNdK2MYmdcVaRWnUjv76wi4nwDAbI87aIdlLbOQ4lF4=; b=kvi7z8tz7q+Na++akneoOjIdUipdfyxadf9+MxCGQplKuuMQpBXQygYMip5a0+kFzO hvwbASwbXje2Qmk708hjyN+uq6JpVUyU5VCHrCzF4vux1MO04qd1b9Qu37mp5Eihvo/x FUURAXkUx4G7EbDFz/rXIjw9Ko/4fo001AWOiQC+kgqTS3YGWcI+TUX6pmye6uHd72Fj dd/hVWyIbA4iina4eDpkedGcCKbz2DG1YUsTXSySWvjXqPThpIrXU89u8DVT9I5VulJ1 9wR7ls0De9Hi3KwJjOiU3rJuQw0/RbVKf3UsiLe7I7v0TDvuw2N+U6fSY2EYaQ35lWDW /DrQ== X-Gm-Message-State: APjAAAV7MvXVO+je8UDN0kHDeQjfjf1Xki9dtLq88rARQrFfFbr3tpOd +J/W65AkGrWw23Vins05lC2IkWA8 X-Google-Smtp-Source: APXvYqzjD4KdR71uGSSdfDtDgMH17kWpx9/9URN8KPIpmMSmQliX5OOo+pJ/CXyN51weafAumGhOnQ== X-Received: by 2002:a05:6000:12c8:: with SMTP id l8mr29055977wrx.72.1564431613486; Mon, 29 Jul 2019 13:20:13 -0700 (PDT) Received: from scaer.home ([2a01:cb19:829a:2800:9142:e193:e0af:96f]) by smtp.gmail.com with ESMTPSA id z1sm63562317wrp.51.2019.07.29.13.20.12 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 29 Jul 2019 13:20:13 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Mon, 29 Jul 2019 22:20:01 +0200 Message-Id: X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [Buildroot] [PATCH 11/13 v2] core: allow br2-external trees to provide libjpeg X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vadim Kochan , "Yann E. MORIN" Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Similar to toolchains, we now offer a way for br2-external trees to provide their libjpeg implementation, which gets included in the jpeg choice. Signed-off-by: "Yann E. MORIN" Cc: Vadim Kochan --- package/jpeg/Config.in | 3 +++ support/scripts/br2-external | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/package/jpeg/Config.in b/package/jpeg/Config.in index a4a63cc7dc..3d0fea83b1 100644 --- a/package/jpeg/Config.in +++ b/package/jpeg/Config.in @@ -38,6 +38,9 @@ config BR2_PACKAGE_JPEG_TURBO http://www.libjpeg-turbo.org +# libjpeg from br2-external trees, if any +source "$BR2_BASE_DIR/.br2-external.in.jpeg" + endchoice config BR2_PACKAGE_HAS_JPEG diff --git a/support/scripts/br2-external b/support/scripts/br2-external index b08b77bd33..82c8afd64c 100755 --- a/support/scripts/br2-external +++ b/support/scripts/br2-external @@ -158,6 +158,7 @@ do_kconfig() { paths menus toolchains + jpeg ) for br2 in "${items[@]}"; do @@ -205,6 +206,14 @@ do_kconfig() { else printf '# No toolchain from: %s\n\n' "${br2_desc}" fi >>"${outputdir}/.br2-external.in.toolchains" + + if [ -f "${br2_ext}/provides/jpeg.in" ]; then + printf 'comment "jpeg from: %s"\n' "${br2_desc}" + printf 'source "%s/provides/jpeg.in"\n' "${br2_ext}" + printf '\n' + else + printf '# No jpeg from: %s\n\n' "${br2_desc}" + fi >>"${outputdir}/.br2-external.in.jpeg" done printf 'endmenu\n' >>"${outputdir}/.br2-external.in.menus" From patchwork Mon Jul 29 20:20:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 1138652 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="IYLfNwRH"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45y9zj6kRwz9sPV for ; Tue, 30 Jul 2019 06:20:33 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id DD1698628E; Mon, 29 Jul 2019 20:20:31 +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 8kvbrNNi531y; Mon, 29 Jul 2019 20:20:29 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id DFF2286246; Mon, 29 Jul 2019 20:20:28 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id AC1A21BF2BD for ; Mon, 29 Jul 2019 20:20:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 9CC8987861 for ; Mon, 29 Jul 2019 20:20:16 +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 L7CkviOCGIaq for ; Mon, 29 Jul 2019 20:20:16 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by hemlock.osuosl.org (Postfix) with ESMTPS id E7D26877DB for ; Mon, 29 Jul 2019 20:20:15 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id r1so63233469wrl.7 for ; Mon, 29 Jul 2019 13:20:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sB+KrGA6k90Jl5CWD2WKk9ROpiU0EBwGimX0kMKmwUs=; b=IYLfNwRHru9ttrMMwtKmEHWAoq0lR2ZC8LZQ17qx1nsBSsJNA6+vAlg+EpUmmEmN73 yxGaA89NJ5r7FuBbhCKTEfhqbaPy81wfh3aUe5kMC5ksBLle8AFc36sJ4bFWmBAFf5QN rBw+tAuQMdDVMUNuGGtqtF3FSKgB7+s1gMGkNujmlw2OYmyqx42CRPKe/7pUc4ZbFtEE GbUL7gO8rgFRmGAT276xYubjwVtPPwqtNPVnv7AU7nejFQOU8kBGVE2DNJ9PwI2T1D/l 0/ynhy9At1cM24tWOTLJizBHQdK+4mVnYR0uOJ8Cxy5+5rJKlNPICkcWC7oa6YxAtkOR RgHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=sB+KrGA6k90Jl5CWD2WKk9ROpiU0EBwGimX0kMKmwUs=; b=QhP7+ohBFXmpfwdkZYYBRlx7gqpnjPGfFQ0CyC9tOCtET0wvH/2NGIKDUzdyqqT15/ Ez3v8Gy5lhe+NdSRtwdtW3Ren5RBrv+yT/LuxWaoYMkejh9tqNxzAz+5YhqTSmzvHJIr IBeIbTnysmBjP/AuHMkPJecuoi1FW79Z8kqvbK9SMGa6tXK8He+DVzIPtdKEkD8XdBeJ Y3pSwPdybylWNToTx4VCR78kOD+KELM4G2ltbaKi6r4GHRN8uRcxS8ByX/raA0BidEr3 gC28SkSjxSpD9rSCDaqVaca6Y9ZMLIEekngrihnUAss6E+qSn8dtYboa4ZHSMJsY6GP0 V35Q== X-Gm-Message-State: APjAAAWXRzW+bd2J57Pu1Yhl0BTa1RNTdFRo/3GUJPgebK/1rMA4Xe3q 5ZNrSvrbWgWUZHt6tazN9k0n2c4h X-Google-Smtp-Source: APXvYqy3jutnmv+q5UGnzst9mtU23PsqN5PjTPAlkghOECUWbsgagoewCZsfnh9SWzOIYiJvOiRG1Q== X-Received: by 2002:a5d:51c1:: with SMTP id n1mr117184342wrv.254.1564431614249; Mon, 29 Jul 2019 13:20:14 -0700 (PDT) Received: from scaer.home ([2a01:cb19:829a:2800:9142:e193:e0af:96f]) by smtp.gmail.com with ESMTPSA id z1sm63562317wrp.51.2019.07.29.13.20.13 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 29 Jul 2019 13:20:13 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Mon, 29 Jul 2019 22:20:02 +0200 Message-Id: <17776fab64a42131b80ee61de4996741a2bc7aa1.1564431589.git.yann.morin.1998@free.fr> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [Buildroot] [PATCH 12/13 v2] core: allow br2-external trees to provide opensl X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vadim Kochan , "Yann E. MORIN" Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Similar to toolchains and jpeg, we now offer a way for br2-external trees to provide their openssl implementation, which gets included in the openssl choice. Signed-off-by: "Yann E. MORIN" Cc: Vadim Kochan --- package/openssl/Config.in | 3 +++ support/scripts/br2-external | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/package/openssl/Config.in b/package/openssl/Config.in index d84033141f..a64660bea3 100644 --- a/package/openssl/Config.in +++ b/package/openssl/Config.in @@ -68,6 +68,9 @@ config BR2_PACKAGE_LIBRESSL_BIN endif +# openssl from br2-external trees, if any +source "$BR2_BASE_DIR/.br2-external.in.openssl" + endchoice config BR2_PACKAGE_HAS_OPENSSL diff --git a/support/scripts/br2-external b/support/scripts/br2-external index 82c8afd64c..171526f8c8 100755 --- a/support/scripts/br2-external +++ b/support/scripts/br2-external @@ -159,6 +159,7 @@ do_kconfig() { menus toolchains jpeg + openssl ) for br2 in "${items[@]}"; do @@ -214,6 +215,14 @@ do_kconfig() { else printf '# No jpeg from: %s\n\n' "${br2_desc}" fi >>"${outputdir}/.br2-external.in.jpeg" + + if [ -f "${br2_ext}/provides/openssl.in" ]; then + printf 'comment "openssl from: %s"\n' "${br2_desc}" + printf 'source "%s/provides/openssl.in"\n' "${br2_ext}" + printf '\n' + else + printf '# No openssl from: %s\n\n' "${br2_desc}" + fi >>"${outputdir}/.br2-external.in.openssl" done printf 'endmenu\n' >>"${outputdir}/.br2-external.in.menus" From patchwork Mon Jul 29 20:20:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 1138651 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Yu83jDwk"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45y9zh5gC0z9sNy for ; Tue, 30 Jul 2019 06:20:32 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id CD088878B0; Mon, 29 Jul 2019 20:20:30 +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 jDqIjWWJl0nf; Mon, 29 Jul 2019 20:20:30 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id F4009878ED; Mon, 29 Jul 2019 20:20:29 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id C463A1BF2BD for ; Mon, 29 Jul 2019 20:20:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id BF1CE85792 for ; Mon, 29 Jul 2019 20:20:17 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yeX1DmCBfBCe for ; Mon, 29 Jul 2019 20:20:17 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by fraxinus.osuosl.org (Postfix) with ESMTPS id DFB128575B for ; Mon, 29 Jul 2019 20:20:16 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id r1so63233511wrl.7 for ; Mon, 29 Jul 2019 13:20:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FoLY3X+vA7AQ+2+m8lPNAZnidglB18tozg8NHYRDFXk=; b=Yu83jDwkgIB/VKPO8/6UdohwG7d3BBW61v+BiquctcOGvXCHVBDqEdDWQRrsrxC+r+ IxC5vJmuVMIXxsIxRXGLvTtUT1iBflhXAStL5qLPMM7mtec2+x1QeSuzh1XaNkV8s2F/ qP1OAhea4sB2iPJAysofiFsbQSa/yI8XG0CyVpEzo5srRphjYnIEShsNhJOt4D16wiJM aKNK6L8eDHuYwjGYnsjK59N2CkkatHJ58xu1qv7lesIqjQtXag6tiQCLV5MulBkuTVPu 7kPbrGEOHE+BgemoeU0GqcFrD5fjJ9zXFpGChBU1XAXphSTciyG34PjnnX++TwMP6Uqa GzsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=FoLY3X+vA7AQ+2+m8lPNAZnidglB18tozg8NHYRDFXk=; b=i+a0L+qQwClxNvCLThTSmekChALN7y+hJUOGtfufmTOUdoBpHeAjLDVTI+jXIbZvax 4M93ZF73S6YDKskjZtQcmV2BI0f3l1fhwgHx2iKMmvKin7HIyYCrOXUINCsto542FkjE MgWAbGFvsCSmm2cADf8PX2wDpU65A+I7+xhnIVYxxj71MxA4OXBk4hsIQPa93szUET2S 9pptMfl5UG8AXUWAgXvM/eIagjgY7B24Mn3OGmzHsRY2MosSXkcCZ3z+pSubhQbsu9EU vUxSpsLpFKN7Oj3UptPxgfNUDogn14+KIi5gMOiuOr3l/ZL9CGDgcyIDMTH7DdMN/E0t LnhQ== X-Gm-Message-State: APjAAAUHtWdT814ZAxO2eRH8nKk9/1rOacCfP5albmDHN4F6vs+NxFxt Q5iViKeke5dx6nY8DKe/cWWIMxwd X-Google-Smtp-Source: APXvYqy03Fn/qUXK8nQG3bm2kZfL/k5CHvWFMBTr4isup4mECUXryx11EP4Y222L52SiPsAYlZhDLQ== X-Received: by 2002:adf:e941:: with SMTP id m1mr35240314wrn.279.1564431615204; Mon, 29 Jul 2019 13:20:15 -0700 (PDT) Received: from scaer.home ([2a01:cb19:829a:2800:9142:e193:e0af:96f]) by smtp.gmail.com with ESMTPSA id z1sm63562317wrp.51.2019.07.29.13.20.14 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 29 Jul 2019 13:20:14 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Mon, 29 Jul 2019 22:20:03 +0200 Message-Id: <7f27bb724debc80a274d44a169f1680e88509189.1564431589.git.yann.morin.1998@free.fr> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [Buildroot] [PATCH 13/13 v2] docs/manual: document providers from br2-external X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vadim Kochan , "Yann E. MORIN" Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Add documentation about how a br2-external tree can provide an external toolchain or a libjpeg alternative implementation. Signed-off-by: "Yann E. MORIN" Cc: Vadim Kochan --- Changes v1 -> v2: - expand manual even more --- Note: the documentation about external toolchains is inexistent so far, but this is unrelated to this change, which is only about documenting how to provide one from a br2-external. --- docs/manual/customize-outside-br.txt | 89 +++++++++++++++++++++++++++- 1 file changed, 88 insertions(+), 1 deletion(-) diff --git a/docs/manual/customize-outside-br.txt b/docs/manual/customize-outside-br.txt index 353b2ed75f..6ab01bcb1f 100644 --- a/docs/manual/customize-outside-br.txt +++ b/docs/manual/customize-outside-br.txt @@ -81,7 +81,8 @@ in the following chapters: Apart from those mandatory files, there may be additional and optional content that may be present in a br2-external tree, like the +configs/+ -directory. They are described in the following chapters as well. +or +provides/+ directories. They are described in the following chapters +as well. A complete example br2-external tree layout is also described later. @@ -186,6 +187,22 @@ the one from the last br2-external tree is used. It is thus possible to override a defconfig bundled in Buildroot or another br2-external tree. +===== The +provides/+ directory + +For some packages, Buildroot provides a choice between two (or more) +implementations of API-compatible such packages. For example, there is +a choice to choose either libjpeg ot jpeg-turbo, and another choice +between openssl or libressl. Finally, there is a choice to select one +of the known, pre-configured toolchains. + +It is possible for a br2-external to extend those choices, by providing +a set of files that define those alternatives: + +* +provides/toolchains.in+ defines the pre-configured toolchains, which + will then be listed in the toolchain selection; +* +provides/jpeg.in+ defines the alternative libjpeg implementations; +* +provides/openssl.in+ defines the alternative openssl implementations. + ===== Free-form content One can store all the board-specific configuration files there, such @@ -217,8 +234,10 @@ illustration, of course): | `---- | |- Config.in + | |source "$BR2_EXTERNAL_BAR_42_PATH/toolchain/toolchain-external-mine/Config.in.options" | |source "$BR2_EXTERNAL_BAR_42_PATH/package/pkg-1/Config.in" | |source "$BR2_EXTERNAL_BAR_42_PATH/package/pkg-2/Config.in" + | |source "$BR2_EXTERNAL_BAR_42_PATH/package/my-jpeg/Config.in" | | | |config BAR_42_FLASH_ADDR | | hex "my-board flash address" @@ -259,6 +278,42 @@ illustration, of course): |- package/pkg-2/pkg-2.hash |- package/pkg-2/pkg-2.mk | + |- provides/jpeg.in + | |config BR2_PACKAGE_MY_JPEG + | | bool "my-jpeg" + | `---- + |- package/my-jpeg/Config.in + | |config BR2_PACKAGE_PROVIDES_JPEG + | | default "my-jpeg" if BR2_PACKAGE_MY_JPEG + | `---- + |- package/my-jpeg/my-jpeg.mk + | |# This is a normal package .mk file + | |MY_JPEG_VERSION = 1.2.3 + | |MY_JPEG_SITE = https://example.net/some/place + | |MY_JPEG_PROVIDES = jpeg + | |$(eval $(autotools-package)) + | `---- + | + |- provides/toolchains.in + | |config BR2_TOOLCHAIN_EXTERNAL_MINE + | | bool "my custom toolchain" + | | depends on BR2_some_arch + | | select BR2_INSTALL_LIBSTDCPP + | `---- + |- toolchain/toolchain-external-mine/Config.in.options + | |if BR2_TOOLCHAIN_EXTERNAL_MINE + | |config BR2_TOOLCHAIN_EXTERNAL_PREFIX + | | default "arch-mine-linux-gnu" + | |config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL + | | default "toolchain-external-mine" + | |endif + | `---- + |- toolchain/toolchain-external-mine/toolchain-external-mine.mk + | |TOOLCHAIN_EXTERNAL_MINE_SITE = https://example.net/some/place + | |TOOLCHAIN_EXTERNAL_MINE_SOURCE = my-toolchain.tar.gz + | |$(eval $(toolchain-external-package)) + | `---- + | |- configs/my-board_defconfig | |BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_BAR_42_PATH)/patches/" | |BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_BAR_42_PATH)/board/my-board/overlay/" @@ -311,3 +366,35 @@ External options ---> [ ] foo [ ] bar ---- + +Additionally, the jpeg provider will be visible in the jpeg choice: + +---- +Target packages ---> + Libraries ---> + Graphics ---> + [*] jpeg support + jpeg variant () ---> + ( ) jpeg + ( ) jpeg-turbo + *** jpeg from: Example br2-external tree *** + (X) my-jpeg + *** jpeg from: FOO_27 *** + ( ) another-jpeg +---- + +And similarly for the toolchains: + +---- +Toolchain ---> + Toolchain () ---> + ( ) Custom toolchain + *** Toolchains from: Example br2-external tree *** + (X) my custom toolchain +---- + +.Note +The toolchain options in +toolchain/toolchain-external-mine/Config.in.options+ +will not appear in the `Toolchain` menu. They must be explicitly included +from within the br2-external's top-level +Config.in+ and will thus appear +in the `External options` menu.