Linux-Development-Sys Digest #789, Volume #7 Thu, 20 Apr 00 06:16:31 EDT
Contents:
Re: porting.... (Mike McDonald)
Chinese torture with my disk (Daniel de Rauglaudre)
Re: modules (greg)
linux shell (John Diorio)
tq_disk or tq_scheduler?? (Badrinath Venkatachari)
Re: linux shell (Greg Wimpey)
how to debug linux device driver? ("Harold")
how to debug linux device driver? ("Harold")
Kernel source browser (root)
Building a kernel w/o IDE CD fails ("Ed Snow")
Re: Kernel source browser ("Harold")
Re: Overlay filesystem (aka union, translucent, inheriting)? (Scott Sexton)
Is there any reference about how to proceed i2c operations? ("Harold")
Re: Problem with glibc v2.1.3 and _xstat. (Daniel Sands)
where can i find a kernel debugger? ("Harold")
Re: porting.... ([EMAIL PROTECTED])
----------------------------------------------------------------------------
Reply-To: [EMAIL PROTECTED]
From: [EMAIL PROTECTED] (Mike McDonald)
Subject: Re: porting....
Date: Wed, 19 Apr 2000 19:19:10 GMT
In article <8dk1sa$43v$[EMAIL PROTECTED]>,
[EMAIL PROTECTED] writes:
> Hello all,
>
> I'm about to take on the huge task of attempting to port Linux to a new
> (currently unsupported) platform. The target is MIPS-based, so I was
> hoping I might be able to snag some of the existing code in arch/mips...
Which MIPS are you using? I'm working on the NEC Vr4121. I still have a bug
in the TLB code so it's not ready for primetime yet.
The most important thing to understand about the MIPS kernel code is that it
hasn't been updated since something like 2.0.35! 'make xconfig' won't even
work out of the box. Cobalt Micro has newer versions on their website but they
haven't gotten merged back into the main kernel sources. The stuff on SGI's
site haven't been update in about two years (for MIPS based stuff).
> I really haven't the faintest idea of where to start, as I'm not much
> of a kernel hacker, so any FAQ, HOWTO, book, webpage, or even scribble
> on a restaurant napkin would be helpful.
Here's the order I tackled things in: (I'm using 2.2.14 BTW)
1) get 'make xconfig' to work
2) get gcc to cross compile for the MIPS, little endian in my case (all the
existing MIPS kernel code assumes big endian!)
3) create a arch/mips/<your codename> directory, Look at the jazz and baget
directories for examples of useful code. (Skip the DEC and SGI ones!)
4) see if you can get a minimal vmlinux to compile. By minimal, I mean
nothing but a serial console in it!
5) get a boot loader of some sort to put the kernel in memory at the right
address (0x80000000). One with some rudimentary debugging commands (like
dumping memory) is real helpful. (Remember to change printk()'s buffer from
static to global so you can dump it's contents when the kernel panics early
on.)
6) Get the console output to work. you can move the console init call up
quite a few steps in main().
7) Get the RTC to work so you can calculate Bogomips! that'll impress your
boss that things are coming along.
8) Verify that the memory caches are working. It's really hairy code. You
may luck out and be able to use an existing set of code.
9) About this time, you should be getting to where the kernel looks for
something to exec. Figure out how to make a ramdisk with just a shell in it.
This will require you to cross compile libc (a really FUN exercise!) and bash.
Get the kernel to mount the ramdisk and load the shell.
10) ??? This is as far as I've gotten. At this point, I'm loading the 4121's
TLB with the wrong value and then the kernel writes over itsself. I haven't
been able to figure out what the correct values for the TLB entries should be.
> Any experts out there have any suggestions as to what I need to change
> to get it working?
Processors! :-)
Good luck!
Mike McDonald
[EMAIL PROTECTED]
------------------------------
From: Daniel de Rauglaudre <[EMAIL PROTECTED]>
Subject: Chinese torture with my disk
Date: Wed, 19 Apr 2000 19:16:34 +0000
Hello everybody,
I have a Chinese torture with my disk (SCSI on my Dell Pentium Pro 200).
Every 10 seconds, it makes a small noise that I would like to stop. The
same noise as if I typed "sync" on an Xterm. I was thinking it was
because of update/bdflush making syncs and I changed the line in
/etc/inittab:
ud::once:/sbin/update
into:
ud::once:/sbin/update -s 3600 -f 3600
No result. Same behavior. I stopped the crond daemon. Nothing better.
It is a Mandrake 7 installation (Linux 2.2). In my previous
installation, RedHat 5.2 (Linux 2.0) it does not do that.
Can somebody help me? Or can somebody tell me the address of an FAQ
where I could find the explanation of my problem?
--
Daniel de RAUGLAUDRE
[EMAIL PROTECTED]
http://cristal.inria.fr/~ddr/
------------------------------
From: greg <[EMAIL PROTECTED]>
Subject: Re: modules
Date: Wed, 19 Apr 2000 15:30:38 -0400
Reply-To: [EMAIL PROTECTED]
lsmod.
I found it.
greg wrote:
> How can you find out which modules are loaded?
------------------------------
From: John Diorio <[EMAIL PROTECTED]>
Subject: linux shell
Date: Wed, 19 Apr 2000 13:42:19 -0700
hi,
I'm programming a shell with C++ and am having the following
problem--I am trying to call an executable file that will open a specified
file.
For example, the command line might read:
>emacs file.txt
or
>netscape http://www.whatever.com
Currently I am using the execvp() call. I can get the executables
running, but not with the specified file. I was thinking that this has to
do with the open() command, but I wasn't sure. Any suggestions? I
couldn't figure out how to use the two together.
Thanks
John Diorio
------------------------------
From: Badrinath Venkatachari <[EMAIL PROTECTED]>
Subject: tq_disk or tq_scheduler??
Date: Wed, 19 Apr 2000 17:17:22 -0700
Hi,
Can someone tell me what the tq_disk task_queue is for and how it gets
consumed. If I were to block a read call , Q it and service it out of
sync with the main line of excution, could I use
run_task_queue(&tq_disk);schedule() combination to run other processes
that can be scheduled, while I wait for data to be available from
read...
basically what I meant was...
//read coming in
struct wait_queue wait = {current, NULL};
Q the read request as rq; /* timer function will service it out of sync
and set the
reqserviced flag to 1 for this request
*/
add_task_queue(&wait_till_serviced, &wait);
for (;;)
{
current->state = TASK_UNINTERRUPTIBLE;
if (rq.reqserviced == 1)
break;
run_task_queue(&tq_disk); //or should it be &tq_scheduler
schedule();
}
is this ok to do...???
thanks a lot in advance
regards
badri
------------------------------
From: Greg Wimpey <greg.wimpey@waii*removetomail*.com.invalid>
Subject: Re: linux shell
Date: 19 Apr 2000 15:43:26 -0600
John Diorio <[EMAIL PROTECTED]> writes:
> hi,
>
>
> I'm programming a shell with C++ and am having the following
> problem--I am trying to call an executable file that will open a specified
> file.
>
> For example, the command line might read:
>
> >emacs file.txt
> or
>
> >netscape http://www.whatever.com
>
>
> Currently I am using the execvp() call. I can get the executables
> running, but not with the specified file. I was thinking that this has to
> do with the open() command, but I wasn't sure. Any suggestions? I
> couldn't figure out how to use the two together.
>
You don't include the code you are using to call execvp(). Here's a
sample program that works on AIX (which is POSIX-compliant, so it
should also work on Linux):
#include <iostream.h>
#include <unistd.h>
main () {
char *file,*newargv[1024]; // is there a #define'd constant for # of args?
// blah blah blah....
file="emacs"; //would really be read from input cmd line
newargv[0] = file;
newargv[1] = "file.txt"; //also really read from cmd line
newargv[2] = NULL;
execvp(file,newargv);
cout << "Exec failed!\n"; // if execvp returned, we're in trouble
}
Are you setting up the argument vector properly? If not, maybe that
is the source of your trouble.
--
Greg Wimpey greg.wimpey@westgeo*removetomail*.com.invalid
------------------------------
From: "Harold" <[EMAIL PROTECTED]>
Subject: how to debug linux device driver?
Date: Wed, 19 Apr 2000 16:12:38 +0800
This is a multi-part message in MIME format.
=======_NextPart_000_0070_01BFAA1A.152856A0
Content-Type: text/plain;
charset="gb2312"
Content-Transfer-Encoding: quoted-printable
Untitled DocumentI wrote a device, and load it as a module.
but I don't know how to debug this driver
while I use it in my application. Can I use
gdb to do this? If can, how to do?
Thanks in advance.
==========================================================================
=======
Welcome to my linux page:
Linux Paradise (under construction)
BTW: Because my job is so busy, I=20
want some friend to maintain this=20
site with me together, please give=20
me some suggestion.
Thanks.=20
=======_NextPart_000_0070_01BFAA1A.152856A0
Content-Type: text/html;
charset="gb2312"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Untitled Document</TITLE>
<META content=3D"text/html; charset=3Dgb2312" =
http-equiv=3DContent-Type><BASE=20
href=3Dfile://C:\WIN98\Desktop\>
<META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>I wrote a device, and load it as a module.</DIV>
<DIV>but I don't know how to debug this driver</DIV>
<DIV>while I use it in my application. Can I use</DIV>
<DIV>gdb to do this? If can, how to do?</DIV>
<DIV> </DIV>
<DIV>Thanks in advance.</DIV>
<DIV> </DIV>
<DIV> </DIV>
<HR>
<BR>
<P>Welcome to my linux page:<BR><A href=3D"http://hyang.uhome.net"=20
target=3D_blank>Linux Paradise</A> (under construction)<BR>BTW: Because =
my job is=20
so busy, I <BR>want some friend to maintain this <BR>site with me =
together,=20
please give <BR>me some suggestion.<BR>Thanks. </P></BODY></HTML>
=======_NextPart_000_0070_01BFAA1A.152856A0==
------------------------------
From: "Harold" <[EMAIL PROTECTED]>
Subject: how to debug linux device driver?
Date: Wed, 19 Apr 2000 17:54:03 +0800
This is a multi-part message in MIME format.
=======_NextPart_000_0009_01BFAA28.3F9F9520
Content-Type: text/plain;
charset="gb2312"
Content-Transfer-Encoding: quoted-printable
Untitled DocumentI wrote a device, and load it as a module.
but I don't know how to debug this driver
while I use it in my application. Can I use
gdb to do this? If can, how to do?
Thanks in advance.
==========================================================================
=======
Welcome to my linux page:
Linux Paradise (under construction)
BTW: Because my job is so busy, I=20
want some friend to maintain this=20
site with me together, please give=20
me some suggestion.
Thanks.=20
=======_NextPart_000_0009_01BFAA28.3F9F9520
Content-Type: text/html;
charset="gb2312"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Untitled Document</TITLE>
<META content=3D"text/html; charset=3Dgb2312" =
http-equiv=3DContent-Type><BASE=20
href=3Dfile://C:\WIN98\Desktop\>
<META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>
<DIV>I wrote a device, and load it as a module.</DIV>
<DIV>but I don't know how to debug this driver</DIV>
<DIV>while I use it in my application. Can I use</DIV>
<DIV>gdb to do this? If can, how to do?</DIV>
<DIV> </DIV>
<DIV>Thanks in advance.
<HR>
<BR></DIV></DIV>
<P>Welcome to my linux page:<BR><A href=3D"http://hyang.uhome.net"=20
target=3D_blank>Linux Paradise</A> (under construction)<BR>BTW: Because =
my job is=20
so busy, I <BR>want some friend to maintain this <BR>site with me =
together,=20
please give <BR>me some suggestion.<BR>Thanks. </P></BODY></HTML>
=======_NextPart_000_0009_01BFAA28.3F9F9520==
------------------------------
From: root <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: Kernel source browser
Date: Wed, 19 Apr 2000 15:36:38 -0700
Does anyone know where I can find a good application or website which
maps out the Linux source code. I keep hearing that one exists but I
can't find it.
Thanks.
Chris
------------------------------
From: "Ed Snow" <[EMAIL PROTECTED]>
Subject: Building a kernel w/o IDE CD fails
Date: Wed, 19 Apr 2000 22:52:38 GMT
I'm using Mandrake 7.0, everything straight off the CD.
I built a kernel and was able to run it without any noticed problems. I went
to reconfigure it without the IDE CDROM support and the resulting image
would not boot. Diff'ing the build log files I noted a large number of
warning messages that appeared when I configured IDE CD out. The diff of
the config files as well as part of the diff from the build attached to the
end of the message.
I could use pointers on
- possible causes for the kernel to hang sooo fast
- tools for understanding what might have hung
- possible causes for the warning messages. Note that the compilation
command did not show up on
the diff. Either environment variables changed, or an include? I
cannot guess why either of those would
happen due to the change in config.
- possible alternate path to getting IDE CD access through the scsi
generic driver. I have added
IDE emulation and the generic driver into the kernel build, as well as
SCSI CD support. Is there a way
to gain access without having to compile IDE CD out?
I suspect that there is more than one way to move forward, I just don't know
any of them. Reading the Kernel, SCSI, and ASPI howto's helped, but did
not get me there. Additional pointers appreciated.
ed
89c89
< # CONFIG_BLK_DEV_IDECD is not set
---
> CONFIG_BLK_DEV_IDECD=y
50a51
>
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fom
it-frame-pointer -fno-strict-aliasing -pipe -O3 -fomit-frame-pointer -fno-ex
ceptions -fno-rtti -pipe -s -mpentium -mcpu=pentium -march=pentium -ffast-ma
th -fexpensive-optimizations -m486 -malign-loops=2 -malign-jumps=2 -malign-f
unctions=2 -DCPU=586 -c -o ide-cd.o ide-cd.c
52c53
< ar rcs block.a ll_rw_blk.o ide.o md.o xor.o genhd.o floppy.o rd.o
ide-probe.o rz1000.o cmd640.o ide-pci.o ide-dma.o ide-proc.o ide-disk.o
---
> ar rcs block.a ll_rw_blk.o ide.o md.o xor.o genhd.o floppy.o rd.o
ide-probe.o rz1000.o cmd640.o ide-pci.o ide-dma.o ide-proc.o ide-disk.o
ide-cd.o
542,551c543,552
< /tmp/ccdxpPd4.s: Assembler messages:
< /tmp/ccdxpPd4.s:1487: Warning: using `%edx' instead of `%dx' due to `l'
suffix
< /tmp/ccdxpPd4.s:1487: Warning: using `%edx' instead of `%dx' due to `l'
suffix
< /tmp/ccdxpPd4.s:1524: Warning: using `%edx' instead of `%dx' due to `l'
suffix
< /tmp/ccdxpPd4.s:1524: Warning: using `%edx' instead of `%dx' due to `l'
suffix
< /tmp/ccdxpPd4.s:1618: Warning: using `%ecx' instead of `%cx' due to `l'
suffix
< /tmp/ccdxpPd4.s:1625: Warning: using `%edx' instead of `%dx' due to `l'
suffix
< /tmp/ccdxpPd4.s:1626: Warning: using `%edx' instead of `%dx' due to `l'
suffix
< /tmp/ccdxpPd4.s:1639: Warning: using `%edx' instead of `%dx' due to `l'
suffix
< /tmp/ccdxpPd4.s:1639: Warning: using `%edx' instead of `%dx' due to `l'
suffix
---
> /tmp/cckXXPVO.s: Assembler messages:
> /tmp/cckXXPVO.s:1487: Warning: using `%edx' instead of `%dx' due to `l'
suffix
> /tmp/cckXXPVO.s:1487: Warning: using `%edx' instead of `%dx' due to `l'
suffix
> /tmp/cckXXPVO.s:1524: Warning: using `%edx' instead of `%dx' due to `l'
suffix
> /tmp/cckXXPVO.s:1524: Warning: using `%edx' instead of `%dx' due to `l'
suffix
> /tmp/cckXXPVO.s:1618: Warning: using `%ecx' instead of `%cx' due to `l'
suffix
> /tmp/cckXXPVO.s:1625: Warning: using `%edx' instead of `%dx' due to `l'
suffix
> /tmp/cckXXPVO.s:1626: Warning: using `%edx' instead of `%dx' due to `l'
suffix
> /tmp/cckXXPVO.s:1639: Warning: using `%edx' instead of `%dx' due to `l'
suffix
> /tmp/cckXXPVO.s:1639: Warning: using `%edx' instead of `%dx' due to `l'
suffix
.
.
.
------------------------------
From: "Harold" <[EMAIL PROTECTED]>
Subject: Re: Kernel source browser
Date: Thu, 20 Apr 2000 09:03:33 +0800
http://metalab.unc.edu/linux-source/
root <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Does anyone know where I can find a good application or website which
> maps out the Linux source code. I keep hearing that one exists but I
> can't find it.
>
> Thanks.
>
> Chris
>
------------------------------
From: Scott Sexton <[EMAIL PROTECTED]>
Subject: Re: Overlay filesystem (aka union, translucent, inheriting)?
Date: Thu, 20 Apr 2000 01:43:02 GMT
I also am searching for a best way to do this. I think we could do well
by exchanging email on our individual tests and sharing information.
I also have searched everywhere to find information on using the md
block device method, but could find nothing.
Have you checked out podfuk, FIST and userfs as Marc Schaefer suggested
in the forum reply yet?
I have downloaded podfuk and FIST, which look promising, but have not
tried them yet.
Do you know about demolinux.org. Their linux runs nicely on a cd without
touching your system. They have not documented their method yet and I
have not tried to dissect it, but perhaps they are using podfuk or FIST.
My email after removing the knowspam is: [EMAIL PROTECTED]
Scott
In article <[EMAIL PROTECTED]>,
Thomas Steffen <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I need an overlay filesystem for Linux. This means I can mount a ro
> filesystem as a "base", and overlay changes on a separate rw
> filesystem, which takes precedence over the ro files. This basically
> makes a ro filesystem editable.
>
> The reason is, that I want to make a live filesystem on CD, and I do
> not want to rely on a filesystem on the hd or on a big ramdisk. Now
> some files in /etc have to be writable, and some files may have to be
> changed (depending on the configuration).
>
> I can see several possible solutions, but none of them seems to be
> "right":
>
> * userfs and inheriting fs are long dead, ovlfs since nearly 2 years.
>
> * md is rumoured to do this on a block device level, but I could find
> a mention in the documentation. Using the block level would mean
> that no changes to the ro-device can be made at all without losing
> the rw-data.
>
> * amd and the am-utils do this on a directory level (mount-type
> union), but it is neither recursive nor browsable nor flexible
> enough (eg you can't edit ro files, you can only create new rw
> files).
>
> * coda might have this functionality, but it is overkill, and again I
> couldn't find it in the documention.
>
> * next best thing: symlink the files that have to be editable out of
> the ro filesystem. This is very unflexible and a lot of work, but
> maybe an option.
>
> * if nothing helps: mount /etc and /var from a ramdisk. unfortunately,
> this would need a significant amount of ram. But if it can be
> swapped out, this could be viable.
>
> Oppinions, remarks, ideas how to solve the problem?
>
> I would really appreciate if someone could revive ovlfs. This would
> be the perfect solution :-) I thing this problem also exists for
> diskless station with a shared image.
>
> Thomas
>
--
Scott Sexton
http://instantlinux.org
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: "Harold" <[EMAIL PROTECTED]>
Subject: Is there any reference about how to proceed i2c operations?
Date: Thu, 20 Apr 2000 11:19:32 +0800
This is a multi-part message in MIME format.
=======_NextPart_000_0007_01BFAABA.4D34AD00
Content-Type: text/plain;
charset="gb2312"
Content-Transfer-Encoding: quoted-printable
Untitled Document
==========================================================================
=======
Welcome to my linux page:
Linux Paradise (under construction)
BTW: Because my job is so busy, I=20
want some friend to maintain this=20
site with me together, please give=20
me some suggestion.
Thanks.=20
=======_NextPart_000_0007_01BFAABA.4D34AD00
Content-Type: text/html;
charset="gb2312"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Untitled Document</TITLE>
<META content=3D"text/html; charset=3Dgb2312" =
http-equiv=3DContent-Type><BASE=20
href=3Dfile://C:\WIN98\Desktop\>
<META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV> </DIV>
<HR>
<BR>
<P>Welcome to my linux page:<BR><A href=3D"http://hyang.uhome.net"=20
target=3D_blank>Linux Paradise</A> (under construction)<BR>BTW: Because =
my job is=20
so busy, I <BR>want some friend to maintain this <BR>site with me =
together,=20
please give <BR>me some suggestion.<BR>Thanks. </P></BODY></HTML>
=======_NextPart_000_0007_01BFAABA.4D34AD00==
------------------------------
From: Daniel Sands <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development,comp.os.linux.development.apps
Subject: Re: Problem with glibc v2.1.3 and _xstat.
Date: Wed, 19 Apr 2000 21:29:16 -0600
> > When Apache loads it complains that it can't load the php support
> > library (a .so file) and exits. The reason: "unresolved symbol _xstat".
> > My workaround is to disable php support for now.
>
> > I remember reading something about this _xstat issue in one of the
> > documents I reviewed before doing this installation. However, I can't
> > seem to locate that information now. It's not in the FAQ and it's not in
> > the INSTALL file. I just don't know where I saw it. Does anyone know
> > what the story is with _xstat and glibc v2.1.3?
>
> 17. ``Looking through the shared libc file I haven't found the
> functions `stat', `lstat', `fstat', and `mknod' and while linking on
> my Linux system I get error messages. How is this supposed to work?''
>
>
> {RM} Believe it or not, stat and lstat (and fstat, and mknod) are
> supposed to be undefined references in libc.so.6! Your problem is
> probably a missing or incorrect /usr/lib/libc.so file; note that this
> is a small text file now, not a symlink to libc.so.6. It should look
> something like this:
> This does also include _xstat. Try recompiling Apache, and you
> should be good to go. Don't forget to recompile the module as well.
Still doesn't work. _xstat, _fxstat, _lxstat, and their 64-bit versions are
not listed as globals in libc.map. So they are inserted into the library as
locals instead of weak references. Is this intended?
------------------------------
From: "Harold" <[EMAIL PROTECTED]>
Subject: where can i find a kernel debugger?
Date: Thu, 20 Apr 2000 11:35:07 +0800
This is a multi-part message in MIME format.
=======_NextPart_000_004B_01BFAABC.7A2E6E20
Content-Type: text/plain;
charset="gb2312"
Content-Transfer-Encoding: quoted-printable
Untitled Document
==========================================================================
=======
Welcome to my linux page:
Linux Paradise (under construction)
BTW: Because my job is so busy, I=20
want some friend to maintain this=20
site with me together, please give=20
me some suggestion.
Thanks.=20
=======_NextPart_000_004B_01BFAABC.7A2E6E20
Content-Type: text/html;
charset="gb2312"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Untitled Document</TITLE>
<META content=3D"text/html; charset=3Dgb2312" =
http-equiv=3DContent-Type><BASE=20
href=3Dfile://C:\WIN98\Desktop\>
<META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV> </DIV>
<HR>
<BR>
<P>Welcome to my linux page:<BR><A href=3D"http://hyang.uhome.net"=20
target=3D_blank>Linux Paradise</A> (under construction)<BR>BTW: Because =
my job is=20
so busy, I <BR>want some friend to maintain this <BR>site with me =
together,=20
please give <BR>me some suggestion.<BR>Thanks. </P></BODY></HTML>
=======_NextPart_000_004B_01BFAABC.7A2E6E20==
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: porting....
Date: Thu, 20 Apr 2000 03:45:10 GMT
In article <OEnL4.193$[EMAIL PROTECTED]>,
[EMAIL PROTECTED] wrote:
> In article <8dk1sa$43v$[EMAIL PROTECTED]>,
> [EMAIL PROTECTED] writes:
> > Hello all,
> >
> > I'm about to take on the huge task of attempting to port Linux to a
new
> > (currently unsupported) platform. The target is MIPS-based, so I
was
> > hoping I might be able to snag some of the existing code in
arch/mips...
>
> Which MIPS are you using? I'm working on the NEC Vr4121. I still
have a bug
> in the TLB code so it's not ready for primetime yet.
The target is a MIPS R5000 series. The TLB should be compatible with
the R4000's (I think...).
> The most important thing to understand about the MIPS kernel code
is that it
> hasn't been updated since something like 2.0.35! 'make xconfig' won't
even
> work out of the box. Cobalt Micro has newer versions on their website
but they
> haven't gotten merged back into the main kernel sources. The stuff on
SGI's
> site haven't been update in about two years (for MIPS based stuff).
How wonderful! ;)
> > I really haven't the faintest idea of where to start, as I'm not
much
> > of a kernel hacker, so any FAQ, HOWTO, book, webpage, or even
scribble
> > on a restaurant napkin would be helpful.
>
> Here's the order I tackled things in: (I'm using 2.2.14 BTW)
*nod* I'm working with 2.2.14 as well.
> 1) get 'make xconfig' to work
Right.
> 2) get gcc to cross compile for the MIPS, little endian in my case
(all the
> existing MIPS kernel code assumes big endian!)
Actually, I have compilers for my target already. I definitely won't
be building a kernel on the target once I have it running... so if I
need to make any changes, I can do it on the PC.
> 3) create a arch/mips/<your codename> directory, Look at the jazz
and baget
> directories for examples of useful code. (Skip the DEC and SGI ones!)
Yep, been poking through there... thanks. :)
> 4) see if you can get a minimal vmlinux to compile. By minimal, I
mean
> nothing but a serial console in it!
*nod* Sounds like what I planned. Although this brings up a question -
- what does the low-level driver portion of the kernel assume about the
target hardware's I/O ports? My target doesn't have any serial
support, and I'm certainly sure LW/SW ops that are memory-mapped to
ports are not the same as on my target. Fortunately, I can do printf()
s and reroute stuff to the PC...
> 5) get a boot loader of some sort to put the kernel in memory at
the right
> address (0x80000000). One with some rudimentary debugging commands
(like
> dumping memory) is real helpful. (Remember to change printk()'s
buffer from
> static to global so you can dump it's contents when the kernel panics
early
> on.)
Good idea.
> 6) Get the console output to work. you can move the console init
call up
> quite a few steps in main().
I assume printf() for me would work here...
> 7) Get the RTC to work so you can calculate Bogomips! that'll
impress your
> boss that things are coming along.
Teehee! That'll be fairly easy.
> 8) Verify that the memory caches are working. It's really hairy
code. You
> may luck out and be able to use an existing set of code.
Yikes. Ok.
> 9) About this time, you should be getting to where the kernel looks
for
> something to exec. Figure out how to make a ramdisk with just a shell
in it.
> This will require you to cross compile libc (a really FUN exercise!)
and bash.
> Get the kernel to mount the ramdisk and load the shell.
I've actually done this in the past. Shouldn't be too bad (I hope).
> 10) ??? This is as far as I've gotten. At this point, I'm loading
the 4121's
> TLB with the wrong value and then the kernel writes over itsself. I
haven't
> been able to figure out what the correct values for the TLB entries
should be.
This is what I'm really worried about -- but I suppose getting console
output is a big milestone anyway, so I'll put that off to the back
burner for now.
> > Any experts out there have any suggestions as to what I need to
change
> > to get it working?
>
> Processors! :-)
>
> Good luck!
Thanks for your help, much appreciated.
> Mike McDonald
> [EMAIL PROTECTED]
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
** FOR YOUR REFERENCE **
The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:
Internet: [EMAIL PROTECTED]
You can send mail to the entire list (and comp.os.linux.development.system) via:
Internet: [EMAIL PROTECTED]
Linux may be obtained via one of these FTP sites:
ftp.funet.fi pub/Linux
tsx-11.mit.edu pub/linux
sunsite.unc.edu pub/Linux
End of Linux-Development-System Digest
******************************