Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Sep 2010 16:02:52 +0530
From:      "Jayachandran C." <c.jayachandran@gmail.com>
To:        freebsd-mips@freebsd.org
Subject:   patch - bsdlabel support on MIPS
Message-ID:  <AANLkTi=ZwWbSbfJOiFb5NnF7q71stPJoVmLcOjQrfdUH@mail.gmail.com>

index | next in thread | raw e-mail

[-- Attachment #1 --]
Here are two patches to enable mips support for bsdlabel(8). Without
these we need to call bsdlabel with '-m i386' or similar to make it
work on MIPS.  The first patch is needed, but the second one provides
'-m mips' support for bsdlabel.

Comments welcome,  especially on the second one.

JC.

[-- Attachment #2 --]
Index: sys/sys/disklabel.h
===================================================================
--- sys/sys/disklabel.h	(revision 212948)
+++ sys/sys/disklabel.h	(working copy)
@@ -52,7 +52,7 @@
 
 /* XXX these should be defined per controller (or drive) elsewhere, not here! */
 #if defined(__i386__) || defined(__amd64__) || defined(__arm__) || \
-    defined(__ia64__) || defined(__powerpc__)
+    defined(__ia64__) || defined(__powerpc__) || defined(__mips__)
 #define LABELSECTOR	1			/* sector containing label */
 #define LABELOFFSET	0			/* offset of label in sector */
 #endif

[-- Attachment #3 --]
Index: sbin/bsdlabel/bsdlabel.c
===================================================================
--- sbin/bsdlabel/bsdlabel.c	(revision 212948)
+++ sbin/bsdlabel/bsdlabel.c	(working copy)
@@ -172,6 +172,7 @@
 				if (!strcmp(optarg, "i386") ||
 				    !strcmp(optarg, "amd64") ||
 				    !strcmp(optarg, "ia64") ||
+				    !strcmp(optarg, "mips") ||
 				    !strcmp(optarg, "pc98")) {
 					labelsoffset = 1;
 					labeloffset = 0;
Index: sbin/bsdlabel/bsdlabel.8
===================================================================
--- sbin/bsdlabel/bsdlabel.8	(revision 212948)
+++ sbin/bsdlabel/bsdlabel.8	(working copy)
@@ -109,7 +109,7 @@
 .Nm
 to use a layout suitable for a different architecture.
 Current valid values are
-.Cm i386 , amd64 , ia64 , pc98 ,
+.Cm i386 , amd64 , ia64 , mips , pc98 ,
 and
 .Cm alpha .
 If this option is omitted,
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=ZwWbSbfJOiFb5NnF7q71stPJoVmLcOjQrfdUH>