diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2016-08-17 22:31:25 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2016-08-22 19:43:26 +0300 |
commit | 60f9d69e016b11c468c98ea75ba0a60c44afbbc4 (patch) | |
tree | ecb49581a9e41a37943c22cd9ef3f63451b20ee7 /import-layers/yocto-poky/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb | |
parent | e18c61205e0234b03697129c20cc69c9b3940efc (diff) | |
download | openbmc-60f9d69e016b11c468c98ea75ba0a60c44afbbc4.tar.xz |
yocto-poky: Move to import-layers subdir
We are going to import additional layers, so create a subdir to
hold all of the layers that we import with git-subtree.
Change-Id: I6f732153a22be8ca663035c518837e3cc5ec0799
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb')
-rw-r--r-- | import-layers/yocto-poky/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb b/import-layers/yocto-poky/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb new file mode 100644 index 000000000..c2c258910 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb @@ -0,0 +1,50 @@ +SUMMARY = "Wrapper script for the Linux kernel module dependency indexer" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +S = "${WORKDIR}" + +INHIBIT_DEFAULT_DEPS = "1" +# The kernel and the staging dir for it is machine specific +PACKAGE_ARCH = "${MACHINE_ARCH}" + +# We need the following for the sstate code to process the wrapper +SSTATE_SCAN_FILES += "depmodwrapper" + +do_install() { + install -d ${D}${bindir_crossscripts}/ + + cat > ${D}${bindir_crossscripts}/depmodwrapper << EOF +#!/bin/sh +# Expected to be called as: depmodwrapper -a KERNEL_VERSION +if [ "\$1" != "-a" -o "\$2" != "-b" ]; then + echo "Usage: depmodwrapper -a -b rootfs KERNEL_VERSION" >&2 + exit 1 +fi +if [ ! -r ${PKGDATA_DIR}/kernel-depmod/kernel-abiversion ]; then + echo "Unable to read: ${PKGDATA_DIR}/kernel-depmod/kernel-abiversion" >&2 +else + kernelabi=\$(cat ${PKGDATA_DIR}/kernel-depmod/kernel-abiversion) + if [ "\$kernelabi" != "\$4" ]; then + echo "Error: Kernel version \$4 does not match kernel-abiversion (\$kernelabi)" >&2 + exit 1 + fi +fi + +if [ ! -r ${PKGDATA_DIR}/kernel-depmod/System.map-\$4 ]; then + echo "Unable to read: ${PKGDATA_DIR}/kernel-depmod/System.map-\$4" >&2 + exec env depmod "\$1" "\$2" "\$3" "\$4" +else + exec env depmod "\$1" "\$2" "\$3" -F "${PKGDATA_DIR}/kernel-depmod/System.map-\$4" "\$4" +fi +EOF + chmod +x ${D}${bindir_crossscripts}/depmodwrapper +} + +SYSROOT_PREPROCESS_FUNCS += "depmodwrapper_sysroot_preprocess" + +depmodwrapper_sysroot_preprocess () { + sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts} +} + +inherit nopackages |