summaryrefslogtreecommitdiffstats
path: root/scripts/lib/recipetool/create_kmod.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/recipetool/create_kmod.py')
-rw-r--r--scripts/lib/recipetool/create_kmod.py18
1 files changed, 4 insertions, 14 deletions
diff --git a/scripts/lib/recipetool/create_kmod.py b/scripts/lib/recipetool/create_kmod.py
index 7cf188db21..cc00106961 100644
--- a/scripts/lib/recipetool/create_kmod.py
+++ b/scripts/lib/recipetool/create_kmod.py
@@ -2,18 +2,8 @@
#
# Copyright (C) 2016 Intel Corporation
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import re
import logging
@@ -40,7 +30,7 @@ class KernelModuleRecipeHandler(RecipeHandler):
makefiles = []
- files = RecipeHandler.checkfiles(srctree, ['*.c', '*.h'], recursive=True)
+ files = RecipeHandler.checkfiles(srctree, ['*.c', '*.h'], recursive=True, excludedirs=['contrib', 'test', 'examples'])
if files:
for cfile in files:
# Look in same dir or parent for Makefile
@@ -123,7 +113,7 @@ class KernelModuleRecipeHandler(RecipeHandler):
kdirpath, _ = check_target(compile_lines, install=False)
if manual_install or not install_lines:
- lines_after.append('EXTRA_OEMAKE_append_task-install = " -C ${STAGING_KERNEL_DIR} M=${S}"')
+ lines_after.append('EXTRA_OEMAKE:append:task-install = " -C ${STAGING_KERNEL_DIR} M=${S}"')
elif install_target and install_target != 'modules_install':
lines_after.append('MODULES_INSTALL_TARGET = "install"')
@@ -141,7 +131,7 @@ class KernelModuleRecipeHandler(RecipeHandler):
warnmsg = 'Unable to find means of passing kernel path into install makefile - if kernel path is hardcoded you will need to patch the makefile'
if warnmsg:
warnmsg += '. Note that the variable KERNEL_SRC will be passed in as the kernel source path.'
- logger.warn(warnmsg)
+ logger.warning(warnmsg)
lines_after.append('# %s' % warnmsg)
return True