zephyr: restructure the build process to use board config files
Move the board specific configurations into its own header file, which
can now be created per board, once it gets tested and validated by the
bootloader.
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
diff --git a/boot/zephyr/hal_flash.c b/boot/zephyr/hal_flash.c
index a3700bc..986ae77 100644
--- a/boot/zephyr/hal_flash.c
+++ b/boot/zephyr/hal_flash.c
@@ -20,15 +20,9 @@
#include <zephyr.h>
#include <misc/printk.h>
-#include "hal/hal_flash.h"
+#include MCUBOOT_TARGET_CONFIG
-#if defined(CONFIG_BOARD_FRDM_K64F)
-#define FLASH_ALIGN 8
-#elif defined(CONFIG_BOARD_96B_CARBON)
-#define FLASH_ALIGN 1
-#else
-#error "Board is currently not supported by bootloader"
-#endif
+#include "hal/hal_flash.h"
/* All of the currently supported devices allow single byte writes. */
uint8_t hal_flash_align(uint8_t flash_id)