From patchwork Thu Feb 27 12:39:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 1245815 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=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=FqyHBSAH; 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 48Ssh03xzDz9sRf for ; Thu, 27 Feb 2020 23:40:00 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 82C7422E54; Thu, 27 Feb 2020 12:39:55 +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 gQxjjy23QJ-3; Thu, 27 Feb 2020 12:39:53 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 82FF02221C; Thu, 27 Feb 2020 12:39:53 +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 505F11BF378 for ; Thu, 27 Feb 2020 12:39:51 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 4BAB086BC5 for ; Thu, 27 Feb 2020 12:39:51 +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 EyRtCTlYl7FA for ; Thu, 27 Feb 2020 12:39:50 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qt1-f195.google.com (mail-qt1-f195.google.com [209.85.160.195]) by whitealder.osuosl.org (Postfix) with ESMTPS id 792E087647 for ; Thu, 27 Feb 2020 12:39:50 +0000 (UTC) Received: by mail-qt1-f195.google.com with SMTP id l21so2105523qtr.8 for ; Thu, 27 Feb 2020 04:39:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=IXVHGZsTlX+mpC6FP+rO3HY914apqoY+fL2DJdKMPdM=; b=FqyHBSAHCqNNZ/vjjV7gvuTQ4ubOwOxyu+y8nVu6L06jBJk0liMM5ksRmBTiwbfiij E5adZQf4L1MjC7pgehzIboe3w55p9PVBrkB+94K9s5rdl63DNoxgqjgvD3u00CKCoSPT 90RkR4VOAvAhobVTI60VVGvrHTEbbjwSJfWaESyqi8cc/HGArIyWq3qGuQ14FaehzwyH oftkCtqGR1HfAdew4RTFquWkZrRuvNBrjr8JVaw0phqjr/ZnmMf1pEHhxexPyfkN6PEz Pvxi+HaBhKZhQmTMhBGiyevj24+aV2RaIGDg+ihxmhTI0xE+j4m1Fu4fGF79Ta2mKdi3 EsJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=IXVHGZsTlX+mpC6FP+rO3HY914apqoY+fL2DJdKMPdM=; b=EjI40qhlkmqDciSbSH/kYLZ4ONSV7Md+kJjMYfhv0OdZMYWZC9WzT0q4x/8uD8fYZr AZiAPGDsSb9AJqUTm2tBeWWG9tH63Q1L+aIM3btoSSrENCKltIXl5Rt+c6aVlJGRlGaR 49JxMs5qwZrZhuz7G809PH7EE7BRHqBHLXRuNHFNQ4s8yOEn7uF/UJwvHbAei6MBcUjJ wMHShC6Nb7M2wX2LI2YdLeTrYKmiUPGRfyy8Dv5MB003NHmOJRRBE5OYUnp1bPEStoPX K4ubgQGnA/ckWwIysmhgt6QtVlfAm+mURo0+NAUedo7XNIs18zl1wZKkO3daZsRrnZDq SngA== X-Gm-Message-State: APjAAAWzvQ5H3QVeqE+fCj6FUk9D0sPLNB+eku0szq9iZd1GIY/TTqMi vKmuG8As5gmJc83CnZ3+yJJ+eveb X-Google-Smtp-Source: APXvYqwJMS/ml6nMPhur6iex+UE+zU2S8nTsVjnz1Wh0eOFpGoYZ4iEILkUuxbC4q5HjjGtNIo0zjg== X-Received: by 2002:aed:218f:: with SMTP id l15mr4814411qtc.247.1582807189309; Thu, 27 Feb 2020 04:39:49 -0800 (PST) Received: from casantos.com (179.178.22.126.dynamic.adsl.gvt.net.br. [179.178.22.126]) by smtp.gmail.com with ESMTPSA id y190sm2960285qkb.130.2020.02.27.04.39.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 04:39:48 -0800 (PST) From: unixmania@gmail.com To: buildroot@buildroot.org Date: Thu, 27 Feb 2020 09:39:35 -0300 Message-Id: <20200227123938.13412-2-unixmania@gmail.com> X-Mailer: git-send-email 2.18.2 In-Reply-To: <20200227123938.13412-1-unixmania@gmail.com> References: <20200227123938.13412-1-unixmania@gmail.com> Subject: [Buildroot] [PATCH 1/4] Makefile: add SED_QUIET 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: Carlos Santos , Adam Duskett , =?utf-8?b?TWljaGHFgiDFgXlzemN6ZWs=?= MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Carlos Santos - Save the sed command full path in HOSTSED - Define SED as "$(HOSTSED) -i -e" - Define SED_QUIET as "$(HOSTSED) -n -e" SED_QUIET will be used by the forthcoming KCONFIG_GET_OPT macro. Signed-off-by: Carlos Santos --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6311ae643e..c7159059a6 100644 --- a/Makefile +++ b/Makefile @@ -307,7 +307,9 @@ HOSTLN := $(shell which $(HOSTLN) || type -p $(HOSTLN) || echo ln) HOSTNM := $(shell which $(HOSTNM) || type -p $(HOSTNM) || echo nm) HOSTOBJCOPY := $(shell which $(HOSTOBJCOPY) || type -p $(HOSTOBJCOPY) || echo objcopy) HOSTRANLIB := $(shell which $(HOSTRANLIB) || type -p $(HOSTRANLIB) || echo ranlib) -SED := $(shell which sed || type -p sed) -i -e +HOSTSED := $(shell which sed || type -p sed) +SED := $(HOSTSED) -i -e +SED_QUIET := $(HOSTSED) -n -e export HOSTAR HOSTAS HOSTCC HOSTCXX HOSTLD export HOSTCC_NOCCACHE HOSTCXX_NOCCACHE From patchwork Thu Feb 27 12:39:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 1245817 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=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=FVp8Hkh/; 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 48Ssh14dwPz9sSW for ; Thu, 27 Feb 2020 23:40:01 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id D26CF8789E; Thu, 27 Feb 2020 12:39:58 +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 IX7rLvW54LFG; Thu, 27 Feb 2020 12:39:57 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 06CBA8785D; Thu, 27 Feb 2020 12:39:57 +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 637A91BF378 for ; Thu, 27 Feb 2020 12:39:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 60611850D6 for ; Thu, 27 Feb 2020 12:39:53 +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 lmfhUUV_0log for ; Thu, 27 Feb 2020 12:39:52 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qv1-f66.google.com (mail-qv1-f66.google.com [209.85.219.66]) by fraxinus.osuosl.org (Postfix) with ESMTPS id BBCD484FFF for ; Thu, 27 Feb 2020 12:39:52 +0000 (UTC) Received: by mail-qv1-f66.google.com with SMTP id g16so1439984qvz.5 for ; Thu, 27 Feb 2020 04:39:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=o9iRHAyYorXHP4Meupd1p0oS0tIP1wfsooWo/0Odt1s=; b=FVp8Hkh/PDineKLT2qPL2W001vHJbwUbhrx1HFiity8060UWRGyb17g1tL3x4OzYy9 zvwO2cnk0KRC5lzivPeqJNyRRIBukHDTt8v0L7QfMbvFQUmHEK6NV/rRUYvPV0FgAtQG POufyWREH4RcKWia+MgaCzmhXg83D/877S//6Gl9w0VH60KWqF/9duta79W8B1CprZFq +Aqc76K6kJMHIb9/UDsbCH2WTl8nhYciF7plt4mioyYN6lMIchv22MvXIx5BSAdz43D7 TSNF4lbCGhT57SMbhoWyce+b3N7zCaEYdR5eZpzghhJn1DYn8AqosyqzOllsDNMFMyUq UbXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=o9iRHAyYorXHP4Meupd1p0oS0tIP1wfsooWo/0Odt1s=; b=g1RMLbUJ+Ex2lqBnoAhSAg5EsvlR9K0FRUe4DBZnCVtqYxA6D3ILu8zVPPzuQ6bW6w CBpOVxCwiM/fyuGLSHGSlniGTADAUleGiMPT4dL0CwCnbbUL/Z70Iddb3Srl3Bf9dWq1 YYCZ4OJyjCD5q8zT29UizvHmCRFxSL3cdsFjmJmD0vtwzLq0YMO4EJDYDtyNdu/5rEmp vxKZaq0JZjYhJUzLsfRQk4M8qK4aRnthOCwp4lt+8AG/5H3xbLapTUFLQ+uBb8LhkLLI KqAo2CRujZZdJcah+xyP3cNGtVcQv5TvcqAI0Xgi+eFZ4bAtoNclQln0S3QAHYR4nY/O UnHA== X-Gm-Message-State: APjAAAWfLk0GRYKu3P1b/VO4oCnXfmKh3adOqMeuPKpGg5tMOjEms2sj Envk4ZoE7wIazlo/KP50TJ679jXJ X-Google-Smtp-Source: APXvYqw3Gg4DfKHx65+ApbfNy0nbMwKhycxA+N1tecsH4QS14+R0jPj/cfE6/1eDyjDubrvlzZSbFg== X-Received: by 2002:a05:6214:1634:: with SMTP id e20mr4774151qvw.205.1582807191493; Thu, 27 Feb 2020 04:39:51 -0800 (PST) Received: from casantos.com (179.178.22.126.dynamic.adsl.gvt.net.br. [179.178.22.126]) by smtp.gmail.com with ESMTPSA id y190sm2960285qkb.130.2020.02.27.04.39.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 04:39:51 -0800 (PST) From: unixmania@gmail.com To: buildroot@buildroot.org Date: Thu, 27 Feb 2020 09:39:36 -0300 Message-Id: <20200227123938.13412-3-unixmania@gmail.com> X-Mailer: git-send-email 2.18.2 In-Reply-To: <20200227123938.13412-1-unixmania@gmail.com> References: <20200227123938.13412-1-unixmania@gmail.com> Subject: [Buildroot] [PATCH 2/4] package/pkg-utils.mk: add KCONFIG_GET_OPT macro 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: Carlos Santos , Adam Duskett , =?utf-8?b?TWljaGHFgiDFgXlzemN6ZWs=?= MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Carlos Santos Given a config name and a file, returns the config value if it is set; otherwise returns an empty string. Signed-off-by: Carlos Santos --- package/pkg-utils.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk index d324934dba..c8d74520e9 100644 --- a/package/pkg-utils.mk +++ b/package/pkg-utils.mk @@ -16,6 +16,10 @@ define KCONFIG_ENABLE_OPT # (option, file) echo '$(1)=y' >> $(2) endef +define KCONFIG_GET_OPT # (option, file) +$(shell $(SED_QUIET) '/^\<$(1)\>=/h;$${x;s/$(1)=//p;}' $(2)) +endef + define KCONFIG_SET_OPT # (option, value, file) $(SED) "/\\<$(1)\\>/d" $(3) echo '$(1)=$(2)' >> $(3) From patchwork Thu Feb 27 12:39:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 1245818 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.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=fq1Iiy33; 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 48Ssh26sK8z9sRY for ; Thu, 27 Feb 2020 23:40:02 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 7096A86113; Thu, 27 Feb 2020 12:40:01 +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 brvUMkM6GxtZ; Thu, 27 Feb 2020 12:40:01 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id E408586166; Thu, 27 Feb 2020 12:40:00 +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 8B9C71BF378 for ; Thu, 27 Feb 2020 12:39:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 889BF850D6 for ; Thu, 27 Feb 2020 12:39:56 +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 PFlCAc_ZGyv5 for ; Thu, 27 Feb 2020 12:39:55 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qk1-f194.google.com (mail-qk1-f194.google.com [209.85.222.194]) by fraxinus.osuosl.org (Postfix) with ESMTPS id D486F84FFF for ; Thu, 27 Feb 2020 12:39:54 +0000 (UTC) Received: by mail-qk1-f194.google.com with SMTP id 11so2945794qkd.1 for ; Thu, 27 Feb 2020 04:39:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=dtnZ9RUO8bB9XzqX1kIQZdm7p5HQ9iB2WQveSqrJ0yo=; b=fq1Iiy332xxaEe43qj9hwhuWcSxv/74BPYetlhNzEkI6bso91SDBx1gmtsrzwghoAi 7eLy92vydDzfg1EL4ZuN2XXS0hiAKNxicf2TncFxHEDPONbFDBtV4zysG0MQdOGrxnUq S5jFKvgYh5Fv1Ef5fbn3WsZZEO30Q9f+FqCvH/LYZGBUgEJf8S5jRve/Li/ntzstRkx3 DojCLkWp5kdwLvzYiMYgU7CIEBXICO3ru7NyRmcjyV424oegUPmdyWJupqbDqUp/+I8M GLF1CvWhMjyieHzS/xffHgN5VNbRvqeRYx3xmYrU/9cgCAfvJ1a3ENXLi5U1JDgueDk7 ukJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=dtnZ9RUO8bB9XzqX1kIQZdm7p5HQ9iB2WQveSqrJ0yo=; b=Yq2HCo+47qFG739cqT6QvSYFMCe5sg2EvR1b9gYPJvxWkP10j08af3uvhISXm3g1/b 374jOckTuIkqATjDSKPerS9zM48ujSSWq71KtvCBUznUCFgYhWIwN4Yyy3pVIA0NbBjZ lhxZBTqRADBtG0aircaHd2YcJEQumXFH30Pdlmcu4TZutOemhaghAHpmy8HiP4QklvyQ jS3qfO23RtZY8BZ6H0PaLyWC9P2YFOCEUfd46DDnZq/QkeBOaK4yaJ8ix2ZlqG4OoipT lyMNwpaB92+MN+/OB9CLuGTmAeFjwVe5rVP3xiX9oPc2Nb64jk69U7hFLzY5O4mjpPGA u6TA== X-Gm-Message-State: APjAAAXgx9WWsFY0xc0Q8Iauu9r2edUgOKwaLdwEMZNpojqzRc+mb/Y/ 9CGqdynT8x8WNtOPRgsvZzphGA0v X-Google-Smtp-Source: APXvYqy1fUz66Ycbvd+pgb0cc3NNIXh4dGA+ls07A9CUHZNpQhbZ3ZcM7zT9NjysP7IJM9WXg8UecQ== X-Received: by 2002:ae9:e104:: with SMTP id g4mr4755409qkm.133.1582807193652; Thu, 27 Feb 2020 04:39:53 -0800 (PST) Received: from casantos.com (179.178.22.126.dynamic.adsl.gvt.net.br. [179.178.22.126]) by smtp.gmail.com with ESMTPSA id y190sm2960285qkb.130.2020.02.27.04.39.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 04:39:53 -0800 (PST) From: unixmania@gmail.com To: buildroot@buildroot.org Date: Thu, 27 Feb 2020 09:39:37 -0300 Message-Id: <20200227123938.13412-4-unixmania@gmail.com> X-Mailer: git-send-email 2.18.2 In-Reply-To: <20200227123938.13412-1-unixmania@gmail.com> References: <20200227123938.13412-1-unixmania@gmail.com> Subject: [Buildroot] [PATCH 3/4] package/openrc: adapt "modules" init script to busybox "modprobe" 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: Carlos Santos , Adam Duskett , =?utf-8?b?TWljaGHFgiDFgXlzemN6ZWs=?= MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Carlos Santos If kmod tools are not selected, check for the busybox features and adapt the modules script accordingly, since the busybox modprobe does not have a "--first-time" option, "--verbose" is just "-v" and "--use-blacklist" is just "-b". Also the blacklist support is not selected in the default busybox configuration. If modprobe is not available, do not install the modules script and configuration file. Signed-off-by: Carlos Santos --- package/openrc/openrc.mk | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/package/openrc/openrc.mk b/package/openrc/openrc.mk index 3f6453cef5..999e34e094 100644 --- a/package/openrc/openrc.mk +++ b/package/openrc/openrc.mk @@ -9,7 +9,7 @@ OPENRC_SITE = $(call github,OpenRC,openrc,$(OPENRC_VERSION)) OPENRC_LICENSE = BSD-2-Clause OPENRC_LICENSE_FILES = LICENSE -OPENRC_DEPENDENCIES = ncurses +OPENRC_DEPENDENCIES = ncurses $(if $(BR2_PACKAGE_BUSYBOX),busybox) # set LIBNAME so openrc puts files in proper directories and sets proper # paths in installed files. Since in buildroot /lib64 and /lib32 always @@ -29,9 +29,30 @@ else OPENRC_MAKE_OPTS += MKSTATICLIBS=yes endif -define OPENRC_BUILD_CMDS - $(MAKE) $(OPENRC_MAKE_OPTS) -C $(@D) +# modprobe can be provided by either kmod or busybox +ifeq ($(BR2_PACKAGE_KMOD_TOOLS),) +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +# Busybox modprobe does not have a --first-time option; --verbose is just -v +# and --use-blacklist is just -b. +ifeq ($(call KCONFIG_GET_OPT,CONFIG_MODPROBE,$(BUSYBOX_BUILD_CONFIG)),y) +ifeq ($(call KCONFIG_GET_OPT,CONFIG_FEATURE_MODPROBE_BLACKLIST,$(BUSYBOX_BUILD_CONFIG)),y) +OPENRC_MODULES_BLACKLIST = s/ --use-blacklist/ -b/ +else +OPENRC_MODULES_BLACKLIST = s/ --use-blacklist// +endif +define OPENRC_MODULES_CLEAN + $(SED) 's/ --first-time//;$(OPENRC_MODULES_BLACKLIST);s/--verbose/-v/' \ + $(@D)/init.d/modules.in +endef +else # BR2_PACKAGE_BUSYBOX +# No modprobe command available. Do not build/install the modules script. +define OPENRC_MODULES_CLEAN + $(SED) 's/ modules//' $(@D)/{conf.d,init.d,runlevels}/Makefile endef +endif # CONFIG_MODPROBE +OPENRC_POST_PATCH_HOOKS += OPENRC_MODULES_CLEAN +endif # BR2_PACKAGE_BUSYBOX +endif # BR2_PACKAGE_KMOD_TOOLS define OPENRC_INSTALL_TARGET_CMDS $(MAKE) $(OPENRC_MAKE_OPTS) DESTDIR=$(TARGET_DIR) -C $(@D) install From patchwork Thu Feb 27 12:39:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 1245819 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=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=KcMeN/B9; 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 48Ssh80qmTz9sRf for ; Thu, 27 Feb 2020 23:40:08 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id AADFC878A5; Thu, 27 Feb 2020 12:40:04 +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 rudv+LA14xNN; Thu, 27 Feb 2020 12:40:02 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 0D576878A1; Thu, 27 Feb 2020 12:40:02 +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 0C0221BF378 for ; Thu, 27 Feb 2020 12:39:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 093BE87647 for ; Thu, 27 Feb 2020 12:39:58 +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 d1A8ytF74Jhj for ; Thu, 27 Feb 2020 12:39:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qv1-f67.google.com (mail-qv1-f67.google.com [209.85.219.67]) by whitealder.osuosl.org (Postfix) with ESMTPS id EF0BF86BC5 for ; Thu, 27 Feb 2020 12:39:56 +0000 (UTC) Received: by mail-qv1-f67.google.com with SMTP id ek2so1456804qvb.0 for ; Thu, 27 Feb 2020 04:39:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=A19Y/YyIbqUESMQ87ruBmxfHEQjPAMTO374/nPpuMpw=; b=KcMeN/B9IwuGhhGmEHWkrjqecoKS5S4MEAgZpV45ABMmoUEVMaQPmTjc0dvGbIt4E4 nSNPZIiQPGxT7aMTs5kdNC1Ezor/ni8pesiFfH3jvRom55lVKjb4GCcwn2OYrwGbePcL 8enw5S/TRAA0nFsc0gno5WACh9neYCI8NsR/8HnSfmFtyk9apUFBVPoXTrzJzoZ1y8rm 66YjlsDSQNZeNWpX5S7SafNWuCuZZjqN/YDrHcYNjWFJ4i4yak5XxN3En9em5ftyi0KI 6VhZiHvrHTRUFHKnkqP5CufdL4WjLjwhrtbgIwvDMuBgIdUsXJAx2yl/Rx9rQw8NVgC+ FdsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=A19Y/YyIbqUESMQ87ruBmxfHEQjPAMTO374/nPpuMpw=; b=TjvF0NqzODMkE8oBV5lOJTUot9cng9i5X5mEMIekYAtNXteVkjsP8b65xe49l78hD9 CMcL9UVCLeKhGORjnOhUMrgzE4O10ImnB6SEqPT8W3kRhJ4Eg9hW8G4AawxSAEE5No0L PuTm/XE2Tx83zsX8SSuS6lHSwAYZ5mNDZgo+NymCMPhhJQmOKpJBiSlqC53TFfh/ODAc Cy8YRNU4PynXtwfmQcujeg6AVSVh9gAAC4mci0eBoOUabvRax3e5eS5tWNwBrOgdwe6f j6pmbtpB5TcNAV0BecrUKsdYpsNrGzuRmm0Lb2vRiOLOjk5GATEnZD+lXxkaq5ly64+O +h/A== X-Gm-Message-State: APjAAAXWjR6IXUn7KIwk5mXBmp5Yts0Ciq0SBaDN6P1r/YfFwYb0QXrE xE10NESx6egxnV0Io7s0WOcrNhbl X-Google-Smtp-Source: APXvYqxhTGXuT4tmEfE7yWey8G5EhvsyIf9WL0MW4hVa9JVTWGMvbD56qopKjEID6Qf8tBFv3j3osw== X-Received: by 2002:a05:6214:11ab:: with SMTP id u11mr4277449qvv.193.1582807195741; Thu, 27 Feb 2020 04:39:55 -0800 (PST) Received: from casantos.com (179.178.22.126.dynamic.adsl.gvt.net.br. [179.178.22.126]) by smtp.gmail.com with ESMTPSA id y190sm2960285qkb.130.2020.02.27.04.39.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 04:39:55 -0800 (PST) From: unixmania@gmail.com To: buildroot@buildroot.org Date: Thu, 27 Feb 2020 09:39:38 -0300 Message-Id: <20200227123938.13412-5-unixmania@gmail.com> X-Mailer: git-send-email 2.18.2 In-Reply-To: <20200227123938.13412-1-unixmania@gmail.com> References: <20200227123938.13412-1-unixmania@gmail.com> Subject: [Buildroot] [PATCH 4/4] package/busybox: document the use of BUSYBOX_BUILD_CONFIG in openrc.mk 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: Carlos Santos , Adam Duskett , =?utf-8?b?TWljaGHFgiDFgXlzemN6ZWs=?= MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Carlos Santos Prevent filures if the variable is removed or renamed in the future. Signed-off-by: Carlos Santos --- package/busybox/busybox.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk index 9eeb784d2a..a761ff569f 100644 --- a/package/busybox/busybox.mk +++ b/package/busybox/busybox.mk @@ -80,7 +80,9 @@ BUSYBOX_CFLAGS += "`$(PKG_CONFIG_HOST_BINARY) --cflags libtirpc`" BUSYBOX_CFLAGS_busybox += "`$(PKG_CONFIG_HOST_BINARY) --libs libtirpc`" endif +# Warning: this is also used in package/openrc/openrc.mk. BUSYBOX_BUILD_CONFIG = $(BUSYBOX_DIR)/.config + # Allows the build system to tweak CFLAGS BUSYBOX_MAKE_ENV = \ $(TARGET_MAKE_ENV) \