27 lines
875 B
Plaintext
27 lines
875 B
Plaintext
# output with debug_info symbol KO to deploydir
|
|
# usage:
|
|
# in recipes file
|
|
# 1) inherit copy-kernel-module
|
|
# notice: if in kernel recipes,then all kernel in tree KO with output
|
|
|
|
inherit deploy
|
|
|
|
PACKAGEFUNCS += " unisoc_output_kernel_mod "
|
|
|
|
python unisoc_output_kernel_mod(){
|
|
# kernmods = []
|
|
targetpath = os.path.join(d.getVar('DEPLOY_DIR_IMAGE'), "kernel_module/"+d.getVar('PN'))
|
|
builddir = d.getVar('B')
|
|
bb.utils.mkdirhier(targetpath)
|
|
|
|
for root, dirs, files in os.walk(builddir):
|
|
for file in files:
|
|
srcfile = os.path.join(root, file)
|
|
if srcfile.endswith(".ko"):
|
|
# 通过这个 kernmods 来记录所有的mod
|
|
# kernmods.append(file)
|
|
targetfile=os.path.join(targetpath, file)
|
|
bb.utils.copyfile(srcfile, targetfile)
|
|
continue
|
|
}
|