[Preston] kernel build
chris
preston at mailman.lug.org.uk
Fri Jan 3 18:54:00 2003
ok, for some strange reason i felt the urge to rebuild my kernel this
morning, and guess what, i fell into some problems, make config; make
dep went fine, but when i went to make bzImage i came up with an
error...
<snip>
make[3]: Entering directory `/home/chris/linux-2.4.20/drivers/ide'
gcc -D__KERNEL__ -I/home/chris/linux-2.4.20/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
-fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686
-nostdinc -iwithprefix include -DKBUILD_BASENAME=ide -DEXPORT_SYMTAB -c
ide.c
ide.c: In function `drive_cmd_intr':
ide.c:1139: parse error before `if'
make[3]: *** [ide.o] Error 1
make[3]: Leaving directory `/home/chris/linux-2.4.20/drivers/ide'
make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/home/chris/linux-2.4.20/drivers/ide'
make[1]: *** [_subdir_ide] Error 2
make[1]: Leaving directory `/home/chris/linux-2.4.20/drivers'
make: *** [_dir_drivers] Error 2ide.c: In function `drive_cmd_intr':
ide.c:1139: parse error before `if'
hedgehog:/home/chris/linux-2.4.20#
</snip>
So i go to the file:line where the compiler is having a problem, but
seings i have no idea about C coding, i just get lost and go get myself
a coffee lol.
<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: }*
1139: if ((!OK_STAT(stat, READY_STAT, BAD_STAT)
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 :).