ubuntu 16.04.3 下使用petalinux命令:petalinux-config -c kernel 报错

nyj@ubuntu:~/work/zynq_usb/zynq_usb$ petalinux-config -c kernel

[INFO] generating Kconfig for project

[INFO] sourcing bitbake

[INFO] generating plnxtool conf

[INFO] generating meta-plnx-generated layer

[INFO] generating machine configuration

[INFO] configuring: kernel

[INFO] generating kernel configuration files

[INFO] bitbake virtual/kernel -c menuconfig

Parsing recipes: 100% |##########################################| Time: 0:00:52

Parsing of 2552 .bb files complete (0 cached, 2552 parsed). 3425 targets, 148 skipped, 0 masked, 0 errors.

NOTE: Resolving any missing task queue dependencies

Initialising tasks: 100% |#######################################| Time: 0:00:04

NOTE: Executing RunQueue Tasks

NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn’t need to be rerun and all succeeded.

Parsing recipes: 100% |##########################################| Time: 0:00:35

Parsing of 2552 .bb files complete (0 cached, 2552 parsed). 3425 targets, 148 skipped, 0 masked, 0 errors.

NOTE: Resolving any missing task queue dependencies

Initialising tasks: 100% |#######################################| Time: 0:00:05

Checking sstate mirror object availability: 100% |###############| Time: 0:00:40

NOTE: Executing SetScene Tasks

NOTE: Executing RunQueue Tasks

ERROR: linux-xlnx-4.14-xilinx-v2018.2+gitAUTOINC+ad4cd988ba-r0 do_menuconfig: Error executing a python function in exec_python_func() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:

File: ‘exec_python_func() autogenerated’, lineno: 2, function: 

0001:

*** 0002:do_menuconfig(d)

0003:

File: ‘/opt/pkg/petalinux/components/yocto/source/arm/layers/core/meta/classes/cml1.bbclass’, lineno: 30, function: do_menuconfig

0026:    except OSError:

0027:        mtime = 0

0028:

0029:    oe_terminal("${SHELL} -c “make %s; if [ $? -ne 0 ]; then echo ‘Command failed.’; printf 'Press any key to continue… '; read r; fi”" % d.getVar(‘KCONFIG_CONFIG_COMMAND’),

*** 0030:                d.getVar(‘PN’) + ’ Configuration’, d)

0031:

0032:    # FIXME this check can be removed when the minimum bitbake version has been bumped

0033:    if hasattr(bb.build, ‘write_taint’):

0034:        try:

File: ‘/opt/pkg/petalinux/components/yocto/source/arm/layers/core/meta/classes/terminal.bbclass’, lineno: 95, function: oe_terminal

0091:        except oe.terminal.ExecutionError as exc:

0092:            bb.fatal(‘Unable to spawn terminal %s: %s’ % (terminal, exc))

0093:

0094:    try:

*** 0095:        oe.terminal.spawn_preferred(command, title, None, d)

0096:    except oe.terminal.NoSupportedTerminals as nosup:

0097:        nosup.terms.remove(“false”)

0098:        cmds = ‘\n\t’.join(nosup.terms).replace("{command}",

0099:                    “do_terminal”).replace("{title}", title)

File: ‘/opt/pkg/petalinux/components/yocto/source/arm/layers/core/meta/lib/oe/terminal.py’, lineno: 204, function: spawn_preferred

0200:def spawn_preferred(sh_cmd, title=None, env=None, d=None):

0201:    “”“Spawn the first supported terminal, by priority”""

0202:    for terminal in prioritized():

0203:        try:

*** 0204:            spawn(terminal.name, sh_cmd, title, env, d)

0205:            break

0206:        except UnsupportedTerminal:

0207:            continue

0208:    else:

File: ‘/opt/pkg/petalinux/components/yocto/source/arm/layers/core/meta/lib/oe/terminal.py’, lineno: 228, function: spawn

0224:    import time

0225:    pidfile = tempfile.NamedTemporaryFile(delete = False).name

0226:    try:

0227:        sh_cmd = bb.utils.which(os.getenv(‘PATH’), “oe-gnome-terminal-phonehome”) + " " + pidfile + " " + sh_cmd

*** 0228:        pipe = terminal(sh_cmd, title, env, d)

0229:        output = pipe.communicate()[0]

0230:        if output:

0231:            output = output.decode(“utf-8”)

0232:        if pipe.returncode != 0:

File: ‘/opt/pkg/petalinux/components/yocto/source/arm/layers/core/meta/lib/oe/terminal.py’, lineno: 50, function: init

0046:            return [element.format(**fmt) for element in self.command]

0047:

0048:class XTerminal(Terminal):

0049:    def init(self, sh_cmd, title=None, env=None, d=None):

*** 0050:        Terminal.init(self, sh_cmd, title, env, d)

0051:        if not os.environ.get(‘DISPLAY’):

0052:            raise UnsupportedTerminal(self.name)

0053:

0054:class Gnome(XTerminal):

File: ‘/opt/pkg/petalinux/components/yocto/source/arm/layers/core/meta/lib/oe/terminal.py’, lineno: 33, function: init

0029:class Terminal(Popen, metaclass=Registry):

0030:    def init(self, sh_cmd, title=None, env=None, d=None):

0031:        fmt_sh_cmd = self.format_command(sh_cmd, title)

0032:        try:

*** 0033:            Popen.init(self, fmt_sh_cmd, env=env)

0034:        except OSError as exc:

0035:            import errno

0036:            if exc.errno == errno.ENOENT:

0037:                raise UnsupportedTerminal(self.name)

File: ‘/opt/pkg/petalinux/components/yocto/source/arm/layers/core/bitbake/lib/bb/process.py’, lineno: 65, function: init

0061:

0062:    def init(self, *args, **kwargs):

0063:        options = dict(self.defaults)

0064:        options.update(kwargs)

*** 0065:        subprocess.Popen.init(self, *args, **options)

0066:

0067:def _logged_communicate(pipe, log, input, extrafiles):

0068:    if pipe.stdin:

0069:        if input is not None:

File: ‘/opt/pkg/petalinux/components/yocto/source/arm/buildtools/sysroots/x86_64-petalinux-linux/usr/lib/python3.5/subprocess.py’, lineno: 676, function: init

0672:                                startupinfo, creationflags, shell,

0673:                                p2cread, p2cwrite,

0674:                                c2pread, c2pwrite,

0675:                                errread, errwrite,

*** 0676:                                restore_signals, start_new_session)

0677:        except:

0678:            # Cleanup if the child failed starting.

0679:            for f in filter(None, (self.stdin, self.stdout, self.stderr)):

0680:                try:

File: ‘/opt/pkg/petalinux/components/yocto/source/arm/buildtools/sysroots/x86_64-petalinux-linux/usr/lib/python3.5/subprocess.py’, lineno: 1282, function: _execute_child

1278:                                # The error must be from chdir(cwd).

1279:                                err_msg += ': ’ + repr(cwd)

1280:                            else:

1281:                                err_msg += ': ’ + repr(orig_executable)

*** 1282:                    raise child_exception_type(errno_num, err_msg)

1283:                raise child_exception_type(err_msg)

1284:

1285:

1286:        def _handle_exitstatus(self, sts, _WIFSIGNALED=os.WIFSIGNALED,

Exception: NotADirectoryError: [Errno 20] Not a directory

ERROR: linux-xlnx-4.14-xilinx-v2018.2+gitAUTOINC+ad4cd988ba-r0 do_menuconfig: Function failed: do_menuconfig

ERROR: Logfile of failure stored in: /home/nyj/work/zynq_usb/zynq_usb/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.14-xilinx-v2018.2+gitAUTOINC+ad4cd988ba-r0/temp/log.do_menuconfig.101311

ERROR: Task (/opt/pkg/petalinux/components/yocto/source/arm/layers/meta-xilinx/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2018.2.bb:do_menuconfig) failed with exit code ‘1’

NOTE: Tasks Summary: Attempted 352 tasks of which 342 didn’t need to be rerun and 1 failed.

Summary: 1 task failed:

/opt/pkg/petalinux/components/yocto/source/arm/layers/meta-xilinx/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2018.2.bb:do_menuconfig

Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

ERROR: bitbake failed to configure kernel

ERROR: Failed to config kernel.

解决办法:使用如下命令将Ubuntu默认的dash改为bash

sudo dpkg-reconfigure dash,在弹出的对话框中选择no

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值