Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ sof-*
boot_ldr-*
boot_module
module
rimage/rimage
tools/rimage/rimage

tap-driver.sh
test-driver
Expand Down
6 changes: 3 additions & 3 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
if BUILD_RIMAGE
SUBDIRS = rimage
if BUILD_TOOLS
SUBDIRS = tools
else
SUBDIRS = doc src test
endif
Expand Down Expand Up @@ -65,7 +65,7 @@ doc-dummy:
doc: doc-dummy
$(MAKE) -C doc doc

if !BUILD_RIMAGE
if !BUILD_TOOLS
all-local:
rm -f $(top_srcdir)/src/include/version.h
endif
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ See [docs](https://thesofproject.github.io/latest/index.html)

1. Run `autogen.sh`

2. Build and install the rimage ELF image creator and signing tool
2. Build and install sof tools: rimage (ELF image creator and signing tool) and
logger

```
./configure --enable-rimage
./configure --enable-tools
make
sudo make install
```
Expand Down
20 changes: 11 additions & 9 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ fi
AM_CONDITIONAL(BUILD_LIB, test "$have_library" = "yes")

# check if we are building tools
AC_ARG_ENABLE(rimage, [AS_HELP_STRING([--enable-rimage],[build rimage tool])], have_rimage=$enableval, have_rimage=no)
AC_ARG_ENABLE(tools, [AS_HELP_STRING([--enable-tools],[build sof tools])], have_tools=$enableval, have_tools=no)
IMPLICIT_FALLTHROUGH_FLAG=""
if test "$have_rimage" = "yes"; then
AC_DEFINE([CONFIG_RIMAGE], [1], [Configure to build rimage])
if test "$have_tools" = "yes"; then
AC_DEFINE([CONFIG_TOOLS], [1], [Configure to build sof tools])
AM_CFLAGS="-O2 -g -Wall -Werror -Wl,-EL -Wmissing-prototypes"
IMPLICIT_FALLTHROUGH_FLAG="-Wimplicit-fallthrough=3"
fi
AM_CONDITIONAL(BUILD_RIMAGE, test "$have_rimage" = "yes")
AM_CONDITIONAL(BUILD_TOOLS, test "$have_tools" = "yes")

# check if we are building docs
AC_ARG_ENABLE(doc, [AS_HELP_STRING([--enable-doc],[build doc])], have_doc=$enableval, have_doc=no)
Expand Down Expand Up @@ -152,7 +152,7 @@ case "$with_arch" in
AC_DEFINE([CONFIG_HOST], [1], [Configure for Host])
;;
*)
if test "$have_rimage" = "no" && test "$have_doc" = "no" ; then
if test "$have_tools" = "no" && test "$have_doc" = "no" ; then
AC_MSG_ERROR([DSP architecture not specified])
fi
;;
Expand Down Expand Up @@ -390,7 +390,7 @@ case "$with_platform" in
AC_DEFINE([CONFIG_MEM_WND], [1], [Configure Memory Windows])
;;
*)
if test "$have_rimage" = "no" && test "$have_doc" = "no"; then
if test "$have_tools" = "no" && test "$have_doc" = "no"; then
if test "$ARCH" = "host"; then
PLATFORM="host"
AC_SUBST(PLATFORM)
Expand Down Expand Up @@ -504,7 +504,7 @@ AC_CHECK_TOOL([OBJDUMP], [objdump], [])

# Check for openssl - used by rimage
AC_CHECK_LIB([crypto], [OPENSSL_config], , [have_openssl="no"])
if test "$have_rimage" = "yes"; then
if test "$have_tools" = "yes"; then
if test "$have_openssl" = "no"; then
AC_MSG_ERROR([Need OpenSSL libcrypto for rimage code signing])
fi
Expand Down Expand Up @@ -537,8 +537,10 @@ AM_EXTRA_RECURSIVE_TARGETS([vminstall])

AC_CONFIG_FILES([
Makefile
rimage/Makefile
rimage/keys/Makefile
tools/Makefile
tools/logger/Makefile
tools/rimage/Makefile
tools/rimage/keys/Makefile
doc/Makefile
src/Makefile
src/tasks/Makefile
Expand Down
4 changes: 2 additions & 2 deletions scripts/rimage-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ done
# make sure rimage is built and aligned with code
if [[ "x$BUILD_LOCAL" == "x" ]]
then
./configure --enable-rimage
./configure --enable-tools
make
sudo make install
else
echo "BUILD in local folder!"
rm -rf $pwd/local/
./configure --enable-rimage --prefix=$pwd/local
./configure --enable-tools --prefix=$pwd/local
make
make install
fi
28 changes: 28 additions & 0 deletions scripts/tools-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

./autogen.sh

pwd=`pwd`

# parse the args
for args in $@
do
if [[ "$args" == "-l" ]]
then
BUILD_LOCAL=1
fi
done

# make sure rimage is built and aligned with code
if [[ "x$BUILD_LOCAL" == "x" ]]
then
./configure --enable-tools
make
sudo make install
else
echo "BUILD in local folder!"
rm -rf $pwd/local/
./configure --enable-tools --prefix=$pwd/local
make
make install
fi
14 changes: 7 additions & 7 deletions scripts/xtensa-build-all.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

SUPPORTED_PLATFORMS=(byt cht bdw hsw apl cnl sue icl skl kbl)
BUILD_RIMAGE=0
BUILD_TOOLS=0
BUILD_DEBUG=no
BUILD_JOBS=1
BUILD_JOBS_NEXT=0
Expand All @@ -11,7 +11,7 @@ pwd=`pwd`
if [ "$#" -eq 0 ]
then
echo "usage: xtensa-build.sh [options] platform(s)"
echo " [-l] Build rimage locally"
echo " [-l] Build tools locally"
echo " [-a] Build all platforms"
echo " [-d] Enable debug build"
echo " [-j [n]] Set number of make build jobs. Infinite jobs with no arg."
Expand All @@ -23,7 +23,7 @@ else
if [[ "$args" == "-l" ]]
then
BUILD_LOCAL=1
BUILD_RIMAGE=1
BUILD_TOOLS=1

PATH=$pwd/local/bin:$PATH

Expand Down Expand Up @@ -74,18 +74,18 @@ set -e
# run autogen.sh
./autogen.sh

# make sure rimage is built and aligned with code
if [[ "x$BUILD_RIMAGE" == "x1" ]]
# make sure tools is built and aligned with code
if [[ "x$BUILD_TOOLS" == "x1" ]]
then
if [[ "x$BUILD_LOCAL" == "x" ]]
then
./configure --enable-rimage
./configure --enable-tools
make -j ${BUILD_JOBS}
sudo make install
else
echo "BUILD in local folder!"
rm -rf $pwd/local/
./configure --enable-rimage --prefix=$pwd/local
./configure --enable-tools --prefix=$pwd/local
make -j ${BUILD_JOBS}
make install
PATH=$pwd/local/bin:$PATH
Expand Down
3 changes: 3 additions & 0 deletions tools/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if BUILD_TOOLS
SUBDIRS = rimage logger
endif
8 changes: 8 additions & 0 deletions tools/logger/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
bin_PROGRAMS = sof-logger

sof_logger_SOURCES = \
logger.c \
convert.c

sof_logger_INCDIR = \
-I $(SRC_DIR)/include
Loading