This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patching kernel headers


Hi Arnaud,

I am experiencing some system level issues with my system-level MIPS
simulator due to some inconsistencies between linux kernels for MIPS and
for other (x86, PowerPC, ARM) architectures.
 
I am relying on the host (x86) linux operating system to perform some of the MIPS system level actions (scheduler, threads, system calls, ...) but as the MIPS version of the kernel does not use the same generic constant values, especially at the I/O level, I am stuck, unless I either implement a new OS in my simulator, or rewrite part of the MIPS based linux kernel.

I am using xtool to get MIPS binary like inputs for my system-level MIPS simulator. When the application makes system calls they are not linux system calls since xtool application has /x-tools/mips-unknown-linux-uclibc/mips-unknown-linux-uclibc/include/bits/fcntl.h which is totally different by the values from flags from x86 linux host's /usr/include/bits/fcntl.h

Do you have any suggestion how to equalize /x-tools/mips-unknown-linux-uclibc/mips-unknown-linux-uclibc/include/bits/fcntl.h with /usr/include/bits/fcntl.h?

Milan



--- On Fri, 10/29/10, Arnaud Lacombe <lacombar@gmail.com> wrote:

> From: Arnaud Lacombe <lacombar@gmail.com>
> Subject: Re: Patching kernel headers
> To: "milan radulovic" <radulovic_milan@yahoo.com>
> Cc: yann.morin.1998@anciens.enib.fr, crossgcc@sourceware.org
> Date: Friday, October 29, 2010, 5:19 PM
> Hi,
> 
> On Fri, Oct 29, 2010 at 10:13 AM, milan radulovic
> <radulovic_milan@yahoo.com>
> wrote:
> > Hi Arnaud,
> >
> > my simulator executes MIPS instructions, so when I
> have system calls the values for flags like O_APPEND,
> O_CREATE, O_TRUNC in MIPS cross compiled binaries are not
> the same like on host.
> >
> so when the MIPS code calls fcntl(2), this system call is
> forwarded to
> the host kernel ? there is no MIPS kernel in your setup ?
> 
>  - Arnaud
> 
> 
> >
> > Milan
> >
> >
> > --- On Fri, 10/29/10, Arnaud Lacombe <lacombar@gmail.com>
> wrote:
> >
> >
> > From: Arnaud Lacombe <lacombar@gmail.com>
> > Subject: Re: Patching kernel headers
> > To: "milan radulovic" <radulovic_milan@yahoo.com>
> > Cc: yann.morin.1998@anciens.enib.fr,
> crossgcc@sourceware.org
> > Date: Friday, October 29, 2010, 4:01 PM
> >
> >
> > Hi,
> >
> > On Fri, Oct 29, 2010 at 3:34 AM, milan radulovic
> > <radulovic_milan@yahoo.com>
> wrote:
> >>
> >> Hi Arnaud,
> >>
> >> Thank you very much for your reply.
> >>
> >> As I stated in my prevoius message I have a mips
> simulator that I run on x86 linux machine. This is the
> reason why?I need xtool for mips.
> >>
> > if it runs in a simulator, why would you need both
> (host's and
> > target's) fcntl.h to be the same ?
> >
> > - Arnaud
> >
> >> Since you said that /bits stuff did not come from
> kernel, could you please advice me what I need to do to
> change the flags value in fcntl.h file in /bits?
> >>
> >> Kind regards,
> >>
> >> Milan
> >>
> >> --- On Fri, 10/29/10, Arnaud Lacombe <lacombar@gmail.com>
> wrote:
> >>
> >> From: Arnaud Lacombe <lacombar@gmail.com>
> >> Subject: Re: Patching kernel headers
> >> To: "milan radulovic" <radulovic_milan@yahoo.com>
> >> Cc: yann.morin.1998@anciens.enib.fr,
> crossgcc@sourceware.org
> >> Date: Friday, October 29, 2010, 3:37 AM
> >>
> >> Hi,
> >>
> >> On Thu, Oct 28, 2010 at 4:05 PM, milan radulovic
> >> <radulovic_milan@yahoo.com>
> wrote:
> >> > Hi Yann, All,
> >> >
> >> > please find attached my,patch file. I tried
> to do as you suggested me but after I successfully built the
> xtool for mips-unknown-linux-uclibc target, mips2, BE, no
> threads, I noticed that no changes in fcntl.h file in
> /x-tools/mips-unknown-linux-uclibc/mips-unknown-linux-uclibc/include/bits/.
> >> >
> >> because the bits/ stuff does not come from the
> kernel.
> >>
> >> > Did I make patch file in proper way? What are
> the switches in diff that you are usually using ?when
> making patches?
> >> >
> >> > Any possibility to get reply from you on my
> previous message?
> >> >
> >> well... I don't really see the point of this,
> especially the
> >> "executing mips binary on x86".
> >>
> >> - Arnaud
> >>
> >
> >
> >
> >
> >
> 




--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]