Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: David Mosberger-Tang <davidm@AZStarNet.com>
Subject: Re: The aboot - Jensen saga
Date: Mon, 6 May 1996 07:56:57 -0700	[thread overview]
Message-ID: <199605061456.HAA21065@koala.azstarnet.com> (raw)

>>>>> On Mon, 6 May 1996 10:28:04 -0400 (EDT), Ben Taylor <bent@snm.com> said:

  Ben> Well, I have the 1.3.98 kernel source, and all the links appear
  Ben> to be good.  I still get the same compilation problems.  Should
  Ben> I go back a few revs on the kernel?

That would fix it.  Trouble is, I don't know how far you'd have to go
back.  Below is a patch that should get you at least closer to a
compiling aboot.

	--david

---
--- utils.c~	Wed Jan  3 19:11:12 1996
+++ utils.c	Fri Apr 19 09:05:23 1996
@@ -137,7 +137,7 @@
 	printk(" version %ld.%ld\n", (rev >> 8) & 0xff, rev & 0xff);
 	/* remove the old virtual page-table mapping */
 	L1[1] = 0;
-	invalidate_all();
+	flush_tlb_all();
 }
 
 
--- fs/ext2.c~	Mon Oct 30 17:23:45 1995
+++ fs/ext2.c	Fri Apr 19 09:03:24 1996
@@ -6,6 +6,12 @@
  * This file has been ported from the DEC 32-bit Linux version
  * by David Mosberger (davidm@cs.arizona.edu).
  */
+#include <linux/types.h>
+
+#undef __KERNEL__
+#include <linux/ext2_fs.h>
+#define __KERNEL__
+
 #include <linux/fs.h>
 #include <linux/string.h>
 
@@ -14,9 +20,6 @@
 #include "disklabel.h"
 #include "utils.h"
 
-#undef __KERNEL__
-#include <linux/ext2_fs.h>
-
 #define MAX_SUPPORTED_GROUPS	128		/* supports 1GB filesystem */
 #define MAX_OPEN_FILES		4
 
@@ -25,6 +28,7 @@
 static struct ext2_super_block sb;
 static struct ext2_group_desc gds[MAX_SUPPORTED_GROUPS];
 static int ngroups = 0;
+static int blocksize;				/* Block size of this fs */
 static int directlim;			/* Maximum direct blkno */
 static int ind1lim;			/* Maximum single-indir blkno */
 static int ind2lim;			/* Maximum double-indir blkno */
@@ -96,9 +100,9 @@
 	 * Calculate direct/indirect block limits for this file system
 	 * (blocksize dependent):
 	 */
-	ext2fs.blocksize = EXT2_BLOCK_SIZE(&sb);
+	blocksize = EXT2_BLOCK_SIZE(&sb);
 	directlim = EXT2_NDIR_BLOCKS - 1;
-	ptrs_per_blk = ext2fs.blocksize/sizeof(unsigned int);
+	ptrs_per_blk = blocksize/sizeof(unsigned int);
 	ind1lim = ptrs_per_blk + directlim;
 	ind2lim = (ptrs_per_blk * ptrs_per_blk) + directlim;
 
@@ -132,7 +136,7 @@
 	}
 
 	group = ino / sb.s_inodes_per_group;
-	offset = partition_offset + (gds[group].bg_inode_table * ext2fs.blocksize)
+	offset = partition_offset + (gds[group].bg_inode_table * blocksize)
 	  + (((ino-1) % sb.s_inodes_per_group) * sizeof(struct ext2_inode));
 	if (cons_read(dev, ip, sizeof(struct ext2_inode), offset) 
 	    != sizeof(struct ext2_inode))
@@ -203,9 +207,9 @@
 
 		/* Read the indirect block */
 		if (cached_iblkno != iblkno) {
-			offset = partition_offset + iblkno * ext2fs.blocksize;
-			if (cons_read(dev, iblkbuf, ext2fs.blocksize, offset)
-			    != ext2fs.blocksize)
+			offset = partition_offset + iblkno * blocksize;
+			if (cons_read(dev, iblkbuf, blocksize, offset)
+			    != blocksize)
 			{
 				printk("ext2_blkno: error on iblk read\n");
 				return 0;
@@ -228,9 +232,9 @@
 
 		/* Read in the double-indirect block */
 		if (cached_diblkno != diblkno) {
-			offset = partition_offset + diblkno * ext2fs.blocksize;
-			if (cons_read(dev, diblkbuf, ext2fs.blocksize, offset)
-			    != ext2fs.blocksize)
+			offset = partition_offset + diblkno * blocksize;
+			if (cons_read(dev, diblkbuf, blocksize, offset)
+			    != blocksize)
 			{
 				printk("ext2_blkno: err reading dindr blk\n");
 				return 0;
@@ -248,9 +252,9 @@
 		/* Read the indirect block */
     
 		if (cached_iblkno != iblkno) {
-			offset = partition_offset + iblkno * ext2fs.blocksize;
-			if (cons_read(dev, iblkbuf, ext2fs.blocksize, offset)
-			    != ext2fs.blocksize)
+			offset = partition_offset + iblkno * blocksize;
+			if (cons_read(dev, iblkbuf, blocksize, offset)
+			    != blocksize)
 			{
 				printk("ext2_blkno: err on iblk read\n");
 				return 0;
@@ -277,8 +281,8 @@
 	long dev_blkno, ncontig, offset, nbytes, tot_bytes;
 
 	tot_bytes = 0;
-	if ((blkno+nblks)*ext2fs.blocksize > ip->i_size)
-		nblks = (ip->i_size + ext2fs.blocksize) / ext2fs.blocksize - blkno;
+	if ((blkno+nblks)*blocksize > ip->i_size)
+		nblks = (ip->i_size + blocksize) / blocksize - blkno;
 
 	while (nblks) {
 		/*
@@ -289,7 +293,7 @@
 		dev_blkno = ext2_blkno(ip, blkno);
 		do {
 			++blkno; ++ncontig; --nblks;
-			nbytes += ext2fs.blocksize;
+			nbytes += blocksize;
 		} while (nblks &&
 			 ext2_blkno(ip, blkno) == dev_blkno + ncontig);
 
@@ -298,7 +302,7 @@
 			memset(buffer, 0, nbytes);
 		} else {
 			/* Read it for real */
-			offset = partition_offset + dev_blkno*ext2fs.blocksize;
+			offset = partition_offset + dev_blkno*blocksize;
 			if (cons_read(dev, buffer, nbytes, offset)
 			    != nbytes)
 			{
@@ -343,13 +347,13 @@
 		while (diroffset < dir_inode->i_size) {
 			blockoffset = 0;
 			if (ext2_breadi(dir_inode,
-					diroffset / ext2fs.blocksize, 1,
+					diroffset / blocksize, 1,
 					blkbuf)
 			    < 0)
 			{
 				return NULL;
 			}
-			while (blockoffset < ext2fs.blocksize) {
+			while (blockoffset < blocksize) {
 				dp = (struct ext2_dir_entry *)
 				  (blkbuf + blockoffset);
 				if ((dp->name_len == component_length) &&
@@ -372,7 +376,7 @@
 			 * component.  Try the next block in this
 			 * directory...
 			 */
-			diroffset += ext2fs.blocksize;
+			diroffset += blocksize;
 		}
 
 		/*

             reply	other threads:[~1996-05-06 14:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-05-06 14:56 David Mosberger-Tang [this message]
  -- strict thread matches above, loose matches on Subject: below --
1996-05-08 23:39 The aboot - Jensen saga Michael Schwingen
1996-05-07  8:32 Martin Ostermann
     [not found] <Pine.GSO.3.93.960506092659.25908A-100000@mageworks.snm.com>
1996-05-06 17:50 ` Jim Paradis
1996-05-06 15:23 David Mosberger-Tang
     [not found] <199605061419.HAA20908@koala.azstarnet.com>
1996-05-06 14:28 ` Ben Taylor
1996-05-06 14:44 ` Erik Troan
1996-05-06 14:19 David Mosberger-Tang
1996-05-06 13:31 Ben Taylor
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