Files
BPI-M2C/source_sync_rls_25c/layers/meta-unisoc/classes/copy-kernel-module.bbclass
T

27 lines
875 B
Plaintext
Raw Normal View History

2026-09-22 09:38:26 +08:00
# 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
}