[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

linux/posix port compiling problem



Looking at the patch, it looks like it boils down to 3 things:

+ disable shell for posix port (easier to drop it from building at all).
+ use *.o on command line instead of from file with ar (why?)
+ a small patch to provide a malloc initialize stub.

Did I miss something?

--joel

Wei-Tsun Sun wrote:
> Joel Sherrill <joel.sherrill at oarcorp.com> wrote:
>
>   
>> Submit the patches and let's move from there.  Which distribution
>> and version?
>>     
>>> Ticker only have 2 tasks active although they both stop at 35 seconds. 
>>>       
>> That sounds like correct behaviour if you ignore the error below.
>>
>>     
>>> Creation of task 3 returned a error code of
>>> 14 (I guess this can be obtained from errno.h:  #define EFAULT 14 /* Bad address */)........
>>>
>>>   
>>>       
>> No.  The error codes in the Classic API are defined in
>> cpukit/rtems/include/rtems/rtems/status.h. 
>>   /**
>>    *  This is the status to indicate that a thread is in wrong state
>>    *  was in the wrong execution state for the requested operation.
>>    */
>>   RTEMS_INCORRECT_STATE          = 14,
>>
>>     
> Hi,
>
> The patch is located at:
> http://www.ece.auckland.ac.nz/~wsun013/rtems/rtems-linux-posix-20090409.patch
>
> Here are the instructions from what I have been doing:
>
> 1. Check out the CVS Head of the RTEMS
>
> 2. run ./bootstrap
>
> 3. apply the patch, ie cat ../rtems-linux-posix-20090409.patch | patch -p1
>
> 4. make a directory outside the rtems, namely build
>
> 5. make a directory which to put the bin, ie /cvs/wip/rtems/i386-linux-rtems/rtems-4.10/bin in my case
>
> 6. Export PATH, ie Export PATH=/cvs/wip/rtems/i386-linux-rtems/rtems-4.10/bin:$PATH
>  
> 7. Link the tool chain and add i386-linux-rtems4.10 as the prefix to the names or you can use the script from
> http://www.ece.auckland.ac.nz/~wsun013/rtems/build-tools-i386-linux-rtems4.10.sh
> Note that the directories inside the script are hardcoded
>
> 8. configure the RTEMS from the build directory by
> ../rtems/configure --prefix=/cvs/wip/rtems/i386-linux-rtems/rtems-4.10 --target=i386-linux-rtems4.10 --host=i386-unknown-linux-gnu --build=i386-unknown-linux-gnu --enable-test=samples --disable-rdbg --disable-rtems-debug --enable-itron --enable-posix --enable-networking --enable-cxx 
>
> 9. make all
>
> I am using Debian Testing, the libc version 2.9
> ii  libc6                                         2.9-4                       GNU C Library: Shared libraries
>
> The info of my gcc:
> ./i386-linux-rtems4.10-gcc -v
> Using built-in specs.
> Target: i486-linux-gnu
> Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.3-3' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --enable-cld --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
> Thread model: posix
> gcc version 4.3.3 (Debian 4.3.3-3)
>
> Some of the resulting sample programs can run fine, eg, hello.exe, ticker.exe only has 2 tasks running. minimum causes segfault.
>
> Let me know if you have any questions.
>
> Wei-Tsun Sun
>
>
>   


-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985