All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][XM-TEST] Add mounting /sys to ramdisk
@ 2006-03-14  0:42 Daniel Stekloff
  2006-03-14  3:10 ` Woody Marvel
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Stekloff @ 2006-03-14  0:42 UTC (permalink / raw)
  To: Xen Mailing List, Ewan Mellor; +Cc: Dan Smith, Stefan Berger

[-- Attachment #1: Type: text/plain, Size: 127 bytes --]


Hi, 

This patch adds mounting /sys for xm-test ramdisk. I tested on the para
virt as well as the HVM disk.img.

Thanks,

Dan

[-- Attachment #2: xmtest-mnt-sys.patch --]
[-- Type: text/x-patch, Size: 1372 bytes --]

# HG changeset patch
# User stekloff@dyn9047022152.beaverton.ibm.com
# Node ID 54dd1febcc7276368cfa7c2304a3e9b8db367cb9
# Parent  36cf47cfea4e3c0197db6b8822398da4a3f624b3

Add mounting /sys for 2.6 xm-test images.

Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>

diff -r 36cf47cfea4e -r 54dd1febcc72 tools/xm-test/ramdisk/Makefile.am
--- a/tools/xm-test/ramdisk/Makefile.am	Mon Mar 13 14:06:58 2006
+++ b/tools/xm-test/ramdisk/Makefile.am	Mon Mar 13 23:32:29 2006
@@ -13,6 +13,8 @@
 
 XMTEST_MAJ_VER = $(shell echo @PACKAGE_VERSION@ | perl -pe 's/(\d+)\.(\d+)\.\d+/\1.\2/')
 XMTEST_VER_IMG = initrd-$(XMTEST_MAJ_VER).img
+
+EXTRA_ROOT_DIRS = sys
 
 if HVM
 all: initrd.img disk.img
@@ -36,7 +38,8 @@
 
 $(XMTEST_VER_IMG): $(BR_IMG)
 	chmod a+x skel/etc/init.d/rcS
-	(cd skel; tar cf - .) | (cd $(BR_SRC)/$(BR_ROOT); tar xvf -)
+	(cd skel; mkdir -p $(EXTRA_ROOT_DIRS); tar cf - .) \
+		| (cd $(BR_SRC)/$(BR_ROOT); tar xvf -)
 	cd $(BR_SRC) && make
 	cp $(BR_IMG) initrd-$(XMTEST_MAJ_VER).img
 
diff -r 36cf47cfea4e -r 54dd1febcc72 tools/xm-test/ramdisk/skel/etc/init.d/rcS
--- a/tools/xm-test/ramdisk/skel/etc/init.d/rcS	Mon Mar 13 14:06:58 2006
+++ b/tools/xm-test/ramdisk/skel/etc/init.d/rcS	Mon Mar 13 23:32:29 2006
@@ -2,3 +2,7 @@
 
 mount -a
 
+# If we're running 2.6, make sure /sys is mounted
+if uname -r | grep -q '^2.6'; then
+	mount -t sysfs none /sys
+fi

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH][XM-TEST] Add mounting /sys to ramdisk
  2006-03-14  0:42 [PATCH][XM-TEST] Add mounting /sys to ramdisk Daniel Stekloff
@ 2006-03-14  3:10 ` Woody Marvel
  2006-03-14 16:21   ` Dan Smith
  2006-03-14 17:10   ` Daniel Stekloff
  0 siblings, 2 replies; 6+ messages in thread
From: Woody Marvel @ 2006-03-14  3:10 UTC (permalink / raw)
  To: xen-devel

Dan 

Is that the only check you can used is 2.6 from uname? Is there any
other piece of info you can check? <not knowing sysfs that well>

wm
=======================
On Mon, 2006-03-13 at 16:42 -0800, Daniel Stekloff wrote:
> Hi, 
> 
> This patch adds mounting /sys for xm-test ramdisk. I tested on the para
> virt as well as the HVM disk.img.
> 
> Thanks,
> 
> Dan
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
-- 
Sincerely,      Woody Marvel
IBM Linux Technology Center
Open Source Virtualization
email: marvel@us.ibm.com
503-578-3833   Beaverton, OR 97006
**********************************

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH][XM-TEST] Add mounting /sys to ramdisk
  2006-03-14  3:10 ` Woody Marvel
@ 2006-03-14 16:21   ` Dan Smith
  2006-03-14 17:03     ` Luciano Miguel Ferreira Rocha
  2006-03-14 17:10   ` Daniel Stekloff
  1 sibling, 1 reply; 6+ messages in thread
From: Dan Smith @ 2006-03-14 16:21 UTC (permalink / raw)
  To: marvel; +Cc: xen-devel


WM> Dan Is that the only check you can used is 2.6 from uname? Is
WM> there any other piece of info you can check? <not knowing sysfs
WM> that well>

Checking for 2.6 is a perfectly reasonable way to decide whether or
not to mount /sys, IMHO.

-- 
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms@us.ibm.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH][XM-TEST] Add mounting /sys to ramdisk
  2006-03-14 16:21   ` Dan Smith
@ 2006-03-14 17:03     ` Luciano Miguel Ferreira Rocha
  0 siblings, 0 replies; 6+ messages in thread
From: Luciano Miguel Ferreira Rocha @ 2006-03-14 17:03 UTC (permalink / raw)
  To: xen-devel

On Tue, Mar 14, 2006 at 08:21:25AM -0800, Dan Smith wrote:
> 
> WM> Dan Is that the only check you can used is 2.6 from uname? Is
> WM> there any other piece of info you can check? <not knowing sysfs
> WM> that well>
> 
> Checking for 2.6 is a perfectly reasonable way to decide whether or
> not to mount /sys, IMHO.

And there's grep sysfs /proc/filesystems (|| modprobe -q sysfs, if
compile-as-module is ever added to sysfs).

(Sorry for replying to this post instead of the initial one, I deleted
it already.)

-- 
lfr
0/0

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH][XM-TEST] Add mounting /sys to ramdisk
  2006-03-14  3:10 ` Woody Marvel
  2006-03-14 16:21   ` Dan Smith
@ 2006-03-14 17:10   ` Daniel Stekloff
  2006-03-14 17:26     ` Woody Marvel
  1 sibling, 1 reply; 6+ messages in thread
From: Daniel Stekloff @ 2006-03-14 17:10 UTC (permalink / raw)
  To: marvel; +Cc: xen-devel

On Mon, 2006-03-13 at 19:10 -0800, Woody Marvel wrote:
> Dan 
> 
> Is that the only check you can used is 2.6 from uname? Is there any
> other piece of info you can check? <not knowing sysfs that well>


Hi Woody,

Yeah... sysfs is compiled into the 2.6 domU kernel, which we are
assuming is the kernel for the ramdisk. The HVM disk.img, which goes and
finds its own non-xen kernel, could be an issue - if the kernel it finds
doesn't compile in sysfs - such as an embedded kernel. I'm not sure this
really is an issue, however. Even if it shouldn't find sysfs to mount,
the image will still boot and still be able to run tests.

Is that ok?

Thanks,
Dan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH][XM-TEST] Add mounting /sys to ramdisk
  2006-03-14 17:10   ` Daniel Stekloff
@ 2006-03-14 17:26     ` Woody Marvel
  0 siblings, 0 replies; 6+ messages in thread
From: Woody Marvel @ 2006-03-14 17:26 UTC (permalink / raw)
  To: Daniel Stekloff; +Cc: xen-devel

Dan

Great, thanks for the reply. I was not inferring any thing on the
requirement of mounting sysfs, just trying to understand if there was
another method of checking for sysfs prior to the mount.

And the one that came from the list was what I was looking for.

==================
And there's grep sysfs /proc/filesystems (|| modprobe -q sysfs, if
compile-as-module is ever added to sysfs).
===================

Thanks Dan, thanks for the patch.

On Tue, 2006-03-14 at 09:10 -0800, Daniel Stekloff wrote:
> On Mon, 2006-03-13 at 19:10 -0800, Woody Marvel wrote:
> > Dan 
> > 
> > Is that the only check you can used is 2.6 from uname? Is there any
> > other piece of info you can check? <not knowing sysfs that well>
> 
> 
> Hi Woody,
> 
> Yeah... sysfs is compiled into the 2.6 domU kernel, which we are
> assuming is the kernel for the ramdisk. The HVM disk.img, which goes and
> finds its own non-xen kernel, could be an issue - if the kernel it finds
> doesn't compile in sysfs - such as an embedded kernel. I'm not sure this
> really is an issue, however. Even if it shouldn't find sysfs to mount,
> the image will still boot and still be able to run tests.
> 
> Is that ok?
> 
> Thanks,
> Dan
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
-- 
Sincerely,      Woody Marvel
IBM Linux Technology Center
Open Source Virtualization
email: marvel@us.ibm.com
503-578-3833   Beaverton, OR 97006
**********************************

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-03-14 17:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-14  0:42 [PATCH][XM-TEST] Add mounting /sys to ramdisk Daniel Stekloff
2006-03-14  3:10 ` Woody Marvel
2006-03-14 16:21   ` Dan Smith
2006-03-14 17:03     ` Luciano Miguel Ferreira Rocha
2006-03-14 17:10   ` Daniel Stekloff
2006-03-14 17:26     ` Woody Marvel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.