source "package/nanocom/Config.in"
source "package/neard/Config.in"
source "package/nvidia-driver/Config.in"
+ source "package/nvidia-tegra23/Config.in"
source "package/ofono/Config.in"
source "package/ola/Config.in"
source "package/on2-8170-modules/Config.in"
--- /dev/null
+menuconfig BR2_PACKAGE_NVIDIA_TEGRA23
+ bool "nvidia-tegra23"
+ depends on BR2_cortex_a9
+ depends on BR2_ARM_EABIHF && BR2_TOOLCHAIN_USES_GLIBC
+ depends on BR2_PACKAGE_XORG7
+ depends on BR2_PACKAGE_XSERVER_XORG_SERVER_VIDEODRV_ABI_14
+ help
+ Install NVidia proprietary blobs to drive Tegra2 or Tegra3
+ GPUs found in some mobile-targeted ARM SoCs.
+
+if BR2_PACKAGE_NVIDIA_TEGRA23
+
+choice
+ prompt "Tegra platform"
+ help
+ Select the SOC platform.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_TEGRA2
+ bool "Tegra 2"
+ help
+ NVIDIA Tegra 2 is a dual-core Cortex-A9 without NEON.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_TEGRA3
+ bool "Tegra 3"
+ depends on BR2_ARM_CPU_HAS_NEON
+ help
+ NVIDIA Tegra 3 is a quad-core Cortex-A9 with NEON.
+
+endchoice
+
+source "package/nvidia-tegra23/nvidia-tegra23-binaries/Config.in"
+endif
+
+comment "nvidia-tegra23 needs Xorg <= 1.14 and a (e)glibc toolchain w/ EABIhf"
+ depends on BR2_cortex_a9
+ depends on !BR2_ARM_EABIHF || !BR2_TOOLCHAIN_USES_GLIBC \
+ || !BR2_PACKAGE_XORG7 || !BR2_PACKAGE_XSERVER_XORG_SERVER_VIDEODRV_ABI_14
--- /dev/null
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES
+ bool "nvidia-tegra23 binaries"
+ select BR2_PACKAGE_MESA3D_HEADERS
+ select BR2_PACKAGE_XLIB_LIBX11
+ select BR2_PACKAGE_XLIB_LIBXEXT
+ select BR2_PACKAGE_HAS_LIBEGL
+ select BR2_PACKAGE_HAS_LIBGLES
+ select BR2_PACKAGE_HAS_LIBOPENMAX
+ help
+ Those packages provide libraries, drivers and firmware that comes from
+ NVIDIA Linux For Tegra.
+
+ https://developer.nvidia.com/linux-tegra
+
+if BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES
+
+config BR2_PACKAGE_PROVIDES_LIBEGL
+ default "nvidia-tegra23-binaries"
+
+config BR2_PACKAGE_PROVIDES_LIBGLES
+ default "nvidia-tegra23-binaries"
+
+config BR2_PACKAGE_PROVIDES_LIBOPENMAX
+ default "nvidia-tegra23-binaries"
+
+endif
--- /dev/null
+prefix=/usr
+exec_prefix=${prefix}
+libdir=/usr/lib
+includedir=/usr/include
+
+Name: egl
+Description: EGL implementation
+Version: 1
+Cflags: -I${includedir}/EGL
+Libs: -L${libdir} -lEGL
--- /dev/null
+prefix=/usr
+exec_prefix=${prefix}
+libdir=/usr/lib
+includedir=/usr/include
+
+Name: glesv2
+Description: OpenGL ES 1.1 implementation
+Version: 1.1
+Cflags: -I${includedir}/GLES
+Libs: -L${libdir} -lGLESv1_CM
--- /dev/null
+prefix=/usr
+exec_prefix=${prefix}
+libdir=/usr/lib
+includedir=/usr/include
+
+Name: glesv2
+Description: OpenGL ES 2 implementation
+Version: 2
+Cflags: -I${includedir}/GLESv2
+Libs: -L${libdir} -lGLESv2
--- /dev/null
+# From https://developer.nvidia.com/linux-tegra-rel-16
+sha1 295dcd63b2f122c2d99f07fcc083db9adb8ac178 Tegra20_Linux_R16.5_armhf.tbz2
+sha1 6be645c20d81d518856bc8520ef4c2472d57eaef Tegra30_Linux_R16.5_armhf.tbz2
--- /dev/null
+################################################################################
+#
+# nvidia-tegra23-binaries
+#
+################################################################################
+
+NVIDIA_TEGRA23_BINARIES_VERSION = $(NVIDIA_TEGRA23_VERSION)
+NVIDIA_TEGRA23_BINARIES_SITE = $(NVIDIA_TEGRA23_SITE)
+NVIDIA_TEGRA23_BINARIES_SOURCE = $(NVIDIA_TEGRA23_BASE)_R$(NVIDIA_TEGRA23_BINARIES_VERSION)_armhf.tbz2
+
+NVIDIA_TEGRA23_BINARIES_LICENSE = License For Customer Use of NVIDIA Software
+NVIDIA_TEGRA23_BINARIES_LICENSE_FILES = nv_tegra/LICENSE
+
+NVIDIA_TEGRA23_BINARIES_INSTALL_STAGING = YES
+
+# Those are not really needed to build nvidia-tegra23-binaries, but
+# will be needed by packages who link against libraries provided by
+# nvidia-tegra23-binaries.
+
+NVIDIA_TEGRA23_BINARIES_DEPENDENCIES = mesa3d-headers \
+ xlib_libX11 xlib_libXext
+
+NVIDIA_TEGRA23_BINARIES_PROVIDES = libegl libgles libopenmax
+
+NVIDIA_TEGRA23_BINARIES_DRV = \
+ nv_tegra/nvidia_drivers/usr/lib/xorg/modules/drivers/tegra_drv.abi$(BR2_PACKAGE_XSERVER_XORG_SERVER_VIDEODRV_ABI).so
+
+define NVIDIA_TEGRA23_BINARIES_EXTRACT_FURTHER
+ $(INSTALL) -d $(@D)/nv_tegra/nvidia_drivers
+ $(call suitable-extractor,$(@D)/nv_tegra/nvidia_drivers.tbz2) \
+ $(@D)/nv_tegra/nvidia_drivers.tbz2 | \
+ $(TAR) $(TAR_STRIP_COMPONENTS)=0 -C $(@D)/nv_tegra/nvidia_drivers/ $(TAR_OPTIONS) -
+ $(INSTALL) -d $(@D)/nv_tegra/nv_sample_apps/nvgstapps
+ $(call suitable-extractor,$(@D)/nv_tegra/nv_sample_apps/nvgstapps.tbz2) \
+ $(@D)/nv_tegra/nv_sample_apps/nvgstapps.tbz2 | \
+ $(TAR) $(TAR_STRIP_COMPONENTS)=0 -C $(@D)/nv_tegra/nv_sample_apps/nvgstapps/ $(TAR_OPTIONS) -
+endef
+NVIDIA_TEGRA23_BINARIES_POST_EXTRACT_HOOKS += NVIDIA_TEGRA23_BINARIES_EXTRACT_FURTHER
+
+define NVIDIA_TEGRA23_BINARIES_INSTALL_LIBS
+ mkdir -p $(1)/usr/lib
+ cp -dpfr $(@D)/nv_tegra/nvidia_drivers/usr/lib/*.so $(1)/usr/lib/
+ (cd $(1)/usr/lib; \
+ ln -sf libGLESv2.so.2 libGLESv2.so; \
+ ln -sf libGLESv1_CM.so.1 libGLESv1_CM.so; \
+ ln -sf libEGL.so.1 libEGL.so \
+ )
+endef
+
+define NVIDIA_TEGRA23_BINARIES_INSTALL_STAGING_CMDS
+ $(call NVIDIA_TEGRA23_BINARIES_INSTALL_LIBS,$(STAGING_DIR))
+ mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig/
+ cp -dpfr package/nvidia-tegra23/nvidia-tegra23-binaries/*.pc \
+ $(STAGING_DIR)/usr/lib/pkgconfig/
+endef
+
+define NVIDIA_TEGRA23_BINARIES_INSTALL_TARGET_CMDS
+ $(call NVIDIA_TEGRA23_BINARIES_INSTALL_LIBS,$(TARGET_DIR))
+ mkdir -p $(TARGET_DIR)/lib/firmware/
+ cp -dpfr $(@D)/nv_tegra/nvidia_drivers/lib/firmware/*.bin \
+ $(TARGET_DIR)/lib/firmware/
+ $(INSTALL) -D -m 0644 $(@D)/nv_tegra/nvidia_drivers/etc/nv_tegra_release \
+ $(TARGET_DIR)/etc/nv_tegra_release
+ $(INSTALL) -D -m 0644 $(@D)/$(NVIDIA_TEGRA23_BINARIES_DRV) \
+ $(TARGET_DIR)/usr/lib/xorg/modules/drivers/tegra_drv.so
+endef
+
+$(eval $(generic-package))
--- /dev/null
+################################################################################
+#
+# nvidia-tegra23
+#
+################################################################################
+
+NVIDIA_TEGRA23_VERSION = 16.5
+
+ifeq ($(BR2_PACKAGE_NVIDIA_TEGRA23_TEGRA2),y)
+NVIDIA_TEGRA23_SITE = http://developer.download.nvidia.com/mobile/tegra/l4t/r16.5.0/ventana_release_armhf
+NVIDIA_TEGRA23_BASE = Tegra20_Linux
+endif
+ifeq ($(BR2_PACKAGE_NVIDIA_TEGRA23_TEGRA3),y)
+NVIDIA_TEGRA23_SITE = http://developer.download.nvidia.com/mobile/tegra/l4t/r16.5.0/cardhu_release_armhf
+NVIDIA_TEGRA23_BASE = Tegra30_Linux
+endif
+
+include $(sort $(wildcard package/nvidia-tegra23/*/*.mk))