[yocto] How to set aliases before bitbake compile

Khem Raj raj.khem at gmail.com
Sun Jan 17 08:28:31 PST 2016


On Sun, Jan 17, 2016 at 4:03 AM, Marius <mdlcameras at gmail.com> wrote:
> Hi
> I am still learning about yocto and kernels and the whole process so please
> excuse a silly question.
> Because I am still learning, I am re-compiling my BBB image on a regular
> basis as I only want the bare minimum of packages in the image.
>
> Now I have to edit the /etc/profile after every eMMC install in order to set
> my aliases. Where can I set the aliases before running bitbake on my image?
>

you can tweak this file using a bbappend e.g.

recipes-core/base-files/base-files_%.bbappend with content e.g.

do_install_append () {
        if [ "${@bb.utils.contains('DISTRO_FEATURES', 'systemd',
'systemd', '', d)}" = "systemd" ]; then
                echo "export SYSTEMD_PAGER=/bin/cat" >>
${D}${sysconfdir}/profile
        fi
}

will set cat to be default pager for systemd tools.
you can do anything in that do_install snippet.
>
> Regards
> Marius
>
> --
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>



More information about the yocto mailing list