All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Hochstein <tom.hochstein@nxp.com>
To: meta-freescale@yoctoproject.org
Subject: [PATCH v3 20/43] fsl-eula: Extend EULA-based archive support
Date: Tue,  7 Aug 2018 10:42:12 -0500	[thread overview]
Message-ID: <1533656555-8038-21-git-send-email-tom.hochstein@nxp.com> (raw)
In-Reply-To: <1533656555-8038-1-git-send-email-tom.hochstein@nxp.com>

Define a common naming scheme and a common unpacking scheme.

Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
---
 classes/fsl-eula-graphics.bbclass |  9 +++++++++
 classes/fsl-eula-unpack2.bbclass  | 36 ++++++++++++++++++++++++++++++++++++
 classes/fsl-eula.bbclass          | 29 +++++++++++++++++++++++++++++
 3 files changed, 74 insertions(+)
 create mode 100644 classes/fsl-eula-graphics.bbclass
 create mode 100644 classes/fsl-eula-unpack2.bbclass
 create mode 100644 classes/fsl-eula.bbclass

diff --git a/classes/fsl-eula-graphics.bbclass b/classes/fsl-eula-graphics.bbclass
new file mode 100644
index 0000000..1feb7bb
--- /dev/null
+++ b/classes/fsl-eula-graphics.bbclass
@@ -0,0 +1,9 @@
+# fsl-eula-graphics.bbclass extends the naming scheme in fsl-eula.bbclass
+# to allow for graphics-backend-specific archives.
+IMX_PACKAGE_NAME_APPEND = ""
+IMX_PACKAGE_NAME_APPEND_class-target = \
+    "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '-wayland', \
+        bb.utils.contains('DISTRO_FEATURES',     'x11',     '-x11', \
+                                                             '-fb', d), d)}"
+IMX_PACKAGE_NAME_append_class-target = "${IMX_PACKAGE_NAME_APPEND}"
+SRC_URI_NAME_append_class-target     = "${IMX_PACKAGE_NAME_APPEND}"
diff --git a/classes/fsl-eula-unpack2.bbclass b/classes/fsl-eula-unpack2.bbclass
new file mode 100644
index 0000000..4bd7b86
--- /dev/null
+++ b/classes/fsl-eula-unpack2.bbclass
@@ -0,0 +1,36 @@
+# 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}
+    if [ -d "${D}/usr/lib" ] && [ "${D}/usr/lib" != "${D}${libdir}" ]; then
+        mv ${D}/usr/lib ${D}${libdir}
+    fi
+    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/classes/fsl-eula.bbclass b/classes/fsl-eula.bbclass
new file mode 100644
index 0000000..0e65ee8
--- /dev/null
+++ b/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                 = "${BPN}-${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"
-- 
2.7.4



  parent reply	other threads:[~2018-08-07 15:58 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-07 15:41 [PATCH v3 00/43] L4.9.88-2.2.0 recipes-bsp and recipes-graphics Tom Hochstein
2018-08-07 15:41 ` [PATCH v3 01/43] xserver-xorg: Update OpenGL configuration Tom Hochstein
2018-08-07 15:41 ` [PATCH v3 02/43] imx-gpu-g2d: Improve COMPATIBLE_MACHINE Tom Hochstein
2018-08-07 15:41 ` [PATCH v3 03/43] waffle: Configure for i.MX GPU Tom Hochstein
2018-08-07 15:41 ` [PATCH v3 04/43] weston: Fix non-GPU support Tom Hochstein
2018-09-07  8:05   ` [v3,04/43] " Gary Bisson
2018-09-07 11:41     ` Tom Hochstein
2018-09-07 12:19       ` Gary Bisson
2018-09-07 13:26         ` Tom Hochstein
2018-09-07 13:47           ` Gary Bisson
2018-08-07 15:41 ` [PATCH v3 05/43] wayland-protocols: Downgrade to 1.13 for i.MX Tom Hochstein
2018-09-10  8:12   ` Andreas Müller
2018-09-10 15:13     ` Tom Hochstein
2018-09-10 17:29       ` Andreas Müller
2018-08-07 15:41 ` [PATCH v3 06/43] wayland-protocols: Add HDR10 metadata and alpha compositing protocols Tom Hochstein
2018-08-07 15:41 ` [PATCH v3 07/43] EULA: Update to v24 Tom Hochstein
2018-08-07 15:42 ` [PATCH v3 08/43] linux-imx: Add i.MX 8 support Tom Hochstein
2018-08-07 15:42 ` [PATCH v3 09/43] u-boot-imx: Add support for i.MX 8QM, 8MQ, and 8QXP Tom Hochstein
2018-08-07 15:42 ` [PATCH v3 10/43] machine: " Tom Hochstein
2018-08-07 15:42 ` [PATCH v3 11/43] imx-dpu-g2d: Use machine override for compatibility Tom Hochstein
2018-08-07 15:42 ` [PATCH v3 12/43] kernel-module-imx-gpu-viv: Update to 6.2.4.p1.6 Tom Hochstein
2018-08-07 15:42 ` [PATCH v3 13/43] imx-gpu-viv: " Tom Hochstein
2018-08-07 15:42 ` [PATCH v3 14/43] imx-gpu-g2d: " Tom Hochstein
2018-08-07 15:42 ` [PATCH v3 15/43] imx-dpu-g2d: Update to 1.4.6 Tom Hochstein
2018-08-07 15:42 ` [PATCH v3 16/43] xf86-video-imx-vivante: Update to 6.2.4.p1.6 Tom Hochstein
2018-08-07 15:42 ` [PATCH v3 17/43] imx-gpu-viv: Remove wayland-egl files Tom Hochstein
2018-08-07 15:42 ` [PATCH v3 18/43] imx-gpu-viv: Add support for i.MX 8 and 8X families Tom Hochstein
2018-08-07 15:42 ` [PATCH v3 19/43] imx-gpu-viv: Add support for OpenCL and OpenVX Tom Hochstein
2018-08-07 15:42 ` Tom Hochstein [this message]
2018-08-07 15:42 ` [PATCH v3 21/43] u-boot-imx: Deploy tools on boot partition for i.MX 8MQ Tom Hochstein
2018-08-07 15:42 ` [PATCH v3 22/43] imx-atf: Add new package ARM Trusted Firmware Tom Hochstein
2018-08-07 15:42 ` [PATCH v3 23/43] imx-sc-firmware: Add new package System Controller Firmware Tom Hochstein
2018-08-07 15:42 ` [PATCH v3 24/43] imx-boot: Add recipes for i.MX 8 boot partition packages Tom Hochstein
2018-08-07 15:42 ` [PATCH v3 25/43] alsa-state: Fix buffer size issue Tom Hochstein
2018-08-07 15:42 ` [PATCH v3 26/43] alsa-state: Add support for splitting ESAI device Tom Hochstein
2018-08-07 15:42 ` [PATCH v3 27/43] alsa-state: Fix channel swap issues Tom Hochstein
2018-08-07 15:42 ` [PATCH v3 28/43] alsa-state: Fix HDMI for i.MX 8M Tom Hochstein
2018-08-07 15:42 ` [PATCH v3 29/43] alsa-state: Add new codecs " Tom Hochstein

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1533656555-8038-21-git-send-email-tom.hochstein@nxp.com \
    --to=tom.hochstein@nxp.com \
    --cc=meta-freescale@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.