bao-project / bao-demos

A guide on how to build and use a set of Bao guest configurations for various platforms
Other
33 stars 37 forks source link

Cannot build zephyr #44

Closed yanjiew1 closed 10 months ago

yanjiew1 commented 11 months ago

Zephyr cannot be built successfully. This is the error message:

ZEPHYR_TOOLCHAIN_VARIANT=cross-compile CROSS_COMPILE=/home/yanjie/tmp/toolchain/bin/aarch64-none-elf- cmake -DCMAKE_PREFIX_PATH=/home/yanjie/tmp/bao-demos/wrkdir/srcs/zephyr/share/zephyr-package \
        -DZEPHYR_MODULES=/home/yanjie/tmp/bao-demos/wrkdir/srcs/cmsis -B/home/yanjie/tmp/bao-demos/wrkdir/imgs/qemu-aarch64-virt/linux+zephyr/zephyr_build -GNinja \
        -DBOARD_ROOT=/home/yanjie/tmp/bao-demos/guests/zephyr -DBOARD=baovm_qemu-aarch64-virt \
        /home/yanjie/tmp/bao-demos/demos/linux+zephyr/zephyr/app
Loading Zephyr default modules (Freestanding).
-- Application: /home/yanjie/tmp/bao-demos/demos/linux+zephyr/zephyr/app
-- CMake version: 3.27.5
-- Found Python3: /usr/bin/python3.10 (found suitable exact version "3.10.6") found components: Interpreter 
-- Cache files will be written to: /home/yanjie/.cache/zephyr
-- Zephyr version: 3.3.0 (/home/yanjie/tmp/bao-demos/wrkdir/srcs/zephyr)
-- Board: baovm_qemu-aarch64-virt
-- Found toolchain: cross-compile (/home/yanjie/tmp/toolchain/bin/aarch64-none-elf-)
-- Found Dtc: /usr/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6") 
-- Found BOARD.dts: /home/yanjie/tmp/bao-demos/guests/zephyr/boards/arm64/baovm_qemu-aarch64-virt/baovm_qemu-aarch64-virt.dts
-- Found devicetree overlay: /home/yanjie/tmp/bao-demos/demos/linux+zephyr/zephyr/app/app.overlay
node '/bao-ipc@70000000' compatible 'bao,ipcshmem' has unknown vendor prefix 'bao'
-- Generated zephyr.dts: /home/yanjie/tmp/bao-demos/wrkdir/imgs/qemu-aarch64-virt/linux+zephyr/zephyr_build/zephyr/zephyr.dts
-- Generated devicetree_generated.h: /home/yanjie/tmp/bao-demos/wrkdir/imgs/qemu-aarch64-virt/linux+zephyr/zephyr_build/zephyr/include/generated/devicetree_generated.h
-- Including generated dts.cmake file: /home/yanjie/tmp/bao-demos/wrkdir/imgs/qemu-aarch64-virt/linux+zephyr/zephyr_build/zephyr/dts.cmake
Parsing /home/yanjie/tmp/bao-demos/wrkdir/srcs/zephyr/Kconfig
/home/yanjie/tmp/bao-demos/wrkdir/srcs/zephyr/scripts/kconfig/kconfig.py: /home/yanjie/tmp/bao-demos/wrkdir/imgs/qemu-aarch64-virt/linux+zephyr/zephyr_build/Kconfig/Kconfig.modules:2: Could not open '/home/yanjie/tmp/bao-demos/wrkdir/srcs/zephyr/' (in 'osource "$(ZEPHYR_CMSIS_KCONFIG)"') (EISDIR: Is a directory)
CMake Error at /home/yanjie/tmp/bao-demos/wrkdir/srcs/zephyr/cmake/modules/kconfig.cmake:329 (message):
  command failed with return code: 1
Call Stack (most recent call first):
  /home/yanjie/tmp/bao-demos/wrkdir/srcs/zephyr/cmake/modules/zephyr_default.cmake:113 (include)
  /home/yanjie/tmp/bao-demos/wrkdir/srcs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  /home/yanjie/tmp/bao-demos/wrkdir/srcs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:159 (include_boilerplate)
  CMakeLists.txt:3 (find_package)

-- Configuring incomplete, errors occurred!
make: *** [/home/yanjie/tmp/bao-demos/guests/zephyr/make.mk:25: /home/yanjie/tmp/bao-demos/wrkdir/imgs/qemu-aarch64-virt/linux+zephyr/zephyr_build] Error 1

After some trial and error, I found that it is this commit in cmsis that breaks the zephyr build.