From 299245d7de3473c07db2dcf15a367f88c9277412 Mon Sep 17 00:00:00 2001 From: David Brown Date: Tue, 10 Jan 2017 09:49:47 -0700 Subject: [PATCH] zephyr: Move code under 'boot' directory The Zephyr build systems makes some assumptions about the directory layout, and encounters problems if the necessary path contains "../..". To help this, place the zephyr directory next to the bootutil directory so that the Makefile can just refer to "../bootutil". This keeps all of the build artifacts under the proper top-level directory. --- Makefile | 4 ++-- {zephyr/src => boot/zephyr}/Makefile | 4 ++-- {zephyr/src => boot/zephyr}/flash_map.c | 0 {zephyr/src => boot/zephyr}/hal_flash.c | 0 {zephyr => boot/zephyr}/include/flash_map/flash_map.h | 0 {zephyr => boot/zephyr}/include/hal/hal_bsp.h | 0 {zephyr => boot/zephyr}/include/hal/hal_flash.h | 0 {zephyr => boot/zephyr}/include/os/os.h | 0 {zephyr => boot/zephyr}/include/os/os_heap.h | 0 {zephyr => boot/zephyr}/include/os/os_malloc.h | 0 {zephyr => boot/zephyr}/include/syscfg/syscfg.h | 0 {zephyr => boot/zephyr}/include/sysflash/sysflash.h | 0 {zephyr/src => boot/zephyr}/keys.c | 0 {zephyr/src => boot/zephyr}/main.c | 0 {zephyr/src => boot/zephyr}/os.c | 0 {zephyr => boot/zephyr}/prj.conf | 0 {zephyr => boot/zephyr}/target.sh.example | 0 17 files changed, 4 insertions(+), 4 deletions(-) rename {zephyr/src => boot/zephyr}/Makefile (60%) rename {zephyr/src => boot/zephyr}/flash_map.c (100%) rename {zephyr/src => boot/zephyr}/hal_flash.c (100%) rename {zephyr => boot/zephyr}/include/flash_map/flash_map.h (100%) rename {zephyr => boot/zephyr}/include/hal/hal_bsp.h (100%) rename {zephyr => boot/zephyr}/include/hal/hal_flash.h (100%) rename {zephyr => boot/zephyr}/include/os/os.h (100%) rename {zephyr => boot/zephyr}/include/os/os_heap.h (100%) rename {zephyr => boot/zephyr}/include/os/os_malloc.h (100%) rename {zephyr => boot/zephyr}/include/syscfg/syscfg.h (100%) rename {zephyr => boot/zephyr}/include/sysflash/sysflash.h (100%) rename {zephyr/src => boot/zephyr}/keys.c (100%) rename {zephyr/src => boot/zephyr}/main.c (100%) rename {zephyr/src => boot/zephyr}/os.c (100%) rename {zephyr => boot/zephyr}/prj.conf (100%) rename {zephyr => boot/zephyr}/target.sh.example (100%) diff --git a/Makefile b/Makefile index fd5a412b..0e70d5dc 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ BOARD ?= qemu_x86 -CONF_FILE = zephyr/prj.conf -SOURCE_DIR = zephyr/src +CONF_FILE = boot/zephyr/prj.conf +SOURCE_DIR = boot/zephyr include ${ZEPHYR_BASE}/Makefile.inc diff --git a/zephyr/src/Makefile b/boot/zephyr/Makefile similarity index 60% rename from zephyr/src/Makefile rename to boot/zephyr/Makefile index 0996747c..6b8618ac 100644 --- a/zephyr/src/Makefile +++ b/boot/zephyr/Makefile @@ -1,8 +1,8 @@ subdir-ccflags-y += -I$(PROJECT)/boot/bootutil/include -subdir-ccflags-y += -I$(PROJECT)/zephyr/include +subdir-ccflags-y += -I$(PROJECT)/boot/zephyr/include obj-y += main.o obj-y += flash_map.o hal_flash.o os.o obj-y += keys.o -obj-y += ../../boot/bootutil/src/ +obj-y += ../bootutil/src/ diff --git a/zephyr/src/flash_map.c b/boot/zephyr/flash_map.c similarity index 100% rename from zephyr/src/flash_map.c rename to boot/zephyr/flash_map.c diff --git a/zephyr/src/hal_flash.c b/boot/zephyr/hal_flash.c similarity index 100% rename from zephyr/src/hal_flash.c rename to boot/zephyr/hal_flash.c diff --git a/zephyr/include/flash_map/flash_map.h b/boot/zephyr/include/flash_map/flash_map.h similarity index 100% rename from zephyr/include/flash_map/flash_map.h rename to boot/zephyr/include/flash_map/flash_map.h diff --git a/zephyr/include/hal/hal_bsp.h b/boot/zephyr/include/hal/hal_bsp.h similarity index 100% rename from zephyr/include/hal/hal_bsp.h rename to boot/zephyr/include/hal/hal_bsp.h diff --git a/zephyr/include/hal/hal_flash.h b/boot/zephyr/include/hal/hal_flash.h similarity index 100% rename from zephyr/include/hal/hal_flash.h rename to boot/zephyr/include/hal/hal_flash.h diff --git a/zephyr/include/os/os.h b/boot/zephyr/include/os/os.h similarity index 100% rename from zephyr/include/os/os.h rename to boot/zephyr/include/os/os.h diff --git a/zephyr/include/os/os_heap.h b/boot/zephyr/include/os/os_heap.h similarity index 100% rename from zephyr/include/os/os_heap.h rename to boot/zephyr/include/os/os_heap.h diff --git a/zephyr/include/os/os_malloc.h b/boot/zephyr/include/os/os_malloc.h similarity index 100% rename from zephyr/include/os/os_malloc.h rename to boot/zephyr/include/os/os_malloc.h diff --git a/zephyr/include/syscfg/syscfg.h b/boot/zephyr/include/syscfg/syscfg.h similarity index 100% rename from zephyr/include/syscfg/syscfg.h rename to boot/zephyr/include/syscfg/syscfg.h diff --git a/zephyr/include/sysflash/sysflash.h b/boot/zephyr/include/sysflash/sysflash.h similarity index 100% rename from zephyr/include/sysflash/sysflash.h rename to boot/zephyr/include/sysflash/sysflash.h diff --git a/zephyr/src/keys.c b/boot/zephyr/keys.c similarity index 100% rename from zephyr/src/keys.c rename to boot/zephyr/keys.c diff --git a/zephyr/src/main.c b/boot/zephyr/main.c similarity index 100% rename from zephyr/src/main.c rename to boot/zephyr/main.c diff --git a/zephyr/src/os.c b/boot/zephyr/os.c similarity index 100% rename from zephyr/src/os.c rename to boot/zephyr/os.c diff --git a/zephyr/prj.conf b/boot/zephyr/prj.conf similarity index 100% rename from zephyr/prj.conf rename to boot/zephyr/prj.conf diff --git a/zephyr/target.sh.example b/boot/zephyr/target.sh.example similarity index 100% rename from zephyr/target.sh.example rename to boot/zephyr/target.sh.example