This seems to bite a lot of people (myself included).

Change

IMAGE_INSTALL += “canlogger”

to

IMAGE_INSTALL_append = “ canlogger”

or possibly better

EXTRA_IMAGE_INSTALL_append = “ canlogger”

 

+= is evaluated immediately during parsing just like = and therefore behaves just like = if the variable did not yet exist.  This then defeats the ?= assignment of IMAGE_INSTALL in your distro/.conf, image recipe, or core-image.bbclass.

 

The “override syntax” _append gets appended POST parsing and so does not preempt the ?= default assignment.

 

From: yocto-bounces@yoctoproject.org [mailto:yocto-bounces@yoctoproject.org] On Behalf Of Oliver
Sent: Thursday, May 14, 2015 10:27 AM
To: yocto@yoctoproject.org
Subject: [yocto] recipe removing (some)contents of /etc

 

Hello

 

I have the below's simple recipe(starting a script in sysV runlevel 2), but when I add it to the image with

IMAGE_INSTALL += "canlogger"

in my local.conf, most of the contents of /etc gets removed/overwritten making the system unbootable.

 

Does someone sees something wrong?

 

#####

DESCRIPTION = "Start CAN services logging"
SECTION = "examples"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
PR = "r0"

SRC_URI += "file://canlogger"

INITSCRIPT_NAME = "canlogger"
INITSCRIPT_PARAMS = "start 98 2 ."

do_install() {
    install -d ${D}${sysconfdir}/init.d/
    install -m 0755 ${WORKDIR}/canlogger ${D}${sysconfdir}/init.d/canlogger
}

inherit update-rc.d

#####

 




Notice to recipient: This email is meant for only the intended recipient of the transmission, and may be a communication privileged by law, subject to export control restrictions or that otherwise contains proprietary information. If you receive this email by mistake, please notify us immediately by replying to this message and then destroy it and do not review, disclose, copy or distribute it. Thank you in advance for your cooperation.