I am trying to add a json to /etc on a device. Have read many SO answers and not found a solution. The new json is called audio_config.json, it is under files/ in the same directory as the .bbappend. Am using append because this file is needed only on one device model while the main recipe is on many models.
Doing this:
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI += "file://audio_config.json"
do_install_append() {
install -d ${D}${sysconfdir}
install -m 644 ${B}/audio_config.json ${D}${sysconfdir}
}
Gets an error saying that the json is not in the work directory. The same thing happens if I use ${WORKDIR} instead of ${B}. Other recipes in this tree follow this same model, not sure what the problem is.
If I use ${THISDIR} then it says that the json is not located in the base recipe directory - which it's not supposed to be.
From SO posts I have tried
FILES_${PN}-audio_config.json = "${sysconfdir}/audio_config.json"
But that seems to have no effect.
TIA!
xraudio_config.json
oraudio_config.json
? Cause your install seems to doinstall -m 644 ${B}/xraudio_config.json ${D}${sysconfdir}
. - Alexander Bollaertaudio_config.json
is located at${RECIPE_APPEND_DIR}/files/audio_config.json
, it should be able to find it, and then you should be able to doinstall -m 644 ${WORKDIR}/audio_config.json ${D}${sysconfdir}
- Alexander Bollaert