我有一个编译打印机驱动程序的方法,并且在do_install中有几行简单的代码可以运行。
do_install() {
install -d ${D}${libdir}/cups/filter
install -m 755 ${B}/src/rastertoprinter ${D}${libdir}/cups/filter/
install -d ${D}${sysconfdir}/cups/ppd
install -m 755 ${B}/../rastertoprinter/printer_name.ppd ${D}${sysconfdir}/cups/ppd/
}
Run Code Online (Sandbox Code Playgroud)
为了编译源代码,我在杯子上有一个DEPENDS,在杯子上也有一个RDEPENDS,因为OS当然需要安装杯子才能打印。
打印机驱动程序不是公开可用的,因此我已将其重命名为rastertoprinter并更改了路径名。
本质上,我只需要简单地创建或确保目录/ usr / lib / cups / filter存在,然后在其中复制rastertoprinter程序。我还需要创建或确保目录/ etc / cups / ppd存在并将.ppd文件复制到该目录中。
前两行运行正常,但第三行抛出以下错误:
file /etc/cups conflicts between attempted installs of printername-r0.corei7_64 and cups-2.2.2-r0.corei7_64
file /etc/cups/ppd conflicts between attempted installs of printername-r0.corei7_64 and cups-2.2.2-r0.corei7_64
Run Code Online (Sandbox Code Playgroud)
我不明白为什么两个食谱都无法创建此目录并在其中添加内容?奇怪的是,我可以做第一个/ usr / lib / cups / filter目录,尽管很好。
我喜欢为我的 yocto 项目的内置用户做一些事情:
1.) 将 root 的密码设置为“abc”
2.) 将 ssh 登录表单的 root shell 设置为 /bin/sh 为 /bin/bash
3.) 添加密码为“xyz”的用户“customUser”
认为一个简单的食谱可以做到这一点。到目前为止,我尝试过@myUser.bb:
SUMMARY = "admin + user"
SECTION = "USR"
LICENSE = "CLOSED"
inherit extrausers useradd
# how to
# pw: abc
# at bash: usermod -p $(openssl passwd abc) root
# get a salted hash: openssl passwd abc
# one possible result: 1Cw5PHLy76ps2
# the command now looks: usermod -p 1Cw5PHLy76ps2 root
# set image root password
EXTRA_USERS_PARAMS = "usermod -p …Run Code Online (Sandbox Code Playgroud)