From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6529810911033556992 X-Received: by 10.28.126.22 with SMTP id z22mr1385502wmc.28.1520419638749; Wed, 07 Mar 2018 02:47:18 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.223.135.246 with SMTP id c51ls407687wrc.11.gmail; Wed, 07 Mar 2018 02:47:18 -0800 (PST) X-Google-Smtp-Source: AG47ELtk5yHpQnOYaKoboLrc2b5SbiSYUV66oEpSg6nvHyQyaFtvlHTejPqKwQklgf9Q3ux49hYY X-Received: by 10.223.178.178 with SMTP id g47mr2040139wrd.12.1520419638099; Wed, 07 Mar 2018 02:47:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520419638; cv=none; d=google.com; s=arc-20160816; b=DmPZVxCAudYk+3f/9AU91iaoy03I8b/N1FUp4q3ylk8amceaH9XCd9NMceTtO9w7VD SKfvZdHTk/1MlNf63GEmKCZdpzXHpZmX+FMBPUDAiWk0kfZe4b85mzLFEOt7fPjH+Rwx 2h2I7IagpiFWpR3bpKNJa5qA6ve4xTnD2a9WA1G3ITEQwkMFAIuR5yBBD2f6hFTuynxZ zhtoMuDxdvsVB6WpqmUgLMLj1PrigNOqqIfLrZ/l6E1NXmEW2a8grAHImzmzImkYcuMQ bqRJNX7igwsuwN5gshwFfXHjWIVLxm5rwvcHIdDFe550sH2DLEHtaBIdnnD8MaheZmOd FwyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=lajC3u2S7ii/7gsw5gH/daT4UZ1Ypq+e9FadyEG2DIE=; b=TqcIVccOBj3dyhlPN7Du9CbrrLI4+k3B7WuzEaKXC9HXhDx6ew7I8xfSD0J80uZcjZ 7fo9bnseXAjvGb9IoV58BmMIR2WmXz3M3/LROEtf9JVw+yOZ38j8/3UySIIt+wa+MJs5 Q0kHgdILlYzpK4n/k9S7SetGhIHzmwedGs5vFMiQ6NcjoEzSc1etFptvCAIFkNnLsKOB ShBk3y79txM5Pc+16l5TS7SL+2kxicfn1oML4wgiot5ibAyByALwWlmG0gINopNBGZeK lP13na1v5GrCE6TboDvNsLSg/x01JkGtQ41liPdUvRgWm7qcl5IFaZtO1VXfqiFVlIdF /cmg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Return-Path: Received: from aqmola.ilbers.de (aqmola.ilbers.de. [85.214.62.211]) by gmr-mx.google.com with ESMTPS id d4si68699wmh.2.2018.03.07.02.47.17 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Mar 2018 02:47:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) client-ip=85.214.62.211; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Received: from localhost.localdomain ([188.227.110.165]) (authenticated bits=0) by aqmola.ilbers.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id w27Al2o9018589 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 7 Mar 2018 11:47:08 +0100 From: Alexander Smirnov To: isar-users@googlegroups.com Cc: Alexander Smirnov Subject: [PATCH v3 1/4] kernel/module: Add AUTOLOAD option Date: Wed, 7 Mar 2018 13:46:55 +0300 Message-Id: <20180307104655.19315-1-asmirnov@ilbers.de> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20180306124055.15990-2-asmirnov@ilbers.de> References: <20180306124055.15990-2-asmirnov@ilbers.de> X-TUID: owdKA6SA/UNj Add possibility to set kernel module to be autoloaded. File '/etc/modules' is created by kmod package, which is dependency of kernel image, so there is no need to add explicit deps to kernel module. Signed-off-by: Alexander Smirnov --- meta/recipes-kernel/linux-module/files/debian/control | 2 +- meta/recipes-kernel/linux-module/module.inc | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/meta/recipes-kernel/linux-module/files/debian/control b/meta/recipes-kernel/linux-module/files/debian/control index 707f857..1ee634c 100644 --- a/meta/recipes-kernel/linux-module/files/debian/control +++ b/meta/recipes-kernel/linux-module/files/debian/control @@ -7,5 +7,5 @@ Maintainer: ISAR project Package: @PN@ Architecture: any -Depends: linux-image-@KERNEL_NAME@ +Depends: linux-image-@KERNEL_NAME@, kmod Description: @DESCRIPTION@ diff --git a/meta/recipes-kernel/linux-module/module.inc b/meta/recipes-kernel/linux-module/module.inc index aa232f7..ec1c4b0 100644 --- a/meta/recipes-kernel/linux-module/module.inc +++ b/meta/recipes-kernel/linux-module/module.inc @@ -13,6 +13,8 @@ DEPENDS += "linux-headers-${KERNEL_NAME}" SRC_URI += "file://debian/" +AUTOLOAD ?= "0" + inherit dpkg dpkg_runbuild_prepend() { @@ -21,4 +23,9 @@ dpkg_runbuild_prepend() { -e 's/@KERNEL_NAME@/${KERNEL_NAME}/g' \ -e 's/@DESCRIPTION@/${DESCRIPTION}/g' \ ${WORKDIR}/${S}/debian/changelog ${WORKDIR}/${S}/debian/control + + if [ ${AUTOLOAD} = "1" ]; then + echo "echo ${PN} >> /etc/modules" >> ${WORKDIR}/${S}/debian/postinst + chmod +x ${WORKDIR}/${S}/debian/postinst + fi } -- 2.1.4