Cross compile world on i386 to x86_64

Ruslan Ermilov ru at
Sat Dec 2 09:01:22 PST 2006

On Sat, Dec 02, 2006 at 06:57:32PM +0530, Joseph Koshy wrote:
> >Can I avoid reinstalling the system with amd64 binaries by
> >cross-compiling world and kernel for amd64 on the installed
> >i386 FreeBSD-CURRENT?
> Yes, it is possible, do check the archives for the details.
We've been doing this "upgrade" last week;
compared to the last time I checked it, the
32-bit compatibility only improved, so the
whole process was much simpler, and basically
was like this:

- cross-compile amd64 world and kernel on i386

- install the amd64 kernel

- reboot with the amd64 kernel and i386 world
  into single user mode.  At this point, the
  dynamically linked i386 binaries could not
  be used because is not yet
  available, so we used /rescue binaries to
  do what's needed (re-mount root file system
  r/w, mount other file systems, etc.)

- after that, we installed the amd64 world by
  faking it into thinking that it's running
  on the i386 box and cross-install to amd64
  (because object directories are layed out
  for this during the build):

	env MACHINE_ARCH=i386 MACHINE=i386 \
	    make TARGET_ARCH=amd64 \
	    DESTDIR=/ installworld

- after that, run mergemaster(8) to update
  /etc, and you should be able to boot into
  amd64 multiuser mode.

I wouldn't recommend this procedure for those
not familiar with the internals of the build

Ruslan Ermilov
ru at
FreeBSD committer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url :

More information about the freebsd-amd64 mailing list