This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DOSBOX cross compilation for OMAPl138

Other Parts Discussed in Thread: OMAPL138

I downloaded dosbox sorce from dosbox site for Debian version. I am not able to cross compile for OMAPl138. 

My question is first, i am downloading correct version of dosbox.and second how to cross compile it. Is there any special procedure required other than normal linux kernel compilation? Please help me get out of this problem. After this i need to run some dos applications on it.

  • Hi,
    You have to configure for ARM architecture and need to cross compile with arm tool chain (arm-arago-linux-gnueabi-gcc)
  • Could you please provide some steps if i am wrong? PATH was set before following steps.

    1. export ARCH=arm
    2. export CROSS_COMPILE=arm-none-linux-gnueabi-
    3. make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi

    Some pages i saw need to change config.h file and compile with some extera flags, All those things are confusable. So any dosbox source availabe for ARM. or please provide me the steps to compile for ARM.
  • I have done following steps :

    my dosbox is dosbox-0.74.

    1. ./autogen.sh
    2. CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ ./configure --build=i386-linux --host=arm-linux --target=arm --prefix=/usr/
    3. make

    After this i am getting some compilation error in some compilation error; Please find below output.
    devuser@ubuntu:~/Downloads/dosbox-0.74$ make
    (CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /home/devuser/Downloads/dosbox-0.74/missing --run autoheader)
    configure.in:41: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
    ../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
    ../../lib/autoconf/general.m4:2591: _AC_COMPILE_IFELSE is expanded from...
    ../../lib/autoconf/general.m4:2607: AC_COMPILE_IFELSE is expanded from...
    configure.in:41: the top level
    configure.in:85: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
    ../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
    ../../lib/autoconf/general.m4:2591: _AC_COMPILE_IFELSE is expanded from...
    ../../lib/autoconf/general.m4:2607: AC_COMPILE_IFELSE is expanded from...
    configure.in:85: the top level
    configure.in:114: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
    ../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
    ../../lib/autoconf/general.m4:2591: _AC_COMPILE_IFELSE is expanded from...
    ../../lib/autoconf/general.m4:2607: AC_COMPILE_IFELSE is expanded from...
    configure.in:114: the top level
    configure.in:149: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
    ../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
    ../../lib/autoconf/general.m4:2591: _AC_COMPILE_IFELSE is expanded from...
    ../../lib/autoconf/general.m4:2607: AC_COMPILE_IFELSE is expanded from...
    configure.in:149: the top level
    configure.in:154: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
    ../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
    ../../lib/autoconf/general.m4:2591: _AC_COMPILE_IFELSE is expanded from...
    ../../lib/autoconf/general.m4:2607: AC_COMPILE_IFELSE is expanded from...
    configure.in:154: the top level
    configure.in:442: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
    ../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
    ../../lib/autoconf/general.m4:2662: _AC_LINK_IFELSE is expanded from...
    ../../lib/autoconf/general.m4:2679: AC_LINK_IFELSE is expanded from...
    configure.in:442: the top level
    rm -f stamp-h1
    touch config.h.in
    cd . && /bin/bash ./config.status config.h
    config.status: creating config.h
    config.status: config.h is unchanged
    make all-recursive
    make[1]: Entering directory `/home/devuser/Downloads/dosbox-0.74'
    Making all in src
    make[2]: Entering directory `/home/devuser/Downloads/dosbox-0.74/src'
    Making all in cpu
    make[3]: Entering directory `/home/devuser/Downloads/dosbox-0.74/src/cpu'
    Making all in core_full
    make[4]: Entering directory `/home/devuser/Downloads/dosbox-0.74/src/cpu/core_full'
    make[4]: Nothing to be done for `all'.
    make[4]: Leaving directory `/home/devuser/Downloads/dosbox-0.74/src/cpu/core_full'
    Making all in core_normal
    make[4]: Entering directory `/home/devuser/Downloads/dosbox-0.74/src/cpu/core_normal'
    make[4]: Nothing to be done for `all'.
    make[4]: Leaving directory `/home/devuser/Downloads/dosbox-0.74/src/cpu/core_normal'
    Making all in core_dyn_x86
    make[4]: Entering directory `/home/devuser/Downloads/dosbox-0.74/src/cpu/core_dyn_x86'
    make[4]: Nothing to be done for `all'.
    make[4]: Leaving directory `/home/devuser/Downloads/dosbox-0.74/src/cpu/core_dyn_x86'
    Making all in core_dynrec
    make[4]: Entering directory `/home/devuser/Downloads/dosbox-0.74/src/cpu/core_dynrec'
    make[4]: Nothing to be done for `all'.
    make[4]: Leaving directory `/home/devuser/Downloads/dosbox-0.74/src/cpu/core_dynrec'
    make[4]: Entering directory `/home/devuser/Downloads/dosbox-0.74/src/cpu'
    arm-linux-gnueabihf-g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -g -O2 -MT callback.o -MD -MP -MF .deps/callback.Tpo -c -o callback.o callback.cpp
    mv -f .deps/callback.Tpo .deps/callback.Po
    arm-linux-gnueabihf-g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -g -O2 -MT cpu.o -MD -MP -MF .deps/cpu.Tpo -c -o cpu.o cpu.cpp
    In file included from ../../include/dos_system.h:29:0,
    from ../../include/dos_inc.h:25,
    from ../../include/programs.h:28,
    from cpu.cpp:29:
    ../../include/cross.h: In function ‘float powf(float, float)’:
    ../../include/cross.h:67:43: error: ‘float powf(float, float)’ was declared ‘extern’ and later ‘static’ [-fpermissive]
    In file included from /home/devuser/AgLeader/E1/toolchain/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/bin/../arm-linux-gnueabihf/libc/usr/include/./math.h:94:0,
    from ../../include/cross.h:66,
    from ../../include/dos_system.h:29,
    from ../../include/dos_inc.h:25,
    from ../../include/programs.h:28,
    from cpu.cpp:29:
    /home/devuser/AgLeader/E1/toolchain/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/bin/../arm-linux-gnueabihf/libc/usr/include/arm-linux-gnueabihf/bits/mathcalls.h:155:1: error: previous declaration of ‘float powf(float, float)’ [-fpermissive]
    In file included from ../../include/programs.h:28:0,
    from cpu.cpp:29:
    ../../include/dos_inc.h: In member function ‘void DOS_MCB::SetFileName(const char*)’:
    ../../include/dos_inc.h:543:78: error: expected primary-expression before ‘,’ token
    ../../include/dos_inc.h:543:79: error: ‘filename’ was not declared in this scope
    ../../include/dos_inc.h:543:87: error: ‘offsetof’ was not declared in this scope
    ../../include/dos_inc.h: In member function ‘void DOS_MCB::GetFileName(char*)’:
    ../../include/dos_inc.h:544:71: error: expected primary-expression before ‘,’ token
    ../../include/dos_inc.h:544:72: error: ‘filename’ was not declared in this scope
    ../../include/dos_inc.h:544:80: error: ‘offsetof’ was not declared in this scope
    cpu.cpp: In member function ‘void TaskStateSegment::Get_SSx_ESPx(Bitu, Bitu&, Bitu&)’:
    cpu.cpp:294:37: error: expected primary-expression before ‘,’ token
    cpu.cpp:294:38: error: ‘esp0’ was not declared in this scope
    cpu.cpp:294:42: error: ‘offsetof’ was not declared in this scope
    cpu.cpp:298:37: error: expected primary-expression before ‘,’ token
    cpu.cpp:298:38: error: ‘sp0’ was not declared in this scope
    cpu.cpp:298:41: error: ‘offsetof’ was not declared in this scope
    cpu.cpp: In function ‘bool CPU_SwitchTask(Bitu, TSwitchType, Bitu)’:
    cpu.cpp:362:49: error: expected primary-expression before ‘,’ token
    cpu.cpp:362:50: error: ‘cr3’ was not declared in this scope
    cpu.cpp:362:53: error: ‘offsetof’ was not declared in this scope
    cpu.cpp:363:49: error: expected primary-expression before ‘,’ token
    cpu.cpp:363:50: error: ‘eip’ was not declared in this scope
    cpu.cpp:364:52: error: expected primary-expression before ‘,’ token
    cpu.cpp:364:53: error: ‘eflags’ was not declared in this scope
    cpu.cpp:365:49: error: expected primary-expression before ‘,’ token
    cpu.cpp:365:50: error: ‘eax’ was not declared in this scope
    cpu.cpp:366:49: error: expected primary-expression before ‘,’ token
    cpu.cpp:366:50: error: ‘ecx’ was not declared in this scope
    cpu.cpp:367:49: error: expected primary-expression before ‘,’ token
    cpu.cpp:367:50: error: ‘edx’ was not declared in this scope
    cpu.cpp:368:49: error: expected primary-expression before ‘,’ token
    cpu.cpp:368:50: error: ‘ebx’ was not declared in this scope
    cpu.cpp:369:49: error: expected primary-expression before ‘,’ token
    cpu.cpp:369:50: error: ‘esp’ was not declared in this scope
    cpu.cpp:370:49: error: expected primary-expression before ‘,’ token
    cpu.cpp:370:50: error: ‘ebp’ was not declared in this scope
    cpu.cpp:371:49: error: expected primary-expression before ‘,’ token
    cpu.cpp:371:50: error: ‘edi’ was not declared in this scope
    cpu.cpp:372:49: error: expected primary-expression before ‘,’ token
    cpu.cpp:372:50: error: ‘esi’ was not declared in this scope
    cpu.cpp:374:48: error: expected primary-expression before ‘,’ token
    cpu.cpp:375:48: error: expected primary-expression before ‘,’ token
    cpu.cpp:376:48: error: expected primary-expression before ‘,’ token
    cpu.cpp:377:48: error: expected primary-expression before ‘,’ token
    cpu.cpp:378:48: error: expected primary-expression before ‘,’ token
    cpu.cpp:379:48: error: expected primary-expression before ‘,’ token
    cpu.cpp:380:49: error: expected primary-expression before ‘,’ token
    cpu.cpp:380:50: error: ‘ldt’ was not declared in this scope
    cpu.cpp:403:42: error: expected primary-expression before ‘,’ token
    cpu.cpp:403:43: error: ‘eflags’ was not declared in this scope
    cpu.cpp:403:49: error: ‘offsetof’ was not declared in this scope
    cpu.cpp:404:42: error: expected primary-expression before ‘,’ token
    cpu.cpp:404:43: error: ‘eip’ was not declared in this scope
    cpu.cpp:406:42: error: expected primary-expression before ‘,’ token
    cpu.cpp:406:43: error: ‘eax’ was not declared in this scope
    cpu.cpp:407:42: error: expected primary-expression before ‘,’ token
    cpu.cpp:407:43: error: ‘ecx’ was not declared in this scope
    cpu.cpp:408:42: error: expected primary-expression before ‘,’ token
    cpu.cpp:408:43: error: ‘edx’ was not declared in this scope
    cpu.cpp:409:42: error: expected primary-expression before ‘,’ token
    cpu.cpp:409:43: error: ‘ebx’ was not declared in this scope
    cpu.cpp:410:42: error: expected primary-expression before ‘,’ token
    cpu.cpp:410:43: error: ‘esp’ was not declared in this scope
    cpu.cpp:411:42: error: expected primary-expression before ‘,’ token
    cpu.cpp:411:43: error: ‘ebp’ was not declared in this scope
    cpu.cpp:412:42: error: expected primary-expression before ‘,’ token
    cpu.cpp:412:43: error: ‘esi’ was not declared in this scope
    cpu.cpp:413:42: error: expected primary-expression before ‘,’ token
    cpu.cpp:413:43: error: ‘edi’ was not declared in this scope
    cpu.cpp:415:42: error: expected primary-expression before ‘,’ token
    cpu.cpp:416:42: error: expected primary-expression before ‘,’ token
    cpu.cpp:417:42: error: expected primary-expression before ‘,’ token
    cpu.cpp:418:42: error: expected primary-expression before ‘,’ token
    cpu.cpp:419:42: error: expected primary-expression before ‘,’ token
    cpu.cpp:420:42: error: expected primary-expression before ‘,’ token
    cpu.cpp:428:43: error: expected primary-expression before ‘,’ token
    cpu.cpp:428:44: error: ‘back’ was not declared in this scope
    cpu.cpp:428:48: error: ‘offsetof’ was not declared in this scope
    cpu.cpp:430:43: error: expected primary-expression before ‘,’ token
    cpu.cpp:430:44: error: ‘back’ was not declared in this scope
    cpu.cpp:430:48: error: ‘offsetof’ was not declared in this scope
    make[4]: *** [cpu.o] Error 1
    make[4]: Leaving directory `/home/devuser/Downloads/dosbox-0.74/src/cpu'
    make[3]: *** [all-recursive] Error 1
    make[3]: Leaving directory `/home/devuser/Downloads/dosbox-0.74/src/cpu'
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/home/devuser/Downloads/dosbox-0.74/src'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/devuser/Downloads/dosbox-0.74'
    make: *** [all] Error 2
    devuser@ubuntu:~/Downloads/dosbox-0.74$



    Pleas elet me know my build source is stable or i am doing any thing wrong?
  • i cross compiled and loaded onto omapl138 evm target and executed, but below error i am getting. somebody can help me out from this pint.

    "./var/dosbox: error while loading shared libraries: libSDL-1.2.so.0: cannot open shared object file: No such file or directory
    "

    thanks
    Gopi
  • Hi,

    Sorry for the delayed response.

    I have attached the sdl library, you can put this library with link in "/usr/lib" folder.

    2158.sdl_library.zip