why cp in do_install() change file permission mode?


Lu, Lianhao <lianhao.lu@...>
 

Hi fellows,

Could anyone tell me why does the cp in do_install() change the file permission mode? Thanks!

do_install () {
rm -rf ${D}${installed_dir}
install -d ${D}${installed_dir}
cp -rp ${S}/* ${D}${installed_dir}
}

After "bitbake xxx -c install", I found the file under ${D}${installed_dir} had the permission mode of 0744 while the corresponding file under directory ${S} had the mode of 0644. Why did this happen? How to avoid this kind of mode change? Thanks!

Best Regards
-Lianhao Lu

Join yocto@lists.yoctoproject.org to automatically receive all group messages.