From patchwork Sun Mar 4 22:58:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denys Dmytriyenko X-Patchwork-Id: 130603 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp2055969lja; Sun, 4 Mar 2018 14:58:38 -0800 (PST) X-Google-Smtp-Source: AG47ELsUloifSPL2/aZPqN+l94rdmhMfUHpYy+ABL/7op1tGeluyK4IzmWRs5gTuGc3JOSHUWZ3F X-Received: by 10.99.160.17 with SMTP id r17mr10673351pge.127.1520204318722; Sun, 04 Mar 2018 14:58:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520204318; cv=none; d=google.com; s=arc-20160816; b=gISwzn+tafG1SXVLt4X0krWQ3pjjId8T6jOtZY/QpvJo3CBNy/BSxAseMi4piLRRQu vozx6g3LwgCWsIZ9uHUQYxFt5E6FMxohk10I4GMjQ1IMOg5IRJgiTFxZFvklI90oDOV+ j/rnvNx33UNuK0yXoeg67IWRYeYpjEQR7rkTX+VviaTig9OXvDO4JlGZDvi7tDYvd2SR 0aW1r6XK831E3vWRdT8SVER/VYxyJao74DpQ5/SUFfFNoToYeNSKkpYpb4AfAbJUMHl3 +aBridAvSKvK7yxHweQ6VdvHI0U8KBRYglR1htBMc7cYE1BIbA9sc7kt9ahYgGXPXtDD 8B2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:message-id:date:to:from:delivered-to :arc-authentication-results; bh=3MZOzoqhtiwyb1pt6XF2PSpMZ6brpgR7GTH/o/mUNjk=; b=TBY/Ie6W29E5OkiC17veZ1L7helq0ARvE6A7LFRgv70fbzVp6KeMNE4BCzhO5TjMN1 vkaDnp7d88TBSx9pkXd0ZmsB2Un06AqeBGYaWPxznKfaWRqRlOlquNPEO5Y3gXa4cbIN EHAyF/+S2nx7HQYd+UGA0a4Z91rwJj0c60yaJIZQcf3GzT282/86oGYSAPx7qeN5Z0s6 KuGpNrAr4xeG4LXP3JohuepXKrliyRYig5r7TIMgsAeV1U9W5lx5XbMRG+ABUIWa1+al kN+ASOqAL1JgCRI3XUj6j36w3pWXN1SJZB5hX3EKnwvZjOlRDEhwMxAJ7hJ6ZuCx2upV hwMg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id w8si7483665pgt.182.2018.03.04.14.58.38; Sun, 04 Mar 2018 14:58:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 938C178ABA; Sun, 4 Mar 2018 22:58:31 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mailout4.zoneedit.com (mailout4.zoneedit.com [64.68.198.17]) by mail.openembedded.org (Postfix) with ESMTP id 01B4278A96 for ; Sun, 4 Mar 2018 22:58:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mailout4.zoneedit.com (Postfix) with ESMTP id 0452C20B84; Sun, 4 Mar 2018 22:58:29 +0000 (UTC) Received: from mailout4.zoneedit.com ([127.0.0.1]) by localhost (zmo03-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3YSqOsHHxZJb; Sun, 4 Mar 2018 22:58:28 +0000 (UTC) Received: from mail.denix.org (pool-100-15-85-143.washdc.fios.verizon.net [100.15.85.143]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mailout4.zoneedit.com (Postfix) with ESMTPSA id C3A7C20B2F; Sun, 4 Mar 2018 22:58:26 +0000 (UTC) Received: from gimli.denix (gimli [192.168.0.6]) by mail.denix.org (Postfix) with ESMTP id 0BA191632FA; Sun, 4 Mar 2018 17:58:26 -0500 (EST) From: Denys Dmytriyenko To: openembedded-core@lists.openembedded.org Date: Sun, 4 Mar 2018 17:58:12 -0500 Message-Id: <1520204294-38993-1-git-send-email-denis@denix.org> X-Mailer: git-send-email 2.7.4 Cc: Denys Dmytriyenko Subject: [OE-core] [rocko][PATCH 1/3] busybox: separate inittab into own package, due to SERIAL_CONSOLES being machine-specific X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org From: Denys Dmytriyenko * Create busybox-inittab recipe to produce machine-specific package with /etc/inittab and necessary getty calls for a machine, based on SERIAL_CONSOLES, similar to how sysvinit-inittab was done * Since CONFIG_FEATURE_USE_INITTAB is controlled by VIRTUAL-RUNTIME_init_manager, make main busybox package RDEPENDS on busybox-inittab when init_manager is set to busybox (From OE-Core rev: afb09abd2f0f7555ba156260a87fd3867f591310) Signed-off-by: Denys Dmytriyenko Signed-off-by: Richard Purdie --- .../recipes-core/busybox/busybox-inittab_1.24.1.bb | 32 ++++++++++++++++++++++ meta/recipes-core/busybox/busybox.inc | 12 ++------ 2 files changed, 34 insertions(+), 10 deletions(-) create mode 100644 meta/recipes-core/busybox/busybox-inittab_1.24.1.bb -- 2.7.4 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-core/busybox/busybox-inittab_1.24.1.bb b/meta/recipes-core/busybox/busybox-inittab_1.24.1.bb new file mode 100644 index 0000000..a83620e --- /dev/null +++ b/meta/recipes-core/busybox/busybox-inittab_1.24.1.bb @@ -0,0 +1,32 @@ +SUMMARY = "inittab configuration for BusyBox" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" + +SRC_URI = "file://inittab" + +S = "${WORKDIR}" + +INHIBIT_DEFAULT_DEPS = "1" + +do_compile() { + : +} + +do_install() { + install -d ${D}${sysconfdir} + install -D -m 0644 ${WORKDIR}/inittab ${D}${sysconfdir}/inittab + tmp="${SERIAL_CONSOLES}" + for i in $tmp + do + j=`echo ${i} | sed s/\;/\ /g` + id=`echo ${i} | sed -e 's/^.*;//' -e 's/;.*//'` + echo "$id::respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab + done +} + +# SERIAL_CONSOLES is generally defined by the MACHINE .conf. +# Set PACKAGE_ARCH appropriately. +PACKAGE_ARCH = "${MACHINE_ARCH}" + +FILES_${PN} = "${sysconfdir}/inittab" +CONFFILES_${PN} = "${sysconfdir}/inittab" diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc index 48910ca..a6bfd46 100644 --- a/meta/recipes-core/busybox/busybox.inc +++ b/meta/recipes-core/busybox/busybox.inc @@ -48,6 +48,8 @@ CONFFILES_${PN}-mdev = "${sysconfdir}/mdev.conf" RRECOMMENDS_${PN} = "${PN}-syslog ${PN}-udhcpc" +RDEPENDS_${PN} = "${@["", "busybox-inittab"][(d.getVar('VIRTUAL-RUNTIME_init_manager') == 'busybox')]}" + inherit cml1 systemd update-rc.d ptest # internal helper @@ -292,16 +294,6 @@ do_install () { install -D -m 0777 ${WORKDIR}/rcS ${D}${sysconfdir}/init.d/rcS install -D -m 0777 ${WORKDIR}/rcK ${D}${sysconfdir}/init.d/rcK install -D -m 0755 ${WORKDIR}/runlevel ${D}${base_sbindir}/runlevel - if grep "CONFIG_FEATURE_USE_INITTAB=y" ${B}/.config; then - install -D -m 0777 ${WORKDIR}/inittab ${D}${sysconfdir}/inittab - tmp="${SERIAL_CONSOLES}" - for i in $tmp - do - j=`echo ${i} | sed s/\;/\ /g` - id=`echo ${i} | sed -e 's/^.*;//' -e 's/;.*//'` - echo "$id::respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab - done - fi fi if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then