Hi Greg,
I've solved the missing libraries problem but the toolchain you
provided isn't generating proper code for the 68000.
I've disassembled the kernel and checked the 'proc_net_ns_init'
function, where the kernel is hanging more precisely at the 'memcpy'
intruction.
So, the memcpy gets compiled into a movel instruction with an odd
displacement (causing a bus error).
memcpy(netd->name, "net", 4);
compiled into:
[...]
2175b8: 217c 6e65 7400 movel #1852142592,%a0@(77)
2175be: 004d
[...]
The previous toolchain is generating 4 moveb intructions in this case.
I also see some other differences related to move opcodes.
For instance, the previous toolchain loads an address content to the
stack by doing this:
207104: 2f39 001f 54c8 movel 1f54c8 <malloc_sizes+0x1c>,%sp at -
20710a: 4eb9 0004 2bbc jsr 42bbc <kmem_cache_alloc>
The new toolchain is doing this:
21755a: 307c 001c moveaw #28,%a0
21755e: d1fc 0020 6d2c addal #2125100,%a0
217564: 2f10 movel %a0@,%sp at -
217566: 4eb9 0004 640e jsr 4640e <kmem_cache_alloc>
To me this looks Coldfire 'limited' adressing modes.
Any suggestion? :|
When ever i have the time I'll try to build a toolchain (maybe using
gcc 4.7) and check the generated code.
Maybe I also could try the code sourcery one, but there is no
reference for the 'legacy 68k' family on their download page (only
coldfire).
Regards,
Luis Alves
Hi Luis,
Post by Luis AlvesI've tryed using the toolchain that you just uploaded but is failing
[...]
/usr/local/libexec/gcc/m68k-uclinux/4.5.1/cc1: error while loading
shared libraries: libmpfr.so.1: cannot open shared object file: No
such file or directory
# ldd /usr/local/libexec/gcc/m68k-uclinux/4.5.1/cc1
? ? ? ?linux-gate.so.1 => ? (0xb7742000)
? ? ? ?libmpc.so.2 => ?/usr/lib/libmpc.so.2 (0xb7719000)
? ? ? ?libmpfr.so.1 => ?not found
? ? ? ?libgmp.so.3 => ?not found
? ? ? ?libdl.so.2 => ?/lib/i386-linux-gnu/libdl.so.2 (0xb7713000)
? ? ? ?libz.so.1 => ?/lib/i386-linux-gnu/libz.so.1 (0xb76fe000)
? ? ? ?libc.so.6 => ?/lib/i386-linux-gnu/libc.so.6 (0xb7580000)
? ? ? ?libmpfr.so.4 => ?/usr/lib/libmpfr.so.4 (0xb7529000)
? ? ? ?libgmp.so.10 => ?/usr/lib/libgmp.so.10 (0xb74b2000)
? ? ? ?/lib/ld-linux.so.2 (0xb7743000)
What's the linux distro this has been compiled in (and arch)?
I compiled it on a Ubuntu 10.4 (I think it was 10.4). I had to install
a few extra libs packages, like libmpfr and libgmp. They are an easy
apt-get install on ubuntu.
Regards
Greg
Post by Luis AlvesAnyway, I guess I'll compile my own toolchain.
Regards,
Luis
Post by Ivica EftimovskiHi Luis,
Post by Luis AlvesI'm currently using the 'experimental' pre-built gcc toolchain from
<http://www.uclinux.org/pub/uClinux/arm-elf-tools/tools-20080626/m68k-uclinux-tools-20080626.sh>
to build my uClinux-dist.
I've never found any issue with that package, so I didn't even bother
to build my own toolchain.
But now I'm wondering: Is there a newer/better pre-built toolchain, or
sorces for building a more recent one.
That tools page on uclinux.org is looking kind of crufty.
I am uploading the latest one I generated and use now, 20101118.
It is based around gcc-4.5.1. I have been using it for quite a while
and have no problems with it.
As Ivica suggests the code sourcery ones are a good choice too.
Or if you feel up to it take the build script in with the 20101118
sources and try building your own. It is character building :-)
Regards
Greg
------------------------------------------------------------------------
Greg Ungerer ??-- ??Principal Engineer ?? ?? ?? ??EMAIL: ?? ?? gerg at snapgear.com
SnapGear Group, McAfee ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??PHONE: ?? ?? ?? +61 7 3435 2888
8 Gardner Close ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? FAX: ?? ?? ??
?? +61 7 3217 5323
http://www.SnapGear.com
--
------------------------------------------------------------------------
Greg Ungerer ?-- ?Principal Engineer ? ? ? ?EMAIL: ? ? gerg at snapgear.com
SnapGear Group, McAfee ? ? ? ? ? ? ? ? ? ? ?PHONE: ? ? ? +61 7 3435 2888
8 Gardner Close, ? ? ? ? ? ? ? ? ? ? ? ? ? ?FAX: ? ? ? ? +61 7 3891 3630
Milton, QLD, 4064, Australia ? ? ? ? ? ? ? ?WEB: http://www.SnapGear.com