Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* 2.0.30 on the alpha?
@ 1997-04-09 15:12 Al Potter
  1997-04-10  4:05 ` Michal Jaegermann
  0 siblings, 1 reply; 6+ messages in thread
From: Al Potter @ 1997-04-09 15:12 UTC (permalink / raw)


Has anyone successfully compiled the latest 2.0.30 kernel for their alpha?

I've applied axp-diffs-2.0.21 as well as em86-patch and traparg-patch-2.0 to
support em86 (works fine w/ 2.0.29) and the compile bails at:

gcc -D__KERNEL__ -I/usr/src/linux-2.0.30/include -Wall -Wstrict-prototypes -g
-O2 -pipe -mno-fp-regs  -c -o block_dev.o block_dev.c
block_dev.c:25: conflicting types for `block_write'
/usr/src/linux-2.0.30/include/linux/fs.h:673: previous declaration of
`block_write'
block_dev.c:150: conflicting types for `block_read'
/usr/src/linux-2.0.30/include/linux/fs.h:669: previous declaration of
`block_read'
block_dev.c: In function `block_read':
block_dev.c:186: warning: large integer implicitly truncated to unsigned type
make[2]: *** [block_dev.o] Error 1
make[2]: Leaving directory `/usr/src/linux-2.0.30/fs'
make[1]: *** [first_rule] Error 2
make[1]: Leaving directory `/usr/src/linux-2.0.30/fs'
make: *** [linuxsubdirs] Error 2

Hints appreciated......

AL

--
+--------------------------------------------------------------------------+
|  Al Potter                             Senior Systems Analyst, SysAdmin  |
|                          Science Applications International Corporation  |
|                                                                          |
|  #include <std_disclaimer.h>                         apotter @ epix.net  |
|  #include <anti_spam.h>                       Remove the spaces to reply |
+--------------------------------------------------------------------------+

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 2.0.30 on the alpha?
  1997-04-09 15:12 Al Potter
@ 1997-04-10  4:05 ` Michal Jaegermann
  0 siblings, 0 replies; 6+ messages in thread
From: Michal Jaegermann @ 1997-04-10  4:05 UTC (permalink / raw)


> 
> I've applied axp-diffs-2.0.21 as well as em86-patch and traparg-patch-2.0 to
> support em86 (works fine w/ 2.0.29) and the compile bails at:
> 
> gcc -D__KERNEL__ -I/usr/src/linux-2.0.30/include -Wall -Wstrict-prototypes -g
> -O2 -pipe -mno-fp-regs  -c -o block_dev.o block_dev.c
> block_dev.c:25: conflicting types for `block_write'
.....

Sigh, recent changes in block_dev.c indeed do not take into account
changes on Alpha.  You likely patched first Intel sources to 2.0.30 and
applied axp-diffs-2.0.21 on the top, right?  Otherwise you would get
rejects from 'patch'.

Here are patches to block_dev.c (2.0.29, Alpha version) which mimic
changes on Intel side and maintain compatibility with axp-diffs.

If you are patching 2.0.29-Alpha you will be left with block_dev.c.orig
after an incomplete patch.  Apply these diffs to THIS file and use
results as block_dev.c

  Michal

--- block_dev.c.orig	Sat Dec 21 17:58:45 1996
+++ block_dev.c	Wed Apr  9 20:35:08 1997
@@ -20,21 +20,19 @@
 #define MAX_BUF_PER_PAGE (PAGE_SIZE / 512)
 #define NBUF 64
 
-long block_write(struct inode * inode, struct file * filp, const char * buf, unsigned long count)
+long block_write(struct inode * inode, struct file * filp,
+       const char * buf, unsigned long count)
 {
-	int blocksize, blocksize_bits, i, j, buffercount,write_error;
+	int blocksize, blocksize_bits, i, buffercount,write_error;
 	long block, blocks;
 	loff_t offset;
 	long chars;
 	long written = 0;
-	int cluster_list[MAX_BUF_PER_PAGE];
 	struct buffer_head * bhlist[NBUF];
-	int blocks_per_cluster;
 	unsigned long size;
 	kdev_t dev;
 	struct buffer_head * bh, *bufferlist[NBUF];
 	register char * p;
-	long excess;
 
 	write_error = buffercount = 0;
 	dev = inode->i_rdev;
@@ -51,8 +49,6 @@
 		i >>= 1;
 	}
 
-	blocks_per_cluster = PAGE_SIZE / blocksize;
-
 	block = filp->f_pos >> blocksize_bits;
 	offset = filp->f_pos & (blocksize-1);
 
@@ -68,15 +64,14 @@
 			chars=count;
 
 #if 0
-		if (chars == blocksize)
-			bh = getblk(dev, block, blocksize);
-		else
-			bh = breada(dev,block,block+1,block+2,-1);
-
+		/* get the buffer head */
+		{
+			struct buffer_head * (*fn)(kdev_t, int, int) = getblk;
+			if (chars != blocksize)
+				fn = bread;
+			bh = fn(dev, block, blocksize);
+		}
 #else
-		for(i=0; i<blocks_per_cluster; i++) cluster_list[i] = block+i;
-		if((block % blocks_per_cluster) == 0)
-		  generate_cluster(dev, cluster_list, blocksize);
 		bh = getblk(dev, block, blocksize);
 
 		if (chars != blocksize && !buffer_uptodate(bh)) {
@@ -90,15 +85,8 @@
 		    blocks = read_ahead[MAJOR(dev)] / (blocksize >> 9) / 2;
 		    if (block + blocks > size) blocks = size - block;
 		    if (blocks > NBUF) blocks=NBUF;
-		    excess = (block + blocks) % blocks_per_cluster;
-		    if ( blocks > excess )
-			blocks -= excess;
 		    bhlist[0] = bh;
 		    for(i=1; i<blocks; i++){
-		      if(((i+block) % blocks_per_cluster) == 0) {
-			for(j=0; j<blocks_per_cluster; j++) cluster_list[j] = block+i+j;
-			generate_cluster(dev, cluster_list, blocksize);
-		      };
 		      bhlist[i] = getblk (dev, block+i, blocksize);
 		      if(!bhlist[i]){
 			while(i >= 0) brelse(bhlist[i--]);
@@ -157,7 +145,8 @@
 	return written;
 }
 
-long block_read(struct inode * inode, struct file * filp, char * buf, unsigned long count)
+long block_read(struct inode * inode, struct file * filp,
+       char * buf, unsigned long count)
 {
 	unsigned int block;
 	loff_t offset;
@@ -165,8 +154,6 @@
 	int blocksize_bits, i;
 	unsigned long blocks, rblocks, left;
 	int bhrequest, uptodate;
-	int cluster_list[MAX_BUF_PER_PAGE];
-	int blocks_per_cluster;
 	struct buffer_head ** bhb, ** bhe;
 	struct buffer_head * buflist[NBUF];
 	struct buffer_head * bhreq[NBUF];
@@ -174,7 +161,6 @@
 	loff_t size;
 	kdev_t dev;
 	long read;
-	long excess;
 
 	dev = inode->i_rdev;
 	blocksize = BLOCK_SIZE;
@@ -193,8 +179,6 @@
 	else
 		size = INT_MAX;
 
-	blocks_per_cluster = PAGE_SIZE / blocksize;
-
 	if (offset > size)
 		left = 0;
 	/* size - offset might not fit into left, so check explicitly. */
@@ -215,9 +199,6 @@
 	if (filp->f_reada) {
 	        if (blocks < read_ahead[MAJOR(dev)] / (blocksize >> 9))
 			blocks = read_ahead[MAJOR(dev)] / (blocksize >> 9);
-		excess = (block + blocks) % blocks_per_cluster;
-		if ( blocks > excess )
-			blocks -= excess;		
 		if (rblocks > blocks)
 			blocks = rblocks;
 		
@@ -240,12 +221,6 @@
 		uptodate = 1;
 		while (blocks) {
 			--blocks;
-#if 1
-			if((block % blocks_per_cluster) == 0) {
-			  for(i=0; i<blocks_per_cluster; i++) cluster_list[i] = block+i;
-			  generate_cluster(dev, cluster_list, blocksize);
-			}
-#endif
 			*bhb = getblk(dev, block++, blocksize);
 			if (*bhb && !buffer_uptodate(*bhb)) {
 				uptodate = 0;
@@ -266,7 +241,6 @@
 		/* Now request them all */
 		if (bhrequest) {
 			ll_rw_block(READ, bhrequest, bhreq);
-			refill_freelist(blocksize);
 		}
 
 		do { /* Finish off all I/O that has actually completed */

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 2.0.30 on the alpha?
@ 1997-04-10 12:51 Michael Alan Dorman
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Alan Dorman @ 1997-04-10 12:51 UTC (permalink / raw)


Al Potter <apotter@alef.bogon.nul> writes:
> Has anyone successfully compiled the latest 2.0.30 kernel for their
> alpha?

I'm running 2.0.30 right now.

$ uname -a
Linux lot49 2.0.30 #4 Sun Apr 9 10:23:29 Local time zone must be
set--see zic manualalpha alpha unknown
$ uptime
  7:49am  up 20:18h,  3 users,  load average: 2.02, 1.85, 1.36
$

> I've applied axp-diffs-2.0.21 as well as em86-patch and
> traparg-patch-2.0 to support em86 (works fine w/ 2.0.29) and the
> compile bails at:

OK, maybe I only succeeded through ignorance, but I applied no patches
at all to my system, and it's been up for nearly a day now.  I
understand about the em86-patch, but I thought axp-diffs were no
longer needed, and I don't have any idea what the traparg-patch is.

Are you sure they're still necessary?

Mike.

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 2.0.30 on the alpha?
       [not found] <87bu7nvy4o.fsf@calder.med.miami.edu>
@ 1997-04-10 15:22 ` Michal Jaegermann
  1997-04-10 15:34   ` Mike Loseke
  0 siblings, 1 reply; 6+ messages in thread
From: Michal Jaegermann @ 1997-04-10 15:22 UTC (permalink / raw)


> 
> OK, maybe I only succeeded through ignorance, but I applied no patches
> at all to my system, and it's been up for nearly a day now.  I
> understand about the em86-patch, but I thought axp-diffs were no
> longer needed, and I don't have any idea what the traparg-patch is.
> 
> Are you sure they're still necessary?

They are not "necessary", beyond that some programs may need for
a compilation headers which are not there, but a work which DM-T
put into lifting artificial limitations in a file system will be lost.

Well, yes, I have 2.0.30 running on Alpha from the last night too
(and my kernel is "patched up", in stages, from pre-2.0.18 days,
axp-diffs and all).  em86 patch and traparg do not come into the
issue on hand. :-)

  Michal

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 2.0.30 on the alpha?
  1997-04-10 15:22 ` 2.0.30 on the alpha? Michal Jaegermann
@ 1997-04-10 15:34   ` Mike Loseke
  0 siblings, 0 replies; 6+ messages in thread
From: Mike Loseke @ 1997-04-10 15:34 UTC (permalink / raw)


Unverified sources claim that Michal Jaegermann wrote:
> 
> > 
> > OK, maybe I only succeeded through ignorance, but I applied no patches
> > at all to my system, and it's been up for nearly a day now.  I
> > understand about the em86-patch, but I thought axp-diffs were no
> > longer needed, and I don't have any idea what the traparg-patch is.
> > 
> > Are you sure they're still necessary?
> 
> They are not "necessary", beyond that some programs may need for
> a compilation headers which are not there, but a work which DM-T
> put into lifting artificial limitations in a file system will be lost.

 With the state of the kernel source as it stands at 2.0.30, what *needs*
to be done to it (patch-wise) for use on an Alpha? Do the axp specific
patches still need to be applied, or have these been integrated into
the source tree as I've heard that they were supposed to be? Can I just
grab the stock tree, compile, install and go?

 Whatever the answer is, I'm sure that it would make a good addition to
the FAQ.

-- 
   Mike Loseke    | With sufficient thrust, pigs fly just fine. However, this
 mike@verinet.com | is not necessarily a good idea. It is hard to be sure
                  | where they are going to land, and it could be dangerous
                  | sitting under them as they fly overhead.      -- RFC 1925

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 2.0.30 on the alpha?
       [not found] <199704101534.JAA21230@bamboo.verinet.com>
@ 1997-04-10 16:05 ` Woodstock
  0 siblings, 0 replies; 6+ messages in thread
From: Woodstock @ 1997-04-10 16:05 UTC (permalink / raw)


On Thu, 10 Apr 1997, Mike Loseke wrote:

>  With the state of the kernel source as it stands at 2.0.30, what *needs*
> to be done to it (patch-wise) for use on an Alpha? Do the axp specific
> patches still need to be applied, or have these been integrated into
> the source tree as I've heard that they were supposed to be? Can I just
> grab the stock tree, compile, install and go?

I _just_ upgraded to 2.0.30 today (haven't rebooted to it yet, but...)
I applied no patches, just changed the Makefile's ARCH = to alpha, and
commented out SMP.  It DOES help to have the latest glibc installed,
though.  I'm running redhat's glibc 961212 rpm... that fixed a lot of
problems for me.

I also applied all the kernel patches for em86... no bad patches, no
compilation errors... sooo..... =shurg=

I'm gonna try to compile glibc 2.0.2 today... pray for my soul. ;)

woody@beer.com	      http://131.238.95.31/woody    - Woody
balint@udayton.edu                                    SysAdmin of WoodyNet!
    ------------------------------------------------------------------
"Bless me Father, for my C program has performed Segmentation Violation"
"A grave sin indeed, my son..." replied the Priest.
"I know... I know...  Is there any chance for Salvation??"
The Priest ponders for an Eternity.  Then he replies, "An offering of cold
beer and pizza to the Linus _may_ save your pitiful soul, my son.  Go now,
or risk perdition of your life!!"

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1997-04-10 16:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <87bu7nvy4o.fsf@calder.med.miami.edu>
1997-04-10 15:22 ` 2.0.30 on the alpha? Michal Jaegermann
1997-04-10 15:34   ` Mike Loseke
     [not found] <199704101534.JAA21230@bamboo.verinet.com>
1997-04-10 16:05 ` Woodstock
1997-04-10 12:51 Michael Alan Dorman
  -- strict thread matches above, loose matches on Subject: below --
1997-04-09 15:12 Al Potter
1997-04-10  4:05 ` Michal Jaegermann

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