boot/uboot: compute CRC on SPLs for Altera SoC FPGA
authorJan Viktorin <viktorin@rehivetech.com>
Tue, 20 Oct 2015 11:32:20 +0000 (13:32 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 22 Mar 2016 22:43:21 +0000 (23:43 +0100)
Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
[Thomas: add Altera in the option name and description, drop reference
to Go being needed and to Maxime Hadjinlian's version of mkpimage
since a C version is now used.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
boot/uboot/Config.in
boot/uboot/uboot.mk

index 0e79734d2f6a7b43c37f5e27829e37361ad91ed7..a6b9f17937b05d06249ee074b6ebab2a272b755b 100644 (file)
@@ -326,6 +326,14 @@ config BR2_TARGET_UBOOT_ZYNQ_IMAGE
          for u-boot-dtb.img file so this U-Boot format is required
          to be set.
 
+config BR2_TARGET_UBOOT_ALTERA_SOCFPGA_IMAGE_CRC
+       bool "CRC SPL image for Altera SoC FPGA"
+       depends on BR2_arm
+       depends on BR2_TARGET_UBOOT_SPL
+       help
+         Generate SPL image fixed by the mkpimage tool to enable
+         booting on the Altera SoC FPGA based platforms.
+
 menuconfig BR2_TARGET_UBOOT_ENVIMAGE
        bool "Environment image"
        help
index f9a3ff8280a34a7c2b5c4b0f6c0dc8f15bd5c6b0..3c962590b70cef1152127b0a594458f8efab7928 100644 (file)
@@ -194,6 +194,15 @@ UBOOT_DEPENDENCIES += host-zynq-boot-bin
 UBOOT_POST_INSTALL_IMAGES_HOOKS += UBOOT_GENERATE_ZYNQ_IMAGE
 endif
 
+ifeq ($(BR2_TARGET_UBOOT_ALTERA_SOCFPGA_IMAGE_CRC),y)
+define UBOOT_CRC_ALTERA_SOCFPGA_IMAGE
+       $(HOST_DIR)/usr/bin/mkpimage -o $(BINARIES_DIR)/$(notdir $(call qstrip,$(BR2_TARGET_UBOOT_SPL_NAME))).crc \
+               $(@D)/$(call qstrip,$(BR2_TARGET_UBOOT_SPL_NAME))
+endef
+UBOOT_DEPENDENCIES += host-mkpimage
+UBOOT_POST_INSTALL_IMAGES_HOOKS += UBOOT_CRC_ALTERA_SOCFPGA_IMAGE
+endif
+
 ifeq ($(BR2_TARGET_UBOOT_ENVIMAGE),y)
 ifeq ($(BR_BUILDING),y)
 ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_ENVIMAGE_SOURCE)),)