aboutsummaryrefslogtreecommitdiffstats
path: root/package/utils
diff options
context:
space:
mode:
Diffstat (limited to 'package/utils')
-rw-r--r--package/utils/brcm2708-userland/Makefile64
-rw-r--r--package/utils/brcm2708-userland/patches/001-interface-vcms_host-cmake-fixes.patch11
2 files changed, 75 insertions, 0 deletions
diff --git a/package/utils/brcm2708-userland/Makefile b/package/utils/brcm2708-userland/Makefile
new file mode 100644
index 0000000000..7fea952974
--- /dev/null
+++ b/package/utils/brcm2708-userland/Makefile
@@ -0,0 +1,64 @@
+#
+# Copyright (C) 2019 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=brcm2708-userland
+PKG_VERSION:=42ec119e03eb8dffc7c83e2ac0e665e333abbef6
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/raspberrypi/userland/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=cb0f1d653fdb9975783f30359277d9de2868607381e081796eac68745e3e8324
+
+PKG_FLAGS:=nonshared
+
+PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
+
+CMAKE_INSTALL:=1
+CMAKE_OPTIONS+=-DVMCS_INSTALL_PREFIX=/usr
+
+ifeq ($(ARCH),aarch64)
+ CMAKE_OPTIONS+=-DARM64=ON
+else
+ CMAKE_OPTIONS+=-DARM64=OFF
+endif
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+TAR_OPTIONS:=--strip-components 1 $(TAR_OPTIONS)
+TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
+
+define Package/brcm2708-userland
+ SECTION:=utils
+ CATEGORY:=Utilities
+ DEPENDS:=@TARGET_brcm2708
+ TITLE:=BCM2708 userland tools
+ DEFAULT:=y if TARGET_brcm2708
+endef
+
+define Package/brcm2708-userland/description
+ BCM2708 userland tools including vcgencmd and tvservice.
+endef
+
+define Package/brcm2708-userland/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dtparam $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dtoverlay $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tvservice $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vcgencmd $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vcmailbox $(1)/usr/bin
+
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/ $(1)/usr/
+
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/ $(1)/usr/
+endef
+
+$(eval $(call BuildPackage,brcm2708-userland))
diff --git a/package/utils/brcm2708-userland/patches/001-interface-vcms_host-cmake-fixes.patch b/package/utils/brcm2708-userland/patches/001-interface-vcms_host-cmake-fixes.patch
new file mode 100644
index 0000000000..cb73512af9
--- /dev/null
+++ b/package/utils/brcm2708-userland/patches/001-interface-vcms_host-cmake-fixes.patch
@@ -0,0 +1,11 @@
+--- a/interface/vmcs_host/CMakeLists.txt
++++ b/interface/vmcs_host/CMakeLists.txt
+@@ -24,7 +24,7 @@ if(NOT ARM64)
+
+ # ILCS pulls in EGL for the ILCS/EGL surface API support
+ target_link_libraries(vcilcs brcmEGL brcmGLESv2 khrn_client vchiq_arm vcos)
+- set(INSTALL_TARGETS "${INSTALL_TARGETS} vcilcs")
++ set(INSTALL_TARGETS ${INSTALL_TARGETS} vcilcs)
+ endif()
+
+ # vchostif needs ilcore as well (vmcs_main pulls it in)