Platform

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

906 Commits   6 Branches   3 Tags   |
   344         kx 
   344         kx COMPONENT_TARGETS  = $(HARDWARE_OMAP5UEVM)
   344         kx COMPONENT_TARGETS += $(HARDWARE_DRA7XXEVM)
   344         kx 
   344         kx NEED_ABS_PATH      = true
   344         kx 
   344         kx COMPONENT_IS_3PP   = true
   344         kx 
   344         kx 
   344         kx include ../../../../build-system/constants.mk
   344         kx 
   344         kx 
   344         kx SOURCE_REQUIRES   = sources/U-Boot/TI/omap5/glsdk
   344         kx 
   344         kx REQUIRES          = boot/kernel/omap543x/3.14.57-20151211
   344         kx 
   344         kx # ======= __END_OF_REQUIRES__ =======
   344         kx 
   344         kx 
   344         kx DEFAULT_NFS_ROOT_IP_ADDR =  172.16.0.3
   344         kx DEFAULT_NFS_ROOT_PATH    = "nfsroot-$(HARDWARE)"
   344         kx DEFAULT_HW_ADDR          =  2a:ab:c0:97:84:9d
   344         kx 
   344         kx 
   344         kx version           = 2014.07-20160225
   344         kx tar_xz_archive    = $(SRC_PACKAGE_PATH)/U-Boot/TI/omap5/glsdk/u-boot-omap-$(version).tar.xz
   344         kx SRC_ARCHIVE       = $(tar_xz_archive)
   344         kx SRC_DIR           = $(TARGET_BUILD_DIR)/u-boot-omap-$(version)
   344         kx src_done          = $(TARGET_BUILD_DIR)/.source_done
   344         kx 
   344         kx u_boot            = $(TARGET_BUILD_DIR)/.u_boot_done
   344         kx 
   344         kx ifneq ($(filter $(HARDWARE),$(HARDWARE_OMAP5UEVM)),)
   344         kx u_boot_config     = omap5_uevm_config
   344         kx endif
   344         kx ifneq ($(filter $(HARDWARE),$(HARDWARE_DRA7XXEVM)),)
   344         kx u_boot_config     = dra7xx_evm_config
   344         kx endif
   344         kx 
   344         kx boot_script_nfs   = $(TARGET_BUILD_DIR)/boot.script.nfs
   344         kx boot_scr_nfs      = $(TARGET_BUILD_DIR)/boot.scr.nfs
   344         kx 
   344         kx boot_script_sd    = $(TARGET_BUILD_DIR)/boot.script.sd
   344         kx boot_scr_sd       = $(TARGET_BUILD_DIR)/boot.scr.sd
   344         kx 
   344         kx boot_script_emmc  = $(TARGET_BUILD_DIR)/boot.script.emmc
   344         kx boot_scr_emmc     = $(TARGET_BUILD_DIR)/boot.scr.emmc
   344         kx 
   344         kx boot_records         = $(TARGET_BUILD_DIR)/$(HARDWARE).boot-records
   344         kx boot_fat32fs         = $(TARGET_BUILD_DIR)/$(HARDWARE).fat32fs
   344         kx install_boot_records = $(TARGET_BUILD_DIR)/.boot_records_done
   344         kx 
   344         kx 
   344         kx PATCHES = PATCHES
   344         kx 
   344         kx 
   344         kx ifneq ($(filter $(TOOLCHAIN),$(TOOLCHAIN_OMAP543X_GLIBC)),)
   344         kx ARCH = arm
   344         kx endif
   344         kx 
   344         kx USE_TARGET_DEST_DIR_SYSROOT = no
   344         kx 
   344         kx 
   344         kx ####### Targets
   344         kx 
   344         kx PKG_GROUP = boot
   344         kx 
   344         kx 
   344         kx UBOOT_BIN_PKG_NAME                = u-boot
   344         kx UBOOT_BIN_PKG_VERSION             = 2014.07
   344         kx UBOOT_BIN_PKG_ARCH                = $(TOOLCHAIN)
   344         kx UBOOT_BIN_PKG_DISTRO_NAME         = $(DISTRO_NAME)
   344         kx UBOOT_BIN_PKG_DISTRO_VERSION      = $(DISTRO_VERSION)
   344         kx UBOOT_BIN_PKG_GROUP               = $(PKG_GROUP)
   344         kx ###                                |---handy-ruler-------------------------------|
   349         kx UBOOT_BIN_PKG_SHORT_DESCRIPTION   = $(HW_SPEC) U-Boot
   344         kx UBOOT_BIN_PKG_URL                 = $(BUG_URL)
   344         kx UBOOT_BIN_PKG_LICENSE             = GPLv2
   344         kx UBOOT_BIN_PKG_DESCRIPTION_FILE    = $(TARGET_BUILD_DIR)/$(UBOOT_BIN_PKG_NAME)-pkg-description
   344         kx UBOOT_BIN_PKG_DESCRIPTION_FILE_IN = $(UBOOT_BIN_PKG_NAME)-pkg-description.in
   344         kx UBOOT_BIN_PKG_INSTALL_SCRIPT      = $(UBOOT_BIN_PKG_NAME)-pkg-install.sh
   344         kx 
   344         kx UBOOT_BIN_PKG      = $(CURDIR)/$(TARGET_BUILD_DIR)/$(UBOOT_BIN_PKG_NAME)-package
   344         kx 
   344         kx build_uboot_pkg    = $(TARGET_BUILD_DIR)/.u_boot_pkg_done
   344         kx 
   344         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)
   344         kx 
   344         kx pkg_archive        = $(TARGET_BUILD_DIR)/$(PKG_GROUP)/$(pkg_basename).$(pkg_arch_suffix)
   344         kx pkg_signature      = $(call sign-name,$(pkg_archive))
   344         kx pkg_description    = $(call desc-name,$(pkg_archive))
   344         kx products           = $(call pkg-files,$(pkg_archive))
   344         kx 
   344         kx BUILD_TARGETS      = $(u_boot)
   344         kx BUILD_TARGETS     += $(boot_script_nfs)
   344         kx BUILD_TARGETS     += $(boot_script_sd)
   344         kx BUILD_TARGETS     += $(boot_script_emmc)
   344         kx BUILD_TARGETS     += $(boot_scr_nfs)
   344         kx BUILD_TARGETS     += $(boot_scr_sd)
   344         kx BUILD_TARGETS     += $(boot_scr_emmc)
   344         kx BUILD_TARGETS     += $(build_uboot_pkg)
   344         kx BUILD_TARGETS     += $(install_boot_records)
   344         kx 
   344         kx PRODUCT_TARGETS    = $(products)
   344         kx 
   344         kx ROOTFS_TARGETS     = $(pkg_archive)
   344         kx 
   344         kx 
   344         kx include ../../../../build-system/core.mk
   344         kx 
   344         kx 
   344         kx ####### Dependencies
   344         kx 
   344         kx ifneq ($(filter $(HARDWARE),$(HARDWARE_OMAP5UEVM)),)
   344         kx console_dev       = ttyO2
   344         kx device_tree_name  = omap5-uevm.dtb
   344         kx device_dtbs       = omap5-uevm.dtb
   344         kx endif
   344         kx ifneq ($(filter $(HARDWARE),$(HARDWARE_DRA7XXEVM)),)
   344         kx console_dev       = ttyO0
   344         kx device_tree_name  = dra7-evm.dtb
   344         kx device_dtbs       = dra7-evm-lcd10.dtb
   344         kx device_dtbs      += dra7-evm-lcd7.dtb
   344         kx device_dtbs      += dra7-evm-vision.dtb
   344         kx device_dtbs      += dra7-evm.dtb
   344         kx device_dtbs      += dra72-evm-lcd10.dtb
   344         kx device_dtbs      += dra72-evm-lcd7.dtb
   344         kx device_dtbs      += dra72-evm-vision.dtb
   344         kx device_dtbs      += dra72-evm.dtb
   344         kx endif
   344         kx 
   344         kx extra  = rw
   344         kx extra += rootwait
   344         kx extra += earlyprintk
   344         kx extra += fixrtc
   344         kx extra += omapdrm.num_crtc=2
   344         kx extra += consoleblank=0
   344         kx extra += cma=64M
   344         kx extra += rootfstype=ext4
   344         kx extra += snd.slots_reserved=1,1
   344         kx 
   344         kx 
   344         kx $(src_done): $(SRC_ARCHIVE) $(PATCHES_DEP)
   344         kx 	$(UNPACK_SRC_ARCHIVE)
   344         kx 	$(APPLY_PATCHES)
   344         kx 	@touch $@
   344         kx 
   344         kx UMAKE := $(BUILD_ENVIRONMENT) $(MAKE) -C $(SRC_DIR) CROSS_COMPILE="$(CROSS_PREFIX)"
   344         kx 
   344         kx $(u_boot): $(src_done)
   344         kx 	$(UMAKE)  $(u_boot_config)
   344         kx 	$(UMAKE)
   344         kx 	@touch $@
   344         kx 
   344         kx $(boot_script_nfs): $(u_boot)
   348         kx 	@( echo "mmc part"  > $(boot_script_nfs) && \
   348         kx 	   echo "fatload mmc 0:1 0x88000000 $(device_tree_name)" >> $(boot_script_nfs) && \
   348         kx 	   echo "fatload mmc 0:1 0x82000000 uImage" >> $(boot_script_nfs) && \
   344         kx 	   echo "setenv bootargs 'root=/dev/nfs nfsroot=$(DEFAULT_NFS_ROOT_IP_ADDR):/$(DEFAULT_NFS_ROOT_PATH) console=$(console_dev),115200n8 ip=dhcp $(extra)'" >> $(boot_script_nfs) && \
   348         kx 	   echo "bootm 0x82000000 - 0x88000000" >> $(boot_script_nfs) )
   344         kx 
   344         kx $(boot_script_sd): $(u_boot)
   348         kx 	@( echo "mmc part"  > $(boot_script_sd) && \
   348         kx 	   echo "fatload mmc 0:1 0x88000000 $(device_tree_name)" >> $(boot_script_sd) && \
   348         kx 	   echo "fatload mmc 0:1 0x82000000 uImage" >> $(boot_script_sd) && \
   344         kx 	   echo "setenv bootargs 'elevator=noop console=$(console_dev),115200n8 root=/dev/mmcblk0p2 $(extra)'" >> $(boot_script_sd) && \
   348         kx 	   echo "bootm 0x82000000 - 0x88000000" >> $(boot_script_sd) )
   344         kx 
   344         kx $(boot_script_emmc): $(u_boot)
   348         kx 	@( echo "mmc part"  > $(boot_script_emmc) && \
   348         kx 	   echo "fatload mmc 1:1 0x88000000 $(device_tree_name)" >> $(boot_script_emmc) && \
   348         kx 	   echo "fatload mmc 1:1 0x82000000 uImage" >> $(boot_script_emmc) && \
   344         kx 	   echo "setenv bootargs 'elevator=noop console=$(console_dev),115200n8 root=/dev/mmcblk0p2 $(extra)'" >> $(boot_script_emmc) && \
   348         kx 	   echo "bootm 0x82000000 - 0x88000000" >> $(boot_script_emmc) )
   344         kx 
   344         kx $(boot_scr_nfs): $(boot_script_nfs)
   344         kx 	$(SRC_DIR)/tools/mkimage -A $(ARCH) -T script -C none -n "Boot Image" -d $< $@
   344         kx 
   344         kx $(boot_scr_sd): $(boot_script_sd)
   344         kx 	$(SRC_DIR)/tools/mkimage -A $(ARCH) -T script -C none -n "Boot Image" -d $< $@
   344         kx 
   344         kx $(boot_scr_emmc): $(boot_script_emmc)
   344         kx 	$(SRC_DIR)/tools/mkimage -A $(ARCH) -T script -C none -n "Boot Image" -d $< $@
   344         kx 
   344         kx $(build_uboot_pkg): $(u_boot) $(boot_scr_nfs) $(boot_scr_sd) $(boot_scr_emmc)
   344         kx 	@mkdir -p $(TARGET_DEST_DIR)/bootfs
   344         kx 	@mkdir -p $(UBOOT_BIN_PKG)/boot
   349         kx 	# ======= Copy U-Boot images: =======
   344         kx 	@cp -a $(boot_scr_nfs)  $(TARGET_DEST_DIR)/bootfs
   344         kx 	@cp -a $(boot_scr_nfs)  $(UBOOT_BIN_PKG)/boot
   344         kx 	@cp -a $(boot_scr_sd)   $(TARGET_DEST_DIR)/bootfs
   344         kx 	@cp -a $(boot_scr_sd)   $(TARGET_DEST_DIR)/bootfs/boot.scr
   344         kx 	@cp -a $(boot_scr_sd)   $(UBOOT_BIN_PKG)/boot
   344         kx 	@cp -a $(boot_scr_sd)   $(UBOOT_BIN_PKG)/boot/boot.scr
   344         kx 	@cp -a $(boot_scr_emmc) $(TARGET_DEST_DIR)/bootfs
   344         kx 	@cp -a $(boot_scr_emmc) $(UBOOT_BIN_PKG)/boot
   344         kx 	@cd $(SRC_DIR) && \
   344         kx 	  cp -a MLO u-boot.img $(TARGET_DEST_DIR)/bootfs && \
   344         kx 	  cp -a MLO u-boot.img $(UBOOT_BIN_PKG)/boot
   344         kx 	@mkdir -p $(UBOOT_BIN_PKG)/usr/doc/u-boot-$(version)
   344         kx 	@cp -a $(SRC_DIR)/Licenses $(SRC_DIR)/CREDITS $(SRC_DIR)/README $(SRC_DIR)/boards.cfg \
   344         kx 	       $(UBOOT_BIN_PKG)/usr/doc/u-boot-$(version)
   344         kx 	@touch $@
   344         kx 
   344         kx $(boot_records): $(build_uboot_pkg)
   344         kx 	@$(DD) if=/dev/zero of=$@ bs=512 count=2048 conv=notrunc
   344         kx 	# ======= Setup empty boot-records because FS boot mode =======
   344         kx 	@touch $@
   344         kx 
   344         kx $(boot_fat32fs): $(build_uboot_pkg)
   344         kx 	@$(DD) if=/dev/zero of=$@ bs=1M count=511
   344         kx 	# ======= Create FAT32 boot partition image =======
   344         kx 	@$(MKDOSFS) -F 32 -n bootfs $@
   344         kx 	@$(MCOPY) -i $@ $(TARGET_DEST_DIR)/bootfs/MLO            ::/
   344         kx 	@$(MCOPY) -i $@ $(TARGET_DEST_DIR)/bootfs/u-boot.img     ::/
   344         kx 	@$(MCOPY) -i $@ $(TARGET_DEST_DIR)/bootfs/boot.scr       ::/
   344         kx 	@$(MCOPY) -i $@ $(TARGET_DEST_DIR)/bootfs/boot.scr.emmc  ::/
   344         kx 	@$(MCOPY) -i $@ $(TARGET_DEST_DIR)/bootfs/boot.scr.nfs   ::/
   344         kx 	@$(MCOPY) -i $@ $(TARGET_DEST_DIR)/bootfs/boot.scr.sd    ::/
   344         kx 	@for dtb in $(device_dtbs) ; do \
   344         kx 	   $(MCOPY) -i $@ $(TARGET_DEST_DIR)/bootfs/$$dtb ::/ ; \
   344         kx 	 done
   344         kx 	@$(MCOPY) -i $@ $(TARGET_DEST_DIR)/bootfs/uImage         ::/
   344         kx 	@$(DOSFSCK) -a $@
   344         kx 	@touch $@
   344         kx 
   344         kx $(install_boot_records): $(boot_records) $(boot_fat32fs)
   344         kx 	@$(BUILDSYSTEM)/install_targets         \
   344         kx 	   --destination=$(PRODUCTS_DEST_DIR)   \
   344         kx 	   --toolchain=$(TOOLCHAIN)             \
   344         kx 	   --hardware=$(HARDWARE)               \
   344         kx 	   --flavour=$(FLAVOUR)                 \
   344         kx 	   $^
   344         kx 	@touch $@
   344         kx 
   344         kx $(UBOOT_BIN_PKG_DESCRIPTION_FILE): $(UBOOT_BIN_PKG_DESCRIPTION_FILE_IN)
   344         kx 	@cat $< | $(SED) -e "s/@VERSION@/$(UBOOT_BIN_PKG_VERSION)/g" | \
   344         kx 	          $(SED) -e "s/@HARDWARE_SPEC@/$(HW_SPEC)/g"> $@
   344         kx 
   344         kx $(pkg_signature)   : $(pkg_archive) ;
   344         kx $(pkg_description) : $(pkg_archive) ;
   344         kx 
   344         kx $(pkg_archive): $(install_boot_records) $(UBOOT_BIN_PKG_DESCRIPTION_FILE) $(UBOOT_BIN_PKG_INSTALL_SCRIPT)
   344         kx 	@cp $(UBOOT_BIN_PKG_DESCRIPTION_FILE) $(UBOOT_BIN_PKG)/.DESCRIPTION
   344         kx 	@cp $(UBOOT_BIN_PKG_INSTALL_SCRIPT) $(UBOOT_BIN_PKG)/.INSTALL
   344         kx 	@chmod a+x $(UBOOT_BIN_PKG)/.INSTALL
   344         kx 	@$(BUILD_PKG_REQUIRES) $(UBOOT_BIN_PKG)/.REQUIRES
   344         kx 	@echo "pkgname=$(UBOOT_BIN_PKG_NAME)"                            >  $(UBOOT_BIN_PKG)/.PKGINFO ; \
   344         kx 	 echo "pkgver=$(UBOOT_BIN_PKG_VERSION)"                          >> $(UBOOT_BIN_PKG)/.PKGINFO ; \
   344         kx 	 echo "arch=$(UBOOT_BIN_PKG_ARCH)"                               >> $(UBOOT_BIN_PKG)/.PKGINFO ; \
   344         kx 	 echo "distroname=$(UBOOT_BIN_PKG_DISTRO_NAME)"                  >> $(UBOOT_BIN_PKG)/.PKGINFO ; \
   344         kx 	 echo "distrover=$(UBOOT_BIN_PKG_DISTRO_VERSION)"                >> $(UBOOT_BIN_PKG)/.PKGINFO ; \
   344         kx 	 echo "group=$(UBOOT_BIN_PKG_GROUP)"                             >> $(UBOOT_BIN_PKG)/.PKGINFO ; \
   344         kx 	 echo "short_description=\"$(UBOOT_BIN_PKG_SHORT_DESCRIPTION)\"" >> $(UBOOT_BIN_PKG)/.PKGINFO ; \
   344         kx 	 echo "url=$(UBOOT_BIN_PKG_URL)"                                 >> $(UBOOT_BIN_PKG)/.PKGINFO ; \
   344         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 .."