Skip to content

readme: update for cmake - #876

Merged
lgirdwood merged 1 commit into
thesofproject:masterfrom
jajanusz:readme-update
Jan 23, 2019
Merged

lgirdwood merged 1 commit into
thesofproject:masterfrom
jajanusz:readme-update

Conversation

@jajanusz

Copy link
Copy Markdown
Contributor

Signed-off-by: Janusz Jankowski janusz.jankowski@linux.intel.com

@dbaluta

dbaluta commented Jan 23, 2019

Copy link
Copy Markdown
Collaborator

Hi @jajanusz,

It looks like you are changing the build system, right?

Trying to compile using the new build system I got an error.

$ mkdir build_byt && cd build_byt
$ cmake -DTOOLCHAIN=xtensa-byt-elf -DROOT_DIR=pwd/../xtensa-root/xtensa-byt-elf ..
$ make baytrail_defconfig
$ make bin -j4

`[ 59%] Building ASM object CMakeFiles/sof.dir/src/arch/xtensa/up/xtos/crt1-boards.S.obj
In file included from /home/daniel/w/sof/sof/src/arch/xtensa/include/arch/interrupt.h:38,
from /home/daniel/w/sof/sof/src/arch/xtensa/include/arch/timer.h:35,
from /home/daniel/w/sof/sof/src/arch/xtensa/timer.c:33:
/home/daniel/w/sof/crosstool-ng/builds/xtensa-byt-elf/lib/gcc/xtensa-byt-elf/8.1.0/include/stdint.h:9:16: fatal error: stdint.h: No such file or directory

include_next <stdint.h>

            ^~~~~~~~~~

compilation terminated.
CMakeFiles/sof.dir/build.make:62: recipe for target 'CMakeFiles/sof.dir/src/arch/xtensa/timer.c.obj' failed
make[3]: *** [CMakeFiles/sof.dir/src/arch/xtensa/timer.c.obj] Error 1
make[3]: *** Waiting for unfinished jobs....
[ 60%] Building C object CMakeFiles/sof.dir/src/arch/xtensa/up/init.c.obj
[ 60%] Building C object CMakeFiles/sof.dir/src/arch/xtensa/up/notifier.c.obj
In file included from /home/daniel/w/sof/sof/src/include/sof/interrupt.h:34,
from /home/daniel/w/sof/sof/src/arch/xtensa/up/init.c:32:
/home/daniel/w/sof/crosstool-ng/builds/xtensa-byt-elf/lib/gcc/xtensa-byt-elf/8.1.0/include/stdint.h:9:16: fatal error: stdint.h: No such file or directory

include_next <stdint.h>

            ^~~~~~~~~~

compilation terminated.
CMakeFiles/sof.dir/build.make:142: recipe for target 'CMakeFiles/sof.dir/src/arch/xtensa/up/init.c.obj' failed
make[3]: *** [CMakeFiles/sof.dir/src/arch/xtensa/up/init.c.obj] Error 1
In file included from /home/daniel/w/sof/sof/src/include/sof/notifier.h:34,
from /home/daniel/w/sof/sof/src/arch/xtensa/up/notifier.c:38:
/home/daniel/w/sof/crosstool-ng/builds/xtensa-byt-elf/lib/gcc/xtensa-byt-elf/8.1.0/include/stdint.h:9:16: fatal error: stdint.h: No such file or directory

include_next <stdint.h>

            ^~~~~~~~~~

`

@jajanusz

Copy link
Copy Markdown
Contributor Author

@dbaluta
I have 2 theories.

  1. You don't have clean repo and may have remainings of previous buildsystem like src/include/config.h (which no longer exists in cmake buildsystem, cos it is in /generated/include).
  2. Paths to toolchain includes are incorrect: try with -DROOT_DIR=`pwd`/../../xtensa-root/xtensa-byt-elf (I added extra '..'), because of added builddir you need to go 1 level more in parents dirs than before.

Comment thread README.md Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't work for me:

/data/pbossart/SOF-public/sof-sdk/sof.git/build$ cmake -DTOOLCHAIN=xtensa-apl-elf -DROOT_DIR=`pwd`/../xtensa-root/xtensa-apl-elf ..
-- Preparing Xtensa toolchain
-- The C compiler identification is unknown
-- The ASM compiler identification is GNU
-- Found assembler: xtensa-apl-elf-gcc
CMake Error at CMakeLists.txt:30 (project):
  The CMAKE_C_COMPILER:

    xtensa-apl-elf-gcc

  is not a full path and was not found in the PATH.

  Tell CMake where to find the compiler by setting either the environment
  variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
  the compiler, or to the compiler name if it is in the PATH.


CMake Error at CMakeLists.txt:30 (project):
  The CMAKE_ASM_COMPILER:

    xtensa-apl-elf-gcc

  is not a full path and was not found in the PATH.

  Tell CMake where to find the compiler by setting either the environment
  variable "ASM" or the CMake cache entry CMAKE_ASM_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.


-- Configuring incomplete, errors occurred!
See also "/data/pbossart/SOF-public/sof-sdk/sof.git/CMakeFiles/CMakeOutput.log".
See also "/data/pbossart/SOF-public/sof-sdk/sof.git/CMakeFiles/CMakeError.log".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you don't have xtensa-apl-elf-* programs in PATH

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to add the following commands to make this work:

pbossart@pbossart-mobl3:/data/pbossart/SOF-public/sof-sdk/sof.git/build$ export PATH=/data/pbossart/SOF-public/sof-sdk/xtensa-root/xtensa-bxt-elf/bin/:$PATH
pbossart@pbossart-mobl3:/data/pbossart/SOF-public/sof-sdk/sof.git/build$ cmake -DTOOLCHAIN=xtensa-bxt-elf -DROOT_DIR=`pwd`/../xtensa-root/xtensa-bxt-elf ..
-- Preparing Xtensa toolchain
-- The C compiler identification is GNU 5.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /data/pbossart/SOF-public/sof-sdk/xtensa-root/xtensa-bxt-elf/bin/xtensa-apl-elf-gcc
-- Generating /data/pbossart/SOF-public/sof-sdk/sof.git/generated/include/version.h
-- Configuring done
-- Generating done
-- Build files have been written to: /data/pbossart/SOF-public/sof-sdk/sof.git

@jajanusz jajanusz Jan 23, 2019 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These steps (in your case adding to PATH) didn't change with buildsystem, they are in full docs there: https://thesofproject.github.io/latest/getting_started/build-guide/build-from-scratch.html#build-toolchain-from-source

This PR is direct replacements for steps that were previously in README.md, for full build for all GCC toolchains I'd have to just copy-paste what we already have on sof-docs.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@plbossart
BTW The C compiler identification is GNU 5.2.0 - AFAIK we support GCC 7+ for both host gcc and gcc xtensa toolchains. FW may work with gcc 5 but rimage build will fail for sure because of -Wimplicit-fallthrough flag

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
Comment thread README.md Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are missing a cd .. here, the make xyz-defconfig doesn't work from the build directory

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have mkdir build && cd build in first step. From there you build/configure etc. It's working dir for your configuration. It's CMake convention.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

never mind, I missed a step here.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are missing a cd .. here, the make xyz-defconfig doesn't work from the build directory

Yup. With this, it works for me. Can you update the docs?

Also, just curious. What was the reason to switch to cmake instead of the good old autotools? :)

@lgirdwood lgirdwood Jan 23, 2019 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dbaluta def_configs and menus, makes it easy to select what to build in, module or not build etc.

@dbaluta

dbaluta commented Jan 23, 2019 •

Copy link
Copy Markdown
Collaborator

@dbaluta
I have 2 theories.

1. You don't have clean repo and may have remainings of previous buildsystem like src/include/config.h (which no longer exists in cmake buildsystem, cos it is in /generated/include).

2. Paths to toolchain includes are incorrect: try with `` -DROOT_DIR=`pwd`/../../xtensa-root/xtensa-byt-elf `` (I added extra '..'), because of added builddir you need to go 1 level more in parents dirs than before.

Yes, after fixing the ROOT_DIR as you said (adding extra ..) it work for me now.

Also, ./scripts/xtensa-build-all.sh works!

@plbossart

Copy link
Copy Markdown
Member

@jajanusz I have exactly the same issues as @dbaluta, even with a clean repo. Plus I really want to use XCC. this is blocking folks when the instructions and setup are not clear.

@plbossart

Copy link
Copy Markdown
Member

so make bin fails but using the scripts kind works, until it doesn't

pbossart@pbossart-mobl3:/data/pbossart/SOF-public/sof-sdk/sof.git$ ./scripts/xtensa-build-all.sh apl
Build in build_apl_gcc
-- Preparing Xtensa toolchain
-- The C compiler identification is GNU 5.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /data/pbossart/SOF-public/sof-sdk/xtensa-root/xtensa-bxt-elf/bin/xtensa-bxt-elf-gcc
-- Generating /data/pbossart/SOF-public/sof-sdk/sof.git/build_apl_gcc/generated/include/version.h
-- Configuring done
-- Generating done
-- Build files have been written to: /data/pbossart/SOF-public/sof-sdk/sof.git/build_apl_gcc
Scanning dependencies of target apollolake_defconfig
Applying olddefconfig with apollolake_defconfig
Using existing configuration '.config' as base
Configuration written to '.config'
Built target apollolake_defconfig
-- Preparing Xtensa toolchain
-- Configuring done
-- Generating done
-- Build files have been written to: /data/pbossart/SOF-public/sof-sdk/sof.git/build_apl_gcc
Scanning dependencies of target genconfig
[  0%] Generating /data/pbossart/SOF-public/sof-sdk/sof.git/build_apl_gcc/generated/include/config.h
[  0%] Built target genconfig
Scanning dependencies of target base_module
[  1%] Building C object src/platform/apollolake/CMakeFiles/base_module.dir/base_module.c.obj
[  1%] Linking C executable base_module
[  1%] Built target base_module
Scanning dependencies of target boot_module
[  1%] Building C object src/platform/apollolake/CMakeFiles/boot_module.dir/boot_module.c.obj
[  2%] Linking C executable boot_module
[  2%] Built target boot_module
Scanning dependencies of target hal
[  3%] Building C object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/attribute.c.obj
[  4%] Building C object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/cache.c.obj
[  4%] Building ASM object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/cache_asm.S.obj
[  5%] Building ASM object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/clock.S.obj
[  5%] Building C object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/coherence.c.obj
[  6%] Building C object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/debug.c.obj
[  6%] Building ASM object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/debug_hndlr.S.obj
[  7%] Building C object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/disass.c.obj
[  8%] Building ASM object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/int_asm.S.obj
[  8%] Building C object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/interrupts.c.obj
[  9%] Building ASM object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/memcopy.S.obj
[  9%] Building ASM object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/mem_ecc_parity.S.obj
[ 10%] Building C object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/misc.c.obj
[ 10%] Building ASM object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/miscellaneous.S.obj
[ 11%] Building C object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/mmu.c.obj
[ 12%] Building ASM object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/mp_asm.S.obj
[ 12%] Building ASM object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/mpu_asm.S.obj
[ 13%] Building C object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/mpu.c.obj
[ 13%] Building C object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/set_region_translate.c.obj
[ 15%] Building ASM object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/state_asm.S.obj
[ 15%] Building C object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/state.c.obj
[ 16%] Building ASM object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/syscache_asm.S.obj
[ 17%] Building ASM object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/windowspill_asm.S.obj
[ 17%] Linking C static library libhal.a
[ 17%] Built target hal
Scanning dependencies of target ld_script_boot_ldr.x
[ 18%] Generating linker script: /data/pbossart/SOF-public/sof-sdk/sof.git/build_apl_gcc/boot_ldr.x
[ 18%] Built target ld_script_boot_ldr.x
Scanning dependencies of target reset
[ 19%] Building ASM object src/arch/xtensa/CMakeFiles/reset.dir/smp/xtos/memctl_default.S.obj
[ 19%] Building ASM object src/arch/xtensa/CMakeFiles/reset.dir/smp/xtos/reset-vector.S.obj
[ 20%] Linking ASM static library libreset.a
[ 20%] Built target reset
Scanning dependencies of target bootloader
[ 20%] Building ASM object src/arch/xtensa/CMakeFiles/bootloader.dir/boot_entry.S.obj
[ 21%] Building C object src/arch/xtensa/CMakeFiles/bootloader.dir/boot_loader.c.obj
[ 22%] Building ASM object src/arch/xtensa/CMakeFiles/bootloader.dir/smp/xtos/_vectors.S.obj
[ 22%] Linking C executable bootloader
[ 22%] Built target bootloader
Scanning dependencies of target bootloader_dump
[ 22%] Built target bootloader_dump
Scanning dependencies of target rimage_ep
[ 22%] Creating directories for 'rimage_ep'
[ 23%] No download step for 'rimage_ep'
[ 24%] No patch step for 'rimage_ep'
[ 24%] No update step for 'rimage_ep'
[ 25%] Performing configure step for 'rimage_ep'
-- The C compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /data/pbossart/SOF-public/sof-sdk/sof.git/build_apl_gcc/rimage_ep/build
[ 25%] Performing build step for 'rimage_ep'
Scanning dependencies of target rimage
[  7%] Building C object CMakeFiles/rimage.dir/file_simple.c.o
[ 14%] Building C object CMakeFiles/rimage.dir/man_apl.c.o
[ 21%] Building C object CMakeFiles/rimage.dir/man_cnl.c.o
[ 28%] Building C object CMakeFiles/rimage.dir/man_kbl.c.o
[ 35%] Building C object CMakeFiles/rimage.dir/man_sue.c.o
[ 42%] Building C object CMakeFiles/rimage.dir/cse.c.o
[ 50%] Building C object CMakeFiles/rimage.dir/css.c.o
[ 57%] Building C object CMakeFiles/rimage.dir/plat_auth.c.o
[ 64%] Building C object CMakeFiles/rimage.dir/hash.c.o
[ 71%] Building C object CMakeFiles/rimage.dir/pkcs1_5.c.o
[ 78%] Building C object CMakeFiles/rimage.dir/manifest.c.o
[ 85%] Building C object CMakeFiles/rimage.dir/elf.c.o
[ 92%] Building C object CMakeFiles/rimage.dir/rimage.c.o
[100%] Linking C executable rimage
[100%] Built target rimage
[ 26%] No install step for 'rimage_ep'
[ 26%] Completed 'rimage_ep'
[ 26%] Built target rimage_ep
Scanning dependencies of target xtos
[ 27%] Building ASM object src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/core-restore.S.obj
[ 27%] Building ASM object src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/core-save.S.obj
[ 29%] Building ASM object src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/core-shutoff.S.obj
[ 29%] Building ASM object src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/double-vector.S.obj
[ 30%] Building ASM object src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/debug-vector.S.obj
[ 30%] Building ASM object src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/xea1/exc-alloca-handler.S.obj
[ 31%] Building ASM object src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/xea1/exc-c-wrapper-handler.S.obj
[ 32%] Building ASM object src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/xea2/exc-c-wrapper-handler.S.obj
[ 32%] Building ASM object src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/xea1/exc-return.S.obj
[ 33%] Building ASM object src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/xea2/exc-return.S.obj
[ 33%] Building C object src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/exc-sethandler.c.obj
[ 34%] Building ASM object src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/exc-syscall-handler.S.obj
[ 34%] Building ASM object src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/exc-table.S.obj
[ 35%] Building ASM object src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/exc-unhandled.S.obj
[ 36%] Building ASM object src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/interrupt-table.S.obj
[ 36%] Building C object src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/int-sethandler.c.obj
[ 37%] Building ASM object src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/xea1/intlevel-restore.S.obj
[ 37%] Building ASM object src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/xea2/intlevel-restore.S.obj
/data/pbossart/SOF-public/sof-sdk/sof.git/src/arch/xtensa/smp/xtos/xea2/intlevel-restore.S: Assembler messages:
/data/pbossart/SOF-public/sof-sdk/sof.git/src/arch/xtensa/smp/xtos/xea2/intlevel-restore.S:73: Error: unknown opcode or format name 'rur.threadptr'
src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/build.make:350: recipe for target 'src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/xea2/intlevel-restore.S.obj' failed
make[3]: *** [src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/xea2/intlevel-restore.S.obj] Error 1
CMakeFiles/Makefile2:1276: recipe for target 'src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/all' failed
make[2]: *** [src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/all] Error 2
CMakeFiles/Makefile2:961: recipe for target 'src/arch/xtensa/CMakeFiles/bin.dir/rule' failed
make[1]: *** [src/arch/xtensa/CMakeFiles/bin.dir/rule] Error 2
Makefile:300: recipe for target 'bin' failed
make: *** [bin] Error 2

Seriously?

@jajanusz

Copy link
Copy Markdown
Contributor Author

so make bin fails but using the scripts kind works, until it doesn't

pbossart@pbossart-mobl3:/data/pbossart/SOF-public/sof-sdk/sof.git$ ./scripts/xtensa-build-all.sh apl
Build in build_apl_gcc
-- Preparing Xtensa toolchain
-- The C compiler identification is GNU 5.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /data/pbossart/SOF-public/sof-sdk/xtensa-root/xtensa-bxt-elf/bin/xtensa-bxt-elf-gcc
-- Generating /data/pbossart/SOF-public/sof-sdk/sof.git/build_apl_gcc/generated/include/version.h
-- Configuring done
-- Generating done
-- Build files have been written to: /data/pbossart/SOF-public/sof-sdk/sof.git/build_apl_gcc
Scanning dependencies of target apollolake_defconfig
Applying olddefconfig with apollolake_defconfig
Using existing configuration '.config' as base
Configuration written to '.config'
Built target apollolake_defconfig
-- Preparing Xtensa toolchain
-- Configuring done
-- Generating done
-- Build files have been written to: /data/pbossart/SOF-public/sof-sdk/sof.git/build_apl_gcc
Scanning dependencies of target genconfig
[  0%] Generating /data/pbossart/SOF-public/sof-sdk/sof.git/build_apl_gcc/generated/include/config.h
[  0%] Built target genconfig
Scanning dependencies of target base_module
[  1%] Building C object src/platform/apollolake/CMakeFiles/base_module.dir/base_module.c.obj
[  1%] Linking C executable base_module
[  1%] Built target base_module
Scanning dependencies of target boot_module
[  1%] Building C object src/platform/apollolake/CMakeFiles/boot_module.dir/boot_module.c.obj
[  2%] Linking C executable boot_module
[  2%] Built target boot_module
Scanning dependencies of target hal
[  3%] Building C object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/attribute.c.obj
[  4%] Building C object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/cache.c.obj
[  4%] Building ASM object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/cache_asm.S.obj
[  5%] Building ASM object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/clock.S.obj
[  5%] Building C object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/coherence.c.obj
[  6%] Building C object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/debug.c.obj
[  6%] Building ASM object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/debug_hndlr.S.obj
[  7%] Building C object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/disass.c.obj
[  8%] Building ASM object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/int_asm.S.obj
[  8%] Building C object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/interrupts.c.obj
[  9%] Building ASM object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/memcopy.S.obj
[  9%] Building ASM object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/mem_ecc_parity.S.obj
[ 10%] Building C object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/misc.c.obj
[ 10%] Building ASM object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/miscellaneous.S.obj
[ 11%] Building C object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/mmu.c.obj
[ 12%] Building ASM object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/mp_asm.S.obj
[ 12%] Building ASM object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/mpu_asm.S.obj
[ 13%] Building C object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/mpu.c.obj
[ 13%] Building C object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/set_region_translate.c.obj
[ 15%] Building ASM object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/state_asm.S.obj
[ 15%] Building C object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/state.c.obj
[ 16%] Building ASM object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/syscache_asm.S.obj
[ 17%] Building ASM object src/arch/xtensa/smp/hal/CMakeFiles/hal.dir/windowspill_asm.S.obj
[ 17%] Linking C static library libhal.a
[ 17%] Built target hal
Scanning dependencies of target ld_script_boot_ldr.x
[ 18%] Generating linker script: /data/pbossart/SOF-public/sof-sdk/sof.git/build_apl_gcc/boot_ldr.x
[ 18%] Built target ld_script_boot_ldr.x
Scanning dependencies of target reset
[ 19%] Building ASM object src/arch/xtensa/CMakeFiles/reset.dir/smp/xtos/memctl_default.S.obj
[ 19%] Building ASM object src/arch/xtensa/CMakeFiles/reset.dir/smp/xtos/reset-vector.S.obj
[ 20%] Linking ASM static library libreset.a
[ 20%] Built target reset
Scanning dependencies of target bootloader
[ 20%] Building ASM object src/arch/xtensa/CMakeFiles/bootloader.dir/boot_entry.S.obj
[ 21%] Building C object src/arch/xtensa/CMakeFiles/bootloader.dir/boot_loader.c.obj
[ 22%] Building ASM object src/arch/xtensa/CMakeFiles/bootloader.dir/smp/xtos/_vectors.S.obj
[ 22%] Linking C executable bootloader
[ 22%] Built target bootloader
Scanning dependencies of target bootloader_dump
[ 22%] Built target bootloader_dump
Scanning dependencies of target rimage_ep
[ 22%] Creating directories for 'rimage_ep'
[ 23%] No download step for 'rimage_ep'
[ 24%] No patch step for 'rimage_ep'
[ 24%] No update step for 'rimage_ep'
[ 25%] Performing configure step for 'rimage_ep'
-- The C compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /data/pbossart/SOF-public/sof-sdk/sof.git/build_apl_gcc/rimage_ep/build
[ 25%] Performing build step for 'rimage_ep'
Scanning dependencies of target rimage
[  7%] Building C object CMakeFiles/rimage.dir/file_simple.c.o
[ 14%] Building C object CMakeFiles/rimage.dir/man_apl.c.o
[ 21%] Building C object CMakeFiles/rimage.dir/man_cnl.c.o
[ 28%] Building C object CMakeFiles/rimage.dir/man_kbl.c.o
[ 35%] Building C object CMakeFiles/rimage.dir/man_sue.c.o
[ 42%] Building C object CMakeFiles/rimage.dir/cse.c.o
[ 50%] Building C object CMakeFiles/rimage.dir/css.c.o
[ 57%] Building C object CMakeFiles/rimage.dir/plat_auth.c.o
[ 64%] Building C object CMakeFiles/rimage.dir/hash.c.o
[ 71%] Building C object CMakeFiles/rimage.dir/pkcs1_5.c.o
[ 78%] Building C object CMakeFiles/rimage.dir/manifest.c.o
[ 85%] Building C object CMakeFiles/rimage.dir/elf.c.o
[ 92%] Building C object CMakeFiles/rimage.dir/rimage.c.o
[100%] Linking C executable rimage
[100%] Built target rimage
[ 26%] No install step for 'rimage_ep'
[ 26%] Completed 'rimage_ep'
[ 26%] Built target rimage_ep
Scanning dependencies of target xtos
[ 27%] Building ASM object src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/core-restore.S.obj
[ 27%] Building ASM object src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/core-save.S.obj
[ 29%] Building ASM object src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/core-shutoff.S.obj
[ 29%] Building ASM object src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/double-vector.S.obj
[ 30%] Building ASM object src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/debug-vector.S.obj
[ 30%] Building ASM object src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/xea1/exc-alloca-handler.S.obj
[ 31%] Building ASM object src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/xea1/exc-c-wrapper-handler.S.obj
[ 32%] Building ASM object src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/xea2/exc-c-wrapper-handler.S.obj
[ 32%] Building ASM object src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/xea1/exc-return.S.obj
[ 33%] Building ASM object src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/xea2/exc-return.S.obj
[ 33%] Building C object src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/exc-sethandler.c.obj
[ 34%] Building ASM object src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/exc-syscall-handler.S.obj
[ 34%] Building ASM object src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/exc-table.S.obj
[ 35%] Building ASM object src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/exc-unhandled.S.obj
[ 36%] Building ASM object src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/interrupt-table.S.obj
[ 36%] Building C object src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/int-sethandler.c.obj
[ 37%] Building ASM object src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/xea1/intlevel-restore.S.obj
[ 37%] Building ASM object src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/xea2/intlevel-restore.S.obj
/data/pbossart/SOF-public/sof-sdk/sof.git/src/arch/xtensa/smp/xtos/xea2/intlevel-restore.S: Assembler messages:
/data/pbossart/SOF-public/sof-sdk/sof.git/src/arch/xtensa/smp/xtos/xea2/intlevel-restore.S:73: Error: unknown opcode or format name 'rur.threadptr'
src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/build.make:350: recipe for target 'src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/xea2/intlevel-restore.S.obj' failed
make[3]: *** [src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/xea2/intlevel-restore.S.obj] Error 1
CMakeFiles/Makefile2:1276: recipe for target 'src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/all' failed
make[2]: *** [src/arch/xtensa/smp/xtos/CMakeFiles/xtos.dir/all] Error 2
CMakeFiles/Makefile2:961: recipe for target 'src/arch/xtensa/CMakeFiles/bin.dir/rule' failed
make[1]: *** [src/arch/xtensa/CMakeFiles/bin.dir/rule] Error 2
Makefile:300: recipe for target 'bin' failed
make: *** [bin] Error 2

Seriously?

Maybe try to use proper toolchain instead of old bugged one without threadptr support when you are doing SMP build?

@lgirdwood

Copy link
Copy Markdown
Member

@plbossart you need latest toolchain. make sure you have gcc 8.1 for xtensa.

@jajanusz

jajanusz commented Jan 23, 2019 •

Copy link
Copy Markdown
Contributor Author

@jajanusz I have exactly the same issues as @dbaluta, even with a clean repo. Plus I really want to use XCC. this is blocking folks when the instructions and setup are not clear.

Both community wiki and README are for tools available to community (gcc toolchain), so instructions were updated for these toolchains. For proprietary compilers you have snippets ready to be copy-pasted (they were also in PR #845).

If you cannot translate simple instructions to xt toolchain, when only thing you need to do is change 1 variable + you have it described in internal wiki + you had it described also in PR #845 then I don't know what kind of instructions you need. I think video tutorial on youtube for 4 commands may be overkill.

@dbaluta

dbaluta commented Jan 23, 2019 •

Copy link
Copy Markdown
Collaborator

@jajanusz I have exactly the same issues as @dbaluta, even with a clean repo. Plus I really want to use XCC. this is blocking folks when the instructions and setup are not clear.

Both community wiki and README are for tools available to community (gcc toolchain), so instructions where updated for these toolchains. For proprietary compilers you have snippets ready to be copy-pasted (they were also in PR #845).

If you cannot translate simple instructions to xt toolchain, when only thing you need to do is change 1 variable + you have it described in internal wiki + you had it described also in PR #845 then I don't know what kind of instructions you need. I think video tutorial on youtube for 4 commands may be overkill.

@jajanusz I appreciate the polish way of being so direct :). Come on, we are all friends here.

@lgirdwood
lgirdwood merged commit 8051fe3 into thesofproject:master Jan 23, 2019
@plbossart

plbossart commented Jan 23, 2019 via email

Copy link
Copy Markdown
Member

@plbossart

plbossart commented Jan 23, 2019 via email

Copy link
Copy Markdown
Member

@lgirdwood

Copy link
Copy Markdown
Member

On 1/23/19 1:50 PM, Liam Girdwood wrote: @plbossart https://github.com/plbossart you need latest toolchain. make sure you have gcc 8.1 for xtensa.
dependency missed then...

We've had this gcc 8.1 dependency for a long time now otherwise your FW would not build, it's possible you have two gcc versions and the cmake is using the older version (maybe $PATH precedence ?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants