Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Matt Wilson <msw@redhat.com>
To: axp-list@redhat.com
Subject: Re: AFS
Date: Wed, 1 Nov 2000 19:27:40 -0500	[thread overview]
Message-ID: <20001101192739.B23033@devserv.devel.redhat.com> (raw)
In-Reply-To: <Pine.4.10.10011011453550.25665-100000@lab1-2.eng.utah.edu>; from santiago@eng.utah.edu on Wed, Nov 01, 2000 at 02:54:59PM -0700

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

I build with something like:

$ make SYS_NAME="alpha_linux22" LINUX_VERS="2.2.17-4" LINUX_VERSION="2.2.17-4"

with the attached patch.

Matt

On Wed, Nov 01, 2000 at 02:54:59PM -0700, James Fowler wrote:
> So far it will only compile against a 2.2.14 or lower kernel.  Don't know
> why (that is why I haven't changed it - I know that it can be changed).
> James

[-- Attachment #2: openafs-1.0-alpha.patch --]
[-- Type: text/plain, Size: 11369 bytes --]

? alpha_linux22
Index: configure.sh
===================================================================
RCS file: configure.sh
diff -N configure.sh
--- /dev/null	Thu Aug 24 05:00:32 2000
+++ /tmp/cvsyZXBxm	Wed Nov  1 19:26:14 2000
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+find_build_arch() {
+	case `uname -m` in
+		i[0-9]86*)
+			echo i386
+		;;
+		alpha*)
+			echo alpha
+		;;
+	esac
+}
+
+arch=`find_build_arch`
+bdir=${arch}_linux22
+mkdir $bdir
+rm -f @sys
+ln -s $bdir @sys
+mkdir -p $bdir/{obj,dest}
+rm -f obj dest
+ln -s @sys/{obj,dest} .
+ln -s src/Makefile .
+make links
Index: src/config/Makefile.alpha_linux22
===================================================================
RCS file: Makefile.alpha_linux22
diff -N Makefile.alpha_linux22
--- /dev/null	Thu Aug 24 05:00:32 2000
+++ /tmp/cvsJK122a	Wed Nov  1 19:26:33 2000
@@ -0,0 +1,50 @@
+# Copyright 1998 Transarc Corporation 
+#
+# Keep macros within each section in sorted order for clean diff displays.
+#
+# AFS_OSTYPE used to indicate suffixes and os specific subdirectories.
+AFS_OSTYPE = LINUX
+
+# Base directory for linux kernel source. Actually a prefix which is complete
+# when LINUX_VERS is appended to it.
+LINUX_SRCDIR = /lib/modules/
+# Default list of Linux kernels to build. Build will run only if all
+# can be built. To build a different set, specify LINUX_VERS to make.
+LINUX_VERS = 2.2.16-24smp 2.2.17-4
+
+#
+# compilation and link editor flags
+DBG=-g
+OPTMZ=-O2
+PAM_CFLAGS = -O2 -Dlinux -DLINUX_PAM -fPIC
+# Put -O2 here to _ensure_ all Makefiles pick it up.
+XCFLAGS= -O2 -Wall -pipe
+MT_CFLAGS=-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}
+XLDFLAGS=
+SHARE_LDFLAGS = -shared -Xlinker -x
+SHLIB_SUFFIX=so
+SHLIB_CFLAGS=
+#
+# libraries
+MTLIBS=-lpthread
+TXLIBS= /usr/lib/libncurses.so
+XLIBS=
+#
+# programs
+AR=ar
+AS=as
+CP=cp
+INSTALL=${SRCDIR}bin/install
+LD=ld   
+MT_CC=cc
+MV=mv
+RANLIB=ranlib
+RM=rm
+WASHTOOL=${SRCDIR}bin/washtool
+#
+# Other OS specific requirements
+#
+YACC = bison -y
+LEX = flex -l
+# Used in des library.
+CRYPT_OBJ = crypt.o
Index: src/config/afs_sysnames.h
===================================================================
RCS file: /mnt/devel/CVS/openafs/src/config/afs_sysnames.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- src/config/afs_sysnames.h	2000/11/01 19:31:24	1.1.1.1
+++ src/config/afs_sysnames.h	2000/11/01 19:40:51	1.2
@@ -101,6 +101,7 @@
 
 #define SYS_NAME_ID_i386_linux2		1500
 #define SYS_NAME_ID_i386_linux22	1501
+#define SYS_NAME_ID_alpha_linux22	1502
 
 /*
  * Placeholder to keep system-wide standard flags since this file is included by all 
Index: src/config/linux-version
===================================================================
RCS file: /mnt/devel/CVS/openafs/src/config/linux-version,v
retrieving revision 1.1.1.1
retrieving revision 1.3
diff -u -r1.1.1.1 -r1.3
--- src/config/linux-version	2000/11/01 19:31:24	1.1.1.1
+++ src/config/linux-version	2000/11/01 20:44:32	1.3
@@ -41,7 +41,8 @@
 		continue
 	fi
 	header=$LINUX_SRCDIR$VERS/include/linux/version.h
-	if [ ! -f $header ] ; then
+	header2=$LINUX_SRCDIR$VERS/build/include/linux/version.h
+	if [ ! -f $header -a ! -f $header2 ] ; then
 	    echo "ERROR: Cannot build for Linux kernel $VERS: $header does not exist."
 	    errors=true
 	    continue
@@ -53,7 +54,15 @@
 	    echo "ERROR: Cannot build for Linux kernel $VERS:"
 	    echo "       No UTS_RELEASE string found in $header."
 	    continue
-	elif [ "$VERS" != "$vers" ] ; then
+	fi
+	missedver=true
+	for I in $vers; do
+		NI="`echo $I | sed -e 's,-.*,,g'`"
+		if [ "$VERS" = "$I" -o "$VERS" = "$NI" ]; then
+			missedver=false
+		fi
+	done
+	if $missedver ; then
 	    echo "ERROR: Cannot build $VERS. Wrong version '('$vers')' in $header."
 	    errors=true
 	    continue
Index: src/config/param.alpha_linux22.h
===================================================================
RCS file: param.alpha_linux22.h
diff -N param.alpha_linux22.h
--- /dev/null	Thu Aug 24 05:00:32 2000
+++ /tmp/cvsuiqwuF	Wed Nov  1 19:26:33 2000
@@ -0,0 +1,67 @@
+/* Copyright (C) 1998 by Transarc Corporation */
+
+
+#ifndef _PARAM_ALPHA_LINUX22_H_
+#define _PARAM_ALPHA_LINUX22_H_
+
+/* In user space the AFS_LINUX20_ENV should be sufficient. In the kernel,
+ * it's a judgment call. If something is obviously i386 specific, use that
+ * #define instead. Note that "20" refers to the linux 2.0 kernel. The "2"
+ * in the sysname is the current version of the client. This takes into
+ * account the perferred OS user space configuration as well as the kernel.
+ */
+
+#define AFS_LINUX20_ENV	1
+#define AFS_LINUX22_ENV	1
+#define AFS_ALPHA_LINUX20_ENV	1
+#define AFS_ALPHA_LINUX22_ENV	1
+#define AFS_NONFSTRANS 1
+
+#define AFS_MOUNT_AFS "afs"	/* The name of the filesystem type. */
+#define AFS_SYSCALL 137
+#define	AFS_64BIT_ENV	1
+#define AFS_NAMEI_ENV     1   /* User space interface to file system */
+#include <afs/afs_sysnames.h>
+
+#define AFS_USERSPACE_IP_ADDR 1
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS		0       /* if nonzero, garbage collect PAGs */
+
+
+/* Machine / Operating system information */
+#define SYS_NAME	"alpha_linux22"
+#define SYS_NAME_ID	SYS_NAME_ID_alpha_linux22
+#define AFSLITTLE_ENDIAN    1
+#define AFS_HAVE_FFS        1       /* Use system's ffs. */
+#define AFS_HAVE_STATVFS    0	/* System doesn't support statvfs */
+#define AFS_VM_RDWR_ENV	    1	/* read/write implemented via VM */
+
+#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
+#include <linux/config.h>
+#ifdef CONFIG_SMP
+#undef CONFIG_SMP
+#endif
+/* Using "AFS_SMP" to map to however many #define's are required to get
+ * MP to compile for Linux
+ */
+#ifdef AFS_SMP
+#define CONFIG_SMP
+#ifndef CONFIG_X86_LOCAL_APIC
+#define CONFIG_X86_LOCAL_APIC
+#endif
+#define __SMP__
+#define AFS_GLOBAL_SUNLOCK
+#endif
+
+#endif /* __KERNEL__  && !DUMP_KERNEL*/
+
+#ifdef KERNEL
+#ifndef MIN
+#define MIN(A,B) ((A) < (B) ? (A) : (B))
+#endif
+#ifndef MAX
+#define MAX(A,B) ((A) > (B) ? (A) : (B))
+#endif
+#endif /* KERNEL */
+
+#endif /* _PARAM_ALPHA_LINUX20_H_ */
Index: src/config/param.alpha_linux22_usr.h
===================================================================
RCS file: param.alpha_linux22_usr.h
diff -N param.alpha_linux22_usr.h
--- /dev/null	Thu Aug 24 05:00:32 2000
+++ /tmp/cvsNj8kZz	Wed Nov  1 19:26:33 2000
@@ -0,0 +1,56 @@
+/* Copyright (C) 1998 by Transarc Corporation */
+
+
+#ifndef _PARAM_USR_ALPHA_LINUX22_H_
+#define _PARAM_USR_ALPHA_LINUX22_H_
+
+/* In user space the AFS_LINUX20_ENV should be sufficient. In the kernel,
+ * it's a judgment call. If something is obviously i386 specific, use that
+ * #define instead. Note that "20" refers to the linux 2.0 kernel. The "2"
+ * in the sysname is the current version of the client. This takes into
+ * account the perferred OS user space configuration as well as the kernel.
+ */
+
+#define UKERNEL			1	/* user space kernel */
+#define AFS_ENV			1
+#define AFS_USR_LINUX20_ENV	1
+#define AFS_USR_LINUX22_ENV	1
+#define AFS_NONFSTRANS 1
+
+#define AFS_MOUNT_AFS "afs"	/* The name of the filesystem type. */
+#define AFS_SYSCALL 137
+#define AFS_64BIT_ENV  1
+#define AFS_NAMEI_ENV     1   /* User space interface to file system */
+#include <afs/afs_sysnames.h>
+
+#define AFS_USERSPACE_IP_ADDR 1
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS		0       /* if nonzero, garbage collect PAGs */
+
+
+/* Machine / Operating system information */
+#define SYS_NAME	"alpha_linux22"
+#define SYS_NAME_ID	SYS_NAME_ID_alpha_linux22
+#define AFSLITTLE_ENDIAN    1
+#define AFS_HAVE_FFS        1       /* Use system's ffs. */
+#define AFS_HAVE_STATVFS    0	/* System doesn't support statvfs */
+#define AFS_VM_RDWR_ENV	    1	/* read/write implemented via VM */
+
+#define	afsio_iov	uio_iov
+#define	afsio_iovcnt	uio_iovcnt
+#define	afsio_offset	uio_offset
+#define	afsio_seg	uio_segflg
+#define	afsio_fmode	uio_fmode
+#define	afsio_resid	uio_resid
+#define	AFS_UIOSYS	1
+#define	AFS_UIOUSER	UIO_USERSPACE
+#define	AFS_CLBYTES	MCLBYTES
+#define	AFS_MINCHANGE	2
+#define	VATTR_NULL	usr_vattr_null
+
+#define AFS_DIRENT
+#ifndef CMSERVERPREF
+#define CMSERVERPREF
+#endif
+
+#endif /* _PARAM_USR_ALPHA_LINUX22_H_ */
Index: src/des/andrew-conf.h
===================================================================
RCS file: /mnt/devel/CVS/openafs/src/des/andrew-conf.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- src/des/andrew-conf.h	2000/11/01 19:31:25	1.1.1.1
+++ src/des/andrew-conf.h	2000/11/01 19:40:51	1.2
@@ -31,7 +31,7 @@
 #if defined(sgi)
 #include "conf-sgi.h"
 #else
-#ifdef	__alpha
+#if defined(__alpha) && !defined(AFS_LINUX20_ENV)
 #include "conf-bsd-alpha.h"
 #else
 #if	defined(AFS_X86_ENV)
@@ -41,7 +41,12 @@
 #include "conf-winnt.h"
 #else
 #ifdef AFS_LINUX20_ENV
-#include "conf-i386-linux.h"
+# ifdef __i386__
+# include "conf-i386-linux.h"
+# endif
+# ifdef __alpha__
+# include "conf-alpha-linux.h"
+# endif
 #else
 Sorry, you lose.
 Figure out what the machine looks like and fix this file to include it.
Index: src/des/conf-alpha-linux.h
===================================================================
RCS file: conf-alpha-linux.h
diff -N conf-alpha-linux.h
--- /dev/null	Thu Aug 24 05:00:32 2000
+++ /tmp/cvseUa4bI	Wed Nov  1 19:26:33 2000
@@ -0,0 +1,14 @@
+/*
+ * Copyright 1988 by the Massachusetts Institute of Technology.
+ *
+ * For copying and distribution information, please see the file
+ * <mit-copyright.h>.
+ *
+ * Machine-type definitions: Linux on Intel
+ */
+
+#include <mit-cpyright.h>
+
+#define BITS32
+#define BIG
+#define LSBFIRST
Index: src/libafs/MakefileProto.LINUX
===================================================================
RCS file: /mnt/devel/CVS/openafs/src/libafs/MakefileProto.LINUX,v
retrieving revision 1.1.1.1
retrieving revision 1.3
diff -u -r1.1.1.1 -r1.3
--- src/libafs/MakefileProto.LINUX	2000/11/01 19:31:27	1.1.1.1
+++ src/libafs/MakefileProto.LINUX	2000/11/01 20:44:32	1.3
@@ -31,11 +31,19 @@
 CC = gcc
 LD = ld
 # -Wall
+
+ifeq (i386_linux22, ${SYS_NAME})
 CCFLAGS =   -O2 -fomit-frame-pointer \
 	-fno-strength-reduce -pipe -m486 -malign-loops=2 -malign-jumps=2 \
-	-malign-functions=2
+	-malign-functions=2 -I/lib/modules/${CLIENT}/build/include
 DEFINES = -D__KERNEL__  -DCPU=586 -DKERNEL -D_KERNEL -DMODULE ${SMP_DEF}
-INCLUDES = -I. -I../
+endif
+ifeq (alpha_linux22, ${SYS_NAME})
+CCFLAGS =   -O2 -fomit-frame-pointer -fno-strength-reduce -pipe -I/lib/modules/${CLIENT}/build/include
+DEFINES = -D__KERNEL__  -DCPU=alpha -DKERNEL -D_KERNEL -DMODULE ${SMP_DEF}
+endif
+
+INCLUDES = -I. -I.. -I../libuafs
 
 CFLAGS = $(CCFLAGS) $(DEFINES) $(INCLUDES)
 
Index: src/lwp/Makefile
===================================================================
RCS file: /mnt/devel/CVS/openafs/src/lwp/Makefile,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- src/lwp/Makefile	2000/11/01 19:31:27	1.1.1.1
+++ src/lwp/Makefile	2000/11/01 19:49:26	1.2
@@ -59,7 +59,7 @@
 					$(CC) -c -I${SRCDIR}include -KPIC -G0  process.s;; \
 				sgi_61 | sgi_62 | sgi_63 ) \
 					$(CC) -c ${XCFLAGS} -I${SRCDIR}include -KPIC -G0  process.s;; \
-				hp* | i386_linux* | sgi_64 | sgi_65) \
+				hp* | alpha_linux* | i386_linux* | sgi_64 | sgi_65) \
 					${CC} ${CFLAGS} -c process.c;; \
 				ncrx86_*) \
 					/usr/ccs/lib/cpp -P -I${SRCDIR}include process.s process.ss; \

  reply	other threads:[~2000-11-02  0:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-01 21:54 AFS James Fowler
2000-11-02  0:27 ` Matt Wilson [this message]
  -- strict thread matches above, loose matches on Subject: below --
1998-01-21 21:32 AFS J. Daniel Powell
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox