WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] v2.6.x root dev patch

To: xen-devel@xxxxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] v2.6.x root dev patch
From: David Becker <becker@xxxxxxxxxxx>
Date: Tue, 14 Sep 2004 13:13:58 -0400
Delivery-date: Tue, 14 Sep 2004 18:33:00 +0100
Envelope-to: steven.hand@xxxxxxxxxxxx
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.6+20040523i
For xen0, I do ip config on the kernel command line
(eg ip=172.16.5.107:::255.255.252.0:dragonfly-xen:eth0:off )
and that works fine with v2.4 but not with v2.6 xen0 kernels.

Turns out that in 2.6 xen0, MAJOR(ROOT_DEV) == UNNAMED_MAJOR during the
time the ipconfig stuff runs.   In that case, ipconfig decides to do dhcp even
though the ip= command line param is present.

The 2.4 xen0 initializes ROOT_DEV to MKDEV(RAMDISK_MAJOR,0) and avoids
this problem.   The 2.6 xen0 initializes ROOT_DEV to the value stashed
in bzImage .. except 2.6 xen0 kernels don't have any of that bzImage
header stuff.

Here is a patch to make 2.6 initialize ROOT_DEV as is done in 2.4:

===== linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/setup.c 1.18 vs edited =====
--- 1.18/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/setup.c  Tue Sep  7 
05:59:38 2004
+++ edited/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/setup.c        Tue Sep 
14 12:53:12 2004
@@ -1313,7 +1313,7 @@
                efi_enabled = 1;
 #endif
 
-       ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV);
+       ROOT_DEV = MKDEV(RAMDISK_MAJOR,0);
        drive_info = DRIVE_INFO;
        screen_info = SCREEN_INFO;
        edid_info = EDID_INFO;




-------------------------------------------------------
This SF.Net email is sponsored by: thawte's Crypto Challenge Vl
Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam
Camcorder. More prizes in the weekly Lunch Hour Challenge.
Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] v2.6.x root dev patch, David Becker <=