diff --git a/meta-digi-arm/classes/fsl-eula-unpack2.bbclass b/meta-digi-arm/classes/fsl-eula-unpack2.bbclass new file mode 100644 index 000000000..a3c8e668f --- /dev/null +++ b/meta-digi-arm/classes/fsl-eula-unpack2.bbclass @@ -0,0 +1,33 @@ +# fsl-eula-unpack2.bbclass provides a mechanism for a) unpacking certain +# EULA-licensed archives downloaded by HTTP and b) handling the EULA +# acceptance. + +inherit fsl-eula-unpack fsl-eula + +IMX_PACKAGE_VERSION = "${PV}" + +SRC_URI = "${FSL_MIRROR}${IMX_PACKAGE_NAME}.bin;name=${SRC_URI_NAME};fsl-eula=true" + +S = "${WORKDIR}/${IMX_PACKAGE_NAME}" + +# For native apps, insert the user-local sysroot path +# For nativesdk apps, insert the correct distro folder +D_SUBDIR = "" +D_SUBDIR_class-native = "${STAGING_DIR_NATIVE}" +D_SUBDIR_class-nativesdk = "/opt/${DISTRO}" + +# SCR is the location and name of the Software Content Register file +# relative to ${D}${D_SUBDIR}. +SCR = "SCR.txt" + +do_install () { + install -d ${D}${D_SUBDIR} + cp -r ${S}/* ${D}${D_SUBDIR} + rm ${D}${D_SUBDIR}/COPYING + if [ ! -f ${D}${D_SUBDIR}/${SCR} ]; then + bbfatal "Missing Software Content Register \"${D}${D_SUBDIR}/${SCR}\"" + fi + rm ${D}${D_SUBDIR}/${SCR} +} + +FILES_${PN} = "/" diff --git a/meta-digi-arm/classes/fsl-eula.bbclass b/meta-digi-arm/classes/fsl-eula.bbclass new file mode 100644 index 000000000..ec27fcde7 --- /dev/null +++ b/meta-digi-arm/classes/fsl-eula.bbclass @@ -0,0 +1,29 @@ +# fsl-eula.bbclass defines a common naming scheme used by the +# packing and unpacking mechanisms defined in fsl-eula-pack.bbclass +# and fsl-eula-unpack2.bbclass. +# +# Note that it is not necessary to inherit this class directly. It is +# already inherited from fsl-eula-pack.bbclass and fsl-eula-unpack2.bbclass. +# +# The naming scheme takes into account the fact that a single software +# package can create many archives based on the combinations of a) target +# versus native/nativesdk components, and b) the target or native architecture. +# The naming scheme can be extended through regular bitbake means to allow +# configuration-specific archives, as can be seen in fsl-eula-graphics.bbclass. + +# The variable IMX_PACKAGE_NAME gives a unique name for every possible +# archive. The variable is built from a combination of the package name ${PN}, +# the version ${IMX_PACKAGE_VERSION} and the target or native architecture, +# ${TARGET_ARCH} or ${BUILD_ARCH}. +IMX_PACKAGE_NAME = "${PN}-${IMX_PACKAGE_VERSION}-${TARGET_ARCH}" +IMX_PACKAGE_NAME_class-native = "${PN}-${IMX_PACKAGE_VERSION}-${BUILD_ARCH}" +IMX_PACKAGE_NAME_class-nativesdk = "${PN}-${IMX_PACKAGE_VERSION}-${BUILD_ARCH}" + +# The variable SRC_URI_NAME gives a unique SRC_URI name option for use in +# unpacking recipes derived from fsl-eula-unpack2.bbclass. With this name, +# a single unpacking recipe can handle all possible archives. The name is +# built from with a combination of target or native architecture, +# ${TARGET_ARCH} or ${BUILD_ARCH}, and a native or nativesdk designation. +SRC_URI_NAME = "${TARGET_ARCH}" +SRC_URI_NAME_class-native = "${BUILD_ARCH}-native" +SRC_URI_NAME_class-nativesdk = "${BUILD_ARCH}-nativesdk"