zephyr: Fix board logic
Don't set the board to qemu_x86 either; that's not right by any means.
Remove dts.overlay and build system logic related to it in
boot/zephyr/CMakeLists.txt. This file was a hack for arduino_101,
which is no longer supported by Zephyr.
Remove all the other DTC_OVERLAY_FILE logic in general while we're
here. Zephyr picks up
${APPLICATION_SOURCE_DIR}/boards/${BOARD}.overlay and uses it as
DTC_OVERLAY_FILE "for free" if DTC_OVERLAY_FILE is unset.
Adjust the minimum CMake version while we're here to account for
Zephyr build system changes.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Signed-off-by: David Brown <david.brown@linaro.org>
diff --git a/boot/zephyr/CMakeLists.txt b/boot/zephyr/CMakeLists.txt
index de7754a..1c334c1 100644
--- a/boot/zephyr/CMakeLists.txt
+++ b/boot/zephyr/CMakeLists.txt
@@ -4,31 +4,7 @@
#
# SPDX-License-Identifier: Apache-2.0
-cmake_minimum_required(VERSION 3.8.2)
-
-# Board-specific CONF_FILES should get merged into the build as well.
-# Default to qemu_x86 if no board has been specified.
-set(BOARD qemu_x86)
-
-# Add a common dts overlay necessary to ensure mcuboot is linked into,
-# and fits inside, the boot partition. (If the user specified a
-# DTC_OVERLAY_FILE on the CMake command line, we need to append onto
-# the list).
-if(DTC_OVERLAY_FILE)
- set(DTC_OVERLAY_FILE
- "${DTC_OVERLAY_FILE} ${CMAKE_CURRENT_LIST_DIR}/dts.overlay"
- CACHE STRING "" FORCE
- )
-else()
- set(DTC_OVERLAY_FILE ${CMAKE_CURRENT_LIST_DIR}/dts.overlay)
-endif()
-
-if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/boards/${BOARD}.overlay)
- set(DTC_OVERLAY_FILE
- "${DTC_OVERLAY_FILE} ${CMAKE_CURRENT_LIST_DIR}/boards/${BOARD}.overlay"
- CACHE STRING "" FORCE
- )
-endif()
+cmake_minimum_required(VERSION 3.13.1)
# Enable Zephyr runner options which request mass erase if so
# configured.
diff --git a/boot/zephyr/dts.overlay b/boot/zephyr/dts.overlay
deleted file mode 100644
index c9697df..0000000
--- a/boot/zephyr/dts.overlay
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * HACK: don't enforce fitting in the boot partition on x86.
- *
- * The currently only x86 target supported by mcuboot, arduino_101, doesn't
- * have its flash partitions defined in DTS. On the other hand, all ARM-based
- * SoCs currently supported do, and no other arches are currently supported.
- *
- * Keep the build working on x86 until the board(s) in that arch support flash
- * partition layout in DTS.
- */
-#ifndef CONFIG_X86
-/ {
- chosen {
- zephyr,code-partition = &boot_partition;
- };
-};
-#endif