I cannot compile the 4.7.24 etherboot distribution.
I am using old gcc v2.91.66 (and as v2.9.1) tools, and have verified that
the Makefile does properly detect this, and sets the GAS291 flag.
Because this flag is set, "start32.S" is properly compiled, however
"prloader.s" fails, with the following message:
----------------
#as -o bin/prloader.tmp bin/prloader.s
bin/prloader.s: Assembler messages:
bin/prloader.s:163: Error: Ignoring junk ':' after expression
bin/prloader.s:163: Error: operands given don't match any known 386
instruction
bin/prloader.s:219: Error: operands given don't match any known 386
instruction
bin/prloader.s:234: Error: Can't open q for reading.
bin/prloader.s:234: q: No such file or directory
----------------
I did some forensics, and have found issues with "Makefile", and "loader.s",
corrected by the patch below:
----------------
diff -r src/Makefile src_org/Makefile
104c104
< LCONFIG+= -DRELOC=$(RELOCADDR) $(OLDGAS)
---
> LCONFIG+= -DRELOC=$(RELOCADDR)
diff -r src/loader.S src_org/loader.S
205,213c205
< #ifdef GAS291
< # SEG_CS
< # seg cs
< cs
< rep
< movsw
< #else
< rep movsw %cs:(%si),%es:(%di)
< #endif
---
> rep movsw %cs:(%si),%es:(%di)
217,220d208
<
< #ifdef GAS291
< ljmp $MOVEROM>>4, $moved-_start /* reload cs:ip to execute
from RAM */
< #else
222,230d209
< #endif
< /*
< #ifdef GAS291
< ljmp $MOVEROM>>4,$1f-RELOC
< #else
< ljmp $MOVEROM>>4,$1f-_start
< #endif
< 1:
< */
419,428d397
< #ifdef GAS291
< /*
< call RELOC>>4, 0
< lcall $RELOC>>4, 0
< DAMN - can't get the above to work, so use brute force below
< */
< .byte 0x9A
< .word 0
< .word RELOC>>4
< #else
430d398
< #endif
----------------
All files are now built, but when I try to create a test floppy with "make
bin32/cs89x0.lzdsk" (or ".dsk"), the process failed again. Apparently
GAS291 cannot compile the code in "boot1a.s" as compactly as necessary.
Commenting out the ".org PRT_OFF" close to the end of the file allowed me to
generate the attached listing ("boot1a.lst"). Hopefully someone will be able
to see where or how GAS291 is differing from newer GAS, and tweak the code
to allow continued support of "old" installations. I am now committed to
updating my own tools, so this I may even be able to do so myself.
I think it is likely that other assembly source files may have similar
issues with GAS291 - I didn't try all options in the makefile.
Finally, since I can't compile the latest, I have been testing with 4.6.2
I have found that adding a call to the "_reset()" function inside the
"_disable()" function corrects problems detecting the cs89x0 in the
compiled-in kernel driver.
static void cs89x0_disable(struct nic *nic)
{
cs89x0_reset(nic);
}
Without the call to "_reset()", the kernel will always fail to locate the
cs89x0, unless
bootparams are used to force a "more aggressive probe(i.e., io=0x301).
Regards,
Robb Main.
|