Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-6]: src Pull up following revision(s) (requested by manu in ticke...



details:   https://anonhg.NetBSD.org/src/rev/1d7459b4b9cb
branches:  netbsd-6
changeset: 776585:1d7459b4b9cb
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Tue Mar 18 08:17:56 2014 +0000

description:
Pull up following revision(s) (requested by manu in ticket #1026):
        share/man/man4/options.4: revision 1.433
        sys/kern/kern_exec.c: revision 1.371- 1.372
Add EMUL_NATIVEROOT so that native binaries can be told to search an
"emulation" directory before the real root. This makes easier to test
an amd64 kernel on the top of an i386 root filesystem prior a full
migration.

diffstat:

 share/man/man4/options.4 |  17 ++++++++++++++++-
 sys/kern/kern_exec.c     |   8 ++++++--
 2 files changed, 22 insertions(+), 3 deletions(-)

diffs (61 lines):

diff -r d98a84c1d28f -r 1d7459b4b9cb share/man/man4/options.4
--- a/share/man/man4/options.4  Tue Mar 18 08:09:46 2014 +0000
+++ b/share/man/man4/options.4  Tue Mar 18 08:17:56 2014 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: options.4,v 1.411.2.1 2012/02/23 18:29:52 riz Exp $
+.\"    $NetBSD: options.4,v 1.411.2.2 2014/03/18 08:17:56 msaitoh Exp $
 .\"
 .\" Copyright (c) 1996
 .\"    Perry E. Metzger.  All rights reserved.
@@ -450,6 +450,21 @@
 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
diff -r d98a84c1d28f -r 1d7459b4b9cb sys/kern/kern_exec.c
--- a/sys/kern/kern_exec.c      Tue Mar 18 08:09:46 2014 +0000
+++ b/sys/kern/kern_exec.c      Tue Mar 18 08:17:56 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_exec.c,v 1.339.2.7 2014/02/03 11:54:02 sborrill Exp $     */
+/*     $NetBSD: kern_exec.c,v 1.339.2.8 2014/03/18 08:17:56 msaitoh Exp $      */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.339.2.7 2014/02/03 11:54:02 sborrill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.339.2.8 2014/03/18 08:17:56 msaitoh Exp $");
 
 #include "opt_exec.h"
 #include "opt_ktrace.h"
@@ -185,7 +185,11 @@
 /* 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,



Home | Main Index | Thread Index | Old Index