Platform

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

988 Commits   6 Branches   3 Tags   |
    18         kx 
    62         kx COMPONENT_TARGETS = $(HARDWARE_OMAP5UEVM)
    18         kx 
    18         kx NEED_ABS_PATH     = true
    18         kx 
    18         kx COMPONENT_IS_3PP  = true
    18         kx 
    18         kx 
    18         kx include ../../../../build-system/constants.mk
    18         kx 
    18         kx 
   309         kx SOURCE_REQUIRES   = sources/U-Boot/TI/omap5/glsdk
    18         kx 
   309         kx REQUIRES          = boot/kernel/omap543x/3.8.13-20140222
    18         kx 
   175         kx # ======= __END_OF_REQUIRES__ =======
    18         kx 
   175         kx 
    18         kx DEFAULT_NFS_ROOT_IP_ADDR =  172.16.0.3
    18         kx DEFAULT_NFS_ROOT_PATH    = "nfsroot-omap5-uevm"
    18         kx DEFAULT_HW_ADDR          =  2a:ab:c0:97:84:9d
    18         kx 
    18         kx 
    18         kx version           = 2013.04-20140216
   309         kx tar_xz_archive    = $(SRC_PACKAGE_PATH)/U-Boot/TI/omap5/glsdk/u-boot-omap-$(version).tar.xz
   309         kx SRC_ARCHIVE       = $(tar_xz_archive)
    18         kx SRC_DIR           = $(TARGET_BUILD_DIR)/u-boot-omap-$(version)
    29         kx src_done          = $(TARGET_BUILD_DIR)/.source_done
    18         kx 
    29         kx build_dir         = $(TARGET_BUILD_DIR)/build
    18         kx u_boot            = $(build_dir)/.u_boot_done
    18         kx 
    18         kx u_boot_config     = omap5_uevm_config
    18         kx 
   122         kx boot_script_nfs   = $(TARGET_BUILD_DIR)/boot.script.nfs
   122         kx boot_scr_nfs      = $(TARGET_BUILD_DIR)/boot.scr.nfs
    18         kx 
   247         kx boot_script_sd    = $(TARGET_BUILD_DIR)/boot.script.sd
   247         kx boot_scr_sd       = $(TARGET_BUILD_DIR)/boot.scr.sd
    18         kx 
   247         kx boot_script_emmc  = $(TARGET_BUILD_DIR)/boot.script.emmc
   247         kx boot_scr_emmc     = $(TARGET_BUILD_DIR)/boot.scr.emmc
    18         kx 
   247         kx boot_records         = $(TARGET_BUILD_DIR)/$(HARDWARE).boot-records
   247         kx boot_fat32fs         = $(TARGET_BUILD_DIR)/$(HARDWARE).fat32fs
   247         kx install_boot_records = $(TARGET_BUILD_DIR)/.boot_records_done
    18         kx 
   247         kx 
    18         kx PATCHES = PATCHES
    18         kx 
    18         kx 
   198         kx ifneq ($(filter $(TOOLCHAIN),$(TOOLCHAIN_OMAP543X_GLIBC)),)
    18         kx ARCH = arm
    18         kx endif
    18         kx 
    62         kx USE_TARGET_DEST_DIR_SYSROOT = no
    62         kx 
    18         kx device_tree_name  = omap5-uevm.dtb
    18         kx 
    18         kx 
    18         kx ####### Targets
    18         kx 
    22         kx PKG_GROUP = boot
    18         kx 
    22         kx 
    18         kx UBOOT_BIN_PKG_NAME                = u-boot
    18         kx UBOOT_BIN_PKG_VERSION             = 2013.04-20140216
    18         kx UBOOT_BIN_PKG_ARCH                = $(TOOLCHAIN)
   104         kx UBOOT_BIN_PKG_DISTRO_NAME         = $(DISTRO_NAME)
   104         kx UBOOT_BIN_PKG_DISTRO_VERSION      = $(DISTRO_VERSION)
    22         kx UBOOT_BIN_PKG_GROUP               = $(PKG_GROUP)
    62         kx ###                                |---handy-ruler-------------------------------|
   117         kx UBOOT_BIN_PKG_SHORT_DESCRIPTION   = OMAP5UEVM U-Boot
    86         kx UBOOT_BIN_PKG_URL                 = $(BUG_URL)
    18         kx UBOOT_BIN_PKG_LICENSE             = GPLv2
    18         kx UBOOT_BIN_PKG_DESCRIPTION_FILE    = $(TARGET_BUILD_DIR)/$(UBOOT_BIN_PKG_NAME)-pkg-description
    18         kx UBOOT_BIN_PKG_DESCRIPTION_FILE_IN = $(UBOOT_BIN_PKG_NAME)-pkg-description.in
    18         kx UBOOT_BIN_PKG_INSTALL_SCRIPT      = $(UBOOT_BIN_PKG_NAME)-pkg-install.sh
    18         kx 
    62         kx UBOOT_BIN_PKG      = $(CURDIR)/$(TARGET_BUILD_DIR)/$(UBOOT_BIN_PKG_NAME)-package
    18         kx 
    62         kx build_uboot_pkg    = $(TARGET_BUILD_DIR)/.u_boot_pkg_done
    18         kx 
    62         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)
    18         kx 
    62         kx pkg_archive        = $(TARGET_BUILD_DIR)/$(PKG_GROUP)/$(pkg_basename).$(pkg_arch_suffix)
    62         kx pkg_signature      = $(call sign-name,$(pkg_archive))
    62         kx pkg_description    = $(call desc-name,$(pkg_archive))
    62         kx products           = $(call pkg-files,$(pkg_archive))
    18         kx 
    62         kx BUILD_TARGETS      = $(u_boot)
    62         kx BUILD_TARGETS     += $(boot_script_nfs)
    62         kx BUILD_TARGETS     += $(boot_script_sd)
    62         kx BUILD_TARGETS     += $(boot_script_emmc)
    62         kx BUILD_TARGETS     += $(boot_scr_nfs)
    62         kx BUILD_TARGETS     += $(boot_scr_sd)
    62         kx BUILD_TARGETS     += $(boot_scr_emmc)
    62         kx BUILD_TARGETS     += $(build_uboot_pkg)
   247         kx BUILD_TARGETS     += $(install_boot_records)
    18         kx 
    62         kx PRODUCT_TARGETS    = $(products)
    18         kx 
    62         kx ROOTFS_TARGETS     = $(pkg_archive)
    18         kx 
    62         kx 
    18         kx include ../../../../build-system/core.mk
    18         kx 
    18         kx 
    18         kx ####### Dependencies
    18         kx 
    18         kx $(src_done): $(SRC_ARCHIVE) $(PATCHES_DEP)
    18         kx 	$(UNPACK_SRC_ARCHIVE)
    18         kx 	$(APPLY_PATCHES)
    18         kx 	@touch $@
    18         kx 
    18         kx UMAKE := $(BUILD_ENVIRONMENT) $(MAKE) -C $(SRC_DIR) CROSS_COMPILE="$(CROSS_PREFIX)"
    18         kx 
    18         kx $(u_boot): $(src_done)
    18         kx 	@mkdir -p $(build_dir)
    18         kx 	$(UMAKE)  $(u_boot_config)
    18         kx 	$(UMAKE)
    18         kx 	@touch $@
    18         kx 
    18         kx $(boot_script_nfs): $(u_boot)
    18         kx 	@( echo "mmc part" > $(boot_script_nfs) && \
    18         kx 	   echo "fatload mmc 0:1 0x825f0000 omap5-uevm.dtb" >> $(boot_script_nfs) && \
    18         kx 	   echo "fatload mmc 0:1 0x80300000 uImage" >> $(boot_script_nfs) && \
    18         kx 	   echo "setenv bootargs 'root=/dev/nfs nfsroot=$(DEFAULT_NFS_ROOT_IP_ADDR):/$(DEFAULT_NFS_ROOT_PATH) console=ttyO2,115200n8 earlyprintk rw ip=dhcp omapdrm.num_crtc=2 consoleblank=0'" >> $(boot_script_nfs) && \
    18         kx 	   echo "setenv fdt_high 0x84000000" >> $(boot_script_nfs) && \
    18         kx 	   echo "bootm 0x80300000 - 0x825f0000" >> $(boot_script_nfs) )
    18         kx 
    18         kx $(boot_script_sd): $(u_boot)
    18         kx 	@( echo "mmc part" > $(boot_script_sd) && \
    18         kx 	   echo "fatload mmc 0:1 0x825f0000 omap5-uevm.dtb" >> $(boot_script_sd) && \
    18         kx 	   echo "fatload mmc 0:1 0x80300000 uImage" >> $(boot_script_sd) && \
    18         kx 	   echo "setenv bootargs 'elevator=noop console=ttyO2,115200n8 root=/dev/mmcblk0p2 rw rootwait earlyprintk fixrtc ip=dhcp omapdrm.num_crtc=2 consoleblank=0'" >> $(boot_script_sd) && \
    18         kx 	   echo "setenv fdt_high 0x84000000" >> $(boot_script_sd) && \
    18         kx 	   echo "bootm 0x80300000 - 0x825f0000" >> $(boot_script_sd) )
    18         kx 
    18         kx $(boot_script_emmc): $(u_boot)
    18         kx 	@( echo "mmc part" > $(boot_script_emmc) && \
    18         kx 	   echo "fatload mmc 1:1 0x825f0000 omap5-uevm.dtb" >> $(boot_script_emmc) && \
    18         kx 	   echo "fatload mmc 1:1 0x80300000 uImage" >> $(boot_script_emmc) && \
    18         kx 	   echo "setenv bootargs 'elevator=noop console=ttyO2,115200n8 root=/dev/mmcblk0p2 rw rootwait earlyprintk fixrtc ip=dhcp omapdrm.num_crtc=2 consoleblank=0'" >> $(boot_script_emmc) && \
    18         kx 	   echo "setenv fdt_high 0x84000000" >> $(boot_script_emmc) && \
    18         kx 	   echo "bootm 0x80300000 - 0x825f0000" >> $(boot_script_emmc) )
    18         kx 
    18         kx $(boot_scr_nfs): $(boot_script_nfs)
    18         kx 	$(SRC_DIR)/tools/mkimage -A $(ARCH) -T script -C none -n "Boot Image" -d $< $@
    18         kx 
    18         kx $(boot_scr_sd): $(boot_script_sd)
    18         kx 	$(SRC_DIR)/tools/mkimage -A $(ARCH) -T script -C none -n "Boot Image" -d $< $@
    18         kx 
    18         kx $(boot_scr_emmc): $(boot_script_emmc)
    18         kx 	$(SRC_DIR)/tools/mkimage -A $(ARCH) -T script -C none -n "Boot Image" -d $< $@
    18         kx 
    62         kx $(build_uboot_pkg): $(u_boot) $(boot_scr_nfs) $(boot_scr_sd) $(boot_scr_emmc)
    18         kx 	@mkdir -p $(TARGET_DEST_DIR)/bootfs
    18         kx 	@mkdir -p $(UBOOT_BIN_PKG)/boot
    18         kx 	# Copy U-Boot images:
    19         kx 	@cp -a $(boot_scr_nfs)  $(TARGET_DEST_DIR)/bootfs
    19         kx 	@cp -a $(boot_scr_nfs)  $(UBOOT_BIN_PKG)/boot
    19         kx 	@cp -a $(boot_scr_sd)   $(TARGET_DEST_DIR)/bootfs
    19         kx 	@cp -a $(boot_scr_sd)   $(TARGET_DEST_DIR)/bootfs/boot.scr
    19         kx 	@cp -a $(boot_scr_sd)   $(UBOOT_BIN_PKG)/boot
    19         kx 	@cp -a $(boot_scr_sd)   $(UBOOT_BIN_PKG)/boot/boot.scr
    18         kx 	@cp -a $(boot_scr_emmc) $(TARGET_DEST_DIR)/bootfs
    18         kx 	@cp -a $(boot_scr_emmc) $(UBOOT_BIN_PKG)/boot
    18         kx 	@cd $(SRC_DIR) && \
    18         kx 	  cp -a MLO u-boot u-boot.bin u-boot.img u-boot.lds u-boot.map u-boot.srec $(TARGET_DEST_DIR)/bootfs && \
    18         kx 	  cp -a MLO u-boot u-boot.bin u-boot.img u-boot.lds u-boot.map u-boot.srec $(UBOOT_BIN_PKG)/boot
   247         kx 	@( cd $(UBOOT_BIN_PKG)/boot ; \
   247         kx 	   chmod a-x u-boot u-boot.bin u-boot.srec ; \
   247         kx 	 )
    18         kx 	@mkdir -p $(UBOOT_BIN_PKG)/usr/doc/u-boot-$(version)
    18         kx 	@cp -a $(SRC_DIR)/COPYING $(SRC_DIR)/CREDITS $(SRC_DIR)/README* $(SRC_DIR)/boards.cfg \
    18         kx 	       $(UBOOT_BIN_PKG)/usr/doc/u-boot-$(version)
    62         kx 	@touch $@
    62         kx 
   247         kx $(boot_records): $(build_uboot_pkg)
   247         kx 	@$(DD) if=/dev/zero of=$@ bs=512 count=2048 conv=notrunc
   247         kx 	# ======= Setup empty boot-records because FS boot mode =======
   247         kx 	@touch $@
   247         kx 
   247         kx $(boot_fat32fs): $(build_uboot_pkg)
   247         kx 	@$(DD) if=/dev/zero of=$@ bs=1M count=511
   247         kx 	# ======= Create FAT32 boot partition image =======
   247         kx 	@$(MKDOSFS) -F 32 -n bootfs $@
   247         kx 	@$(MCOPY) -i $@ $(TARGET_DEST_DIR)/bootfs/MLO            ::/
   247         kx 	@$(MCOPY) -i $@ $(TARGET_DEST_DIR)/bootfs/u-boot.img     ::/
   247         kx 	@$(MCOPY) -i $@ $(TARGET_DEST_DIR)/bootfs/boot.scr       ::/
   247         kx 	@$(MCOPY) -i $@ $(TARGET_DEST_DIR)/bootfs/boot.scr.emmc  ::/
   247         kx 	@$(MCOPY) -i $@ $(TARGET_DEST_DIR)/bootfs/boot.scr.nfs   ::/
   247         kx 	@$(MCOPY) -i $@ $(TARGET_DEST_DIR)/bootfs/boot.scr.sd    ::/
   247         kx 	@$(MCOPY) -i $@ $(TARGET_DEST_DIR)/bootfs/omap5-uevm.dtb ::/
   247         kx 	@$(MCOPY) -i $@ $(TARGET_DEST_DIR)/bootfs/uImage         ::/
   247         kx 	@$(DOSFSCK) -a $@
   247         kx 	@touch $@
   247         kx 
   247         kx $(install_boot_records): $(boot_records) $(boot_fat32fs)
   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 
    62         kx $(UBOOT_BIN_PKG_DESCRIPTION_FILE): $(UBOOT_BIN_PKG_DESCRIPTION_FILE_IN)
    62         kx 	@cat $< | $(SED) -e "s/@VERSION@/$(version)/g" > $@
    62         kx 
    62         kx $(pkg_signature)   : $(pkg_archive) ;
    62         kx $(pkg_description) : $(pkg_archive) ;
    62         kx 
   247         kx $(pkg_archive): $(install_boot_records) $(UBOOT_BIN_PKG_DESCRIPTION_FILE) $(UBOOT_BIN_PKG_INSTALL_SCRIPT)
    18         kx 	@cp $(UBOOT_BIN_PKG_DESCRIPTION_FILE) $(UBOOT_BIN_PKG)/.DESCRIPTION
    18         kx 	@cp $(UBOOT_BIN_PKG_INSTALL_SCRIPT) $(UBOOT_BIN_PKG)/.INSTALL
    18         kx 	@chmod a+x $(UBOOT_BIN_PKG)/.INSTALL
    18         kx 	@$(BUILD_PKG_REQUIRES) $(UBOOT_BIN_PKG)/.REQUIRES
    18         kx 	@echo "pkgname=$(UBOOT_BIN_PKG_NAME)"                            >  $(UBOOT_BIN_PKG)/.PKGINFO ; \
    18         kx 	 echo "pkgver=$(UBOOT_BIN_PKG_VERSION)"                          >> $(UBOOT_BIN_PKG)/.PKGINFO ; \
    18         kx 	 echo "arch=$(UBOOT_BIN_PKG_ARCH)"                               >> $(UBOOT_BIN_PKG)/.PKGINFO ; \
    18         kx 	 echo "distroname=$(UBOOT_BIN_PKG_DISTRO_NAME)"                  >> $(UBOOT_BIN_PKG)/.PKGINFO ; \
    18         kx 	 echo "distrover=$(UBOOT_BIN_PKG_DISTRO_VERSION)"                >> $(UBOOT_BIN_PKG)/.PKGINFO ; \
    18         kx 	 echo "group=$(UBOOT_BIN_PKG_GROUP)"                             >> $(UBOOT_BIN_PKG)/.PKGINFO ; \
    18         kx 	 echo "short_description=\"$(UBOOT_BIN_PKG_SHORT_DESCRIPTION)\"" >> $(UBOOT_BIN_PKG)/.PKGINFO ; \
    18         kx 	 echo "url=$(UBOOT_BIN_PKG_URL)"                                 >> $(UBOOT_BIN_PKG)/.PKGINFO ; \
    18         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 .."