我已经bitbake core-image-minimal-dev为 genericx86 机器正确配置了运行。BitBake 生成 a bootia32.efi、 a bzImage--<stuff>.bin、 an .hddimg、 an .iso、 a .rootfs.ext3、 a .rootfs.ext4、 a.rootfs.tar.bz2和 a core-image-initramfs-<stuff>.rootfs.cpio.gz。我对如何将其中一个或多个添加到目标机器的硬盘上并从该硬盘启动的方法感兴趣。
我正在尝试进行一个测试,验证(使用 Mockito v1.9.5's )在执行 pass-through 之后调用接口中verify具有签名的方法,并且我遇到了一个我真的不明白的错误。deinit()BarFoo.deinit()
这是FooTest.java我正在尝试运行的:
@RunWith(JukitoRunner.class)
public class FooTest {
@Inject
private Foo foo;
@Inject
private Bar bar;
public static class TestModule extends JukitoModule {
@Override
protected void configureTest() {
bind(Foo.class).to(FooImpl.class);
bind(Bar.class).to(BarImpl.class);
bindSpy(BarImpl.class);
}
}
@Test
public void testDeinit() {
foo.init(mock(Baz.class));
foo.deinit();
verify(bar).deinit();
}
@After
public void validate() {
validateMockitoUsage(); //line YY
}
}
Run Code Online (Sandbox Code Playgroud)
运行此程序时,testDeinit()失败并出现以下错误:
org.mockito.exceptions.misusing.UnfinishedVerificationException:
Missing method call for verify(mock) here:
-> at redacted.impl.BarImpl.deinit(BarImpl.java:XX)
Example of correct …Run Code Online (Sandbox Code Playgroud) 如何使用BitBake配方向图像添加大量文件?
我将文件添加到图像的模式如下:
SRC_URI += "file://bar"
do_install () {
install -m 0775 ${S}/bar/baz/foo.txt ${D}${prefix}/test
}
FILES_${PN} += "${prefix}"
FILES_${PN} += "${prefix}test"
FILES_${PN} += "${prefix}test/foo.txt"
Run Code Online (Sandbox Code Playgroud)
哪个适合几个文件.但是,对于大量文件来说,这可能非常繁琐.问题似乎是我需要指定要打包的每个文件.有没有办法避免这种情况?
我有一个在 Docker 容器(CentOS 7)上运行的 BitBake 构建过程。在recipe gcc-cross-i586-5.2.0-r0: task do_compile我尝试的每次运行中,BitBake 都会失败。
的输出示例bitbake:
NOTE: recipe gcc-cross-i586-5.2.0-r0: task do_compile: Started
ERROR: Worker process (367) exited unexpectedly (-9), shutting down...
ERROR: Worker process (367) exited unexpectedly (-9), shutting down...
ERROR: Worker process (367) exited unexpectedly (-9), shutting down...
ERROR: Worker process (367) exited unexpectedly (-9), shutting down...
NOTE: Tasks Summary: Attempted 1538 tasks of which 17 didn't need to be rerun and all succeeded.
Run Code Online (Sandbox Code Playgroud)
这是问题recipe gcc-cross-i586-5.2.0-r0: task do_compile …
我有一个基于autotools的BitBake配方,我希望安装二进制文件/usr/local/bin和安装库/usr/local/lib(而不是/usr/bin和/usr/lib,它们是默认的目标目录).
这是autotools.bbclass我发现重要文件的一部分.
CONFIGUREOPTS = " --build=${BUILD_SYS} \
--host=${HOST_SYS} \
--target=${TARGET_SYS} \
--prefix=${prefix} \
--exec_prefix=${exec_prefix} \
--bindir=${bindir} \
--sbindir=${sbindir} \
--libexecdir=${libexecdir} \
--datadir=${datadir} \
--sysconfdir=${sysconfdir} \
--sharedstatedir=${sharedstatedir} \
--localstatedir=${localstatedir} \
--libdir=${libdir} \
...
Run Code Online (Sandbox Code Playgroud)
我认为,最简单的方法来完成我想要做的是简单地改变${bindir}和${libdir},或者改变${prefix}到/usr/local,但我还没有这方面的任何成功.有没有办法改变这些安装变量,或者我是否以错误的方式考虑这个问题?
根据Ross Burton的建议,我尝试将以下内容添加到我的食谱中:
prefix="/usr/local"
exec_prefix="/usr/local"
Run Code Online (Sandbox Code Playgroud)
但这会导致构建在该配方的do_configure()任务期间失败,并返回以下内容:
| checking for GLIB... no
| configure: error: Package requirements (glib-2.0 >= 2.12.3) were not met:
|
| No package …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用自定义源(linux 内核 3.16)使用 yocto 创建图像。当我尝试运行“bitbake myCustomRecipe”时,我收到如下警告和错误:
WARNING: Unable to get checksum for myCustomRecipe SRC_URI entry defconfig: file could not be found
Run Code Online (Sandbox Code Playgroud)
我还有其他几个警告/错误,但我相信由于上述警告,这些警告/错误很自然。我的层结构是这样的:
meta-mytestLayer
|
+--conf/
| |
| +--layer.conf
|
+--recipes-kernel/
|
+--linux/
|
+--myCustomRecipe_3.16/
| |
| +--defconfig
|
+--myCustomRecipe_3.16.bb
Run Code Online (Sandbox Code Playgroud)
如您所见,myCustomRecipe_3.16/ 目录中有一个 defconfig 文件。为什么找不到这个?这个文件结构与我在几个教程中看到的非常相似(如本文档的实验三)。我的 layer.config 看起来像这样:
BBPATH .= ":${LAYERDIR}"
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS += "myTestLayer"
BBFILE_PATTERN_myTestLayer = "^${LAYERDIR}/"
BBFILE_PRIORITY_myTestLayer = "6"
Run Code Online (Sandbox Code Playgroud)
我的食谱是这样的:
inherit kernel
require recipes-kernel/linux/linux-yocto.inc
SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git;protocol=git;nocheckout=1;name=machine"
SRC_URI += "file://defconfig"
LINUX_VERSION ?= "3.16" …Run Code Online (Sandbox Code Playgroud) 我已将 python 包上传到 Artifactory 内的本地 PyPI。我已将其安装在我的系统上pip install foo(我需要进行身份验证)。我可以python -c "import foo"毫无问题地做。
当我尝试在 PyCharm 中使用此模块(使用import foo)时,PyCharm 抛出了我unresolved reference 'foo'。
所以我进入 Preferences->Project:myproject->Project Interpreter->Available Packages->Manage Repositories 并添加本地 PyPI,如下所示:
但是当重新加载“可用包”中的包列表时,我收到以下错误对话框:
401 禁止,因为我从未被提示输入凭据,但我不知道如何继续。
如何foo在 PyCharm 项目中导入包?
我对克隆私有git仓库的内容感兴趣,因此可以通过自定义BitBake配方使用它们.我尝试从Yocto Project邮件列表中调整这种技术,并产生以下内容:
SRC_URI = "git://www.example.com/path/to/repo;protocol=https;branch=master;name=commit;user=<username>:<password>
SRCREV_commit = "9f8309bbdf0632191bec21fada2cb61a30bcf53e"
Run Code Online (Sandbox Code Playgroud)
我正在使用的密码包含左括号.我收到此错误:
/bin/sh: -c: line 0: syntax error near unexpected token `)'
Run Code Online (Sandbox Code Playgroud)
我可以以某种方式逃避这个特殊角色,或者使用其他方式克隆回购?
我正在尝试创建一个使用自动工具的相当简单的BitBake食谱,您可以在这里看到它:
SUMMARY = "an example autotools recipe"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
inherit autotools
SRC_URI = "file://${TOPDIR}/piu/geo_utilities"
S = "${TOPDIR}/piu/geo_utilities"
Run Code Online (Sandbox Code Playgroud)
使用此配方的默认程序包启动BitBake构建后, do_configure失败并显示以下内容:
configure: line 12851: syntax error near unexpected token `GLIB,'
configure: line 12851: `PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.12.3)'
Run Code Online (Sandbox Code Playgroud)
当我跑步时ldd --version,得到以下信息:ldd (GNU libc) 2.17。
我已经找到了几个类似Google Groups帖子和GitHub问题的站点,这些站点表明可以通过更新pkg-config来解决该问题。我正在运行Red Hat,所以我已经运行了sudo yum install pkgconfig它返回了pkgconfig-0.27.1-4.el7.x86_64 already installed and latest version。
(这个问题跟在后面这个问题是由回答者解决)
我有一个BitBake recipe(example_0.1.bb),do_install其中包含一个尝试安装.so文件的任务:
do_install() {
install -d ${D}${libdir}
install -m 0644 ${S}/example.so ${D}${libdir}
}
FILES_${PN} += "${libdir}/example.so"
Run Code Online (Sandbox Code Playgroud)
这在构建过程中失败并返回:
ERROR: example not found in the base feeds
Run Code Online (Sandbox Code Playgroud)
但是,如果我将测试文件添加到包中,则.so文件和测试文件都会添加到rootfs中.
do_install() {
install -d ${D}${libdir}
install -m 0644 ${S}/example.so ${D}${libdir}
echo "bar" >> ${TOPDIR}/foo
install -m 0644 ${TOPDIR}/foo ${D}${libdir}
}
FILES_${PN} += "${libdir}/libceill.so"
FILES_${PN} += "${libdir}/foo"
Run Code Online (Sandbox Code Playgroud)
如何只添加.so没有垃圾测试文件的文件?