mirror of
https://github.com/lingble/meta-tegra.git
synced 2025-11-01 12:57:53 +00:00
Make an x11-base image buildable using the NVIDIA-provided
libraries.
This commit is contained in:
@@ -32,3 +32,11 @@ GCCVERSION = "4.9%"
|
|||||||
|
|
||||||
OLDEST_KERNEL_aarch64 = "3.10"
|
OLDEST_KERNEL_aarch64 = "3.10"
|
||||||
PREFERRED_VERSION_linux-libc-headers = "3.16"
|
PREFERRED_VERSION_linux-libc-headers = "3.16"
|
||||||
|
|
||||||
|
PREFERRED_PROVIDER_virtual/libgl = "tegra-libraries"
|
||||||
|
PREFERRED_PROVIDER_virtual/libegl = "tegra-libraries"
|
||||||
|
PREFERRED_PROVIDER_virtual/libgles1 = "tegra-libraries"
|
||||||
|
PREFERRED_PROVIDER_virtual/libgles2 = "tegra-libraries"
|
||||||
|
|
||||||
|
PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
|
||||||
|
XSERVER = "xserver-xorg xf86-input-evdev xserver-xorg-video-nvidia xserver-xorg-module-libwfb"
|
||||||
|
|||||||
12
recipes-bsp/tegra-binaries/files/xorg.conf
Normal file
12
recipes-bsp/tegra-binaries/files/xorg.conf
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# Disable extensions not useful on Tegra.
|
||||||
|
Section "Module"
|
||||||
|
Disable "dri"
|
||||||
|
SubSectionSub "extmod"
|
||||||
|
Option "omit xfree86-dga"
|
||||||
|
EndSubSection
|
||||||
|
EndSection
|
||||||
|
|
||||||
|
Section "Device"
|
||||||
|
Identifier "Tegra0"
|
||||||
|
Driver "nvidia"
|
||||||
|
EndSection
|
||||||
@@ -3,6 +3,11 @@ require tegra-shared-binaries.inc
|
|||||||
|
|
||||||
COMPATIBLE_HOST = "(arm.*)"
|
COMPATIBLE_HOST = "(arm.*)"
|
||||||
|
|
||||||
|
DEPENDS = "\
|
||||||
|
gstreamer1.0-plugins-base \
|
||||||
|
${@bb.utils.contains('DISTRO_FEATURES', ['x11', 'alsa'], 'virtual/libx11 alsa-lib', '', d)} \
|
||||||
|
"
|
||||||
|
|
||||||
do_configure() {
|
do_configure() {
|
||||||
tar -C ${B} -x -f ${S}/nv_tegra/nv_sample_apps/nvgstapps.tbz2
|
tar -C ${B} -x -f ${S}/nv_tegra/nv_sample_apps/nvgstapps.tbz2
|
||||||
}
|
}
|
||||||
@@ -11,7 +16,7 @@ do_compile[noexec] = "1"
|
|||||||
|
|
||||||
LIBROOT = "${B}/usr/lib/arm-linux-gnueabihf"
|
LIBROOT = "${B}/usr/lib/arm-linux-gnueabihf"
|
||||||
|
|
||||||
NVGSTPLAYER = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'nvgstplayer', '', d)}"
|
NVGSTPLAYER = "${@bb.utils.contains('DISTRO_FEATURES', ['x11', 'alsa'], 'nvgstplayer', '', d)}"
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
install -d ${D}${bindir}
|
install -d ${D}${bindir}
|
||||||
@@ -29,10 +34,11 @@ do_install() {
|
|||||||
|
|
||||||
PACKAGES = "nvgstcapture ${NVGSTPLAYER} ${PN}"
|
PACKAGES = "nvgstcapture ${NVGSTPLAYER} ${PN}"
|
||||||
FILES_nvgstcapture = "${bindir}/nvgstcapture-1.0"
|
FILES_nvgstcapture = "${bindir}/nvgstcapture-1.0"
|
||||||
RDEPENDS_nvcapture = "${PN}"
|
RDEPENDS_nvgstcapture = "${PN} libgstpbutils-1.0"
|
||||||
FILES_nvgstplayer = "${bindir}/nvgstplayer-1.0"
|
FILES_nvgstplayer = "${bindir}/nvgstplayer-1.0"
|
||||||
RDEPENDS_nvgstplayer = "${PN} virtual/libx11"
|
RDEPENDS_nvgstplayer = "${PN}"
|
||||||
FILES_${PN} = "${libdir}"
|
FILES_${PN} = "${libdir}"
|
||||||
|
DEBIAN_NOAUTONAME_${PN} = "1"
|
||||||
|
|
||||||
INHIBIT_PACKAGE_STRIP = "1"
|
INHIBIT_PACKAGE_STRIP = "1"
|
||||||
INHIBIT_SYSROOT_STRIP = "1"
|
INHIBIT_SYSROOT_STRIP = "1"
|
||||||
@@ -41,4 +47,4 @@ INSANE_SKIP_${PN} = "dev-so ldflags build-deps"
|
|||||||
INSANE_SKIP_${PN}-dev = "ldflags build-deps"
|
INSANE_SKIP_${PN}-dev = "ldflags build-deps"
|
||||||
INSANE_SKIP_${MLPREFIX}nvgstcapture = "ldflags build-deps"
|
INSANE_SKIP_${MLPREFIX}nvgstcapture = "ldflags build-deps"
|
||||||
INSANE_SKIP_${MLPREFIX}nvgstplayer = "ldflags build-deps"
|
INSANE_SKIP_${MLPREFIX}nvgstplayer = "ldflags build-deps"
|
||||||
DEPENDS_${PN} = "gstreamer1.0 gstreamer1.0-plugins-good-jpeg"
|
RDEPENDS_${PN} = "gstreamer1.0 gstreamer1.0-plugins-good-jpeg tegra-libraries"
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ LIC_FILES_CHKSUM = "file://nv_tegra/LICENSE;md5=60ad17cc726658e8cf73578bea47b85f
|
|||||||
SRC_URI = "http://developer.download.nvidia.com/embedded/L4T/r23_Release_v1.0/Tegra210_Linux_R${PV}_armhf.tbz2"
|
SRC_URI = "http://developer.download.nvidia.com/embedded/L4T/r23_Release_v1.0/Tegra210_Linux_R${PV}_armhf.tbz2"
|
||||||
SRC_URI[md5sum] = "4773c4aff47f464f0a6eb2a8342b05e7"
|
SRC_URI[md5sum] = "4773c4aff47f464f0a6eb2a8342b05e7"
|
||||||
SRC_URI[sha256sum] = "aacb0b1e9571df43621a6fd32101f8f52f9387ecb84e96930fb5682a68676c15"
|
SRC_URI[sha256sum] = "aacb0b1e9571df43621a6fd32101f8f52f9387ecb84e96930fb5682a68676c15"
|
||||||
|
SRC_URI += "file://xorg.conf"
|
||||||
|
|
||||||
S = "${TMPDIR}/work-shared/tegra-binaries-${PV}-${PR}/Linux_for_Tegra"
|
S = "${TMPDIR}/work-shared/tegra-binaries-${PV}-${PR}/Linux_for_Tegra"
|
||||||
B = "${WORKDIR}/build"
|
B = "${WORKDIR}/build"
|
||||||
|
|||||||
@@ -26,6 +26,6 @@ deltask do_packagedata
|
|||||||
deltask do_rm_work
|
deltask do_rm_work
|
||||||
|
|
||||||
do_preconfigure() {
|
do_preconfigure() {
|
||||||
:
|
cp ${WORKDIR}/xorg.conf ${S}
|
||||||
}
|
}
|
||||||
addtask preconfigure after do_patch
|
addtask preconfigure after do_patch
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ require tegra-shared-binaries.inc
|
|||||||
|
|
||||||
COMPATIBLE_HOST = "(arm.*)"
|
COMPATIBLE_HOST = "(arm.*)"
|
||||||
|
|
||||||
|
DEPENDS = "mesa"
|
||||||
|
|
||||||
do_configure() {
|
do_configure() {
|
||||||
tar -C ${B} -x -f ${S}/nv_tegra/nvidia_drivers.tbz2 usr/lib
|
tar -C ${B} -x -f ${S}/nv_tegra/nvidia_drivers.tbz2 usr/lib
|
||||||
}
|
}
|
||||||
@@ -26,34 +28,12 @@ do_install() {
|
|||||||
ln -sf libGLESv2.so.2 ${D}${libdir}/libGLESv2.so
|
ln -sf libGLESv2.so.2 ${D}${libdir}/libGLESv2.so
|
||||||
}
|
}
|
||||||
|
|
||||||
python __anonymous() {
|
PACKAGES = "${PN}"
|
||||||
for p in (("libegl", "libegl1"), ("libgl", "libgl1"),
|
PROVIDES += "virtual/libgl virtual/libgles1 virtual/libgles2 virtual/egl"
|
||||||
("libgles1", "libglesv1-cm1"), ("libgles2", "libglesv2-2")):
|
|
||||||
fullp = p[0] + "-tegra"
|
|
||||||
pkgs = " ".join(p)
|
|
||||||
d.setVar("DEBIAN_NOAUTONAME_" + fullp, "1")
|
|
||||||
d.appendVar("RREPLACES_" + fullp, pkgs)
|
|
||||||
d.appendVar("RPROVIDES_" + fullp, pkgs)
|
|
||||||
d.appendVar("RCONFLICTS_" + fullp, pkgs)
|
|
||||||
|
|
||||||
# For -dev, the first element is both the Debian and original name
|
FILES_${PN} = "${libdir}"
|
||||||
fullp += "-dev"
|
|
||||||
pkgs = p[0] + "-dev"
|
|
||||||
d.setVar("DEBIAN_NOAUTONAME_" + fullp, "1")
|
|
||||||
d.appendVar("RREPLACES_" + fullp, pkgs)
|
|
||||||
d.appendVar("RPROVIDES_" + fullp, pkgs)
|
|
||||||
d.appendVar("RCONFLICTS_" + fullp, pkgs)
|
|
||||||
}
|
|
||||||
|
|
||||||
PACKAGES = "libegl-tegra libgl-tegra libgles1-tegra libgles2-tegra \
|
INSANE_SKIP_${PN} = "dev-so textrel ldflags build-deps"
|
||||||
libegl-tegra-dev libgl-tegra-dev libgles1-tegra-dev libgles2-tegra-dev ${PN}"
|
INHIBIT_PACKAGE_STRIP = "1"
|
||||||
FILES_libegl-tegra = "${libdir}/libEGL${SOLIBS}"
|
INHIBIT_SYSROOT_STRIP = "1"
|
||||||
FILES_libegl-tegra-dev = "${libdir}/libEGL${SOLIBSDEV}"
|
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
|
||||||
FILES_libgl-tegra = "${libdir}/libGL${SOLIBS}"
|
|
||||||
FILES_libgl-tegra-dev = "${libdir}/libGL${SOLIBSDEV}"
|
|
||||||
FILES_libgles1-tegra = "${libdir}/libGLESv1*${SOLIBS}"
|
|
||||||
FILES_libgles1-tegra-dev = "${libdir}/libGLESv1*${SOLIBSDEV}"
|
|
||||||
FILES_libgles2-tegra = "${libdir}/libGLESv2*${SOLIBS}"
|
|
||||||
FILES_libgles2-tegra-dev = "${libdir}/libGLESv2*${SOLIBSDEV}"
|
|
||||||
|
|
||||||
INSANE_SKIP_${PN} = "dev-so"
|
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
require tegra-binaries-${PV}.inc
|
||||||
|
require tegra-shared-binaries.inc
|
||||||
|
|
||||||
|
COMPATIBLE_HOST = "(arm.*)"
|
||||||
|
|
||||||
|
do_configure() {
|
||||||
|
tar -C ${B} -x -f ${S}/nv_tegra/nvidia_drivers.tbz2 usr/lib/xorg
|
||||||
|
}
|
||||||
|
|
||||||
|
do_compile[noexec] = "1"
|
||||||
|
|
||||||
|
DRVROOT = "${B}/usr/lib/xorg/modules"
|
||||||
|
|
||||||
|
do_install() {
|
||||||
|
install -d ${D}${libdir}/xorg/modules/drivers
|
||||||
|
install -m 0644 ${DRVROOT}/drivers/nvidia_drv.so ${D}${libdir}/xorg/modules/drivers/
|
||||||
|
install -d ${D}${libdir}/xorg/modules/extensions
|
||||||
|
install -m 0644 ${DRVROOT}/extensions/libglx.so ${D}${libdir}/xorg/modules/extensions/
|
||||||
|
install -d ${D}${datadir}/X11/xorg.conf.d
|
||||||
|
install -m 0644 ${S}/xorg.conf ${D}${datadir}/X11/xorg.conf.d/00-tegra-xorg.conf
|
||||||
|
}
|
||||||
|
|
||||||
|
PACKAGES = "${PN}"
|
||||||
|
RDEPENDS_${PN} = "tegra-libraries"
|
||||||
|
FILES_${PN} = "${libdir} ${datadir}"
|
||||||
|
RPROVIDES_${PN} += "xserver-xorg-extension-glx"
|
||||||
|
RCONFLICTS_${PN} = "xserver-xorg-extension-glx"
|
||||||
|
|
||||||
|
INSANE_SKIP_${PN} = "dev-so textrel ldflags xorg-driver-abi"
|
||||||
|
INHIBIT_PACKAGE_STRIP = "1"
|
||||||
|
INHIBIT_SYSROOT_STRIP = "1"
|
||||||
|
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
|
||||||
1
recipes-graphics/cairo/cairo_%.bbappend
Normal file
1
recipes-graphics/cairo/cairo_%.bbappend
Normal file
@@ -0,0 +1 @@
|
|||||||
|
PACKAGECONFIG_append_jetson-tx1 = " egl glesv2"
|
||||||
2
recipes-graphics/mesa/mesa-gl_%.bbappend
Normal file
2
recipes-graphics/mesa/mesa-gl_%.bbappend
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
COMPATIBLE_MACHINE_jetson-tx1 = "(-)"
|
||||||
|
|
||||||
17
recipes-graphics/mesa/mesa_%.bbappend
Normal file
17
recipes-graphics/mesa/mesa_%.bbappend
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
PROVIDES_remove_jetson-tx1 = "virtual/libgl virtual/libgles1 virtual/libgles2 virtual/libopenvg virtual/egl"
|
||||||
|
|
||||||
|
python () {
|
||||||
|
overrides = d.getVar("OVERRIDES", True).split(":")
|
||||||
|
if "jetson-tx1" not in overrides:
|
||||||
|
return
|
||||||
|
|
||||||
|
extra_oeconf = d.getVar("EXTRA_OECONF", True)
|
||||||
|
extra_oeconf = extra_oeconf.replace("--enable-glx-tls", "--enable-glx")
|
||||||
|
d.setVar("EXTRA_OECONF", extra_oeconf)
|
||||||
|
}
|
||||||
|
|
||||||
|
do_install_append_jetson-tx1() {
|
||||||
|
rm -f ${D}${libdir}/libGL.*
|
||||||
|
rm -f ${D}${libdir}/libGLES*
|
||||||
|
rm -f ${D}${libdir}/libEGL.*
|
||||||
|
}
|
||||||
4
recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend
Normal file
4
recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
PACKAGECONFIG_append_jetson-tx1 = " xinerama"
|
||||||
|
do_install_append_jetson-tx1() {
|
||||||
|
rm -f ${D}${libdir}/xorg/modules/extensions/libglx.so
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user