HOW TO to get linux emulation going on AMD64 5.3-RC1 !
Lars Tunkrans
lars.tunkrans at bredband.net
Sun Oct 24 05:27:55 PDT 2004
This is a step by step guide to get linux emulation to run
on AMD64 5.3-RC1 using the standard emulators/linux_base port.
This is pulled together from the previous work done by Tim Robbins and Francois Tigeot.
Do we need to feed this back to a certain authority ?
If the "authority" reads this please respond,
if not I'll mail it to the maintainer of linux_base in a few days.
1.) Put these varaiables in the Kernel config file:
/usr/src/sys/amd64/conf/your_kernel_config_file
options LINPROCFS
options COMPAT_43
options COMPAT_LINUX32
Rebuild the kernel and install it !
2.) Edited /etc/fstab for linprocfs , add the line:
none /compat/linux/proc linprocfs rw 0 0
3.) Edit /etc/rc.conf and add the line:
linux_enabled="YES"
4.) Reboot.
5.) Patch /usr/ports/emulators/linux_base/Makefile with
Francois Tigeot's patch.
Put the patch below in /usr/ports/emulators/linux_base/patchfile
run:
# patch -p0 < patchfile
---------------<snip>------------------
--- Makefile.orig Wed Oct 6 15:13:33 2004
+++ Makefile Wed Oct 6 16:05:51 2004
@@ -110,6 +110,9 @@
RPM= LC_ALL=C rpm
RPMFLAGS= --root ${LINUXBASE} --dbpath ${DBPATH} --nodeps \
--replacepkgs --ignoreos --ignorearch
+.if (${ARCH} == "amd64")
+RPMFLAGS+= --noscripts
+.endif
RPMDIR= ${DISTDIR}/${DIST_SUBDIR}
REMOVE_DIRS= boot dev home root tmp var/tmp usr/local usr/tmp
@@ -118,7 +121,7 @@
etc/protocols
BRAND_FILES= bin/rpm sbin/ldconfig sbin/sln
-FALLBACK_ELF_MIB= kern.fallback_elf_brand
+FALLBACK_ELF_MIB= kern.elf32.fallback_brand
LINUX_ELF= 3
PREVIOUS_ELF!= /sbin/sysctl -n ${FALLBACK_ELF_MIB}
-------------------<snip>--------------------------
6.) Install linux_base
# cd /usr/ports/emulators/linux_base
# make install
7.) Fix the library searchpath for the linux Emulator to
find the linux X libraries. Brand some binaries as Linux binaries,
( this is done in linux_base makefile for i386 )
# cd /usr/compat/linux
# echo '/usr/X11R6/lib' > etc/ld.so.conf
# brandelf -t Linux sbin/ldconfig
# brandelf -t Linux sbin/sln
# brandelf -t Linux sbin/rpm
# sbin/ldconfig
8.) Reboot again.
Install desired Linux apps and run.
Regards
//Lars
More information about the freebsd-amd64
mailing list