Aurelien Jarno wrote:
On Fri, Mar 24, 2006 at 05:59:14PM +0000, Thiemo Seufer wrote:
On Fri, Mar 24, 2006 at 06:41:32PM +0100, Aurelien Jarno wrote:
[snip]
Hmm, you select the hal.o file accordingly? Won't mips1-le-elf work
on both R1 and R2? Checking for R1/R2 doesn't seem ideal to me if it
can be avoided.
Thiemo, any comment?
At least for 32bit kernels this looks like a viable option, if the hal
layer is sufficiently simple (i.e. no dependency to kernel headers).
Same for 64bit kernels and MIPS-III.
So in short we could use mipsisa32-{be,le}-elf on all machines but the
one that have CONFIG_CPU_MIPS32_R1 or CONFIG_CPU_MIPS32_R2 set to one.
Am I right?
Erm, depends on what "mipsisa32" selects in that case.
The compatibility tree is:
/ -> MIPS-III -> MIPS-IV -> MIPS64 -> MIPS64R2 # 64bit
| ^ ^
| | |
MIPS-I -> MIPS-II ------------------------> MIPS32 -> MIPS32R2 # 32bit
so you need MIPS-I for 32bit Kernels and MIPS-III for 64bit kernels.
For the current compilers in Debian this can be selected via
-march=mips1 and -march=mips3 respectively.
Ok, please find attached a new patch that uses mips1-{be,le}-elf for all
kernels. Tested on R1 and R4400 CPU.
As for 64-bit kernels, the MIPS-III binary does not work, as it is a
32-bit file:
LD [M] /usr/src/modules/madwifi/ath_hal/ath_hal.o
ld: /usr/src/modules/madwifi/ath_hal/hal.o: ABI is incompatible with that of
the selected emulation
ld: failed to merge target specific data of file
/usr/src/modules/madwifi/ath_hal/hal.o
ld: BFD 2.16.91 20060118 Debian GNU/Linux assertion fail
../../bfd/elflink.c:7915
ld: BFD 2.16.91 20060118 Debian GNU/Linux assertion fail
../../bfd/elflink.c:7915
ld: BFD 2.16.91 20060118 Debian GNU/Linux assertion fail
../../bfd/elflink.c:7915
ld: BFD 2.16.91 20060118 Debian GNU/Linux assertion fail
../../bfd/elflink.c:7915
ld: Attempt to do relocatable link with elf32-tradbigmips input and
elf64-tradbigmips output
ld: final link failed: File in wrong format
make[3]: *** [/usr/src/modules/madwifi/ath_hal/ath_hal.o] Error 1
make[2]: *** [_module_/usr/src/modules/madwifi/ath_hal] Error 2
make[2]: Leaving directory `/usr/src/linux-headers-2.6.16-rc6-r4k-ip22'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/modules/madwifi/ath_hal'
make: *** [all] Erreur 1
make: quittant le répertoire « /usr/src/modules/madwifi »
[EMAIL PROTECTED]:/usr/src/modules/madwifi# file
/usr/src/modules/madwifi/ath_hal/*o
/usr/src/modules/madwifi/ath_hal/ah_osdep.o: ELF 64-bit MSB relocatable, MIPS,
MIPS-III version 1 (SYSV), not stripped
/usr/src/modules/madwifi/ath_hal/hal.o: ELF 32-bit MSB relocatable, MIPS,
MIPS-III version 1 (SYSV), not stripped
Hi guys,
Patch looks good, I'll get it in the madwifi(-old) package soon.
However, for madiwfi(-ng), I hope we can fix this upstream. Can I
contact you off-list to discuss this?
I am not qualified to comment on anything mips related, however, so I
need a little assistance.
Thanks, Kel.