From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6600302104896602112 X-Received: by 2002:a50:929d:: with SMTP id k29-v6mr525441eda.5.1536752587313; Wed, 12 Sep 2018 04:43:07 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:adf:ad2e:: with SMTP id p43-v6ls525364wrc.12.gmail; Wed, 12 Sep 2018 04:43:07 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdaey2xOS2pmPNnAa2vYHYOmz+MO1+LSoX6sjixhs3dUw/fkeEQaM2MKQ+OdbUvIdUQeageJ X-Received: by 2002:adf:ad95:: with SMTP id w21-v6mr135079wrc.26.1536752587055; Wed, 12 Sep 2018 04:43:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536752587; cv=none; d=google.com; s=arc-20160816; b=cT6Dd2tVkykwU0s5TcK1z3N1bHRODYJglZYw4uafG/Rd9RySfkdULFjBYHZogl8qj0 yWGDH+2st1VcCPW3QpInOW4GJNL4RtxCvTpwbsT1vLKNIVb+PTe4jE9NE0WCJwDd3Dyx 30Lq1OL+xZzn/2MAOZlIXS49swORjkWOVTrZPdtpUBlNc9c7ZXZScl4LhjPOk1E//79X +1ghHBnU96/Ue1ZzC3Dj3d1I1QpvAUUZBgi+UPqASjJ2aicGpE2iLc5ARfIwMpiXv41m YilfkaUxbhiJxdjW0YvLCshp+7tnrn14iiCUrYu7boPjNfWzqoHcVcruOnBWDeygC3fI Fdow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from; bh=22M8K8pmHOt8aAlaSUwCKdxKXscl0ZkrN9K+hfrb2oA=; b=a/MFRXrE5ZmGKmBEtDn+7iiYWQ/olYUXTG/ZfelZPHJ6ngCjRA9ep73gonOCe5NFwj 6RxnsUCFCo+5ylLRZeRtCDh17ELrnO3ID+0D55nDQl46rpB5y5fR43NRseLb+VtW5TMC 56Q+KkqAgGo/K9/JdcNI9J3zaEJ4JoA+V4nBuzDnz1mn/M3+AX/14VtO/1qzv0Lv4s6L uav87ucs2kvB89eFb+310TeNq8HqIngS/Lwtz8qL7n1pgEFElfa0IjputWoBTLKNQu4Y u8YxarKC+KmvCykUKLHD5dJJxgC/Yq17lP5DQXt42eTtS7PSmrNRBdMUrwtL88jBhX40 xK6g== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of claudius.heine.ext@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=claudius.heine.ext@siemens.com Return-Path: Received: from gecko.sbs.de (gecko.sbs.de. [194.138.37.40]) by gmr-mx.google.com with ESMTPS id g14-v6si412004wmg.0.2018.09.12.04.43.06 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Sep 2018 04:43:07 -0700 (PDT) Received-SPF: pass (google.com: domain of claudius.heine.ext@siemens.com designates 194.138.37.40 as permitted sender) client-ip=194.138.37.40; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of claudius.heine.ext@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=claudius.heine.ext@siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by gecko.sbs.de (8.15.2/8.15.2) with ESMTPS id w8CBh6Cn030483 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 12 Sep 2018 13:43:06 +0200 Received: from ring.ppmd.siemens.net (linux-ses-ext02.ppmd.siemens.net [139.25.69.181]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id w8CBh6m9020306; Wed, 12 Sep 2018 13:43:06 +0200 From: claudius.heine.ext@siemens.com To: isar-users@googlegroups.com Cc: Claudius Heine Subject: [PATCH] linux-module/autoload: allow defining multiple modules with custom name Date: Wed, 12 Sep 2018 13:42:58 +0200 Message-Id: <20180912114258.19139-1-claudius.heine.ext@siemens.com> X-Mailer: git-send-email 2.18.0 X-TUID: rmfus+gcaQ/Q From: Claudius Heine Currently `AUTOLOAD` only supports binary operation that defines if a module (with the same name as the recipe) should be loaded or not. This is very cumbersome to work with if one recipe allows deployment of multiple modules or if the module name differs from the recipe name. With this patch `AUTOLOAD` will have a new meaning, it revers to a bitbake array that contains the module names. This commit breaks the usage of `AUTOLOAD`. Recipes will need to replace all their: AUTOLOAD = "1" lines with: AUTOLOAD = "${PN}" And their: AUTOLOAD = "0" lines with: AUTOLOAD = "" in order to migrate to the new interface. Signed-off-by: Claudius Heine --- meta-isar/recipes-kernel/example-module/example-module.bb | 2 +- meta/recipes-kernel/linux-module/module.inc | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/meta-isar/recipes-kernel/example-module/example-module.bb b/meta-isar/recipes-kernel/example-module/example-module.bb index 6b63ae3..1a4554a 100644 --- a/meta-isar/recipes-kernel/example-module/example-module.bb +++ b/meta-isar/recipes-kernel/example-module/example-module.bb @@ -11,7 +11,7 @@ SRC_URI += "file://src" S = "${WORKDIR}/src" -AUTOLOAD = "1" +AUTOLOAD = "${PN}" # Cross-compilation is not supported for the default Debian kernels. # For example, package with kernel headers for ARM: diff --git a/meta/recipes-kernel/linux-module/module.inc b/meta/recipes-kernel/linux-module/module.inc index 7bc29a8..af7526f 100644 --- a/meta/recipes-kernel/linux-module/module.inc +++ b/meta/recipes-kernel/linux-module/module.inc @@ -13,7 +13,7 @@ DEPENDS += "linux-headers-${KERNEL_NAME}" SRC_URI += "file://debian/" -AUTOLOAD ?= "0" +AUTOLOAD ?= "" inherit dpkg @@ -24,7 +24,7 @@ do_prepare_prepend() { -e 's/@DESCRIPTION@/${DESCRIPTION}/g' \ ${S}/debian/changelog ${S}/debian/control - if [ ${AUTOLOAD} = "1" ]; then - echo "echo ${PN} >> /etc/modules" >> ${S}/debian/postinst - fi + for module in "${AUTOLOAD}"; do + echo "echo $module >> /etc/modules" >> ${S}/debian/postinst + done } -- 2.18.0