From: Nitin A Kamble <nitin.a.kam...@intel.com> a new recipe which recipe provides the ability to setup a BSP image for a specific machine or platform at the boot time. The base recipe does not provide any machine configuration files, those are provided by individual BSP layer.
Signed-off-by: Nitin A Kamble <nitin.a.kam...@intel.com> --- .../machinesetuptool/machinesetuptool_git.bb | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 meta/recipes-bsp/machinesetuptool/machinesetuptool_git.bb diff --git a/meta/recipes-bsp/machinesetuptool/machinesetuptool_git.bb b/meta/recipes-bsp/machinesetuptool/machinesetuptool_git.bb new file mode 100644 index 0000000..e901d12 --- /dev/null +++ b/meta/recipes-bsp/machinesetuptool/machinesetuptool_git.bb @@ -0,0 +1,55 @@ +SUMMARY = "Daemon to setup an image for a specific machine at boot time." +SECTION = "base" +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" +RDEPENDS_${PN} = "sysvinit sed" + +PV = "1.0+git${SRCPV}" + +SRCREV = "b1a1f62f2f8748080131afa588dd7208bcf35635" + +SRC_URI = "git://git.yoctoproject.org/machinesetuptool.git" + +S = "${WORKDIR}/git" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +inherit autotools pkgconfig update-rc.d + +INITSCRIPT_NAME = "machinesetuptool" +INITSCRIPT_PARAMS = "start 00 S . stop 20 0 1 6 ." + +# This variable is initialized to empty value now. +# It needs to be populated with the desired machine configuration files +# for each BSP in it's own layer. +MACHINE_CONFIG_FILES ?= "" + +python __anonymous () { + src_uri = d.getVar('SRC_URI', True) + machine_config_files = (d.getVar('MACHINE_CONFIG_FILES', True) or "") + for file in machine_config_files.split(): + src_uri += " file://" + file + d.setVar('SRC_URI', src_uri) +} + +do_install_append() { + + if [ -r ${WORKDIR}/defaults ] + then + install -m 0755 ${WORKDIR}/defaults ${D}/${sysconfdir}/${BPN}/ + fi + + if [ -r ${WORKDIR}/detect-machine ] + then + install -m 0755 ${WORKDIR}/detect-machine ${D}/${sysconfdir}/${BPN}/scripts/ + fi + + + for file in ${MACHINE_CONFIG_FILES} + do + if ( [ "$file" != "defaults" ] && [ "$file" != "detect-machine" ] ); then + mkdir -p ${D}/${sysconfdir}/${BPN}/config/`dirname ${file}` + install -m 0644 ${S}/../${file} ${D}/${sysconfdir}/${BPN}/config/${file} + fi + done +} -- 1.8.1.4 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core