環境
MacBook Air Mid 2013 (OS X 10.11.6)
Zephyr Kernel v1.4.0
Zephyr Kernel v1.4.0
参考
(1) ツールチェインのビルドエラー1
エラー
$ ct-ng build [INFO ] Performing some trivial sanity checks [ERROR] Your file system in '/Volumes/CrossToolNG/build/.build' is *not* case-sensitive! [ERROR] [ERROR] >> [ERROR] >> Build failed in step '(top-level)' [ERROR] >> [ERROR] >> Error happened in: CT_Abort[scripts/functions@329] [ERROR] >> called from: CT_TestAndAbort[scripts/functions@351] [ERROR] >> called from: main[scripts/crosstool-NG.sh@93] [ERROR] >> [ERROR] >> For more info on this error, look at the file: 'build.log' [ERROR] >> There is a list of known issues, some with workarounds, in: [ERROR] >> '/usr/local/Cellar/crosstool-ng/1.22.0_1/share/doc/crosstool-ng/crosstool-ng-1.22.0/B - Known issues.txt' [ERROR] [ERROR] (elapsed: 24505002:43.00) [00:00] / make: *** [build] Error 1
解決策
参考URLのスクリプトやディスクユーティリティでは、Case-sensitiveなイメージを作成できなかった。下記で必要なイメージを作成することができる。
$ hdiutil create -size 8g -fs "Case-sensitive HFS+" -type SPARSE -volname CrossToolNG CrossToolNG.sparseimage
(2) ツールチェインのビルド2
エラー
$ ct-ng build (省略) [ERROR] >> Build failed in step 'Checking that gcc can compile a trivial statically linked program (CT_WANTS_STATIC_LINK)' [ERROR] >> called in step '(top-level)' (省略)
解決策
$ ct-ng menuconfig
で、
C compiler -> Link libstdc++ statically into the gcc binary のチェックを外す。
(3) サンプルアプリのビルド
エラー
$ cd samples/hello_world/microkernel/ $ make /Users/..../Documents/zephyr-v1.4.0/scripts/Makefile.toolchain.xtools:2: *** XTOOLS_TOOLCHAIN_PATH is not set. Stop. make[1]: *** [sub-make] Error 2 make: *** [all] Error 2
解決策
~/.zepherrc に下記を追加
export XTOOLS_TOOLCHAIN_PATH=/Volumes/CrossToolNG/x-tools
(4) Qemu実行
エラー
$ make BOARD=qemu_x86 qemu Using /Users/..../Documents/zephyr-v1.4.0 as source for kernel GEN ./Makefile CHK include/generated/version.h CHK misc/generated/configs.c CHK include/generated/offsets.h CHK misc/generated/sysgen/prj.mdef To exit from QEMU enter: 'CTRL+a, x' [QEMU] CPU: qemu32 make[2]: /usr/bin/qemu-system-i386: No such file or directory
解決策
$ QEMU_BIN_PATH=/usr/local/bin make BOARD=qemu_x86 qemu
コメント