From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6608507886135934976 X-Received: by 2002:adf:ec4b:: with SMTP id w11-v6mr795915wrn.20.1538663144865; Thu, 04 Oct 2018 07:25:44 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a1c:c90f:: with SMTP id f15-v6ls868903wmb.4.canary-gmail; Thu, 04 Oct 2018 07:25:43 -0700 (PDT) X-Google-Smtp-Source: ACcGV60UvphthT/qNC30O39HF1THY5vYV7E+4OxHrvwM+Uhv8Yb5UvMy+8GG2saoHRYbDdhFswYU X-Received: by 2002:a1c:7dd1:: with SMTP id y200-v6mr852938wmc.12.1538663143980; Thu, 04 Oct 2018 07:25:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538663143; cv=none; d=google.com; s=arc-20160816; b=T5hfN/A2sSrd4v4Jq+twSC+ugWkwjYyEFn135qwt/agbyuL03vTj1Ki5DttJNcuPGx Qa+9RPm3iXd3u4gqjfoYcWI5k118UqR4UMSrDI42iFW/+6H1ZWN3ykBvIhXKHj3i21NH GQ+702x6Ut0Bc9eY2s5cyjiZNosnxnkREqTZ9Yi1u3MqTQNpx9MpP2htJT10zPbJPNg4 2ub/QPuFLfrR5VvlyUsB4xXEwNroMaTmKHFEL9KaYYltDCxmU8x6n9oXN2hM/G16fERu cBD4UQax4yiKJDcEUWmO+/TcSF6H5b8veBi/n2ZcsJitZU6I6EkaFZ5C99B9mJ7ZV7r6 URfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from; bh=eu9iWPgmwQYA8mewTYsqqAiV8UFhKdeOZvparFEhD00=; b=k80E0DxGGd9jyf5UojMWaEHD2E+hvwFZ4F41q6YGxNwiInpboj9YRElRta7jjZZI7h cJzcUj6211sNaGAFE4fd56XGkdlVomm5cOepMW+6IK523vbXc8Iub06ivZ+9qzYdAZeq NcajbekE/yEYFip1gd2smJKZ1uwmJGyVKSEWm/hgq6xj8SsNVBw0+Uz1lYk9mWkDkN+u Y4V+2FkYAE5eGOyoV4hPnXSWA4AsnonuzGO/giFLbRabGc0qAH80qVIvlndWlG282Ilw whZUQkrfiQXUaJiZ99k6hcsqZKF3hFDoTtgTRJMPSWPYV4tjl61ZmOyS9jnXkaN/CBfw cClA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from thoth.sbs.de (thoth.sbs.de. [192.35.17.2]) by gmr-mx.google.com with ESMTPS id z14-v6si143636wrh.4.2018.10.04.07.25.43 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Oct 2018 07:25:43 -0700 (PDT) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) client-ip=192.35.17.2; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id w94EPhew012525 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 4 Oct 2018 16:25:43 +0200 Received: from md1pvb1c.ad001.siemens.net (md1pvb1c.ad001.siemens.net [139.25.68.40]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id w94EPhLO016945; Thu, 4 Oct 2018 16:25:43 +0200 From: Henning Schild To: isar-users Cc: Henning Schild Subject: [PATCH] linux-custom: fall back to using "make defconfig" when no config given Date: Thu, 4 Oct 2018 16:25:41 +0200 Message-Id: <20181004142541.11757-1-henning.schild@siemens.com> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUID: D4Eyy9HoK2Od This allows us to write kernel recipes that do not have to bring what they consider their defconfig. If KERNEL_DEFCONFIG is empty, do not attempt to copy a file into the tree and call "make defconfig" instead of "make olddefconfig". Signed-off-by: Henning Schild --- meta/recipes-kernel/linux/files/build-kernel.sh | 6 +++++- meta/recipes-kernel/linux/linux-custom.inc | 6 ++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/meta/recipes-kernel/linux/files/build-kernel.sh b/meta/recipes-kernel/linux/files/build-kernel.sh index 3f39d43..32d62bf 100644 --- a/meta/recipes-kernel/linux/files/build-kernel.sh +++ b/meta/recipes-kernel/linux/files/build-kernel.sh @@ -34,7 +34,11 @@ REPACK_LINUX_IMAGE_DIR="${REPACK_DIR}/linux-image" REPACK_LINUX_HEADERS_DIR="${REPACK_DIR}/linux-headers" cd $1 -make olddefconfig +if [ -e .config ]; then + make olddefconfig +else + make defconfig +fi KV=$( make -s kernelrelease ) if [ "${KV}" != "${PV}" ]; then diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc index 34c9a62..6ee87d4 100644 --- a/meta/recipes-kernel/linux/linux-custom.inc +++ b/meta/recipes-kernel/linux/linux-custom.inc @@ -10,7 +10,7 @@ FILESPATH =. "${LAYERDIR_core}/recipes-kernel/linux/files:" DESCRIPTION ?= "Custom kernel" KERNEL_NAME_PRODVIDED ?= "${@ d.getVar('PN', True).partition('linux-')[2]}" -KERNEL_DEFCONFIG ?= "defconfig" +KERNEL_DEFCONFIG ?= "" python() { kernel_name = d.getVar("KERNEL_NAME_PRODVIDED", True) @@ -43,7 +43,9 @@ dpkg_runbuild() { # Install package builder script sudo install -m 755 ${WORKDIR}/build-kernel.sh ${BUILDCHROOT_DIR} - sudo cp ${WORKDIR}/${KERNEL_DEFCONFIG} ${S}/.config + if [ ! -z ${KERNEL_DEFCONFIG} ]; then + sudo cp ${WORKDIR}/${KERNEL_DEFCONFIG} ${S}/.config + fi E="${@ bb.utils.export_proxies(d)}" -- 2.19.0