版主: wanchong , wangyu , eepwwp , firedom |
himalaya0604
最后登陆时间:2015-10-05 18:59:23 |
我参照Edison BSP User Guide.pdf
中的Building a Standard Intel® Edison Image 部分来编译内核: 前2步正常通过,执行第3步骤时,发现这2个目录:/path/bitbake_download_dir 和 /path/bitbake_sstate_dir 不存在,所以自己创建了这2个目录, 然后执行,然后出现了很多错误,发现是权限问题,于是加上sudo 重新执行命令: zhangq@ubuntu:/bob/edison-src$ sudo ./device-software/setup.sh --dl_dir=/path/bitbake_download_dir --sstate_dir=/path/bitbake_sstate_dir [sudo] password for zhangq: We are building in external mode Extracting upstream Yocto tools in the /bob/edison-src/poky directory from archive Unpacking Mingw layer to poky/meta-mingw/ directory from archive Unpacking Darwin layer to poky/meta-darwin/ directory from archive Initializing yocto build environment Setting up yocto configuration file (in build/conf/local.conf) ** Success ** SDK will be generated for linux32 host Now run these two commands to setup and build the flashable image: cd /bob/edison-src source poky/oe-init-build-env bitbake edison-image ************* zhangq@ubuntu:/bob/edison-src$ 第4步执行正常: zhangq@ubuntu:/bob/edison-src$ source poky/oe-init-build-env ### Shell environment set up for builds. ### You can now run 'bitbake <target>' Common targets are: core-image-minimal core-image-sato meta-toolchain adt-installer meta-ide-support You can also run generated qemu images with a command like 'runqemu qemux86' zhangq@ubuntu:/bob/edison-src/build$ 执行第5步骤(注意:bitbake命令要用普通用户操作,用root操作会出错,而且bitbake命令要在build目录下执行) zhangq@ubuntu:/bob/edison-src/build$ bitbake edison-image ERROR: Error parsing configuration files Traceback (most recent call last): File "/bob/edison-src/poky/bitbake/lib/bb/cookerdata.py", line 228, in CookerDataBuilder.parseBaseConfiguration(): try: > self.parseConfigurationFiles(self.prefiles, self.postfiles) except SyntaxError: File "/bob/edison-src/poky/bitbake/lib/bb/cookerdata.py", line 290, in CookerDataBuilder.parseConfigurationFiles(prefiles=[], postfiles=[]): if data.getVar("BB_WORKERCONTEXT", False) is None: > bb.fetch.fetcher_init(data) bb.codeparser.parser_cache_init(data) File "/bob/edison-src/poky/bitbake/lib/bb/fetch2/__init__.py", line 484, in fetcher_init(d=<bb.data_smart.DataSmart object at 0x9d66d8c>): pass > revs.clear() else: File "/bob/edison-src/poky/bitbake/lib/bb/persist_data.py", line 147, in SQLTable.clear(): def clear(self): > self._execute("DELETE FROM %s;" % self.table) File "/bob/edison-src/poky/bitbake/lib/bb/persist_data.py", line 66, in SQLTable._execute(*query=('DELETE FROM BB_URI_HEADREVS;',)): try: > return self.cursor.execute(*query) except sqlite3.OperationalError as exc: OperationalError: attempt to write a readonly database 从错误描述可以判断是权限问题,于是修改poky目录的权限: zhangq@ubuntu:/bob/edison-src/build$ sudo chmod -R 777 /bob/edison-src/ zhangq@ubuntu:/bob/edison-src/build$ bitbake edison-image 仍然有错误: ERROR: OE-core's config sanity checker detected a potential misconfiguration. Either fix the cause of this error or at your own risk disable the checker (see sanity.conf). Following is the list of potential problems / advisories: DL_DIR: /path/bitbake_download_dir exists but you do not appear to have write access to it. Failed to create a file in SSTATE_DIR: Permission denied. You could try using /path/bitbake_sstate_dir in SSTATE_MIRRORS rather than as an SSTATE_CACHE. ERROR: Execution of event handler 'check_sanity_eventhandler' failed ERROR: Command execution failed: Exited with 1 Summary: There were 3 ERROR messages shown, returning a non-zero exit code. zhangq@ubuntu:/bob/edison-src/build$ 通过网络查找,解决方法是修改sanity.conf 文件 zhangq@ubuntu:/bob/edison-src/build$ gedit ../poky/meta/conf/sanity.conf 屏蔽掉下面这句 #SANITY_ABIFILE = "${TMPDIR}/abi_version" 然后继续执行 zhangq@ubuntu:/bob/edison-src/build$ bitbake edison-image ERROR: Execution of event handler 'check_sanity_eventhandler' failed Traceback (most recent call last): File "check_sanity_eventhandler(e)", line 6, in check_sanity_eventhandler(e=<bb.event.SanityCheck object at 0xa321ccc>) File "sanity.bbclass", line 51, in check_sanity(sanity_data=<bb.data_smart.DataSmart object at 0xa6b56ac>) File "sanity.bbclass", line 7, in sanity_handle_abichanges(status=<SanityStatus object at 0xa77cbcc>, d=<bb.data_smart.DataSmart object at 0xa6b56ac>) File "/usr/lib/python2.7/genericpath.py", line 18, in exists(path=None): try: > os.stat(path) except os.error: TypeError: coercing to Unicode: need string or buffer, NoneType found Parsing recipes: 100% |#########################################| Time: 00:02:49 Parsing of 919 .bb files complete (0 cached, 919 parsed). 1287 targets, 93 skipped, 0 masked, 0 errors. NOTE: Resolving any missing task queue dependencies Build Configuration: BB_VERSION = "1.22.0" BUILD_SYS = "i686-linux" NATIVELSBSTRING = "Ubuntu-12.04" TARGET_SYS = "i586-poky-linux" MACHINE = "edison" DISTRO = "poky-edison" DISTRO_VERSION = "1.6.1" TUNE_FEATURES = "m32 core2" TARGET_FPU = "" meta meta-yocto meta-yocto-bsp meta-edison meta-edison-distro meta-edison-middleware meta-edison-arduino meta-edison-devtools = "<unknown>:<unknown>" NOTE: Preparing runqueue NOTE: Executing SetScene Tasks NOTE: Executing RunQueue Tasks ERROR: Unable to acquire lock '/path/bitbake_download_dir/m4-1.4.17.tar.gz.lock', directory is not writable ERROR: Unable to acquire lock '/path/bitbake_download_dir/quilt-0.61.tar.gz.lock', directory is not writable ERROR: Function failed: base_do_fetch ERROR: Logfile of failure stored in: /bob/edison-src/build/tmp/work/i686-linux/m4-native/1.4.17-r0/temp/log.do_fetch.30844 ERROR: Function failed: base_do_fetch ERROR: Logfile of failure stored in: /bob/edison-src/build/tmp/work/i686-linux/quilt-native/0.61-r0/temp/log.do_fetch.30842 ERROR: Task 18 (/bob/edison-src/poky/meta/recipes-devtools/quilt/quilt-native_0.61.bb, do_fetch) failed with exit code '1' ERROR: Task 2705 (/bob/edison-src/poky/meta/recipes-devtools/m4/m4-native_1.4.17.bb, do_fetch) failed with exit code '1' ERROR: Unable to acquire lock '/path/bitbake_download_dir/gnu-config-20120814.tar.bz2.lock', directory is not writable ERROR: Function failed: base_do_fetch ERROR: Logfile of failure stored in: /bob/edison-src/build/tmp/work/i686-linux/gnu-config-native/20120814-r0/temp/log.do_fetch.30843 ERROR: Task 1275 (virtual:native:/bob/edison-src/poky/meta/recipes-devtools/gnu-config/gnu-config_20120814.bb, do_fetch) failed with exit code '1' ERROR: Unable to acquire lock '/path/bitbake_download_dir/autoconf-2.69.tar.gz.lock', directory is not writable ERROR: Function failed: base_do_fetch ERROR: Logfile of failure stored in: /bob/edison-src/build/tmp/work/i686-linux/autoconf-native/2.69-r11/temp/log.do_fetch.30845 ERROR: Task 1248 (virtual:native:/bob/edison-src/poky/meta/recipes-devtools/autoconf/autoconf_2.69.bb, do_fetch) failed with exit code '1' ERROR: Unable to acquire lock '/path/bitbake_download_dir/automake-1.14.tar.gz.lock', directory is not writable ERROR: Function failed: base_do_fetch ERROR: Logfile of failure stored in: /bob/edison-src/build/tmp/work/i686-linux/automake-native/1.14-r0/temp/log.do_fetch.30846 ERROR: Task 1257 (virtual:native:/bob/edison-src/poky/meta/recipes-devtools/automake/automake_1.14.bb, do_fetch) failed with exit code '1' NOTE: Tasks Summary: Attempted 5 tasks of which 0 didn't need to be rerun and 5 failed. Waiting for 0 running tasks to finish: Summary: 5 tasks failed: /bob/edison-src/poky/meta/recipes-devtools/quilt/quilt-native_0.61.bb, do_fetch /bob/edison-src/poky/meta/recipes-devtools/m4/m4-native_1.4.17.bb, do_fetch virtual:native:/bob/edison-src/poky/meta/recipes-devtools/gnu-config/gnu-config_20120814.bb, do_fetch virtual:native:/bob/edison-src/poky/meta/recipes-devtools/autoconf/autoconf_2.69.bb, do_fetch virtual:native:/bob/edison-src/poky/meta/recipes-devtools/automake/automake_1.14.bb, do_fetch Summary: There were 11 ERROR messages shown, returning a non-zero exit code. zhangq@ubuntu:/bob/edison-src/build$ 当发现这些错误时,我已经醉了,但是看到了这两句,似乎有有些转机, ERROR: Unable to acquire lock '/path/bitbake_download_dir/m4-1.4.17.tar.gz.lock', directory is not writable ERROR: Unable to acquire lock '/path/bitbake_download_dir/quilt-0.61.tar.gz.lock', directory is not writable 于是我修改/path的权限, zhangq@ubuntu:/bob/edison-src/build$ sudo chmod -R 777 /path/ 坚持不懈的编译: zhangq@ubuntu:/bob/edison-src/build$ bitbake edison-image ERROR: Execution of event handler 'check_sanity_eventhandler' failed Traceback (most recent call last): File "check_sanity_eventhandler(e)", line 6, in check_sanity_eventhandler(e=<bb.event.SanityCheck object at 0xa321ccc>) File "sanity.bbclass", line 51, in check_sanity(sanity_data=<bb.data_smart.DataSmart object at 0xa6b56ac>) File "sanity.bbclass", line 7, in sanity_handle_abichanges(status=<SanityStatus object at 0xa77cbcc>, d=<bb.data_smart.DataSmart object at 0xa6b56ac>) File "/usr/lib/python2.7/genericpath.py", line 18, in exists(path=None): try: > os.stat(path) except os.error: TypeError: coercing to Unicode: need string or buffer, NoneType found Parsing recipes: 100% |#########################################| Time: 00:02:49 Parsing of 919 .bb files complete (0 cached, 919 parsed). 1287 targets, 93 skipped, 0 masked, 0 errors. NOTE: Resolving any missing task queue dependencies Build Configuration: BB_VERSION = "1.22.0" BUILD_SYS = "i686-linux" NATIVELSBSTRING = "Ubuntu-12.04" TARGET_SYS = "i586-poky-linux" MACHINE = "edison" DISTRO = "poky-edison" DISTRO_VERSION = "1.6.1" TUNE_FEATURES = "m32 core2" TARGET_FPU = "" meta meta-yocto meta-yocto-bsp meta-edison meta-edison-distro meta-edison-middleware meta-edison-arduino meta-edison-devtools = "<unknown>:<unknown>" 终于开始正常编译了,慢慢等,可能要7-8个小时...... 如果后面编译有错,待续...... |
|
|
emmahou
最后登陆时间:2015-01-14 10:52:38 |
好帖子,学习了。.
|
liuxingyidao
最后登陆时间:2015-12-24 14:48:01 |
好帖子,学习了。.
|