Platform

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

809 Commits   5 Branches   3 Tags   |
   278         kx 
   564         kx COMPONENT_TARGETS  = $(HARDWARE_CI20)
   278         kx 
   564         kx NEED_ABS_PATH      = true
   278         kx 
   564         kx COMPONENT_IS_3PP   = true
   278         kx 
   278         kx NO_CCACHE = true
   278         kx 
   278         kx include ../../../../../../build-system/constants.mk
   278         kx 
   278         kx 
   564         kx SOURCE_REQUIRES    = sources/hal/drivers/ci20/sgx-ddk/3.18
   278         kx 
   564         kx REQUIRES           = boot/kernel/ci20/3.18-20151015
   278         kx 
   278         kx # ======= __END_OF_REQUIRES__ =======
   278         kx 
   278         kx 
   564         kx version            = 1.14.3759903
   564         kx kernel_version     = 3.18-20151015
   564         kx modules_version    = 3.18.3
   564         kx tar_xz_archive     = $(SRC_PACKAGE_PATH)/hal/drivers/ci20/sgx-ddk/3.18/ci20-sgx-km-$(version).tar.xz
   564         kx SRC_ARCHIVE        = $(tar_xz_archive)
   564         kx SRC_DIR            = $(TARGET_BUILD_DIR)/ci20-sgx-km-$(version)
   564         kx src_done           = $(TARGET_BUILD_DIR)/.source_done
   278         kx 
   564         kx udev_rules         = $(CURDIR)/udev/96-powervr.rules
   278         kx 
   564         kx kernel_sources     = $(TARGET_DEST_DIR)/usr/src/linux-ci20-$(kernel_version)
   278         kx 
   564         kx build_sgxddk_pkg   = $(TARGET_BUILD_DIR)/.sgxddk_pkg_done
   278         kx 
   564         kx modules_done       = $(TARGET_BUILD_DIR)/.modules_done
   278         kx 
   278         kx 
   278         kx PATCHES = PATCHES
   278         kx 
   278         kx 
   278         kx ifneq ($(filter $(TOOLCHAIN),$(TOOLCHAIN_JZ47XX_GLIBC)),)
   278         kx ARCH = mips
   278         kx endif
   278         kx 
   278         kx extra_build_environment  = KERNELDIR=$(kernel_sources)
   278         kx extra_build_environment += DISCIMAGE=$(TARGET_DEST_DIR)
   278         kx extra_build_environment += INSTALL_MOD_PATH=$(TARGET_DEST_DIR)
   278         kx 
   278         kx ifneq ($(filter $(TOOLCHAIN),$(TOOLCHAIN_JZ47XX_GLIBC)),)
   278         kx SGX_KERNEL_MODULE_PATH  = $(CURDIR)/$(SRC_DIR)/eurasia_km/eurasiacon/build/linux2/jz4780_linux
   278         kx endif
   278         kx 
   278         kx USE_TARGET_DEST_DIR_SYSROOT = no
   278         kx 
   278         kx ####### Targets
   278         kx 
   278         kx PKG_GROUP = boot
   278         kx 
   278         kx 
   278         kx SGXDDK_BIN_PKG_NAME                = sgxddk
   278         kx SGXDDK_BIN_PKG_VERSION             = 1.14.3759903
   278         kx SGXDDK_BIN_PKG_ARCH                = $(TOOLCHAIN)
   278         kx SGXDDK_BIN_PKG_DISTRO_NAME         = $(DISTRO_NAME)
   278         kx SGXDDK_BIN_PKG_DISTRO_VERSION      = $(DISTRO_VERSION)
   278         kx SGXDDK_BIN_PKG_GROUP               = $(PKG_GROUP)
   278         kx ###                                 |---handy-ruler-------------------------------|
   278         kx SGXDDK_BIN_PKG_SHORT_DESCRIPTION   = SGX DDK for Linux kernel
   278         kx SGXDDK_BIN_PKG_URL                 = $(BUG_URL)
   278         kx SGXDDK_BIN_PKG_LICENSE             = GPLv2
   278         kx SGXDDK_BIN_PKG_DESCRIPTION_FILE    = $(TARGET_BUILD_DIR)/$(SGXDDK_BIN_PKG_NAME)-pkg-description
   278         kx SGXDDK_BIN_PKG_DESCRIPTION_FILE_IN = $(SGXDDK_BIN_PKG_NAME)-pkg-description.in
   278         kx SGXDDK_BIN_PKG_INSTALL_SCRIPT      = $(TARGET_BUILD_DIR)/$(SGXDDK_BIN_PKG_NAME)-pkg-install.sh
   278         kx SGXDDK_BIN_PKG_INSTALL_SCRIPT_IN   = $(SGXDDK_BIN_PKG_NAME)-pkg-install.sh.in
   278         kx 
   278         kx SGXDDK_BIN_PKG   = $(CURDIR)/$(TARGET_BUILD_DIR)/$(SGXDDK_BIN_PKG_NAME)-package
   278         kx 
   278         kx pkg_basename     = $(SGXDDK_BIN_PKG_NAME)-$(SGXDDK_BIN_PKG_VERSION)-$(SGXDDK_BIN_PKG_ARCH)-$(SGXDDK_BIN_PKG_DISTRO_NAME)-$(SGXDDK_BIN_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    = $(modules_done)
   278         kx BUILD_TARGETS   += $(build_sgxddk_pkg)
   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 ####### 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 LMAKE := CROSS_COMPILE="$(CROSS_PREFIX)" ARCH=$(ARCH)  $(extra_build_environment) V=$(if $(VERBOSE),1,0) $(MAKE) -C $(SGX_KERNEL_MODULE_PATH)
   278         kx 
   278         kx $(modules_done): $(src_done)
   278         kx 	$(LMAKE) kbuild
   278         kx 	$(LMAKE) kbuild_install
   278         kx 	@( if [ -x /sbin/depmod ] ; then \
   278         kx 	     /sbin/depmod -b $(TARGET_DEST_DIR) $(modules_version) ; \
   278         kx 	   fi \
   278         kx 	 )
   278         kx 	@touch $@
   278         kx 
   278         kx $(build_sgxddk_pkg): $(modules_done)
   278         kx 	@mkdir -p $(SGXDDK_BIN_PKG)/lib/modules/$(modules_version)
   278         kx 	@mkdir -p $(SGXDDK_BIN_PKG)/lib/udev/rules.d
   278         kx 	# ======= Copy modules and firmware (without links to sources): =======
   278         kx 	@cd $(TARGET_DEST_DIR)/lib/modules/$(modules_version) && \
   278         kx 	  cp -rf extra $(SGXDDK_BIN_PKG)/lib/modules/$(modules_version)
   278         kx 	# ======= Copy udev rules to set right permissions for /dev/bc_example inode: =======
   278         kx 	@cp -a $(udev_rules) $(SGXDDK_BIN_PKG)/lib/udev/rules.d
   278         kx 	# ======= Install Documentation =======
   278         kx 	@mkdir -p $(SGXDDK_BIN_PKG)/usr/doc/sgxddk-$(version)
   278         kx 	@cp -a $(SRC_DIR)/eurasia_km/*-COPYING \
   278         kx 	       $(SRC_DIR)/eurasia_km/INSTALL $(SRC_DIR)/eurasia_km/README \
   278         kx 	       $(SGXDDK_BIN_PKG)/usr/doc/sgxddk-$(version)
   278         kx 	# ======= Install the same to $(TARGET_DEST_DIR) =======
   278         kx 	$(call install-into-devenv, $(SGXDDK_BIN_PKG))
   278         kx 	@touch $@
   278         kx 
   278         kx $(SGXDDK_BIN_PKG_DESCRIPTION_FILE): $(SGXDDK_BIN_PKG_DESCRIPTION_FILE_IN)
   278         kx 	@cat $< | $(SED) -e "s/@VERSION@/$(version)/g" > $@
   278         kx 
   278         kx $(SGXDDK_BIN_PKG_INSTALL_SCRIPT): $(SGXDDK_BIN_PKG_INSTALL_SCRIPT_IN)
   278         kx 	@cat $< | $(SED) -e "s/@MODULES_VERSION@/$(modules_version)/g" > $@
   278         kx 
   278         kx $(pkg_signature)   : $(pkg_archive) ;
   278         kx $(pkg_description) : $(pkg_archive) ;
   278         kx 
   278         kx $(pkg_archive): $(build_sgxddk_pkg) $(SGXDDK_BIN_PKG_DESCRIPTION_FILE) $(SGXDDK_BIN_PKG_INSTALL_SCRIPT)
   278         kx 	@cp $(SGXDDK_BIN_PKG_DESCRIPTION_FILE) $(SGXDDK_BIN_PKG)/.DESCRIPTION
   278         kx 	@cp $(SGXDDK_BIN_PKG_INSTALL_SCRIPT) $(SGXDDK_BIN_PKG)/.INSTALL
   278         kx 	@chmod a+x $(SGXDDK_BIN_PKG)/.INSTALL
   278         kx 	@$(BUILD_PKG_REQUIRES) $(SGXDDK_BIN_PKG)/.REQUIRES
   278         kx 	@echo "pkgname=$(SGXDDK_BIN_PKG_NAME)"                            >  $(SGXDDK_BIN_PKG)/.PKGINFO ; \
   278         kx 	 echo "pkgver=$(SGXDDK_BIN_PKG_VERSION)"                          >> $(SGXDDK_BIN_PKG)/.PKGINFO ; \
   278         kx 	 echo "arch=$(SGXDDK_BIN_PKG_ARCH)"                               >> $(SGXDDK_BIN_PKG)/.PKGINFO ; \
   278         kx 	 echo "distroname=$(SGXDDK_BIN_PKG_DISTRO_NAME)"                  >> $(SGXDDK_BIN_PKG)/.PKGINFO ; \
   278         kx 	 echo "distrover=$(SGXDDK_BIN_PKG_DISTRO_VERSION)"                >> $(SGXDDK_BIN_PKG)/.PKGINFO ; \
   278         kx 	 echo "group=$(SGXDDK_BIN_PKG_GROUP)"                             >> $(SGXDDK_BIN_PKG)/.PKGINFO ; \
   278         kx 	 echo "short_description=\"$(SGXDDK_BIN_PKG_SHORT_DESCRIPTION)\"" >> $(SGXDDK_BIN_PKG)/.PKGINFO ; \
   278         kx 	 echo "url=$(SGXDDK_BIN_PKG_URL)"                                 >> $(SGXDDK_BIN_PKG)/.PKGINFO ; \
   278         kx 	 echo "license=$(SGXDDK_BIN_PKG_LICENSE)"                         >> $(SGXDDK_BIN_PKG)/.PKGINFO
   647         kx 	@$(PSEUDO) sh -c "cd $(SGXDDK_BIN_PKG) && chown -R root:root . && $(MAKE_PACKAGE) --linkadd yes .."