我的目标是创建Bitbake配方,它将在/ etc目录和脚本中安装配置文件,将该配置应用到/ect/init.d目录(并调用update-rc-d)。 我已经看到了另一个类似的问题(http://codepen.io/PiotrBerebecki/pen/bwLjaE)。我几乎完全按照这个家伙做了什么,但不幸的是它没有用。 问题是Bitbake没有抱怨什么,但只是没有将这些文件添加到rootfs。 这是我目前的食谱。我还将我的脚本和配置文件放在两个目录中:files和alsa-config,它们位于recipe目录中。
SUMMARY = "Alsa Config"
DESCRIPTION = "Adds alsa configuration file, and startup script that applies it."
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRC_URI += " \
file://my-alsa-config \
file://asound.state \
"
PACKAGE_ARCH = "${MACHINE_ARCH}"
S = "${WORKDIR}"
INITSCRIPT_NAME = "my-alsa-config"
INITSCRIPT_PARAMS = "defaults 99 01"
inherit autotools update-rc.d
do_install() {
install -m 0644 ${WORKDIR}/asound.state ${D}${sysconfdir}
}
FILES_${PN} += "${sysconfdir}/asound.state"
在我的local.conf中,我添加了一行:
CORE_IMAGE_EXTRA_INSTALL += "alsa-config "
拜托,有人可以帮忙吗?
答案 0 :(得分:0)
幸运的是,我能够解决问题。这是解决方案:
SUMMARY = "Alsa Config"
DESCRIPTION = "Adds alsa configuration file, and startup script that applies it."
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRC_URI += " \
file://my-alsa-config \
file://asound.state \
"
PACKAGE_ARCH = "${MACHINE_ARCH}"
S = "${WORKDIR}"
INITSCRIPT_NAME = "my-alsa-config"
INITSCRIPT_PARAMS = "defaults 99 01"
inherit autotools update-rc.d
do_install() {
install -d ${D}${sysconfdir}/init.d/
install -m 0755 ${WORKDIR}/my-alsa-config ${D}${sysconfdir}/init.d/
install -m 0644 ${WORKDIR}/asound.state ${D}${sysconfdir}/
}
FILES_${PN} += "${sysconfdir}/asound.state \
${sysconfdir}/my-alsa-config"
一点评论: