From 6f2857c2a7113a2ce07b80e04dc1adcaeadaa0be Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Wed, 31 Jan 2018 14:14:40 -0500 Subject: [PATCH] zephyr: add compatibility shim for flash driver name The upstream Zephyr project is renaming FLASH_DRIVER_NAME to FLASH_DEV_NAME as part of some changes related to device tree. Work around this for now by keeping the MCUboot name the same if FLASH_DRIVER_NAME is not provided by Zephyr, but FLASH_DEV_NAME is. Signed-off-by: Marti Bolivar --- boot/zephyr/include/target.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/boot/zephyr/include/target.h b/boot/zephyr/include/target.h index 9ccc0325..a2c5cf4c 100644 --- a/boot/zephyr/include/target.h +++ b/boot/zephyr/include/target.h @@ -30,6 +30,16 @@ #endif #endif /* !defined(MCUBOOT_TARGET_CONFIG) */ +/* + * Upstream Zephyr changed the name from FLASH_DRIVER_NAME to + * FLASH_DEV_NAME. For now, let's just convert the Zephyr name to the + * one expected by MCUboot. This can be cleaned up after the upstream + * Zephyr tree has been released and settled down. + */ +#if !defined(FLASH_DRIVER_NAME) && defined(FLASH_DEV_NAME) +#define FLASH_DRIVER_NAME FLASH_DEV_NAME +#endif + /* * Sanity check the target support. */