Platform

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

809 Commits   5 Branches   3 Tags   |
   349         kx 
   349         kx COMPONENT_TARGETS  = $(HARDWARE_NIT6Q)
   349         kx 
   349         kx NEED_ABS_PATH      = true
   349         kx 
   349         kx COMPONENT_IS_3PP   = true
   349         kx 
   349         kx 
   349         kx include ../../../../build-system/constants.mk
   349         kx 
   349         kx 
   349         kx SOURCE_REQUIRES   = sources/U-Boot/Boundary/Nit6Q
   349         kx 
   349         kx REQUIRES          = boot/kernel/nit6q/3.14.28-20160304
   349         kx 
   349         kx # ======= __END_OF_REQUIRES__ =======
   349         kx 
   349         kx 
   349         kx DEFAULT_NFS_ROOT_IP_ADDR =  172.16.0.3
   349         kx DEFAULT_NFS_ROOT_PATH    = "nfsroot-$(HARDWARE)"
   349         kx DEFAULT_HW_ADDR          =  2a:ab:c0:90:96:ba
   349         kx 
   349         kx 
   349         kx version           = 2015.07-20160305
   349         kx tar_xz_archive    = $(SRC_PACKAGE_PATH)/U-Boot/Boundary/Nit6Q/u-boot-imx6-$(version).tar.xz
   349         kx SRC_ARCHIVE       = $(tar_xz_archive)
   349         kx SRC_DIR           = $(TARGET_BUILD_DIR)/u-boot-imx6-$(version)
   349         kx src_done          = $(TARGET_BUILD_DIR)/.source_done
   349         kx 
   349         kx u_boot            = $(TARGET_BUILD_DIR)/.u_boot_done
   349         kx 
   349         kx ifneq ($(filter $(HARDWARE),$(HARDWARE_NIT6Q)),)
   349         kx u_boot_name       = nitrogen6q
   349         kx u_boot_config     = $(u_boot_name)_defconfig
   349         kx endif
   349         kx 
   349         kx upgrade_src_script   = scripts/6x_upgrade
   349         kx upgrade_script       = $(TARGET_BUILD_DIR)/6x_upgrade
   349         kx 
   349         kx boot_src_script      = scripts/6x_bootscript
   349         kx boot_script          = $(TARGET_BUILD_DIR)/6x_bootscript
   349         kx 
   349         kx boot_records         = $(TARGET_BUILD_DIR)/$(HARDWARE).boot-records
   349         kx boot_fat32fs         = $(TARGET_BUILD_DIR)/$(HARDWARE).fat32fs
   349         kx install_boot_records = $(TARGET_BUILD_DIR)/.boot_records_done
   349         kx 
   349         kx 
   349         kx PATCHES = PATCHES
   349         kx 
   349         kx 
   349         kx ifneq ($(filter $(TOOLCHAIN),$(TOOLCHAIN_IMX6_GLIBC)),)
   349         kx ARCH = arm
   349         kx endif
   349         kx 
   349         kx USE_TARGET_DEST_DIR_SYSROOT = no
   349         kx 
   349         kx 
   349         kx ####### Targets
   349         kx 
   349         kx PKG_GROUP = boot
   349         kx 
   349         kx 
   349         kx UBOOT_BIN_PKG_NAME                = u-boot
   349         kx UBOOT_BIN_PKG_VERSION             = 2015.07
   349         kx UBOOT_BIN_PKG_ARCH                = $(TOOLCHAIN)
   349         kx UBOOT_BIN_PKG_DISTRO_NAME         = $(DISTRO_NAME)
   349         kx UBOOT_BIN_PKG_DISTRO_VERSION      = $(DISTRO_VERSION)
   349         kx UBOOT_BIN_PKG_GROUP               = $(PKG_GROUP)
   349         kx ###                                |---handy-ruler-------------------------------|
   349         kx UBOOT_BIN_PKG_SHORT_DESCRIPTION   = $(HW_SPEC) U-Boot
   349         kx UBOOT_BIN_PKG_URL                 = $(BUG_URL)
   349         kx UBOOT_BIN_PKG_LICENSE             = GPLv2
   349         kx UBOOT_BIN_PKG_DESCRIPTION_FILE    = $(TARGET_BUILD_DIR)/$(UBOOT_BIN_PKG_NAME)-pkg-description
   349         kx UBOOT_BIN_PKG_DESCRIPTION_FILE_IN = $(UBOOT_BIN_PKG_NAME)-pkg-description.in
   349         kx UBOOT_BIN_PKG_INSTALL_SCRIPT      = $(UBOOT_BIN_PKG_NAME)-pkg-install.sh
   349         kx 
   349         kx UBOOT_BIN_PKG      = $(CURDIR)/$(TARGET_BUILD_DIR)/$(UBOOT_BIN_PKG_NAME)-package
   349         kx 
   349         kx build_uboot_pkg    = $(TARGET_BUILD_DIR)/.u_boot_pkg_done
   349         kx 
   349         kx pkg_basename       = $(UBOOT_BIN_PKG_NAME)-$(UBOOT_BIN_PKG_VERSION)-$(UBOOT_BIN_PKG_ARCH)-$(UBOOT_BIN_PKG_DISTRO_NAME)-$(UBOOT_BIN_PKG_DISTRO_VERSION)
   349         kx 
   349         kx pkg_archive        = $(TARGET_BUILD_DIR)/$(PKG_GROUP)/$(pkg_basename).$(pkg_arch_suffix)
   349         kx pkg_signature      = $(call sign-name,$(pkg_archive))
   349         kx pkg_description    = $(call desc-name,$(pkg_archive))
   349         kx products           = $(call pkg-files,$(pkg_archive))
   349         kx 
   349         kx BUILD_TARGETS      = $(u_boot)
   349         kx BUILD_TARGETS     += $(boot_script_nfs)
   349         kx BUILD_TARGETS     += $(boot_script_sd)
   349         kx BUILD_TARGETS     += $(boot_script_emmc)
   349         kx BUILD_TARGETS     += $(boot_scr_nfs)
   349         kx BUILD_TARGETS     += $(boot_scr_sd)
   349         kx BUILD_TARGETS     += $(boot_scr_emmc)
   349         kx BUILD_TARGETS     += $(build_uboot_pkg)
   349         kx BUILD_TARGETS     += $(install_boot_records)
   349         kx 
   349         kx PRODUCT_TARGETS    = $(products)
   349         kx 
   349         kx ROOTFS_TARGETS     = $(pkg_archive)
   349         kx 
   349         kx 
   349         kx include ../../../../build-system/core.mk
   349         kx 
   349         kx 
   349         kx ####### Dependencies
   349         kx 
   349         kx ifneq ($(filter $(HARDWARE),$(HARDWARE_NIT6Q)),)
   349         kx device_dtbs  = imx6dl-nit6xlite.dtb
   349         kx device_dtbs += imx6dl-nitrogen6_vm-magstripe.dtb
   349         kx device_dtbs += imx6dl-nitrogen6_vm.dtb
   349         kx device_dtbs += imx6dl-nitrogen6x.dtb
   349         kx device_dtbs += imx6q-nitrogen6_max.dtb
   349         kx device_dtbs += imx6q-nitrogen6x.dtb
   349         kx device_dtbs += imx6q-sabrelite.dtb
   349         kx endif
   349         kx 
   349         kx 
   349         kx $(src_done): $(SRC_ARCHIVE) $(PATCHES_DEP)
   349         kx 	$(UNPACK_SRC_ARCHIVE)
   349         kx 	$(APPLY_PATCHES)
   349         kx 	@touch $@
   349         kx 
   349         kx UMAKE := $(BUILD_ENVIRONMENT) $(MAKE) -C $(SRC_DIR) CROSS_COMPILE="$(CROSS_PREFIX)"
   349         kx 
   349         kx $(u_boot): $(src_done)
   349         kx 	$(UMAKE)  $(u_boot_config)
   349         kx 	$(UMAKE)
   349         kx 	@touch $@
   349         kx 
   349         kx $(upgrade_script): $(upgrade_src_script) $(u_boot)
   349         kx 	$(SRC_DIR)/tools/mkimage -A $(ARCH) -O linux -T script -C none -a 0 -e 0 -n 'upgrade script' -d $< $@
   349         kx 
   349         kx $(boot_script): $(boot_src_script) $(u_boot)
   349         kx 	$(SRC_DIR)/tools/mkimage -A $(ARCH) -O linux -T script -C none -a 0 -e 0 -n 'boot script' -d $< $@
   349         kx 
   349         kx $(build_uboot_pkg): $(u_boot) $(upgrade_script) $(boot_script)
   349         kx 	@mkdir -p $(TARGET_DEST_DIR)/bootfs
   349         kx 	@mkdir -p $(UBOOT_BIN_PKG)/boot
   349         kx 	# ======= Copy U-Boot images: =======
   349         kx 	@cp -a $(upgrade_script)  $(TARGET_DEST_DIR)/bootfs
   349         kx 	@cp -a $(upgrade_script)  $(UBOOT_BIN_PKG)/boot
   349         kx 	@cp -a $(boot_script)  $(TARGET_DEST_DIR)/bootfs
   349         kx 	@cp -a $(boot_script)  $(UBOOT_BIN_PKG)/boot
   349         kx 	@cd $(SRC_DIR) && \
   349         kx 	  cp -a u-boot.imx $(TARGET_DEST_DIR)/bootfs/u-boot.$(u_boot_name) && \
   349         kx 	  cp -a u-boot.imx $(UBOOT_BIN_PKG)/boot/u-boot.$(u_boot_name)
   349         kx 	@mkdir -p $(UBOOT_BIN_PKG)/usr/doc/u-boot-$(version)
   349         kx 	@cp -a $(SRC_DIR)/Licenses $(SRC_DIR)/MAINTAINERS $(SRC_DIR)/README \
   349         kx 	       $(UBOOT_BIN_PKG)/usr/doc/u-boot-$(version)
   349         kx 	@touch $@
   349         kx 
   349         kx $(boot_records): $(build_uboot_pkg)
   349         kx 	@$(DD) if=/dev/zero of=$@ bs=512 count=2048 conv=notrunc
   349         kx 	# ======= Setup empty boot-records because FS boot mode =======
   349         kx 	@touch $@
   349         kx 
   349         kx $(boot_fat32fs): $(build_uboot_pkg)
   349         kx 	@$(DD) if=/dev/zero of=$@ bs=1M count=511
   349         kx 	# ======= Create FAT32 boot partition image =======
   349         kx 	@$(MKDOSFS) -F 32 -n bootfs $@
   349         kx 	@$(MCOPY) -i $@ $(TARGET_DEST_DIR)/bootfs/u-boot.$(u_boot_name) ::/
   349         kx 	@$(MCOPY) -i $@ $(upgrade_script)                               ::/
   349         kx 	@$(MCOPY) -i $@ $(boot_script)                                  ::/
   349         kx 	@for dtb in $(device_dtbs) ; do \
   349         kx 	   $(MCOPY) -i $@ $(TARGET_DEST_DIR)/bootfs/$$dtb ::/ ; \
   349         kx 	 done
   349         kx 	@$(MCOPY) -i $@ $(TARGET_DEST_DIR)/bootfs/uImage                ::/
   349         kx 	@$(DOSFSCK) -a $@
   349         kx 	@touch $@
   349         kx 
   349         kx $(install_boot_records): $(boot_records) $(boot_fat32fs)
   349         kx 	@$(BUILDSYSTEM)/install_targets         \
   349         kx 	   --destination=$(PRODUCTS_DEST_DIR)   \
   349         kx 	   --toolchain=$(TOOLCHAIN)             \
   349         kx 	   --hardware=$(HARDWARE)               \
   349         kx 	   --flavour=$(FLAVOUR)                 \
   349         kx 	   $^
   349         kx 	@touch $@
   349         kx 
   349         kx $(UBOOT_BIN_PKG_DESCRIPTION_FILE): $(UBOOT_BIN_PKG_DESCRIPTION_FILE_IN)
   349         kx 	@cat $< | $(SED) -e "s/@VERSION@/$(UBOOT_BIN_PKG_VERSION)/g" | \
   349         kx 	          $(SED) -e "s/@HARDWARE_SPEC@/$(HW_SPEC)/g"> $@
   349         kx 
   349         kx $(pkg_signature)   : $(pkg_archive) ;
   349         kx $(pkg_description) : $(pkg_archive) ;
   349         kx 
   349         kx $(pkg_archive): $(install_boot_records) $(UBOOT_BIN_PKG_DESCRIPTION_FILE) $(UBOOT_BIN_PKG_INSTALL_SCRIPT)
   349         kx 	@cp $(UBOOT_BIN_PKG_DESCRIPTION_FILE) $(UBOOT_BIN_PKG)/.DESCRIPTION
   349         kx 	@cp $(UBOOT_BIN_PKG_INSTALL_SCRIPT) $(UBOOT_BIN_PKG)/.INSTALL
   349         kx 	@chmod a+x $(UBOOT_BIN_PKG)/.INSTALL
   349         kx 	@$(BUILD_PKG_REQUIRES) $(UBOOT_BIN_PKG)/.REQUIRES
   349         kx 	@echo "pkgname=$(UBOOT_BIN_PKG_NAME)"                            >  $(UBOOT_BIN_PKG)/.PKGINFO ; \
   349         kx 	 echo "pkgver=$(UBOOT_BIN_PKG_VERSION)"                          >> $(UBOOT_BIN_PKG)/.PKGINFO ; \
   349         kx 	 echo "arch=$(UBOOT_BIN_PKG_ARCH)"                               >> $(UBOOT_BIN_PKG)/.PKGINFO ; \
   349         kx 	 echo "distroname=$(UBOOT_BIN_PKG_DISTRO_NAME)"                  >> $(UBOOT_BIN_PKG)/.PKGINFO ; \
   349         kx 	 echo "distrover=$(UBOOT_BIN_PKG_DISTRO_VERSION)"                >> $(UBOOT_BIN_PKG)/.PKGINFO ; \
   349         kx 	 echo "group=$(UBOOT_BIN_PKG_GROUP)"                             >> $(UBOOT_BIN_PKG)/.PKGINFO ; \
   349         kx 	 echo "short_description=\"$(UBOOT_BIN_PKG_SHORT_DESCRIPTION)\"" >> $(UBOOT_BIN_PKG)/.PKGINFO ; \
   349         kx 	 echo "url=$(UBOOT_BIN_PKG_URL)"                                 >> $(UBOOT_BIN_PKG)/.PKGINFO ; \
   349         kx 	 echo "license=$(UBOOT_BIN_PKG_LICENSE)"                         >> $(UBOOT_BIN_PKG)/.PKGINFO
   586         kx 	@$(PSEUDO) sh -c "cd $(UBOOT_BIN_PKG) && chown -R root:root . && $(MAKE_PACKAGE) --linkadd yes .."