From e3d8cf496d6d965ccdd993bddfd7c98e9ae09701 Mon Sep 17 00:00:00 2001 From: Nathan Whitehorn Date: Sun, 3 Oct 2010 17:50:43 +0000 Subject: [PATCH] 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 --- usr.sbin/sysinstall/dist.c | 4 ++-- usr.sbin/sysinstall/dist.h | 8 +++++++- usr.sbin/sysinstall/install.c | 2 +- usr.sbin/sysinstall/menus.c | 2 +- usr.sbin/sysinstall/sysinstall.8 | 2 +- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/usr.sbin/sysinstall/dist.c b/usr.sbin/sysinstall/dist.c index 8bd62d1b6dab..716a05421337 100644 --- a/usr.sbin/sysinstall/dist.c +++ b/usr.sbin/sysinstall/dist.c @@ -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, }; diff --git a/usr.sbin/sysinstall/dist.h b/usr.sbin/sysinstall/dist.h index 59643ee0af62..0fd004f5d997 100644 --- a/usr.sbin/sysinstall/dist.h +++ b/usr.sbin/sysinstall/dist.h @@ -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 \ diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c index 07a16d17dd62..4bf67ea00ea4 100644 --- a/usr.sbin/sysinstall/install.c +++ b/usr.sbin/sysinstall/install.c @@ -979,7 +979,7 @@ installFixupKernel(dialogMenuItem *self, int dists) * 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; } diff --git a/usr.sbin/sysinstall/menus.c b/usr.sbin/sysinstall/menus.c index 58a995012788..2015978b2794 100644 --- a/usr.sbin/sysinstall/menus.c +++ b/usr.sbin/sysinstall/menus.c @@ -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 diff --git a/usr.sbin/sysinstall/sysinstall.8 b/usr.sbin/sysinstall/sysinstall.8 index b5c714b14713..64df1bb8494c 100644 --- a/usr.sbin/sysinstall/sysinstall.8 +++ b/usr.sbin/sysinstall/sysinstall.8 @@ -428,7 +428,7 @@ Dictionary information (for tools like spell). .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.