From patchwork Tue Oct 13 19:41:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brandon Maier X-Patchwork-Id: 1381702 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) 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=fail (p=none dis=none) header.from=rockwellcollins.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=rockwellcollins.com header.i=@rockwellcollins.com header.a=rsa-sha256 header.s=hrcrc2020 header.b=dy3bbTNV; 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 4C9mCX3BqHz9sTK for ; Wed, 14 Oct 2020 06:42:15 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 2F0502E38B; Tue, 13 Oct 2020 19:42:14 +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 bENv0NlZICk8; Tue, 13 Oct 2020 19:42:10 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 93C7D2E429; Tue, 13 Oct 2020 19:42:10 +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 A6BBD1BF868 for ; Tue, 13 Oct 2020 19:42:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id A377F87D4C for ; Tue, 13 Oct 2020 19:42:09 +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 4g66gz8h+HvJ for ; Tue, 13 Oct 2020 19:42:07 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from ch3vs04.rockwellcollins.com (ch3vs04.rockwellcollins.com [205.175.226.52]) by whitealder.osuosl.org (Postfix) with ESMTPS id 2C73387D4B for ; Tue, 13 Oct 2020 19:42:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rockwellcollins.com; s=hrcrc2020; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ngmudTNxXj5KuMHTMmkWnAKI+cPubNxauP5h6aqtHgY=; b=dy3bbTNVxCBB97BhWjhLGYBrvJBOOdVGr2wD0owhjITLxZ6Kx+cNHELf +eWT29K97GgRkw3ETebLfbYCSOYJ+xEICzyYVX+louu/OfUmxvXCBnyDT 4xgCuEct2ffswHpd+KHH2vmTIIDLzL3TeZVP/DUs9+BGDJ2f8wSCKtF6Z 52VDi2QV7pUwit+45+UUakgCFOC8eBrOEknuzobJaJ5sa7GXc8dyQ9c+g Qpms09EJLvJrNxiGy0YTgUTBsawkGF7gT/SqVyrfxvGAvxVR0VxECD6P0 IsHiIsqOfJ4Cgqy5NaA7yKCfrpNnSgZijsuPXhHjUjSn08kLuCT9mZBHv g==; IronPort-SDR: Llnau4oDjkOyWjFeVi2ulsCTliclZAzCf6//6RTeP0Qcnmdl/Ut9/NOOfL7KA2QFOPsaBO0IvP IbnVkYLRlcD315NDw6IigJpd/+PxgycbAQF3vpFIz46Qf4sjGB6hOObsJOIHzY8X42Ij7LAX1g mTiiDwTUS1thx1QmcqZZuFV+/hxuypD9+jNI+ct2NvAXnMH+lIylSMQdGMct9XiHcz9jxPpHro FMlC/Ya2ISwV8VIiUPziX5jI9o5r5iEersQPX9z/PnKY0fwsyOA+pOXKdkUgbR1y1nq3Q6dZPf CtE= Received: from ofwch3n02.rockwellcollins.com (HELO ciulimr02.rockwellcollins.com) ([205.175.226.14]) by ch3vs04.rockwellcollins.com with ESMTP; 13 Oct 2020 14:42:06 -0500 X-Received: from righttwix.rockwellcollins.com (righttwix.rockwellcollins.com [192.168.141.218]) by ciulimr02.rockwellcollins.com (Postfix) with ESMTP id A1DF92007E; Tue, 13 Oct 2020 14:42:05 -0500 (CDT) From: Brandon Maier To: buildroot@buildroot.org Date: Tue, 13 Oct 2020 14:41:49 -0500 Message-Id: <20201013194149.171518-2-brandon.maier@rockwellcollins.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201013194149.171518-1-brandon.maier@rockwellcollins.com> References: <20201013194149.171518-1-brandon.maier@rockwellcollins.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 2/2] system: support br2-external init systems 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: Brandon Maier , yann.morin.1998@free.fr, thomas.petazzoni@bootlin.com Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Some externals may wish to provide custom init systems for tightly integrated boot. This has been supported through the BR2_INIT_NONE, however a downside to the BR2_INIT_NONE is it forces the custom init system to use either skeleton-custom and roll a custom skeleton for each target, or skeleton-init-none which isn't a complete skeleton. Allowing br2-external to define custom BR2_INIT_* means they can now safely 'select' the BR2_PACKAGE_SKELETON_INIT_* and use a sysv style skeleton if they want. Signed-off-by: Brandon Maier --- support/scripts/br2-external | 17 +++++++++++++++++ system/Config.in | 3 +++ 2 files changed, 20 insertions(+) diff --git a/support/scripts/br2-external b/support/scripts/br2-external index ededd2d900..f6ad722f72 100755 --- a/support/scripts/br2-external +++ b/support/scripts/br2-external @@ -161,6 +161,7 @@ do_kconfig() { toolchains jpeg openssl + init ) for br2 in "${items[@]}"; do @@ -224,7 +225,23 @@ do_kconfig() { else printf '# No openssl from: %s\n\n' "${br2_desc}" fi >>"${outputdir}/.br2-external.in.openssl" + + if [ -f "${br2_ext}/provides/init.in" ]; then + printf 'comment "init from: %s"\n' "${br2_desc}" + printf 'source "%s/provides/init.in"\n' "${br2_ext}" + printf '\n' + else + printf '# No init from: %s\n\n' "${br2_desc}" + fi >>"${outputdir}/.br2-external.in.init" done + 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" + printf 'endmenu\n' >>"${outputdir}/.br2-external.in.menus" } diff --git a/system/Config.in b/system/Config.in index ec61fac781..ff7a470561 100644 --- a/system/Config.in +++ b/system/Config.in @@ -144,6 +144,9 @@ config BR2_INIT_NONE have to provide your own, either with a new package or with a rootfs-overlay. +# Init systems from br2-external trees, if any +source "$BR2_BASE_DIR/.br2-external.in.init" + endchoice choice