From c00d39c71b459c09638fadba9bcdc76960d6fd32 Mon Sep 17 00:00:00 2001 From: Daniel Leung Date: Tue, 12 Nov 2019 11:05:05 -0800 Subject: [PATCH] Add rimage as a git submodule This adds rimage as a git submodule by running: git submodule add https://github.com/thesofproject/rimage.git rimage git submodule set-branch --branch master rimage This also modifies the build script to build the tool. Signed-off-by: Daniel Leung --- .gitmodules | 4 ++++ rimage | 1 + src/arch/xtensa/CMakeLists.txt | 8 +++++--- 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 .gitmodules create mode 160000 rimage diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000000..7bb66ada9c0f --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "rimage"] + path = rimage + url = https://github.com/thesofproject/rimage.git + branch = master diff --git a/rimage b/rimage new file mode 160000 index 000000000000..f23b2c2d07d1 --- /dev/null +++ b/rimage @@ -0,0 +1 @@ +Subproject commit f23b2c2d07d13b60efe881203d754475b11fbfba diff --git a/src/arch/xtensa/CMakeLists.txt b/src/arch/xtensa/CMakeLists.txt index ffcb599fa8f7..c299264f20a8 100644 --- a/src/arch/xtensa/CMakeLists.txt +++ b/src/arch/xtensa/CMakeLists.txt @@ -347,13 +347,11 @@ add_custom_target( ExternalProject_Add(rimage_ep DEPENDS check_version_h - DOWNLOAD_COMMAND "" + DOWNLOAD_COMMAND git submodule update --init SOURCE_DIR "${PROJECT_SOURCE_DIR}/rimage" PREFIX "${PROJECT_BINARY_DIR}/rimage_ep" BINARY_DIR "${PROJECT_BINARY_DIR}/rimage_ep/build" BUILD_ALWAYS 1 - CMAKE_ARGS -DVERSION_H_PATH=${VERSION_H_PATH} - -DPEM_KEY_PREFIX=${PROJECT_SOURCE_DIR}/rimage/keys INSTALL_COMMAND "" ) @@ -392,6 +390,8 @@ if(MEU_PATH) -s ${MEU_OFFSET} -k ${RIMAGE_PRIVATE_KEY} -i ${RIMAGE_IMR_TYPE} + -f ${SOF_MAJOR}.${SOF_MINOR} + -b ${SOF_BUILD} ${RIMAGE_MOD_OFFSET_FLAG} ${bootloader_binary_path} sof-${fw_name} @@ -431,6 +431,8 @@ else() -m ${fw_name} -k ${RIMAGE_PRIVATE_KEY} -i ${RIMAGE_IMR_TYPE} + -f ${SOF_MAJOR}.${SOF_MINOR} + -b ${SOF_BUILD} ${RIMAGE_MOD_OFFSET_FLAG} ${bootloader_binary_path} sof-${fw_name}