2 # Copyright (C) 2019-2020 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
10 PKG_NAME:=bcm27xx-userland
11 PKG_VERSION:=f4bccc38f9d0a740aeb7818d33ca1fd551e325de
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://codeload.github.com/raspberrypi/userland/tar.gz/$(PKG_VERSION)?
16 PKG_HASH:=3a4ea8788809bf889da9fe61759e4f8daafab3444264c011db9c6b25237fd044
20 PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
23 CMAKE_OPTIONS+=-DVMCS_INSTALL_PREFIX=/usr
25 ifeq ($(ARCH),aarch64)
26 CMAKE_OPTIONS+=-DARM64=ON
28 CMAKE_OPTIONS+=-DARM64=OFF
31 include $(INCLUDE_DIR)/package.mk
32 include $(INCLUDE_DIR)/cmake.mk
34 TAR_OPTIONS:=--strip-components 1 $(TAR_OPTIONS)
35 TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
37 define Package/bcm27xx-userland
40 DEPENDS:=@TARGET_bcm27xx
41 TITLE:=BCM27xx userland tools
42 DEFAULT:=y if TARGET_bcm27xx
45 define Package/bcm27xx-userland/description
46 BCM27xx userland tools including vcgencmd and tvservice.
49 define Package/bcm27xx-userland/install
50 $(INSTALL_DIR) $(1)/usr/bin
51 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dtmerge $(1)/usr/bin
52 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dtparam $(1)/usr/bin
53 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dtoverlay $(1)/usr/bin
54 ifneq ($(ARCH),aarch64)
55 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/raspistill $(1)/usr/bin
56 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/raspivid $(1)/usr/bin
57 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/raspividyuv $(1)/usr/bin
58 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/raspiyuv $(1)/usr/bin
60 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tvservice $(1)/usr/bin
61 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vcgencmd $(1)/usr/bin
62 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vcmailbox $(1)/usr/bin
64 $(INSTALL_DIR) $(1)/usr/include
65 $(CP) $(PKG_INSTALL_DIR)/usr/include/ $(1)/usr/
67 $(INSTALL_DIR) $(1)/usr/lib
68 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ $(1)/usr/
71 $(eval $(call BuildPackage,bcm27xx-userland))