Platform

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

849 Commits   5 Branches   3 Tags   |
Index: Makefile
===================================================================
--- Makefile	(nonexistent)
+++ Makefile	(revision 582)
@@ -0,0 +1,189 @@
+
+COMPONENT_TARGETS = $(HARDWARE_BT1)
+
+NEED_ABS_PATH     = true
+
+COMPONENT_IS_3PP  = true
+
+
+include ../../../../build-system/constants.mk
+
+
+SOURCE_REQUIRES   = sources/U-Boot/Baikal/BFK
+
+REQUIRES          = boot/kernel/bt1/4.4.24-4.08.84
+
+# ======= __END_OF_REQUIRES__ =======
+
+
+DEFAULT_NFS_ROOT_IP_ADDR = 192.168.68.230
+DEFAULT_NFS_ROOT_PATH    = "nfsroot-bt1"
+DEFAULT_HW_ADDR          = 7a:72:6c:4a:7a:ee
+
+
+version         = 2014.10-4.08.84
+tar_xz_archive  = $(SRC_PACKAGE_PATH)/U-Boot/Baikal/BFK/u-boot-baikal-$(version).tar.xz
+SRC_ARCHIVE     = $(tar_xz_archive)
+SRC_DIR         = $(TARGET_BUILD_DIR)/u-boot-baikal-$(version)
+src_done        = $(TARGET_BUILD_DIR)/.source_done
+
+u_boot          = $(TARGET_BUILD_DIR)/.u_boot_done
+
+u_boot_config   = baikal_bfk_defconfig
+u_boot_logo     = $(CURDIR)/logo/radix-2CPU-224x96.bmp
+
+boot_script_sd  = $(TARGET_BUILD_DIR)/boot.script.sd
+boot_scr_sd     = $(TARGET_BUILD_DIR)/boot.scr.sd
+
+boot_records         = $(TARGET_BUILD_DIR)/$(HARDWARE).boot-records
+install_boot_records = $(TARGET_BUILD_DIR)/.boot_records_done
+
+
+PATCHES = PATCHES
+
+
+ifneq ($(filter $(TOOLCHAIN),$(TOOLCHAIN_P5600_GLIBC)),)
+ARCH = mips
+endif
+
+USE_TARGET_DEST_DIR_SYSROOT = no
+
+
+####### Targets
+
+PKG_GROUP = boot
+
+
+UBOOT_BIN_PKG_NAME                = u-boot
+UBOOT_BIN_PKG_VERSION             = 2014.10
+UBOOT_BIN_PKG_ARCH                = $(TOOLCHAIN)
+UBOOT_BIN_PKG_DISTRO_NAME         = $(DISTRO_NAME)
+UBOOT_BIN_PKG_DISTRO_VERSION      = $(DISTRO_VERSION)
+UBOOT_BIN_PKG_GROUP               = $(PKG_GROUP)
+###                                |---handy-ruler-------------------------------|
+UBOOT_BIN_PKG_SHORT_DESCRIPTION   = Baikal-T BFK U-Boot
+UBOOT_BIN_PKG_URL                 = $(BUG_URL)
+UBOOT_BIN_PKG_LICENSE             = custom
+UBOOT_BIN_PKG_DESCRIPTION_FILE    = $(TARGET_BUILD_DIR)/$(UBOOT_BIN_PKG_NAME)-pkg-description
+UBOOT_BIN_PKG_DESCRIPTION_FILE_IN = $(UBOOT_BIN_PKG_NAME)-pkg-description.in
+UBOOT_BIN_PKG_INSTALL_SCRIPT      = $(UBOOT_BIN_PKG_NAME)-pkg-install.sh
+
+UBOOT_BIN_PKG      = $(CURDIR)/$(TARGET_BUILD_DIR)/$(UBOOT_BIN_PKG_NAME)-package
+
+build_uboot_pkg    = $(TARGET_BUILD_DIR)/.u_boot_pkg_done
+
+pkg_basename       = $(UBOOT_BIN_PKG_NAME)-$(UBOOT_BIN_PKG_VERSION)-$(UBOOT_BIN_PKG_ARCH)-$(UBOOT_BIN_PKG_DISTRO_NAME)-$(UBOOT_BIN_PKG_DISTRO_VERSION)
+
+pkg_archive        = $(TARGET_BUILD_DIR)/$(PKG_GROUP)/$(pkg_basename).$(pkg_arch_suffix)
+pkg_signature      = $(call sign-name,$(pkg_archive))
+pkg_description    = $(call desc-name,$(pkg_archive))
+products           = $(call pkg-files,$(pkg_archive))
+
+BUILD_TARGETS      = $(u_boot)
+BUILD_TARGETS     += $(boot_script_sd)
+BUILD_TARGETS     += $(boot_scr_sd)
+BUILD_TARGETS     += $(build_uboot_pkg)
+BUILD_TARGETS     += $(install_boot_records)
+
+PRODUCT_TARGETS    = $(products)
+
+ROOTFS_TARGETS     = $(pkg_archive)
+
+
+include ../../../../build-system/core.mk
+
+
+#
+# Unavailable for 3.0.8 kernel
+#
+extra  = maxcpus=2
+extra += earlyprintk=uart8250,mmio32,0x1F04A000,115200
+extra += video=sma750fb:1600x900-16@60
+
+
+ifneq ($(filter $(HARDWARE),$(HARDWARE_BT1)),)
+device_dtb  = baikal_bfk.dtb
+endif
+
+device_tree_compiler = $(TARGET_DEST_DIR)/usr/bin/$(TARGET)-dtc
+
+####### Dependencies
+
+$(src_done): $(SRC_ARCHIVE) $(PATCHES_DEP)
+	$(UNPACK_SRC_ARCHIVE)
+	$(APPLY_PATCHES)
+	@touch $@
+
+UMAKE := $(BUILD_ENVIRONMENT) $(MAKE) -C $(SRC_DIR) CROSS_COMPILE="$(CROSS_PREFIX)" \
+                                                    DTC=$(device_tree_compiler) LOGO_BMP=$(u_boot_logo)
+
+$(u_boot): $(src_done)
+	$(UMAKE)  $(u_boot_config)
+	$(UMAKE)
+	@touch $@
+
+$(boot_script_sd): $(u_boot)
+	@( echo "mmcinfo"                                    > $(boot_script_sd) && \
+	   echo "ext4load mmc 0:1 0x80100000 /boot/uImage"  >> $(boot_script_sd) && \
+	   echo "ext4load mmc 0:1 0x85D00000 $(device_dtb)" >> $(boot_script_sd) && \
+	   echo "setenv bootargs 'console=ttyS0,115200n8 root=/dev/mmcblk0p1 ro rootwait $(extra)'" >> $(boot_script_sd) && \
+	   echo "bootm 0x80100000 - 0x85D00000"             >> $(boot_script_sd) \
+	 )
+
+$(boot_scr_sd): $(boot_script_sd)
+	$(SRC_DIR)/tools/mkimage -A $(ARCH) -T script -C none -n "Boot Image" -d $< $@
+
+$(build_uboot_pkg): $(boot_scr_sd)
+	@mkdir -p $(TARGET_DEST_DIR)/bootfs
+	@mkdir -p $(UBOOT_BIN_PKG)/boot
+	# ======= Copy boot script =======
+	@cp -a $(boot_scr_sd)   $(TARGET_DEST_DIR)/bootfs/u-boot.scr
+	@cp -a $(boot_scr_sd)   $(UBOOT_BIN_PKG)/boot/u-boot.scr
+	# ======= Copy U-Boot images =======
+	@( cd $(SRC_DIR) ; \
+	   cp -a u-boot.{bin,srec} $(TARGET_DEST_DIR)/bootfs ; \
+	   cp -a u-boot.{bin,srec} $(UBOOT_BIN_PKG)/boot     ; \
+	   cp -a arch/$(ARCH)/dts/baikal.dtb $(TARGET_DEST_DIR)/bootfs/u-boot.dtb ; \
+	   cp -a arch/$(ARCH)/dts/baikal.dtb $(UBOOT_BIN_PKG)/boot/u-boot.dtb     ; \
+	 )
+	@chmod a-x $(UBOOT_BIN_PKG)/boot/u-boot*.{bin,srec}
+	@mkdir -p $(UBOOT_BIN_PKG)/usr/doc/u-boot-baikal-$(version)
+	@cp -a $(SRC_DIR)/Licenses $(SRC_DIR)/COPYING $(SRC_DIR)/CREDITS \
+	       $(SRC_DIR)/MAINTAINERS $(SRC_DIR)/README $(SRC_DIR)/VERSION \
+	       $(UBOOT_BIN_PKG)/usr/doc/u-boot-baikal-$(version)
+	@touch $@
+
+$(boot_records): $(build_uboot_pkg)
+	@$(DD) if=/dev/zero of=$@ bs=512 count=2048 conv=notrunc
+	@touch $@
+
+$(install_boot_records): $(boot_records)
+	@$(BUILDSYSTEM)/install_targets         \
+	   --destination=$(PRODUCTS_DEST_DIR)   \
+	   --toolchain=$(TOOLCHAIN)             \
+	   --hardware=$(HARDWARE)               \
+	   --flavour=$(FLAVOUR)                 \
+	   $^
+	@touch $@
+
+$(UBOOT_BIN_PKG_DESCRIPTION_FILE): $(UBOOT_BIN_PKG_DESCRIPTION_FILE_IN)
+	@cat $< | $(SED) -e "s/@VERSION@/$(version)/g" > $@
+
+$(pkg_signature)   : $(pkg_archive) ;
+$(pkg_description) : $(pkg_archive) ;
+
+$(pkg_archive): $(install_boot_records) $(UBOOT_BIN_PKG_DESCRIPTION_FILE) $(UBOOT_BIN_PKG_INSTALL_SCRIPT)
+	@cp $(UBOOT_BIN_PKG_DESCRIPTION_FILE) $(UBOOT_BIN_PKG)/.DESCRIPTION
+	@cp $(UBOOT_BIN_PKG_INSTALL_SCRIPT) $(UBOOT_BIN_PKG)/.INSTALL
+	@chmod a+x $(UBOOT_BIN_PKG)/.INSTALL
+	@$(BUILD_PKG_REQUIRES) $(UBOOT_BIN_PKG)/.REQUIRES
+	@echo "pkgname=$(UBOOT_BIN_PKG_NAME)"                            >  $(UBOOT_BIN_PKG)/.PKGINFO ; \
+	 echo "pkgver=$(UBOOT_BIN_PKG_VERSION)"                          >> $(UBOOT_BIN_PKG)/.PKGINFO ; \
+	 echo "arch=$(UBOOT_BIN_PKG_ARCH)"                               >> $(UBOOT_BIN_PKG)/.PKGINFO ; \
+	 echo "distroname=$(UBOOT_BIN_PKG_DISTRO_NAME)"                  >> $(UBOOT_BIN_PKG)/.PKGINFO ; \
+	 echo "distrover=$(UBOOT_BIN_PKG_DISTRO_VERSION)"                >> $(UBOOT_BIN_PKG)/.PKGINFO ; \
+	 echo "group=$(UBOOT_BIN_PKG_GROUP)"                             >> $(UBOOT_BIN_PKG)/.PKGINFO ; \
+	 echo "short_description=\"$(UBOOT_BIN_PKG_SHORT_DESCRIPTION)\"" >> $(UBOOT_BIN_PKG)/.PKGINFO ; \
+	 echo "url=$(UBOOT_BIN_PKG_URL)"                                 >> $(UBOOT_BIN_PKG)/.PKGINFO ; \
+	 echo "license=$(UBOOT_BIN_PKG_LICENSE)"                         >> $(UBOOT_BIN_PKG)/.PKGINFO
+	@$(FAKEROOT) sh -c "cd $(UBOOT_BIN_PKG) && chown -R root:root . && $(MAKE_PACKAGE) --linkadd yes .."
Index: PATCHES
===================================================================
--- PATCHES	(nonexistent)
+++ PATCHES	(revision 582)
@@ -0,0 +1,2 @@
+
+../../../../sources/U-Boot/Baikal/BFK/patches/u-boot-baikal-2014.10-4.08.84-dtc.patch -p0
Index: logo/radix-2CPU-224x96.bmp
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = image/x-ms-bmp

Property changes on: logo/radix-2CPU-224x96.bmp
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/x-ms-bmp
\ No newline at end of property
Index: u-boot-pkg-description.in
===================================================================
--- u-boot-pkg-description.in	(nonexistent)
+++ u-boot-pkg-description.in	(revision 582)
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.  Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in.  You must
+# make exactly 11 lines for the formatting to be correct.  It's also
+# customary to leave one space after the ':'.
+
+      |-----handy-ruler------------------------------------------------------|
+u-boot: U-Boot @VERSION@ for Baikal-T BFK board
+u-boot:
+u-boot: BaikalElectronics clone of the U-Boot, a boot loader for Embedded
+u-boot: boards based on PowerPC, ARM, MIPS and several other processors,
+u-boot: which can be installed in a boot ROM and used to initialize and
+u-boot: test the hardware or to download and run application code.
+u-boot:
+u-boot: Original DENX Git Repository: git://git.denx.de/u-boot.git
+u-boot:
+u-boot: BaikalElectronics SDK: http://www.baikalelectronics.ru/products/T1
+u-boot:
Index: u-boot-pkg-install.sh
===================================================================
--- u-boot-pkg-install.sh	(nonexistent)
+++ u-boot-pkg-install.sh	(revision 582)
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+
+# arg 1:  the new package version
+pre_install() {
+  /bin/true
+}
+
+# arg 1:  the new package version
+post_install() {
+  /bin/true
+}
+
+# arg 1:  the new package version
+# arg 2:  the old package version
+pre_update() {
+  /bin/true
+}
+
+# arg 1:  the new package version
+# arg 2:  the old package version
+post_update() {
+  post_install
+}
+
+# arg 1:  the old package version
+pre_remove() {
+  /bin/true
+}
+
+# arg 1:  the old package version
+post_remove() {
+  /bin/true
+}
+
+
+operation=$1
+shift
+
+$operation $*

Property changes on: u-boot-pkg-install.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property