classes: add some required NXP classes

These are required for the imx-m4-demos. The classes exist in
meta-fsl-bsp-release but will eventually be moved to meta-freescale
so, presumably, they could be removed in the future.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
This commit is contained in:
Hector Palacios 2018-06-26 13:19:10 +02:00
parent de348c37c9
commit 59d1d37c2f
2 changed files with 62 additions and 0 deletions

View File

@ -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} = "/"

View File

@ -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"