From patchwork Tue Oct 13 22:36:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brandon Maier X-Patchwork-Id: 1381737 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.138; helo=whitealder.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=uCAiWMUG; 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 4C9r4g0tgPz9ryj for ; Wed, 14 Oct 2020 09:36:34 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 3E72287842; Tue, 13 Oct 2020 22:36: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 IgsvzKt8CI76; Tue, 13 Oct 2020 22:36:30 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 282F087443; Tue, 13 Oct 2020 22:36:30 +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 0CF421BF5A5 for ; Tue, 13 Oct 2020 22:36:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 09D8487443 for ; Tue, 13 Oct 2020 22:36:29 +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 lYtgSFWgzVdU for ; Tue, 13 Oct 2020 22:36:28 +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 0FC8D87429 for ; Tue, 13 Oct 2020 22:36:27 +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=VB9MeJfQihTIgRzCcdr+25Ygzx2gcANKNVxUTwML3vY=; b=uCAiWMUGaXGqJ49oA37KBwQdrBeagaZ2tyeoP9FkV6yA5CeibgpginHn v48/cTERLyLqLj8TQLqcNBPT6sCDQvbPsr2C+kwVlztCNWGmJq7/oDxPY byGCFg654fOt0eW0OaceHypIcHir0E3wNzpQOxcIclMYgCPoFJCGpdG7R uB+Y8nUFZaOih1tymPAfADIPOfN38rEdp64qRgBJlU4y2HAjU93ctCOtU kFDCqGY6pHRfDpY80Dr27m4L8rXwJgBNK6Zrn6dmqBvi4BOKnZVPDrkuf j0tWetkLebC5F3ONXbh0SDF+FQ6iHFS+i9bPvfAd0tVbdmzQfKqVatojx w==; IronPort-SDR: K8Tz5A20gGkv8fl+Lp6cG/tbvr0XyPVjwNiioSiL2L7172r93txVEF06AhHDJ1W75+JrgsB2CA mUGwrxrN/gtTUsdRR2jdGmbX7vpH9B+9Yx81XCVxubhLzJZJKgmmngGgj7Zv5KU3JZvLMt1CJ6 1bljBdZBI/tToCc8mDpz2rhCxYroHq8Yn1IuWiHOi+FkepcLzccCjD3bhQZLePzHRQiBacVhC9 m/wm5rYO16qhdzpWBzJgaABgYFRrf3FlwAVTfC3H+41asKHDfZACC9sfyHmHu1SxBDu8NQasWa LWQ= Received: from ofwch3n02.rockwellcollins.com (HELO ciulimr02.rockwellcollins.com) ([205.175.226.14]) by ch3vs04.rockwellcollins.com with ESMTP; 13 Oct 2020 17:36:28 -0500 X-Received: from righttwix.rockwellcollins.com (righttwix.rockwellcollins.com [192.168.141.218]) by ciulimr02.rockwellcollins.com (Postfix) with ESMTP id 32D9720088; Tue, 13 Oct 2020 17:36:27 -0500 (CDT) From: Brandon Maier To: buildroot@buildroot.org Date: Tue, 13 Oct 2020 17:36:04 -0500 Message-Id: <20201013223605.188920-4-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 v2 4/5] 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: thomas.petazzoni@bootlin.com, Brandon Maier , yann.morin.1998@free.fr, Thomas De Schampheleire 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 --- v2 - Remove bad code from a rebase --- support/scripts/br2-external | 9 +++++++++ system/Config.in | 3 +++ 2 files changed, 12 insertions(+) diff --git a/support/scripts/br2-external b/support/scripts/br2-external index 01804e1220..56dc6f53ca 100755 --- a/support/scripts/br2-external +++ b/support/scripts/br2-external @@ -162,6 +162,7 @@ do_kconfig() { jpeg openssl skeleton + init ) for br2 in "${items[@]}"; do @@ -233,6 +234,14 @@ do_kconfig() { else printf '# No skeleton from: %s\n\n' "${br2_desc}" fi >>"${outputdir}/.br2-external.in.skeleton" + + 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 printf 'endmenu\n' >>"${outputdir}/.br2-external.in.menus" diff --git a/system/Config.in b/system/Config.in index f062e5be93..33abb9beb1 100644 --- a/system/Config.in +++ b/system/Config.in @@ -147,6 +147,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