Platform

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

870 Commits   5 Branches   3 Tags   |
   206         kx 
   206         kx COMPONENT_TARGETS = $(HARDWARE_CI20)
   206         kx 
   206         kx NEED_ABS_PATH     = true
   206         kx 
   206         kx COMPONENT_IS_3PP  = true
   206         kx 
   206         kx 
   206         kx include ../../../../build-system/constants.mk
   206         kx 
   206         kx 
   206         kx SOURCE_REQUIRES   = sources/U-Boot/ci20
   206         kx 
   206         kx REQUIRES          = boot/kernel/ci20/3.0.8-20150728
   206         kx 
   206         kx # ======= __END_OF_REQUIRES__ =======
   206         kx 
   206         kx 
   206         kx DEFAULT_NFS_ROOT_IP_ADDR = 172.16.0.3
   206         kx DEFAULT_NFS_ROOT_PATH    = "nfsroot-ci20"
   206         kx DEFAULT_HW_ADDR          = 2a:ab:c0:3a:1b:12
   206         kx 
   206         kx 
   206         kx version         = 2013.10-20150826
   206         kx tar_bz2_archive = $(SRC_PACKAGE_PATH)/U-Boot/ci20/u-boot-ci20-$(version).tar.bz2
   206         kx SRC_ARCHIVE     = $(tar_bz2_archive)
   206         kx SRC_DIR         = $(TARGET_BUILD_DIR)/u-boot-ci20-$(version)
   206         kx src_done        = $(TARGET_BUILD_DIR)/.source_done
   206         kx 
   206         kx u_boot          = $(TARGET_BUILD_DIR)/.u_boot_done
   206         kx 
   206         kx u_boot_config   = ci20_mmc
   206         kx u_boot_logo     = $(CURDIR)/logo/radix-2CPU-224x96.bmp
   206         kx 
   206         kx boot_script_sd  = $(TARGET_BUILD_DIR)/boot.script.sd
   206         kx boot_scr_sd     = $(TARGET_BUILD_DIR)/boot.scr.sd
   206         kx 
   247         kx boot_records         = $(TARGET_BUILD_DIR)/$(HARDWARE).boot-records
   247         kx install_boot_records = $(TARGET_BUILD_DIR)/.boot_records_done
   206         kx 
   247         kx 
   206         kx PATCHES = PATCHES
   206         kx 
   206         kx 
   206         kx ifneq ($(filter $(TOOLCHAIN),$(TOOLCHAIN_JZ47XX_GLIBC)),)
   206         kx ARCH = mips
   206         kx endif
   206         kx 
   206         kx USE_TARGET_DEST_DIR_SYSROOT = no
   206         kx 
   206         kx 
   206         kx ####### Targets
   206         kx 
   206         kx PKG_GROUP = boot
   206         kx 
   206         kx 
   206         kx UBOOT_BIN_PKG_NAME                = u-boot
   206         kx UBOOT_BIN_PKG_VERSION             = 2013.10
   206         kx UBOOT_BIN_PKG_ARCH                = $(TOOLCHAIN)
   206         kx UBOOT_BIN_PKG_DISTRO_NAME         = $(DISTRO_NAME)
   206         kx UBOOT_BIN_PKG_DISTRO_VERSION      = $(DISTRO_VERSION)
   206         kx UBOOT_BIN_PKG_GROUP               = $(PKG_GROUP)
   206         kx ###                                |---handy-ruler-------------------------------|
   206         kx UBOOT_BIN_PKG_SHORT_DESCRIPTION   = MIPS Creator CI20 U-Boot
   206         kx UBOOT_BIN_PKG_URL                 = $(BUG_URL)
   206         kx UBOOT_BIN_PKG_LICENSE             = custom
   206         kx UBOOT_BIN_PKG_DESCRIPTION_FILE    = $(TARGET_BUILD_DIR)/$(UBOOT_BIN_PKG_NAME)-pkg-description
   206         kx UBOOT_BIN_PKG_DESCRIPTION_FILE_IN = $(UBOOT_BIN_PKG_NAME)-pkg-description.in
   206         kx UBOOT_BIN_PKG_INSTALL_SCRIPT      = $(UBOOT_BIN_PKG_NAME)-pkg-install.sh
   206         kx 
   206         kx UBOOT_BIN_PKG      = $(CURDIR)/$(TARGET_BUILD_DIR)/$(UBOOT_BIN_PKG_NAME)-package
   206         kx 
   206         kx build_uboot_pkg    = $(TARGET_BUILD_DIR)/.u_boot_pkg_done
   206         kx 
   206         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)
   206         kx 
   206         kx pkg_archive        = $(TARGET_BUILD_DIR)/$(PKG_GROUP)/$(pkg_basename).$(pkg_arch_suffix)
   206         kx pkg_signature      = $(call sign-name,$(pkg_archive))
   206         kx pkg_description    = $(call desc-name,$(pkg_archive))
   206         kx products           = $(call pkg-files,$(pkg_archive))
   206         kx 
   206         kx BUILD_TARGETS      = $(u_boot)
   206         kx BUILD_TARGETS     += $(boot_script_sd)
   206         kx BUILD_TARGETS     += $(boot_scr_sd)
   206         kx BUILD_TARGETS     += $(build_uboot_pkg)
   247         kx BUILD_TARGETS     += $(install_boot_records)
   206         kx 
   206         kx PRODUCT_TARGETS    = $(products)
   206         kx 
   206         kx ROOTFS_TARGETS     = $(pkg_archive)
   206         kx 
   206         kx 
   206         kx include ../../../../build-system/core.mk
   206         kx 
   206         kx 
   206         kx #
   206         kx # Unavailable for 3.0.8 kernel
   206         kx #
   206         kx #extra  = dm9000.mac_addr=$(DEFAULT_HW_ADDR)
   206         kx 
   206         kx 
   206         kx ####### Dependencies
   206         kx 
   206         kx $(src_done): $(SRC_ARCHIVE) $(PATCHES_DEP)
   206         kx 	$(UNPACK_SRC_ARCHIVE)
   206         kx 	$(APPLY_PATCHES)
   206         kx 	@touch $@
   206         kx 
   206         kx UMAKE := $(BUILD_ENVIRONMENT) $(MAKE) -C $(SRC_DIR) CROSS_COMPILE="$(CROSS_PREFIX)" LOGO_BMP=$(u_boot_logo)
   206         kx 
   206         kx $(u_boot): $(src_done)
   206         kx 	$(UMAKE)  $(u_boot_config)
   206         kx 	$(UMAKE)
   206         kx 	@touch $@
   206         kx 
   206         kx $(boot_script_sd): $(u_boot)
   206         kx 	@( echo "run ethargs"                                > $(boot_script_sd) && \
   206         kx 	   echo "ext4load mmc 0:1 0x88000000 /boot/uImage"  >> $(boot_script_sd) && \
   206         kx 	   echo "setenv bootargs 'console=ttyS4,115200 root=/dev/mmcblk0p1 mem=256M@0x0 mem=768M@0x30000000 rootwait $(extra)'" >> $(boot_script_sd) && \
   206         kx 	   echo "bootm 0x88000000"                          >> $(boot_script_sd) \
   206         kx 	 )
   206         kx 
   206         kx $(boot_scr_sd): $(boot_script_sd)
   206         kx 	$(SRC_DIR)/tools/mkimage -A $(ARCH) -T script -C none -n "Boot Image" -d $< $@
   206         kx 
   206         kx $(build_uboot_pkg): $(boot_scr_sd)
   206         kx 	@mkdir -p $(TARGET_DEST_DIR)/bootfs
   206         kx 	@mkdir -p $(UBOOT_BIN_PKG)/boot
   206         kx 	# ======= Copy U-Boot images =======
   206         kx 	@cp -a $(boot_scr_sd)   $(TARGET_DEST_DIR)/bootfs
   206         kx 	@cp -a $(boot_scr_sd)   $(TARGET_DEST_DIR)/bootfs/boot.scr
   206         kx 	@cp -a $(boot_scr_sd)   $(UBOOT_BIN_PKG)/boot
   206         kx 	@cp -a $(boot_scr_sd)   $(UBOOT_BIN_PKG)/boot/boot.scr
   206         kx 	@cd $(SRC_DIR) && \
   206         kx 	  cp -a spl/u-boot-spl.bin u-boot.{bin,img,lds,map} $(TARGET_DEST_DIR)/bootfs && \
   206         kx 	  cp -a spl/u-boot-spl.bin u-boot.{bin,img,lds,map} $(UBOOT_BIN_PKG)/boot
   237         kx 	@chmod a-x $(UBOOT_BIN_PKG)/boot/u-boot*.bin
   206         kx 	@mkdir -p $(UBOOT_BIN_PKG)/usr/doc/u-boot-ci20-$(version)
   206         kx 	@cp -a $(SRC_DIR)/Licenses $(SRC_DIR)/CREDITS $(SRC_DIR)/README \
   206         kx 	       $(UBOOT_BIN_PKG)/usr/doc/u-boot-ci20-$(version)
   206         kx 	@touch $@
   206         kx 
   247         kx $(boot_records): $(build_uboot_pkg)
   247         kx 	@$(DD) if=/dev/zero of=$@ bs=512 count=2048 conv=notrunc
   247         kx 	# ======= Clean U-Boot environment (just for remember env address)       =======
   247         kx 	@$(DD) if=/dev/zero of=$@ bs=1K seek=526 count=32 conv=notrunc
   247         kx 	# ======= Setup u-boot-spl & u-boot into unallocated space of disk image =======
   247         kx 	@$(DD) if=$(UBOOT_BIN_PKG)/boot/u-boot-spl.bin of=$@ obs=512 seek=1  conv=notrunc
   247         kx 	@$(DD) if=$(UBOOT_BIN_PKG)/boot/u-boot.img     of=$@ obs=1K  seek=14 conv=notrunc
   247         kx 	@touch $@
   247         kx 
   247         kx $(install_boot_records): $(boot_records)
   247         kx 	@$(BUILDSYSTEM)/install_targets         \
   247         kx 	   --destination=$(PRODUCTS_DEST_DIR)   \
   247         kx 	   --toolchain=$(TOOLCHAIN)             \
   247         kx 	   --hardware=$(HARDWARE)               \
   247         kx 	   --flavour=$(FLAVOUR)                 \
   247         kx 	   $^
   247         kx 	@touch $@
   247         kx 
   206         kx $(UBOOT_BIN_PKG_DESCRIPTION_FILE): $(UBOOT_BIN_PKG_DESCRIPTION_FILE_IN)
   206         kx 	@cat $< | $(SED) -e "s/@VERSION@/$(version)/g" > $@
   206         kx 
   206         kx $(pkg_signature)   : $(pkg_archive) ;
   206         kx $(pkg_description) : $(pkg_archive) ;
   206         kx 
   247         kx $(pkg_archive): $(install_boot_records) $(UBOOT_BIN_PKG_DESCRIPTION_FILE) $(UBOOT_BIN_PKG_INSTALL_SCRIPT)
   206         kx 	@cp $(UBOOT_BIN_PKG_DESCRIPTION_FILE) $(UBOOT_BIN_PKG)/.DESCRIPTION
   206         kx 	@cp $(UBOOT_BIN_PKG_INSTALL_SCRIPT) $(UBOOT_BIN_PKG)/.INSTALL
   206         kx 	@chmod a+x $(UBOOT_BIN_PKG)/.INSTALL
   206         kx 	@$(BUILD_PKG_REQUIRES) $(UBOOT_BIN_PKG)/.REQUIRES
   206         kx 	@echo "pkgname=$(UBOOT_BIN_PKG_NAME)"                            >  $(UBOOT_BIN_PKG)/.PKGINFO ; \
   206         kx 	 echo "pkgver=$(UBOOT_BIN_PKG_VERSION)"                          >> $(UBOOT_BIN_PKG)/.PKGINFO ; \
   206         kx 	 echo "arch=$(UBOOT_BIN_PKG_ARCH)"                               >> $(UBOOT_BIN_PKG)/.PKGINFO ; \
   206         kx 	 echo "distroname=$(UBOOT_BIN_PKG_DISTRO_NAME)"                  >> $(UBOOT_BIN_PKG)/.PKGINFO ; \
   206         kx 	 echo "distrover=$(UBOOT_BIN_PKG_DISTRO_VERSION)"                >> $(UBOOT_BIN_PKG)/.PKGINFO ; \
   206         kx 	 echo "group=$(UBOOT_BIN_PKG_GROUP)"                             >> $(UBOOT_BIN_PKG)/.PKGINFO ; \
   206         kx 	 echo "short_description=\"$(UBOOT_BIN_PKG_SHORT_DESCRIPTION)\"" >> $(UBOOT_BIN_PKG)/.PKGINFO ; \
   206         kx 	 echo "url=$(UBOOT_BIN_PKG_URL)"                                 >> $(UBOOT_BIN_PKG)/.PKGINFO ; \
   206         kx 	 echo "license=$(UBOOT_BIN_PKG_LICENSE)"                         >> $(UBOOT_BIN_PKG)/.PKGINFO
   647         kx 	@$(PSEUDO) sh -c "cd $(UBOOT_BIN_PKG) && chown -R root:root . && $(MAKE_PACKAGE) --linkadd yes .."