Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Oct 2010 17:50:43 +0000 (UTC)
From:      Nathan Whitehorn <nwhitehorn@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r213386 - head/usr.sbin/sysinstall
Message-ID:  <201010031750.o93Hoh2D082550@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: nwhitehorn
Date: Sun Oct  3 17:50:43 2010
New Revision: 213386
URL: http://svn.freebsd.org/changeset/base/213386

Log:
  Extend sysinstall to handle powerpc64 by teaching it that powerpc64 has
  a lib32 distribution, and that the GENERIC kernel is named GENERIC64.
  More modifications will be required later for installations from ftp due
  to the shared platform name with 32-bit powerpc, but this is enough for
  snapshot CDs to work.
  
  Reviewed by:	brucec

Modified:
  head/usr.sbin/sysinstall/dist.c
  head/usr.sbin/sysinstall/dist.h
  head/usr.sbin/sysinstall/install.c
  head/usr.sbin/sysinstall/menus.c
  head/usr.sbin/sysinstall/sysinstall.8

Modified: head/usr.sbin/sysinstall/dist.c
==============================================================================
--- head/usr.sbin/sysinstall/dist.c	Sun Oct  3 17:05:25 2010	(r213385)
+++ head/usr.sbin/sysinstall/dist.c	Sun Oct  3 17:50:43 2010	(r213386)
@@ -87,7 +87,7 @@ static Distribution DistTable[] = {
     DTE_TARBALL("proflibs", &Dists, PROFLIBS, "/"),
     DTE_TARBALL("dict",	    &Dists, DICT,     "/"),
     DTE_TARBALL("info",	    &Dists, INFO,     "/"),
-#ifdef __amd64__
+#if defined(__amd64__) || defined(__powerpc64__)
     DTE_TARBALL("lib32",    &Dists, LIB32,    "/"),
 #endif
     DTE_SUBDIST("src",	    &Dists, SRC,      SrcDistTable),
@@ -98,7 +98,7 @@ static Distribution DistTable[] = {
 
 /* The kernel distributions */
 static Distribution KernelDistTable[] = {
-    DTE_TARBALL("GENERIC",  &KernelDists, KERNEL_GENERIC, "/boot"),
+    DTE_TARBALL(GENERIC_KERNEL_NAME,  &KernelDists, KERNEL_GENERIC, "/boot"),
     DTE_END,
 };
 

Modified: head/usr.sbin/sysinstall/dist.h
==============================================================================
--- head/usr.sbin/sysinstall/dist.h	Sun Oct  3 17:05:25 2010	(r213385)
+++ head/usr.sbin/sysinstall/dist.h	Sun Oct  3 17:50:43 2010	(r213386)
@@ -16,7 +16,7 @@
 #define DIST_CATPAGES		0x00200
 #define DIST_PORTS		0x00400
 #define DIST_LOCAL		0x00800
-#ifdef __amd64__
+#if defined(__amd64__) || defined(__powerpc64__)
 #define DIST_LIB32		0x01000
 #endif
 #define	DIST_KERNEL		0x02000
@@ -75,6 +75,12 @@
 #define DIST_KERNEL_SMP		0x00002
 #define DIST_KERNEL_ALL		0xFFFFF
 
+#ifdef __powerpc64__
+#define GENERIC_KERNEL_NAME	"GENERIC64"
+#else
+#define GENERIC_KERNEL_NAME	"GENERIC"
+#endif
+
 /* Canned distribution sets */
 
 #define _DIST_USER \

Modified: head/usr.sbin/sysinstall/install.c
==============================================================================
--- head/usr.sbin/sysinstall/install.c	Sun Oct  3 17:05:25 2010	(r213385)
+++ head/usr.sbin/sysinstall/install.c	Sun Oct  3 17:50:43 2010	(r213386)
@@ -979,7 +979,7 @@ installFixupKernel(dialogMenuItem *self,
 	 *     already and the /boot/kernel we remove is empty.
 	 */
 	vsystem("rm -rf /boot/kernel");
-		vsystem("mv /boot/GENERIC /boot/kernel");
+		vsystem("mv /boot/" GENERIC_KERNEL_NAME " /boot/kernel");
     }
     return DITEM_SUCCESS | DITEM_RESTORE;
 }

Modified: head/usr.sbin/sysinstall/menus.c
==============================================================================
--- head/usr.sbin/sysinstall/menus.c	Sun Oct  3 17:05:25 2010	(r213385)
+++ head/usr.sbin/sysinstall/menus.c	Sun Oct  3 17:50:43 2010	(r213386)
@@ -993,7 +993,7 @@ DMenu MenuSubDistributions = {
 	dmenuFlagCheck,	dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_GAMES },
       { " info",	"GNU info files",
 	dmenuFlagCheck,	dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_INFO },
-#ifdef __amd64__
+#if defined(__amd64__) || defined(__powerpc64__)
       { " lib32",	"32-bit runtime compatibility libraries",
 	dmenuFlagCheck,	dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_LIB32 },
 #endif

Modified: head/usr.sbin/sysinstall/sysinstall.8
==============================================================================
--- head/usr.sbin/sysinstall/sysinstall.8	Sun Oct  3 17:05:25 2010	(r213385)
+++ head/usr.sbin/sysinstall/sysinstall.8	Sun Oct  3 17:50:43 2010	(r213386)
@@ -428,7 +428,7 @@ Dictionary information (for tools like s
 .It Li info
 GNU info files and other extra docs.
 .It Li lib32
-(amd64 only)
+(amd64 and powerpc64 only)
 32-bit runtime compatibility libraries.
 .It Li ports
 The ports collection.



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