Christos Zoulas <chris...@astron.com> wrote: > I think EMUL_NATIVEROOT is better, since everything starts with EMUL?
We'd get this, with the option documentation: Index: sys/kern/kern_exec.c =================================================================== RCS file: /cvsroot/src/sys/kern/kern_exec.c,v retrieving revision 1.369 diff -U 4 -r1.369 kern_exec.c --- sys/kern/kern_exec.c 3 Jan 2014 15:49:49 -0000 1.369 +++ sys/kern/kern_exec.c 25 Jan 2014 16:13:13 -0000 @@ -177,9 +177,13 @@ /* NetBSD emul struct */ struct emul emul_netbsd = { .e_name = "netbsd", +#ifdef EMUL_NATIVEROOT + .e_path = EMUL_NATIVEROOT, +#else .e_path = NULL, +#endif #ifndef __HAVE_MINIMAL_EMUL .e_flags = EMUL_HAS_SYS___syscall, .e_errno = NULL, .e_nosys = SYS_syscall, Index: share/man/man4/options.4 =================================================================== RCS file: /cvsroot/src/share/man/man4/options.4,v retrieving revision 1.432 diff -U 4 -r1.432 options.4 --- share/man/man4/options.4 13 Oct 2013 22:34:13 -0000 1.432 +++ share/man/man4/options.4 25 Jan 2014 16:13:13 -0000 @@ -449,8 +449,23 @@ .Va struct stat are adjusted and some binaries which use .Xr sysctl 3 to retrieve network details would not work properly. +.It Cd options EMUL_NATIVEROOT=string +Just like emulated binaries first try to lookup files in +an emulation root (e.g.: +.Pa /emul/linux ) +before looking them up in real root, this option cause native +binaries to first look up files in an "emulation" directory too. +This can be useful to test an amd64 kernel on top of an i386 system +prior full migration: by unpacking the amd64 distribution in e.g. +.Pa /emul/netbsd64 +and specifying that location as +.Cd EMUL_NATIVEROOT , +native amd64 binaries can be run while the root filesystem remains +populated with i386 binaries. Beware of +.Pa /dev +incompatibilities between i386 and amd64 if you do this. .It Cd options EXEC_ELF_NOTELESS Run unidentified ELF binaries as .Nx binaries. -- Emmanuel Dreyfus http://hcpnet.free.fr/pubz m...@netbsd.org