From: stanley (stanley@alumni.com)
Date: Thu May 31 2001 - 11:19:46 EDT
Hi joe > Are you linking the program with uClibc? It sounds like you're not > making the syscalls to the OS but rather using a statically linked > printf function which pipes to tsim instead of sending output to the > kernel with a write call Indeed, my program is not making any syscalls to the OS, but rather using a statically linked printf function which pipes to tsim instead of sending output to the kernel with a write call. Currently, uClibc has not been successfully to the platform i am working on, thus i can't link my userland to it. Please correct me if i am wrong, to run a program with uClinux, i will need the following: 1) Create a libc with syscalls to the OS 2) a PIC compiler that compiles libc 3) a simple program which should contains what, i am not too sure 4) elf2flt Currently items 1, 2 and 4 aren't ported to LEON yet. For item 3, i looked into busybox and its init is very complex. I need a simple program that can output something to the console, this demostrate items 1, 2 and 4 are wokring correctly. Perhaps you can give an estimate of the manpower and time required to accomplish items 1, 2 and 4. It seems that i have underestimated it by 2 engineers with 2 months each. By the way, does redhat has any related stuffs similar to what i mentioned here ?, something workable ? Thanks stanley ----- Original Message ----- From: "Joe deBlaquiere" <jadb@redhat.com> To: <uclinux-dev@uclinux.org> Sent: Thursday, May 31, 2001 10:25 PM Subject: Re: [uClinux-dev] Re: [leon_sparc] Help on elf2flt > > > Stanley wrote: > > > My apology, didn't add this into the earlier mail, > > > > the kernel got through include/sparcnommu/processor.h: start_thread > > without showing any helloworld. > > > > > > > > thanks > > > > > > > > ----- Original Message ----- > > > > *From:* Stanley <mailto:stanley@alumni.com> > > > > *To:* leon_sparc@yahoogroups.com <mailto:leon_sparc@yahoogroups.com> > > ; uclinux-dev@uclinux.org <mailto:uclinux-dev@uclinux.org> > > > > *Sent:* Wednesday, May 30, 2001 5:50 PM > > > > *Subject:* [leon_sparc] Help on elf2flt > > > > > > Hi all, > > > > > > > > I am working on elf2flt, a elf to flat binary format conversion > > program. > > > > Firstly, i created a simple program that outputs "hello world" to > > the console, the program works over tsim. > > > > Next, I converted the program using elf2flt, > > > > Then, linking the flt executable into uClinux, instead of seeing > > some "hello world" at the console, i got the output over tsim. > > > > > > > > Hope some kind soul can explain what the output really means. > > > > > > > > Maybe there is something wrong with my simple program, is it > > rightful to extrapolate that a program works over tsim, the same > > program after conversion should work with uClinux ? > > > > > > > > I have some gut feeling that i need to open ttyS0 in the helloworld > > program. > > > > > > > > -------- Output of uClinux for LEON----- > > > > BINFMT_FLAT: Loading file: 4003eee8 > > > > Free pages: 3784kB > > > > ( 0*4kB 1*8kB 0*16kB 0*32kB 1*64kB 1*128kB 14*256kB = 3784kB, %0 > > frag, %0 slack) > > > > hdr->entry = 64, hdr->data_start = 66099, hdr->data_end = 66099, > > hdr->bss_end = 66104, hdr->stac > > > > k_size = 4096 > > > > Stack = 4149, (1) > > > > BINFMT_FLAT: mmap returned: 403c0018 > > > > Free pages: 3656kB > > > > BINFMT_FLAT: RAM mapping of file > > > > ROM mapping is 403c0018, Entry point is 40, data_start is 10233 > > > > start_code: 403c0058, end_code: 403d024b > > > > start_data: 403d024b, end_data: 403d024b > > > > Loaded flat file, BSS=403d024b, DATA=403d024b, TEXT=403c0058 > > > > p=403d1281 > > > > putstringarray(1) > > > > put_string '/bin/init' > > > > p2=403d1277 > > > > p(filename)=403d1277 > > > > putstringarray(2) > > > > put_string 'TERM=linux' > > > > p2=403d126c > > > > put_string 'HOME=/' > > > > p2=403d1265 > > > > p(envp)=403d1265 > > > > putstringarray(1) > > > > put_string 'init' > > > > p2=403d1260 > > > > p(argv)=403d1260 > > > > p(create_flat_tables)=403d1248 > > > > arg_start = 403d1260 > > > > arg_end = 403d1265 > > > > env_start = 403d1265 > > > > env_end = 403d1277 > > > > start_stack: 403d1248 > > > > Free pages: 3656kB > > > > ( 0*4kB 1*8kB 0*16kB 0*32kB 1*64kB 0*128kB 14*256kB = 3656kB, %0 > > frag, %46 slack) > > > > > > *Yahoo! Groups Sponsor* > > [www.debticated.com] > > <http://rd.yahoo.com/M=190462.1393721.2979173.2/S=1702208843:N/A=551014/?htt p://www.debticated.com> > > > > > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service > > <http://docs.yahoo.com/info/terms/>. > > > -- > Joe deBlaquiere > Red Hat, Inc. > 307 Wynn Drive > Huntsville AL, 35805 > voice : (256)-704-9200 > fax : (256)-837-3839 > > This message resent by the uclinux-dev@uclinux.org list server http://www.uClinux.org/ > This message resent by the uclinux-dev@uclinux.org list server http://www.uClinux.org/
This archive was generated by hypermail 2.1.4 : Thu Sep 19 2002 - 13:19:46 EDT