Commit 0e3fa72d authored by Martí Bolívar's avatar Martí Bolívar Committed by David Brown
Browse files

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: default avatarMartí Bolívar <marti.bolivar@nordicsemi.no>
Signed-off-by: default avatarDavid Brown <david.brown@linaro.org>
parent 8accafd5
Loading
Loading
Loading
Loading
+1 −25
Changes for boot/zephyr/CMakeLists.txt: 1 added line, 25 removed lines.
Original line number Diff line number Diff line
@@ -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.

boot/zephyr/dts.overlay

deleted100644 → 0
+0 −17
Changes for boot/zephyr/dts.overlay: 0 added lines, 17 removed lines.
Original line number Diff line number Diff line
/*
 * 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