Platform

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

1000 Commits   6 Branches   3 Tags   |
Index: 2013.10-20150826/Makefile
===================================================================
--- 2013.10-20150826/Makefile	(revision 246)
+++ 2013.10-20150826/Makefile	(revision 247)
@@ -35,7 +35,10 @@
 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
 
 
@@ -80,6 +83,7 @@
 BUILD_TARGETS     += $(boot_script_sd)
 BUILD_TARGETS     += $(boot_scr_sd)
 BUILD_TARGETS     += $(build_uboot_pkg)
+BUILD_TARGETS     += $(install_boot_records)
 
 PRODUCT_TARGETS    = $(products)
 
@@ -136,6 +140,24 @@
 	       $(UBOOT_BIN_PKG)/usr/doc/u-boot-ci20-$(version)
 	@touch $@
 
+$(boot_records): $(build_uboot_pkg)
+	@$(DD) if=/dev/zero of=$@ bs=512 count=2048 conv=notrunc
+	# ======= Clean U-Boot environment (just for remember env address)       =======
+	@$(DD) if=/dev/zero of=$@ bs=1K seek=526 count=32 conv=notrunc
+	# ======= Setup u-boot-spl & u-boot into unallocated space of disk image =======
+	@$(DD) if=$(UBOOT_BIN_PKG)/boot/u-boot-spl.bin of=$@ obs=512 seek=1  conv=notrunc
+	@$(DD) if=$(UBOOT_BIN_PKG)/boot/u-boot.img     of=$@ obs=1K  seek=14 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" > $@
 
@@ -142,7 +164,7 @@
 $(pkg_signature)   : $(pkg_archive) ;
 $(pkg_description) : $(pkg_archive) ;
 
-$(pkg_archive): $(build_uboot_pkg) $(UBOOT_BIN_PKG_DESCRIPTION_FILE) $(UBOOT_BIN_PKG_INSTALL_SCRIPT)
+$(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