create symbolic link in bitbake recipe

前端 未结 6 1736
挽巷
挽巷 2021-01-14 02:03

I have a .bbappend recipe that I need to create a symbolic link in my system.

This is how it looks like now:

bernardo@bernardo-ThinkCentre-Edge72:~/y         


        
6条回答
  •  滥情空心
    2021-01-14 02:56

    I had a look at how other recipes create links in the rootfs, and most seem to do it this way:

    ln -sf /data/etc/bluetooth/main.conf ${D}/${sysconfdir}/bluetooth/main.conf
    

    This command in the recipe will create the following link on the device:

    /# ls -al /etc/bluetooth/main.conf
    lrwxrwxrwx 1 root root 29 Sep 11 15:34 /etc/bluetooth/main.conf -> /data/etc/bluetooth/main.conf
    

    You use the full, Yocto-generated path when creating the link, but you make it point to the "final" location in the rootfs.

    This way you can use "absolute" paths and won't have to change the working directory in the recipe.

提交回复
热议问题