uboot: filesize varible is set by fatload, no need to do it in the script

This commit is contained in:
Benjamin Krill 2014-04-06 15:38:55 +02:00
parent eeba344aa2
commit c31383762a
2 changed files with 9 additions and 4 deletions

View File

@ -1,4 +1,3 @@
setenv fpgasize %FPGA_RBF_SIZE%;
fatload mmc 0:1 $fpgadata socfpga.rbf; fatload mmc 0:1 $fpgadata socfpga.rbf;
fpga load 0 $fpgadata $filesize; fpga load 0 $fpgadata $filesize;
run bridge_enable_handoff; run bridge_enable_handoff;

View File

@ -50,7 +50,7 @@ qsys-generate.HELP = Generate current QSYS implementation
qsys-edit.HELP = Edit QSYS implementation qsys-edit.HELP = Edit QSYS implementation
##### UBOOT / PRELOADER ################################################################################ ##### UBOOT / PRELOADER ################################################################################
.PHONY: preloader uboot .PHONY: preloader uboot uboot-script
PRELOADER_DIR = $(BUILD_DIR)/software/preloader PRELOADER_DIR = $(BUILD_DIR)/software/preloader
QSYS_HPS_INST_NAME = hps_0 QSYS_HPS_INST_NAME = hps_0
PRELOADER_HANDOFF = $(BUILD_QUARTUS_DIR)/hps_isw_handoff/$(QSYS_BASE)_$(QSYS_HPS_INST_NAME)/ 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 uboot: $(PRELOADER_DIR)/Makefile
make -C $(PRELOADER_DIR) uboot 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-edit: $(BUILD_DIR)/software/preloader/settings.bsp
bsp-editor --settings $^ & bsp-editor --settings $^ &
@ -173,19 +178,20 @@ endif
PART_EXT=p PART_EXT=p
sd_rootfs: $(SD_DEV)$(PART_EXT)2 $(ROOTFS) 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 mount $(SD_DEV)$(PART_EXT)2 /mnt
#sudo tar --strip-components 1 -xf $(ROOTFS) -C /mnt #sudo tar --strip-components 1 -xf $(ROOTFS) -C /mnt
sudo tar -xf $(ROOTFS) -C /mnt sudo tar -xf $(ROOTFS) -C /mnt
sudo umount /mnt sudo umount /mnt
sync 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 mkdosfs $(SD_DEV)$(PART_EXT)1
sudo mount $(SD_DEV)$(PART_EXT)1 /mnt sudo mount $(SD_DEV)$(PART_EXT)1 /mnt
sudo cp $(KERNEL) /mnt/zImage sudo cp $(KERNEL) /mnt/zImage
sudo cp $(DEVICE_TREE_BLOB) /mnt/socfpga.dtb sudo cp $(DEVICE_TREE_BLOB) /mnt/socfpga.dtb
sudo cp $(QUARTUS_RBF) /mnt/socfpga.rbf sudo cp $(QUARTUS_RBF) /mnt/socfpga.rbf
sudo cp $(PRELOADER_DIR)/u-boot.scr /mnt/
sudo umount /mnt sudo umount /mnt
sync sync