bsoren
bsoren

Reputation: 11

How to use SSTATE_DUPWHITELIST variable in yocto

I'll try to explain it as easy as I can. I tried to include and build package "A" in my Yocto image, but package A depends on libftdi and ftdi-eeprom. Now, "ftdi-eeprom" depends on the "libftdi". In the newer versions of the "libftdi" the tarball also includes the ftdi-eeprom sources too and when you build the libftdi it builds both of the packages. Although because of the way that package "A" is configured I need two different recipes for each of the dependencies.

long story short, I made the two bitbake recipes as best as I could and successfully built "libftdi". Now when I run the "ftdi-eeprom" recipe, it wants to populate some files into the sysroot that are already installed there by libftdi. Here is where the error occurs... duplicates!

Apparently I need to set a SSTATE_DUPWHITELIST variable and declare that these duplicate files are safe to replace the old ones in the image (this overwrite must happen). Can someone please help me with configuring the SSTATE_DUPWHITELIST? I am not that pro working with Yocto.

Errors that I get on screen are uploaded in Dropbox

Thanks in advance!

Upvotes: 1

Views: 2440

Answers (3)

GSBran
GSBran

Reputation: 71

I got it to work by using: SSTATE_DUPWHITELIST = "/"

Dont forget the quotes. Here's my bb excerpt:

SSTATE_DUPWHITELIST = "/"

DEPENDS = ""

do_unpack() {
    mkdir -pv ${S}
    tar xvf ${DL_DIR}/${FILENAME}.tar  -C ${S}
}

do_install() {
    install -d -m 755  ${D}${includedir}
    install -m 644  ${S}/${MYPATH}/inc/myHeader1.h ${D}${includedir}
    install -m 644  ${S}/${MYPATH}/inc/myHeader2.h ${D}${includedir}
    install -m 644  ${S}/${MYPATH}/inc/myHeader3.h ${D}${includedir}
}

Upvotes: 1

bluelightning
bluelightning

Reputation: 471

The answer is to not use SSTATE_DUPWHITELIST for this at all. Instead, in the libftdi recipe's do_install (or do_install_append, if the recipe itself doesn't define its own do_install) you should delete the duplicate files from within ${D} and then they won't get staged and the error won't occur.

Upvotes: 3

bsoren
bsoren

Reputation: 11

I managed to solve this problem by adding the SSTATE_DUPWHITELIST to the bitbake recipe of the package as follows:

SSTATE_DUPWHITELIST = "${TMPDIR}/PATH/TO/THE/FILES"

I added the absolute path of all of the 6,7 files that had the conflict to the list. I did that because they were basically coming from a same source and it was all safe to do that. correct me if there is a better way though.

Hope this helps someone!

Upvotes: 0

Related Questions