bios/boot: allow to customize flash offsets of Linux images
authorMateusz Holenko <mholenko@antmicro.com>
Mon, 17 Feb 2020 15:52:08 +0000 (16:52 +0100)
committerMateusz Holenko <mholenko@antmicro.com>
Tue, 18 Feb 2020 12:38:09 +0000 (13:38 +0100)
litex/soc/software/bios/boot.c

index 6a8285060866fc293d828c5656da941495657670..f49d89e494f9fa8e1d3d2f6d5dc02101b60d8f5a 100644 (file)
@@ -409,10 +409,18 @@ static int copy_image_from_flash_to_ram(unsigned int flash_address, unsigned int
 }
 #endif
 
-#define KERNEL_IMAGE_FLASH_OFFSET      0x00000000 //  0MB
-#define ROOTFS_IMAGE_FLASH_OFFSET      0x00500000 //  5MB
-#define DEVICE_TREE_IMAGE_FLASH_OFFSET 0x00D00000 // 13MB
-#define EMULATOR_IMAGE_FLASH_OFFSET    0x00E00000 // 14MB
+#ifndef KERNEL_IMAGE_FLASH_OFFSET
+       #define KERNEL_IMAGE_FLASH_OFFSET      0x00000000 //  0MB
+#endif
+#ifndef ROOTFS_IMAGE_FLASH_OFFSET
+       #define ROOTFS_IMAGE_FLASH_OFFSET      0x00500000 //  5MB
+#endif
+#ifndef DEVICE_TREE_IMAGE_FLASH_OFFSET
+       #define DEVICE_TREE_IMAGE_FLASH_OFFSET 0x00D00000 // 13MB
+#endif
+#ifndef EMULATOR_IMAGE_FLASH_OFFSET
+       #define EMULATOR_IMAGE_FLASH_OFFSET    0x00E00000 // 14MB
+#endif
 
 void flashboot(void)
 {