我很期待在我的主机 Ubuntu 上为我的 ARM 目标进行编译。
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=31&t=8478
上面的链接声明使用 chroot 并直接将您的程序编译到主机上目标的根文件系统中。
有人建议使用像 scratchbox 这样的监狱虚拟环境。
为特定目标平台设置交叉编译环境
https://en.wikipedia.org/wiki/Chroot
The chroot mechanism is not intended to defend against intentional tampering by privileged (root) users. On most systems, chroot contexts do not stack properly and chrooted programs with sufficient privileges may perform a second chroot to break out. To mitigate the risk of this security weakness, chrooted programs should relinquish root privileges as soon as practical after chrooting, or other mechanisms – such as FreeBSD Jails - should be used instead. Note that some systems, such as FreeBSD, take precautions to prevent the second chroot attack.[1]
So i am investigating on it for few days here i am not able to understand what above statement means.
1> 与 chroot 相比,虚拟监狱环境有什么优势?
2> chroot 是否会影响所有打开的终端或.. 运行命令的特定终端?
3> 我们究竟应该使用什么来交叉编译 Jail,比如 scratch-box 或 chroot。