# Compile linux stuff on FreeBSD



## Beeblebrox (Jan 30, 2013)

It looks like I am going to have to compile from source, certain linux kernel / world / toolchain / apps (coreboot & OpenWRT for example). As I see it, I could either use a vmware environment or a /compat/linux layer. For the layer in ports there are 3 choices from what I can tell:
1. Redhat/Fedora: emulators/linux_base-f10
2. Gento: emulators/linux_base-gentoo-stage3
3. and finally, Debian sysutils/debootstrap. However, debootstrap boasts this plus:


> In FreeBSD, you can use debootstrap to install Debian into a subdirectory of your existing FreeBSD installation (i386 or amd64) and then run Debian GNU/kFreeBSD (i386 or amd64) or Debian Linux (i386) in a *jail or chroot*.


*Q1.* I am partial to #3 (Debian); any objections? I have emulators/linux_base-f10 installed for using flash. Does flash work under the Debian compat?
*Q2.* If I need to install dependent packages for the build (say gcc): Download the package (.rpm / .deb), chroot into the linux environment and extract / install the package in the chroot environment - is that right?
*Q3.* git / svn the source files and build while chrooted.
Have I missed anything in this summary?
What is your actual experience or difficulties encountered?

Thanks All


----------

