From c31383762aa97493514df0847f85f6dd4d649151 Mon Sep 17 00:00:00 2001 From: Benjamin Krill Date: Sun, 6 Apr 2014 15:38:55 +0200 Subject: [PATCH] uboot: filesize varible is set by fatload, no need to do it in the script --- fpga/soc/soc_system_uboot-scr.txt | 1 - fpga/syn/Makefile | 12 +++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/fpga/soc/soc_system_uboot-scr.txt b/fpga/soc/soc_system_uboot-scr.txt index 6d6da06..d7b82f5 100644 --- a/fpga/soc/soc_system_uboot-scr.txt +++ b/fpga/soc/soc_system_uboot-scr.txt @@ -1,4 +1,3 @@ -setenv fpgasize %FPGA_RBF_SIZE%; fatload mmc 0:1 $fpgadata socfpga.rbf; fpga load 0 $fpgadata $filesize; run bridge_enable_handoff; diff --git a/fpga/syn/Makefile b/fpga/syn/Makefile index f7f564d..a877fbc 100644 --- a/fpga/syn/Makefile +++ b/fpga/syn/Makefile @@ -50,7 +50,7 @@ qsys-generate.HELP = Generate current QSYS implementation qsys-edit.HELP = Edit QSYS implementation ##### UBOOT / PRELOADER ################################################################################ -.PHONY: preloader uboot +.PHONY: preloader uboot uboot-script PRELOADER_DIR = $(BUILD_DIR)/software/preloader QSYS_HPS_INST_NAME = hps_0 PRELOADER_HANDOFF = $(BUILD_QUARTUS_DIR)/hps_isw_handoff/$(QSYS_BASE)_$(QSYS_HPS_INST_NAME)/ @@ -80,6 +80,11 @@ preloader: $(PRELOADER_DIR)/Makefile uboot: $(PRELOADER_DIR)/Makefile make -C $(PRELOADER_DIR) uboot +uboot-script: $(PRELOADER_DIR)/Makefile $(TOP)/soc/soc_system_uboot-scr.txt + cd $(PRELOADER_DIR) && uboot-socfpga/tools/mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "SCRIPT" -d u-boot.txt u-boot.scr + +$(PRELOADER_DIR)/u-boot.scr: uboot-script + bsp-edit: $(BUILD_DIR)/software/preloader/settings.bsp bsp-editor --settings $^ & @@ -173,19 +178,20 @@ endif PART_EXT=p sd_rootfs: $(SD_DEV)$(PART_EXT)2 $(ROOTFS) - sudo mkfs.ext4 $(SD_DEV)$(PART_EXT)2 + sudo mkfs.ext3 $(SD_DEV)$(PART_EXT)2 sudo mount $(SD_DEV)$(PART_EXT)2 /mnt #sudo tar --strip-components 1 -xf $(ROOTFS) -C /mnt sudo tar -xf $(ROOTFS) -C /mnt sudo umount /mnt sync -sd_kernel: $(DEVICE_TREE_BLOB) $(QUARTUS_RBF) $(KERNEL) $(SD_DEV)$(PART_EXT)1 +sd_kernel: $(DEVICE_TREE_BLOB) $(QUARTUS_RBF) $(PRELOADER_DIR)/u-boot.scr $(KERNEL) $(SD_DEV)$(PART_EXT)1 sudo mkdosfs $(SD_DEV)$(PART_EXT)1 sudo mount $(SD_DEV)$(PART_EXT)1 /mnt sudo cp $(KERNEL) /mnt/zImage sudo cp $(DEVICE_TREE_BLOB) /mnt/socfpga.dtb sudo cp $(QUARTUS_RBF) /mnt/socfpga.rbf + sudo cp $(PRELOADER_DIR)/u-boot.scr /mnt/ sudo umount /mnt sync