6.32. To Boot or to Chroot?

There are two different ways you can proceed from this point to build the final system. You can build a kernel, a bootloader, and a few other utilities, boot into the temporary system, and build the rest there. Alternatively, you can chroot into the temporary system.

The boot method is needed when you are building on a different architecture. For example, if you are building a PowerPC system from an x86, you can't chroot. The chroot method is for when you are building on the same architecture. If you are building on, and for, an x86 system, you can simply chroot. The rule of thumb here is if the architectures match and you are running the same series kernel you can just chroot. If you aren't running the same series kernel, or are wanting to run a different ABI, you will need to use the boot option.

If you are in any doubt about this, you can try the following commands to see if you can chroot:

/tools/bin/gcc -v

If either of these commands fail, you will have to follow the boot method.

To chroot, you will also need a Linux Kernel-2.6.32 or greater (having been compiled with GCC-4.1.2 or greater). The reason for the kernel version requirement is that eglibc is built to generate the library for the smallest version of the Linux kernel expected to be supported.

To check your kernel version, run cat /proc/version - if it does not say that you are running a 2.6.32 or later Linux kernel, compiled with GCC 4.1.2 or later, you cannot chroot.

For the boot method, follow If You Are Going to Boot.

For the chroot method, follow If You Are Going to Chroot.