|
MonoSbDevKit243
Mono2.4.3 Scratchbox Developer Kit for FREMANTLE
The Developer KitScratchbox uses QEMU for ARM emulation, the problem is that some ARM syscalls (242, 264, 299) is not yet implemented in QEMU. This miss implemented syscalls can cause some problems in MCS turning impossible compile assemblies for ARM. Scratchbox devkits provide a set of tools that can be executed on host instead of target device and thus it reduces time that is used to build packages. Before build mono-devkit you must first create HOST target on your scratchbox environment. Creating Host TargetFirst step is prepare the directory to get the mono devkit. # sudo mkdir /scratchbox/devkits/mono # sudo chmod ugo+w /scratchbox/devkits/mono Then login into scratchbox: # /scratchbox/login And execute this commands: [sbox-FREMANTLE_X86: ~] > sb-conf setup FREMANTLE_HOST -c host-gcc -d debian-etch:doctools:git:perl:svn -t none [sbox-FREMANTLE_HOST: ~] > sb-conf select FREMANTLE_HOST [sbox-FREMANTLE_HOST: ~] > sb-conf rs maemo-sdk-rootstrap_5.0_i386.tgz [sbox-FREMANTLE_HOST: ~] > sb-conf install --etc --devkits [sbox-FREMANTLE_HOST: ~] > apt-get update [sbox-FREMANTLE_HOST: ~] > fakeroot apt-get install maemo-sdk-runtime [sbox-FREMANTLE_HOST: ~] > fakeroot apt-get install maemo-sdk-dev Now you can start to try to compile the devkit. Build Developer KitLogin into scratchbox if you havent done it yet: # /scratchbox/login Select HOST target: [sbox-FREMANTLE_X86: ~] > sb-conf select FREMANTLE_HOST Then use garmono to build and install devkit: [sbox-FREMANTLE_HOST: ~] > svn co svn://anonsvn.mono-project.com/source/trunk/release/garmono [sbox-FREMANTLE_HOST: ~] > cd garmono [sbox-FREMANTLE_HOST: ~] > make clean Now you need to patch the devkit to:
to do this apply this patch to garmono. Before to try to compile the devkit you need to rename the /usr/include/sys/inotify.h to someother filename because the libc delivery with the SDK not have the inotify interface. mv /usr/include/sys/inotify.h /usr/include/sys/inotify_tmp.h Finally try to make the devkit with: [sbox-FREMANTLE_HOST: ~] > make maemo/devkit Now you probably get this error message: ..... LD genmdesc make[7]: *** [cpu-x86.h] Floating point exception (core dumped) make[6]: *** [all-recursive] Error 1 make[5]: *** [all-recursive] Error 1 make[4]: *** [all] Error 2 make[3]: *** [build-work/main.d/mono-2.4.3/Makefile] Error 2 make[2]: *** [../../../maemo/devkit/mono/cookies/main.d/install] Error 2 make[1]: *** [imgdep-main] Error 2 make: *** [maemo/devkit] Error 2 This occurs because there is some problem in the glib. So you can update the glib with the version just compiled with this command: [sbox-FREMANTLE_HOST: ~] > cp /scratchbox/devkits/mono/lib/glib/libg* /usr/lib/ and try to compile devkit again [sbox-FREMANTLE_HOST: ~] > make maemo/devkit Now you can try to compile mono on X86 target (to have the assembly libraries) and ARMEL taget (to have the native application). To do this you need to enable the devkit with: [sbox-FREMANTLE_HOST: ~] > sb-conf setup FREMANTLE_ARMEL -f -d perl:debian-etch:qemu:doctools:qemu:mono:svn:git [sbox-FREMANTLE_HOST: ~] > sb-conf setup FREMANTLE_X86 -f -d perl:debian-etch:qemu:doctools:qemu:mono:svn:git On the FREMANTLE_X86 target you can run [sbox-FREMANTLE_X86: ~] > make clean [sbox-FREMANTLE_X86: ~] > make maemo/debs Unfortunaly you get this error message: ... MCS [net_2_0] convert.exe make[8]: *** [convert.exe] Error 1 make[7]: *** [convert.exe] Error 2 make[6]: *** [all-recursive] Error 1 make[5]: *** [all] Error 2 make[4]: *** [build-arch-stamp] Error 2 make[3]: *** [build-deb] Error 2 make[2]: *** [../../../maemo/debs/mono/cookies/main.d/install] Error 2 make[1]: *** [imgdep-main] Error 2 make: *** [maemo/debs] Error 2 This error is caused by the attempt of compile and run the convert.exe application inside the FREMANTLE environment. To avoid this one we can try to modify the Makefile.am and Makefile.in to not include the docs directory during the compilation and run [sbox-FREMANTLE_X86: ~] > make maemo/debs Same step in the FREMANTLE_ARMEL target [sbox-FREMANTLE_ARMEL: ~] > make clean [sbox-FREMANTLE_ARMEL: ~] > make maemo/debs |