Platform

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

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