Hi Jon, We are facing serious problems with compiling userspace applications for the Linux port to LM32/Milkymist. So far, we have been successful at porting and running the kernel, and we have userland working thanks to binaries we copied from the sample filesystem image available at http://www.theobroma-systems.com/uclinux-lm32/
However, we cannot compile them ourselves. We tried: - using GCC 4.4, uClibc from Theobroma and your patch: binary does not start, and Busybox prints its "applet not found" error message which seems to be a catch-all generic message for execution problems. - using the binary lm32-linux toolchain available from the Theobroma website (http://www.theobroma- systems.com/assets/downloads/mico32/lm32linux-20080206toolchains_linux.tar.gz): the kernel prints "Error: not enough relocations found" and the system crashes and reboots. - from the GNU LD doc, it seemed that we needed to add the -i linker flag to add relocation info to the binary. We did that, and the system no longer crashed but printed "applet not found" instead. - looking at the scripts available at http://www.theobroma- systems.com/assets/downloads/mico32/lm32linux-20080206.tar.gz it seemed we needed to pass -q as well to the linker. That did not help. - we also tried passing -fPIC to the compiler, without change. So, my questions are: * How does the LM32 FDPIC works? There is no documentation at all, and uClibc and the kernel are full of dirty and sometimes contradictory "hacks" (as the code comments say...), making it very hard to understand. If we knew how it is supposed to work, we could debug the problem more efficiently than trying every combination of compiler/linker options we find lying around in Theobroma's scripts. * Do you think the Theobroma binary toolchain could work, or is it broken beyond repair? In the former case, what are the options that we should pass to the linker and compiler so that the binaries can start? Thank you, Sébastien _______________________________________________ http://lists.milkymist.org/listinfo.cgi/devel-milkymist.org IRC: #milkym...@freenode Webchat: www.milkymist.org/irc.html Wiki: www.milkymist.org/wiki
