Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Pete Popov <ppopov@pacbell.net>
To: Steven Liu <stevenliu@psdc.com>
Cc: linux-mips@oss.sgi.com
Subject: Re: Could not find the source code for "/sbin/init".
Date: Tue, 14 Aug 2001 11:37:56 -0700	[thread overview]
Message-ID: <3B797004.4030503@pacbell.net> (raw)
In-Reply-To: 84CE342693F11946B9F54B18C1AB837B0A2431@ex2k.pcs.psdc.com

Steven Liu wrote:
> Hi, Pete:
> 
> Thank you very much for your help.
> 
> After several tries, I realized that you are right. My MMU may have
> problem.
> 
> Because my mips CPU is not the standard one and I do not have a R3000
> application 
> program such as "date", "arch", or "init", I built an application as
> following.
> 
> liu.c is: 
> 
> void main(void)
> {
> 
> }
> 
> Makefile is:
> 
> ARCH = mips
> 
> .EXPORT_ALL_VARIABLES:
> 
> 
> CROSS_COMPILE 	=mips-linux-
> 
> AS	=$(CROSS_COMPILE)as
> LD	=$(CROSS_COMPILE)ld
> CC	=$(CROSS_COMPILE)gcc  -D__mips__ 
> CPP	=$(CC) -E
> AR	=$(CROSS_COMPILE)ar
> NM	=$(CROSS_COMPILE)nm
> STRIP	=$(CROSS_COMPILE)strip
> OBJCOPY	=$(CROSS_COMPILE)objcopy
> OBJDUMP	=$(CROSS_COMPILE)objdump
> MAKE	=make
> GENKSYMS=/sbin/genksyms
> 
> 
> CFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -mips1
> -mcpu=r3000 -mmemcpy
> 
> CFLAGS += $(shell if $(CC) -fno-strict-aliasing -S -o /dev/null -xc
> /dev/null >/dev/null 2>&1; then echo "-fno-strict-aliasing"; fi)
> 
> # egcs-1.0.2 compiler for MIPS has a problem for which this is a
> work-around
> CFLAGS += $(shell if $(CC) -mno-split-addresses -S -o /dev/null -xc
> /dev/null >/dev/null 2>&1; then echo "-mno-split-addresses"; fi)
> 
> 
> 
> .S.s:
> 	$(CC) -D__ASSEMBLY__  -traditional -E -o $*.s $<
> .S.o:
> 	$(CC) -D__ASSEMBLY__  -traditional -c -o $*.o $<
> 
> 
> 
> liu: $(CONFIGURATION) liu.o
> 	$(LD) $(LINKFLAGS) $(HEAD) liu.o  \
> 		-o liu
> 	$(NM) liu | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aU]
> \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map
> 
> 
> liu.o: liu.c 
> 	$(CC) $(CFLAGS) $(PROFILING) -c -o $*.o $<
> 
> 
> When I ran the program, it crushed.
> 
> Could you build this application and run it on your R3000 system? If it
> works, send me your executable so that I can test my system.

How do you run the program?  Do you use it instead of /sbin/init?  If so, what 
should happen is that the program should "run" and then just return. If you put 
printks before and after your program is run, you should see the program being 
executed and then returning. If it's crashing, it sounds like your kernel can't 
run *any* userland app, probably because the mmu is not setup correctly.

Unfortunately I don't have any R3000 based boards so I can't test anything.

Pete

  parent reply	other threads:[~2001-08-14 18:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-14 18:21 Could not find the source code for "/sbin/init" Steven Liu
2001-08-14 18:21 ` Steven Liu
2001-08-14 18:37 ` Pete Popov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-08-07 17:39 Steven Liu
2001-08-07 17:39 ` Steven Liu
2001-08-07 17:49 ` Pete Popov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3B797004.4030503@pacbell.net \
    --to=ppopov@pacbell.net \
    --cc=linux-mips@oss.sgi.com \
    --cc=stevenliu@psdc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox