[yocto] Per image customizations
Diego
diego.ml at zoho.com
Fri Jun 3 06:52:51 PDT 2016
Hi Oleksandr,
In data mercoledì 1 giugno 2016 21:57:32, Oleksandr Poznyak ha scritto:
> Here is the content of bbappend recipe for base-files recipe:
>
> FILESEXTRAPATHS_append := "${THISDIR}/${PN}"
>
> SRC_URI += "file://fstab-flash \
> file://fstab-regular \
> "
>
> PACKAGES += " ${PN}-flash ${PN}-regular"
> CONFFILES_${PN}-flash = "${CONFFILES_${PN}}"
> CONFFILES_${PN}-regular = "${CONFFILES_${PN}}"
>
> pkg_preinst_${PN}-flash = "${pkg_preinst_${PN}}"
> pkg_preinst_${PN}-regular = "${pkg_preinst_${PN}}"
>
> RREPLACES_${PN}-flash = "${PN}"
> RPROVIDES_${PN}-flash = "${PN}"
> RCONFLICTS_${PN}-flash = "${PN}"
>
> RREPLACES_${PN}-regular = "${PN}"
> RPROVIDES_${PN}-regular = "${PN}"
> RCONFLICTS_${PN}-regular = "${PN}"
>
> python populate_packages_prepend() {
> import shutil
>
> packages = ("${PN}-flash", "${PN}-regular")
> for package in packages:
> # copy ${PN} content to packages
> shutil.copytree("${PKGD}", "${PKGDEST}/%s" % package, symlinks=True)
> # replace fstab
> if package == "${PN}-flash":
> shutil.copy("${WORKDIR}/fstab-flash",
> "${PKGDEST}/${PN}-flash/etc/fstab")
> else:
> shutil.copy("${WORKDIR}/fstab-regular",
> "${PKGDEST}/${PN}-regular/etc/fstab")
> }
>
>
> This will produce two separate packages that will replace base-files
> package.
> Moreover, this trick allows You to modify base-files package separately for
> flash-OS and regular-OS
>
This is very useful, thank you. With this code I'm able to have two different
fstab files under packages-split:
./packages-split/base-files-regular/etc/fstab
./packages-split/base-files-flash/etc/fstab
Regardless of that though, the resulting rpm packages for "base-files-regular"
and "base-files-flash" have the original fstab as in "base-files", which is
different to both the fstabs in packages-split mentioned above.
I'm looking at what might be causing this, but any idea is welcome.
Thanks,
Diego
More information about the yocto
mailing list