Re: building 2.2.9 on alpha -- where's alpha/regdef.h?

Benjamin LaHaise (bcrl@spellcast.com)
Mon, 7 Jun 1999 17:20:31 -0400 (EDT)


On Fri, 4 Jun 1999, David S. Miller wrote:

> It works perfectly fine, and in fact right now is the only way, to
> build sparc64 kernels on a Sparc* system. In fact the Alpha folks
> were the first ones ever, real early on, to make ix86 --> Alpha kernel
> cross build working with gcc.

The alpha needs something like this patch against 2.2.9 for the build to
complete, but the resulting kernel did work for me. Note that the alpha
objstrip that gets built won't work properly on a 32 bit machine, but I
didn't need it so...

-ben

diff -urN clean/linux-2.2.9/arch/alpha/Makefile alpha-2.2/linux/arch/alpha/Makefile
--- clean/linux-2.2.9/arch/alpha/Makefile Mon Jan 25 00:29:52 1999
+++ alpha-2.2/linux/arch/alpha/Makefile Mon Jun 7 00:23:35 1999
@@ -8,7 +8,7 @@
# Copyright (C) 1994 by Linus Torvalds
#

-NM := nm -B
+NM := $(NM) -B

LINKFLAGS = -static -T arch/alpha/vmlinux.lds #-N -relax
CFLAGS := $(CFLAGS) -pipe -mno-fp-regs -ffixed-8
diff -urN clean/linux-2.2.9/arch/alpha/boot/Makefile alpha-2.2/linux/arch/alpha/boot/Makefile
--- clean/linux-2.2.9/arch/alpha/boot/Makefile Mon Oct 12 14:40:12 1998
+++ alpha-2.2/linux/arch/alpha/boot/Makefile Mon Jun 7 00:34:24 1999
@@ -68,7 +68,7 @@
$(OBJSTRIP) -v $(VMLINUX) vmlinux.nh

vmlinux: $(TOPDIR)/vmlinux
- strip -o vmlinux $(VMLINUX)
+ $(STRIP) -o vmlinux $(VMLINUX)

tools/lxboot: $(OBJSTRIP) bootloader
$(OBJSTRIP) -p bootloader tools/lxboot
@@ -80,7 +80,7 @@
$(OBJSTRIP) -vb bootpheader tools/bootph

$(OBJSTRIP): $(OBJSTRIP).c
- $(HOSTCC) $(OBJSTRIP).c -o $(OBJSTRIP)
+ $(HOSTCC) $(HOSTCFLAGS) -I$(HPATH) $(OBJSTRIP).c -o $(OBJSTRIP)

tools/mkbb: tools/mkbb.c
$(HOSTCC) tools/mkbb.c -o tools/mkbb
diff -urN clean/linux-2.2.9/arch/alpha/lib/strchr.S alpha-2.2/linux/arch/alpha/lib/strchr.S
--- clean/linux-2.2.9/arch/alpha/lib/strchr.S Fri Oct 18 04:53:20 1996
+++ alpha-2.2/linux/arch/alpha/lib/strchr.S Mon Jun 7 00:20:12 1999
@@ -6,7 +6,7 @@
* string, or null if it is not found.
*/

-#include <alpha/regdef.h>
+#include <asm/regdef.h>

.set noreorder
.set noat
diff -urN clean/linux-2.2.9/arch/alpha/lib/strlen_user.S alpha-2.2/linux/arch/alpha/lib/strlen_user.S
--- clean/linux-2.2.9/arch/alpha/lib/strlen_user.S Sat Apr 24 20:54:08 1999
+++ alpha-2.2/linux/arch/alpha/lib/strlen_user.S Mon Jun 7 00:20:25 1999
@@ -5,7 +5,7 @@
* (strlen+1) or zero if an error occurred.
*/

-#include <alpha/regdef.h>
+#include <asm/regdef.h>


/* Allow an exception for an insn; exit if we get one. */
diff -urN clean/linux-2.2.9/arch/alpha/lib/strncpy_from_user.S alpha-2.2/linux/arch/alpha/lib/strncpy_from_user.S
--- clean/linux-2.2.9/arch/alpha/lib/strncpy_from_user.S Sat Apr 24 20:54:08 1999
+++ alpha-2.2/linux/arch/alpha/lib/strncpy_from_user.S Mon Jun 7 00:18:04 1999
@@ -12,7 +12,7 @@


#include <asm/errno.h>
-#include <alpha/regdef.h>
+#include <asm/regdef.h>


/* Allow an exception for an insn; exit if we get one. */
diff -urN clean/linux-2.2.9/arch/alpha/lib/strrchr.S alpha-2.2/linux/arch/alpha/lib/strrchr.S
--- clean/linux-2.2.9/arch/alpha/lib/strrchr.S Wed Nov 19 17:07:33 1997
+++ alpha-2.2/linux/arch/alpha/lib/strrchr.S Mon Jun 7 00:20:38 1999
@@ -6,7 +6,7 @@
* within a null-terminated string, or null if it is not found.
*/

-#include <alpha/regdef.h>
+#include <asm/regdef.h>

.set noreorder
.set noat
diff -urN clean/linux-2.2.9/arch/alpha/lib/stxcpy.S alpha-2.2/linux/arch/alpha/lib/stxcpy.S
--- clean/linux-2.2.9/arch/alpha/lib/stxcpy.S Thu Feb 6 07:42:35 1997
+++ alpha-2.2/linux/arch/alpha/lib/stxcpy.S Mon Jun 7 00:20:48 1999
@@ -19,7 +19,7 @@
* Furthermore, v0, a3-a5, t11, and t12 are untouched.
*/

-#include <alpha/regdef.h>
+#include <asm/regdef.h>

.set noat
.set noreorder
diff -urN clean/linux-2.2.9/arch/alpha/lib/stxncpy.S alpha-2.2/linux/arch/alpha/lib/stxncpy.S
--- clean/linux-2.2.9/arch/alpha/lib/stxncpy.S Thu Feb 6 07:51:09 1997
+++ alpha-2.2/linux/arch/alpha/lib/stxncpy.S Mon Jun 7 00:20:54 1999
@@ -27,7 +27,7 @@
* Furthermore, v0, a3-a5, t11, t12, and $at are untouched.
*/

-#include <alpha/regdef.h>
+#include <asm/regdef.h>

.set noat
.set noreorder
diff -urN clean/linux-2.2.9/include/asm-alpha/regdef.h alpha-2.2/linux/include/asm-alpha/regdef.h
--- clean/linux-2.2.9/include/asm-alpha/regdef.h Wed Dec 31 19:00:00 1969
+++ alpha-2.2/linux/include/asm-alpha/regdef.h Sun Jun 6 23:13:27 1999
@@ -0,0 +1,44 @@
+#ifndef __alpha_regdef_h__
+#define __alpha_regdef_h__
+
+#define v0 $0 /* function return value */
+
+#define t0 $1 /* temporary registers (caller-saved) */
+#define t1 $2
+#define t2 $3
+#define t3 $4
+#define t4 $5
+#define t5 $6
+#define t6 $7
+#define t7 $8
+
+#define s0 $9 /* saved-registers (callee-saved registers) */
+#define s1 $10
+#define s2 $11
+#define s3 $12
+#define s4 $13
+#define s5 $14
+#define s6 $15
+#define fp s6 /* frame-pointer (s6 in frame-less procedures) */
+
+#define a0 $16 /* argument registers (caller-saved) */
+#define a1 $17
+#define a2 $18
+#define a3 $19
+#define a4 $20
+#define a5 $21
+
+#define t8 $22 /* more temps (caller-saved) */
+#define t9 $23
+#define t10 $24
+#define t11 $25
+#define ra $26 /* return address register */
+#define t12 $27
+
+#define pv t12 /* procedure-variable register */
+#define AT $at /* assembler temporary */
+#define gp $29 /* global pointer */
+#define sp $30 /* stack pointer */
+#define zero $31 /* reads as zero, writes are noops */
+
+#endif /* __alpha_regdef_h__ */

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/