[Preston] kernel build

chris preston at mailman.lug.org.uk
Mon Jan 6 13:49:03 2003


On Mon, 2003-01-06 at 13:35, Mike Williams wrote:
> Hi
> 
> On 3 Jan 2003 at 18:53, chris wrote:
> 
> [snip]
> > ide.c: In function `drive_cmd_intr':
> > ide.c:1139: parse error before `if'
> [snip]
> > <code>
> > 1123:static ide_startstop_t drive_cmd_intr (ide_drive_t *drive)
> > 1124:{
> > 1125:        struct request *rq = HWGROUP(drive)->rq;
> > 1126:        byte *args = (byte *) rq->buffer;
> > 1127:        byte stat = GET_STAT();
> > 1128:       int retries = 10;
> > 1129:
> > 1130:        ide__sti();     /* local CPU only */
> > 1131:        if ((stat & DRQ_STAT) && args && args[3]) {
> > 1132:                byte io_32bit = drive->io_32bit;
> > 1133:                drive->io_32bit = 0;
> > 1134:                ide_input_data(drive, &args[4], args[3] *
> > SECTOR_WORDS);  
> > 1135:                drive->io_32bit = io_32bit;
> > 1136:                while (((stat = GET_STAT()) & BUSY_STAT) &&
> > retries--)
> > 1137:                        udelay(100);
> > 1138:        }*
> 
> This is the first error - delete the * at the end of the above line 
> and try again.
> 
> > 1139:        if ((!OK_STAT(stat, READY_STAT, BAD_STAT)
> 
> Hmm, you may have a problem here too - replace with the following 
> line and try it as well.
> 
>         if ((!OK_STAT(stat, READY_STAT, BAD_STAT)))
> 
> However, this may indicate there is other code missing, which may be 
> crucial (read may crash your machine).  I'd either reinstall your 
> kernel source or pick it up again from the net to get compilable 
> source.
> 
> > 1140:        return ide_error(drive, "drive_cmd", stat); /* calls ide_end_drive_cmd */
> > 1141:        ide_end_drive_cmd (drive, stat, GET_ERR());
> > 1142:        return ide_stopped;
> > 1143:
> > 1144:}
> > </code>
> > 
> > If anyone has some help i would greatly appreciate it :).
> 
> 
> 
> TTFN
> 
> Mike
> -- 
> Puns about broken change machines don't make any cents.
> 
Cheers mike, i was playing yesterdya and managed to get it to compile,
first changed that * to a ; then changed :

        };
        if (!OK_STAT(stat, READY_STAT, BAD_STAT)) {
        return ide_error(drive, "drive_cmd", stat); /* calls
ide_end_drive_cmd */
        ide_end_drive_cmd (drive, stat, GET_ERR());
        return ide_stopped;
}
}


and everything compiled fine from then on. :o)

hedgehog:/home/chris/linux-2.4.20# uname -a, stat); /* calls
ide_end_drive_cmd */
Linux hedgehog 2.4.20 #2 SMP Mon Jan 6 00:22:39 GMT 2003 i686 unknown
hedgehog:/home/chris/linux-2.4.20# 

kernel booted a treat with no errors. A lot less painfull than previous
attempts :).