Platform

The main Radix cross Linux repository contains build scripts of the GNU/Linux distribution.

809 Commits   5 Branches   3 Tags   |
   278         kx 
   278         kx COMPONENT_TARGETS  = $(HARDWARE_CI20)
   278         kx 
   278         kx 
   278         kx NEED_ABS_PATH      = true
   278         kx COMPONENT_IS_3PP   = true
   278         kx 
   278         kx 
   278         kx include ../../../../build-system/constants.mk
   278         kx 
   278         kx 
   278         kx SOURCE_REQUIRES    = sources/hal/PowerVR/ci20/sgx-ddk/3.18
   278         kx 
   278         kx ifeq ($(__USE_BUILT_GCC_LIBS__),yes)
   671         kx REQUIRES           = dev/gcc/5.4.0
   278         kx endif
   278         kx REQUIRES          += hal/drivers/ci20/sgx-ddk/3.18/1.14.3759903
   564         kx REQUIRES          += X11/libs/mesa/11.2.2
   278         kx REQUIRES          += X11/X.org/lib/libXext/1.3.3
   278         kx REQUIRES          += X11/X.org/lib/libXfixes/5.0.1
   278         kx 
   278         kx # ======= __END_OF_REQUIRES__ =======
   278         kx 
   278         kx 
   278         kx version            = 1.14.3759903
   278         kx tar_xz_archive     = $(SRC_PACKAGE_PATH)/hal/PowerVR/ci20/sgx-ddk/3.18/ci20-sgx-um-$(version).tar.xz
   278         kx SRC_ARCHIVE        = $(tar_xz_archive)
   278         kx SRC_DIR            = $(TARGET_BUILD_DIR)/ci20-sgx-um-$(version)
   278         kx src_dir_name       = ci20-sgx-um-$(version)
   278         kx doc_dir_name       = ci20-sgx-um-$(version)
   278         kx src_done           = $(TARGET_BUILD_DIR)/.source_done
   278         kx 
   278         kx license            = $(CURDIR)/license/COPYING
   278         kx pkgconfigs_dir     = $(CURDIR)/pkgconfigs
   278         kx scripts            = $(CURDIR)/etc
   278         kx 
   278         kx PATCHES = PATCHES
   278         kx 
   278         kx install_target     = $(TARGET_BUILD_DIR)/.install_done
   278         kx 
   278         kx 
   278         kx ####### Targets
   278         kx 
   278         kx PKG_GROUP = xlibs
   278         kx 
   278         kx #
   278         kx # *PKG_NAME & *PKG_VERSION shouldn't be a reference to value.
   278         kx #
   278         kx XORG_PKG_NAME                = ci20-sgx-um
   278         kx XORG_PKG_VERSION             = 1.14.3759903
   278         kx XORG_PKG_ARCH                = $(TOOLCHAIN)
   278         kx XORG_PKG_DISTRO_NAME         = $(DISTRO_NAME)
   278         kx XORG_PKG_DISTRO_VERSION      = $(DISTRO_VERSION)
   278         kx XORG_PKG_GROUP               = $(PKG_GROUP)
   278         kx ###                           |---handy-ruler-------------------------------|
   278         kx XORG_PKG_SHORT_DESCRIPTION   = PowerVR userspace drivers for X11
   278         kx XORG_PKG_URL                 = $(BUG_URL)
   278         kx XORG_PKG_LICENSE             = custom
   278         kx XORG_PKG_DESCRIPTION_FILE    = $(TARGET_BUILD_DIR)/$(XORG_PKG_NAME)-pkg-description
   278         kx XORG_PKG_DESCRIPTION_FILE_IN = $(XORG_PKG_NAME)-pkg-description.in
   278         kx XORG_PKG_INSTALL_SCRIPT      = $(XORG_PKG_NAME)-pkg-install.sh
   278         kx 
   278         kx XORG_PKG         = $(CURDIR)/$(TARGET_BUILD_DIR)/$(XORG_PKG_NAME)-package
   278         kx 
   278         kx pkg_basename     = $(XORG_PKG_NAME)-$(XORG_PKG_VERSION)-$(XORG_PKG_ARCH)-$(XORG_PKG_DISTRO_NAME)-$(XORG_PKG_DISTRO_VERSION)
   278         kx 
   278         kx pkg_archive      = $(TARGET_BUILD_DIR)/$(PKG_GROUP)/$(pkg_basename).$(pkg_arch_suffix)
   278         kx pkg_signature    = $(call sign-name,$(pkg_archive))
   278         kx pkg_description  = $(call desc-name,$(pkg_archive))
   278         kx products         = $(call pkg-files,$(pkg_archive))
   278         kx 
   278         kx BUILD_TARGETS    = $(build_target)
   278         kx BUILD_TARGETS   += $(install_target)
   278         kx 
   278         kx PRODUCT_TARGETS  = $(products)
   278         kx 
   278         kx ROOTFS_TARGETS   = $(pkg_archive)
   278         kx 
   278         kx 
   278         kx include ../../../../build-system/core.mk
   278         kx 
   278         kx 
   278         kx TARGET_BIN_RPATH = /lib$(LIBSUFFIX):/usr/lib$(LIBSUFFIX)
   278         kx TARGET_LIB_RPATH = /lib$(LIBSUFFIX):/usr/lib$(LIBSUFFIX)
   278         kx 
   278         kx 
   278         kx ####### Dependencies
   278         kx 
   278         kx $(src_done): $(SRC_ARCHIVE) $(PATCHES_DEP)
   278         kx 	$(UNPACK_SRC_ARCHIVE)
   278         kx 	$(APPLY_PATCHES)
   278         kx 	@touch $@
   278         kx 
   278         kx $(install_target): $(src_done)
   278         kx 	@mkdir -p $(XORG_PKG)
   278         kx 	# ======= Install MIPS Creator CI20 PowerVR DDK UM =======
   278         kx 	@mkdir -p $(XORG_PKG)/usr/lib$(LIBSUFFIX)
   278         kx 	@( cd $(SRC_DIR) ; \
   278         kx 	   cp -a usr $(XORG_PKG) ; \
   278         kx 	 )
   278         kx 	@mkdir -p $(XORG_PKG)/etc/skel
   278         kx 	@cp -a $(SRC_DIR)/etc/skel/Desktop $(XORG_PKG)/etc/skel
   278         kx 	# ======= Install pkg-config *.pc files to the target destination for development =======
   278         kx 	@mkdir -p $(XORG_PKG)/usr/lib$(LIBSUFFIX)/pkgconfig
   278         kx 	@cp -a $(pkgconfigs_dir)/egl.pc       $(XORG_PKG)/usr/lib$(LIBSUFFIX)/pkgconfig
   278         kx 	@cp -a $(pkgconfigs_dir)/glesv1_cm.pc $(XORG_PKG)/usr/lib$(LIBSUFFIX)/pkgconfig
   278         kx 	@cp -a $(pkgconfigs_dir)/glesv2.pc    $(XORG_PKG)/usr/lib$(LIBSUFFIX)/pkgconfig
   278         kx 	# ======= Install Scripts =======
   278         kx 	@mkdir -p $(XORG_PKG)/etc/{X11,rc.d}
   278         kx 	@cp -a $(scripts)/X11/xorg.conf.powervr $(XORG_PKG)/etc/X11
   278         kx 	@cp -a $(scripts)/rc.d/rc.powervr.example $(XORG_PKG)/etc/rc.d
   278         kx 	@chmod a-x $(XORG_PKG)/etc/rc.d/rc.powervr.example
   278         kx 	@( cd $(XORG_PKG)/etc/X11 ; \
   278         kx 	   ln -sf xorg.conf.powervr xorg.conf ; \
   278         kx 	 )
   278         kx 	# ======= Install Documentation =======
   278         kx 	@mkdir -p $(XORG_PKG)/usr/doc/$(doc_dir_name)
   278         kx 	@cp -a $(license) \
   278         kx 	       $(XORG_PKG)/usr/doc/$(doc_dir_name)
   278         kx 	@mkdir -p $(XORG_PKG)/usr/share/doc/$(doc_dir_name)
   278         kx 	@( cd $(SRC_DIR) ; \
   278         kx 	   cp -a $(license) \
   278         kx 	         $(XORG_PKG)/usr/share/doc/$(doc_dir_name) \
   278         kx 	 )
   278         kx 	@( cd $(XORG_PKG)/usr/share/doc ; \
   278         kx 	   ln -sf $(doc_dir_name) $(XORG_PKG_NAME) ; \
   278         kx 	 )
   278         kx 	# ======= Install the same to $(TARGET_DEST_DIR) =======
   278         kx 	$(call install-into-devenv, $(XORG_PKG))
   278         kx 	# ======= tune pkg-config *.pc search path to the target destination for development =======
   278         kx 	@( cd $(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/pkgconfig ; \
   278         kx 	   sed -i "s,/usr,$(TARGET_DEST_DIR)/usr,g" egl.pc          \
   278         kx 	                                            glesv1_cm.pc    \
   278         kx 	                                            glesv2.pc     ; \
   278         kx 	 )
   278         kx ifneq ($(CHRPATH),)
   278         kx 	# ======= Set RPATH/RUNPATH for target binaries =======
   278         kx 	@( cd $(XORG_PKG)/usr ; \
   278         kx 	   for file in `find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs echo` ; do \
   278         kx 	     rpath=`$(CHRPATH) -l $$file 2> /dev/null | grep "R*PATH"` ; \
   278         kx 	     if echo "$$rpath" | grep -q "/usr/local/XSGX/lib" ; then \
   278         kx 	       $(CHRPATH) -r $(TARGET_BIN_RPATH) $$file 1> /dev/null 2> /dev/null ; \
   278         kx 	     fi ; \
   278         kx 	   done ; \
   278         kx 	 )
   278         kx 	# ======= Set RPATH/RUNPATH for target shared objects =======
   278         kx 	@( cd $(XORG_PKG)/usr ; \
   278         kx 	   for file in `find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs echo` ; do \
   278         kx 	     rpath=`$(CHRPATH) -l $$file 2> /dev/null | grep "R*PATH"` ; \
   278         kx 	     if echo "$$rpath" | grep -q "/usr/local/XSGX/lib" ; then \
   278         kx 	       $(CHRPATH) -r $(TARGET_LIB_RPATH) $$file 1> /dev/null 2> /dev/null ; \
   278         kx 	     fi ; \
   278         kx 	   done ; \
   278         kx 	 )
   278         kx endif
   278         kx 	@touch $@
   278         kx 
   278         kx $(XORG_PKG_DESCRIPTION_FILE): $(XORG_PKG_DESCRIPTION_FILE_IN)
   278         kx 	@cat $< | $(SED) -e "s/@VERSION@/$(version)/g" > $@
   278         kx 
   278         kx $(pkg_signature)   : $(pkg_archive) ;
   278         kx $(pkg_description) : $(pkg_archive) ;
   278         kx 
   278         kx $(pkg_archive): $(install_target) $(XORG_PKG_DESCRIPTION_FILE) $(XORG_PKG_INSTALL_SCRIPT)
   278         kx 	@cp $(XORG_PKG_DESCRIPTION_FILE) $(XORG_PKG)/.DESCRIPTION
   278         kx 	@cp $(XORG_PKG_INSTALL_SCRIPT) $(XORG_PKG)/.INSTALL
   278         kx 	@$(BUILD_PKG_REQUIRES) $(XORG_PKG)/.REQUIRES
   278         kx 	@echo "pkgname=$(XORG_PKG_NAME)"                            >  $(XORG_PKG)/.PKGINFO ; \
   278         kx 	 echo "pkgver=$(XORG_PKG_VERSION)"                          >> $(XORG_PKG)/.PKGINFO ; \
   278         kx 	 echo "arch=$(XORG_PKG_ARCH)"                               >> $(XORG_PKG)/.PKGINFO ; \
   278         kx 	 echo "distroname=$(XORG_PKG_DISTRO_NAME)"                  >> $(XORG_PKG)/.PKGINFO ; \
   278         kx 	 echo "distrover=$(XORG_PKG_DISTRO_VERSION)"                >> $(XORG_PKG)/.PKGINFO ; \
   278         kx 	 echo "group=$(XORG_PKG_GROUP)"                             >> $(XORG_PKG)/.PKGINFO ; \
   278         kx 	 echo "short_description=\"$(XORG_PKG_SHORT_DESCRIPTION)\"" >> $(XORG_PKG)/.PKGINFO ; \
   278         kx 	 echo "url=$(XORG_PKG_URL)"                                 >> $(XORG_PKG)/.PKGINFO ; \
   278         kx 	 echo "license=$(XORG_PKG_LICENSE)"                         >> $(XORG_PKG)/.PKGINFO
   647         kx 	@$(PSEUDO) sh -c "cd $(XORG_PKG) && chown -R root:root . && $(MAKE_PACKAGE) --linkadd yes .."