* RE: After Uncompresseing Linux..., what's next
@ 2002-12-19 16:10 James Don
2002-12-19 16:39 ` Tom Rini
2002-12-20 16:14 ` Prakash kanthi
0 siblings, 2 replies; 26+ messages in thread
From: James Don @ 2002-12-19 16:10 UTC (permalink / raw)
To: 'Prakash kanthi', LinuxPPC
I just went thru this myself ... ;-)
1.) Get a BDM/JTAG tool look halt the processor after you see " Now booting
the kernel" and look for valid asm at 0x0 ... make sure it mathes your
start.s file ...
2.) Veryfy you have your mem map from ppcboot matching requirements for the
kernel i.e ram (physical=0x0, virtual=0xc0000000) and immr (phys 0xff000000
virtual 0xff000000) ... I had my immr in ppc boot at 0x02200000 this screwed
me for quite a while ... otherwise you have no printk ... the memory map is
very important not to screw with some things depend on it (unless your
careful) ...
3.) verify you SMC1 (uart) is getting proper clocking config ... i.e
bus->brg1 and brg1 is 16 times baud rate ... otherwise you have no printk
4.) and always always keep in mind your RAM refesh could be wrong ...
everyone will tell you this even when it has nothing to do with your problem
... try not to ignore them if you are still stuck ;-) But verifying step 1
should prove your ok ...
Best of luck,
Jim
-----Original Message-----
From: Prakash kanthi [mailto:pkanthi@yahoo.com]
Sent: Wednesday, December 18, 2002 7:14 PM
To: LinuxPPC
Subject: After Uncompresseing Linux..., what's next
Hi there,
I was trying to load linuxppc_2_4_devel onto my board.
It goes through the board info read, UART init and
Uncompressing the linux kernel. But after that, i do
not see any messages and board hangs.
Here is the UART output:
------------------------------------
OS Booting...
loaded at: 00400000 0060D1CC
board data at: 00000030 00000044
relocated to: 00405C24 00405C38
zimage at: 00406290 004A08FF
initrd at: 004A1000 006097CA
avail ram: 0060E000 007F8000
Linux/PPC load: console=ttyS0,9600 console=tty1 ip=on
root=/dev/xsysace/disc0/pa
rt3 rw
Uncompressing Linux...done.
Now booting the kernel
-------------------------------------------
After the last line, it hangs. I get a feeling that,
the uncompressing process is not writing in the memory
starting from 0x00000000 and, after uncompressing, it
is jumping into 0x00000000 and is not able to find
anything.
My questions are,
1. How can i make sure that, the uncompressing process
is going to start writing the data from 0x00000000.
2. How big a space this uncompressing process needs?
And also how much overall memory is required for
running linux. I just have 8MB SDRAM.
3. What is the next step in the booting process? Which
Device (eth, pci, ide, ???) Initialization?
Your help is appreciated.
thanks,
Prakash
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: After Uncompresseing Linux..., what's next
2002-12-19 16:10 After Uncompresseing Linux..., what's next James Don
@ 2002-12-19 16:39 ` Tom Rini
2002-12-20 16:14 ` Prakash kanthi
1 sibling, 0 replies; 26+ messages in thread
From: Tom Rini @ 2002-12-19 16:39 UTC (permalink / raw)
To: James Don; +Cc: 'Prakash kanthi', LinuxPPC
On Thu, Dec 19, 2002 at 11:10:41AM -0500, James Don wrote:
> 2.) Veryfy you have your mem map from ppcboot matching requirements for the
> kernel i.e ram (physical=0x0, virtual=0xc0000000) and immr (phys 0xff000000
> virtual 0xff000000) ... I had my immr in ppc boot at 0x02200000 this screwed
> me for quite a while ... otherwise you have no printk ... the memory map is
> very important not to screw with some things depend on it (unless your
> careful) ...
>
> 3.) verify you SMC1 (uart) is getting proper clocking config ... i.e
> bus->brg1 and brg1 is 16 times baud rate ... otherwise you have no printk
That's all 8xx-specific isn't it 'tho? It looks like this is a Xilinx
ML300 board, and thus a '40x'.
--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 26+ messages in thread
* After Uncompresseing Linux..., what's next
2002-12-19 16:10 After Uncompresseing Linux..., what's next James Don
2002-12-19 16:39 ` Tom Rini
@ 2002-12-20 16:14 ` Prakash kanthi
2002-12-20 16:32 ` Prakash kanthi
` (3 more replies)
1 sibling, 4 replies; 26+ messages in thread
From: Prakash kanthi @ 2002-12-20 16:14 UTC (permalink / raw)
To: LinuxPPC
Folks,
I just wanted to provide more info on my env. I have
PPC405 based board with no network support forcing me
to use zImage.initrd.elf.
Can you suggest more on my problem described below? I
saw the memory values at 0x00000000 onwards after
uncompressing linux and they have changed. But when
the control jumps to 0x0, my board hangs. I see that
ESR is showing a value of 0x80000000, meaning either
illegal instruction or Machine Check.
Can you tell what's going on? What happens next after
uncompressing? I am thinking it executes start_kernel
function which calls lock_kernel. Let me know if i am
wrong.
thanks,
Prakash
--- James Don <JDon@spacebridge.com> wrote:
> I just went thru this myself ... ;-)
>
> 1.) Get a BDM/JTAG tool look halt the processor
> after you see " Now booting
> the kernel" and look for valid asm at 0x0 ... make
> sure it mathes your
> start.s file ...
>
> 2.) Veryfy you have your mem map from ppcboot
> matching requirements for the
> kernel i.e ram (physical=0x0, virtual=0xc0000000)
> and immr (phys 0xff000000
> virtual 0xff000000) ... I had my immr in ppc boot at
> 0x02200000 this screwed
> me for quite a while ... otherwise you have no
> printk ... the memory map is
> very important not to screw with some things depend
> on it (unless your
> careful) ...
>
> 3.) verify you SMC1 (uart) is getting proper
> clocking config ... i.e
> bus->brg1 and brg1 is 16 times baud rate ...
> otherwise you have no printk
>
> 4.) and always always keep in mind your RAM refesh
> could be wrong ...
> everyone will tell you this even when it has nothing
> to do with your problem
> ... try not to ignore them if you are still stuck
> ;-) But verifying step 1
> should prove your ok ...
>
> Best of luck,
> Jim
>
>
> -----Original Message-----
> From: Prakash kanthi [mailto:pkanthi@yahoo.com]
> Sent: Wednesday, December 18, 2002 7:14 PM
> To: LinuxPPC
> Subject: After Uncompresseing Linux..., what's next
>
>
> Hi there,
>
> I was trying to load linuxppc_2_4_devel onto my
> board.
> It goes through the board info read, UART init and
> Uncompressing the linux kernel. But after that, i do
> not see any messages and board hangs.
>
> Here is the UART output:
> ------------------------------------
> OS Booting...
>
> loaded at: 00400000 0060D1CC
> board data at: 00000030 00000044
> relocated to: 00405C24 00405C38
> zimage at: 00406290 004A08FF
> initrd at: 004A1000 006097CA
> avail ram: 0060E000 007F8000
>
> Linux/PPC load: console=ttyS0,9600 console=tty1
> ip=on
> root=/dev/xsysace/disc0/pa
> rt3 rw
> Uncompressing Linux...done.
> Now booting the kernel
> -------------------------------------------
>
> After the last line, it hangs. I get a feeling that,
> the uncompressing process is not writing in the
> memory
> starting from 0x00000000 and, after uncompressing,
> it
> is jumping into 0x00000000 and is not able to find
> anything.
>
> My questions are,
> 1. How can i make sure that, the uncompressing
> process
> is going to start writing the data from 0x00000000.
>
> 2. How big a space this uncompressing process needs?
> And also how much overall memory is required for
> running linux. I just have 8MB SDRAM.
>
> 3. What is the next step in the booting process?
> Which
> Device (eth, pci, ide, ???) Initialization?
>
> Your help is appreciated.
>
> thanks,
> Prakash
>
>
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: After Uncompresseing Linux..., what's next
2002-12-20 16:14 ` Prakash kanthi
@ 2002-12-20 16:32 ` Prakash kanthi
2002-12-20 16:49 ` Jim Potter
2002-12-20 16:38 ` Gary Thomas
` (2 subsequent siblings)
3 siblings, 1 reply; 26+ messages in thread
From: Prakash kanthi @ 2002-12-20 16:32 UTC (permalink / raw)
To: LinuxPPC
I found the correct exception guys. It means
Privileged Instruction Exception.
--- Prakash kanthi <pkanthi@yahoo.com> wrote:
>
> Folks,
>
> I just wanted to provide more info on my env. I have
> PPC405 based board with no network support forcing
> me
> to use zImage.initrd.elf.
>
> Can you suggest more on my problem described below?
> I
> saw the memory values at 0x00000000 onwards after
> uncompressing linux and they have changed. But when
> the control jumps to 0x0, my board hangs. I see that
> ESR is showing a value of 0x80000000, meaning either
> illegal instruction or Machine Check.
>
> Can you tell what's going on? What happens next
> after
> uncompressing? I am thinking it executes
> start_kernel
> function which calls lock_kernel. Let me know if i
> am
> wrong.
>
> thanks,
> Prakash
>
>
>
>
> --- James Don <JDon@spacebridge.com> wrote:
> > I just went thru this myself ... ;-)
> >
> > 1.) Get a BDM/JTAG tool look halt the processor
> > after you see " Now booting
> > the kernel" and look for valid asm at 0x0 ... make
> > sure it mathes your
> > start.s file ...
> >
> > 2.) Veryfy you have your mem map from ppcboot
> > matching requirements for the
> > kernel i.e ram (physical=0x0, virtual=0xc0000000)
> > and immr (phys 0xff000000
> > virtual 0xff000000) ... I had my immr in ppc boot
> at
> > 0x02200000 this screwed
> > me for quite a while ... otherwise you have no
> > printk ... the memory map is
> > very important not to screw with some things
> depend
> > on it (unless your
> > careful) ...
> >
> > 3.) verify you SMC1 (uart) is getting proper
> > clocking config ... i.e
> > bus->brg1 and brg1 is 16 times baud rate ...
> > otherwise you have no printk
> >
> > 4.) and always always keep in mind your RAM refesh
> > could be wrong ...
> > everyone will tell you this even when it has
> nothing
> > to do with your problem
> > ... try not to ignore them if you are still stuck
> > ;-) But verifying step 1
> > should prove your ok ...
> >
> > Best of luck,
> > Jim
> >
> >
> > -----Original Message-----
> > From: Prakash kanthi [mailto:pkanthi@yahoo.com]
> > Sent: Wednesday, December 18, 2002 7:14 PM
> > To: LinuxPPC
> > Subject: After Uncompresseing Linux..., what's
> next
> >
> >
> > Hi there,
> >
> > I was trying to load linuxppc_2_4_devel onto my
> > board.
> > It goes through the board info read, UART init and
> > Uncompressing the linux kernel. But after that, i
> do
> > not see any messages and board hangs.
> >
> > Here is the UART output:
> > ------------------------------------
> > OS Booting...
> >
> > loaded at: 00400000 0060D1CC
> > board data at: 00000030 00000044
> > relocated to: 00405C24 00405C38
> > zimage at: 00406290 004A08FF
> > initrd at: 004A1000 006097CA
> > avail ram: 0060E000 007F8000
> >
> > Linux/PPC load: console=ttyS0,9600 console=tty1
> > ip=on
> > root=/dev/xsysace/disc0/pa
> > rt3 rw
> > Uncompressing Linux...done.
> > Now booting the kernel
> > -------------------------------------------
> >
> > After the last line, it hangs. I get a feeling
> that,
> > the uncompressing process is not writing in the
> > memory
> > starting from 0x00000000 and, after uncompressing,
> > it
> > is jumping into 0x00000000 and is not able to find
> > anything.
> >
> > My questions are,
> > 1. How can i make sure that, the uncompressing
> > process
> > is going to start writing the data from
> 0x00000000.
> >
> > 2. How big a space this uncompressing process
> needs?
> > And also how much overall memory is required for
> > running linux. I just have 8MB SDRAM.
> >
> > 3. What is the next step in the booting process?
> > Which
> > Device (eth, pci, ide, ???) Initialization?
> >
> > Your help is appreciated.
> >
> > thanks,
> > Prakash
> >
> >
>
>
>
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: After Uncompresseing Linux..., what's next
2002-12-20 16:14 ` Prakash kanthi
2002-12-20 16:32 ` Prakash kanthi
@ 2002-12-20 16:38 ` Gary Thomas
2002-12-20 16:48 ` Prakash kanthi
2002-12-20 16:47 ` Jim Potter
2002-12-26 22:47 ` Smallest Initrd (ram disk) Prakash kanthi
3 siblings, 1 reply; 26+ messages in thread
From: Gary Thomas @ 2002-12-20 16:38 UTC (permalink / raw)
To: Prakash kanthi; +Cc: linuxppc embedded
On Fri, 2002-12-20 at 09:14, Prakash kanthi wrote:
>
> Folks,
>
> I just wanted to provide more info on my env. I have
> PPC405 based board with no network support forcing me
> to use zImage.initrd.elf.
>
> Can you suggest more on my problem described below? I
> saw the memory values at 0x00000000 onwards after
> uncompressing linux and they have changed. But when
> the control jumps to 0x0, my board hangs. I see that
> ESR is showing a value of 0x80000000, meaning either
> illegal instruction or Machine Check.
>
> Can you tell what's going on? What happens next after
> uncompressing? I am thinking it executes start_kernel
> function which calls lock_kernel. Let me know if i am
> wrong.
>
A *lot* happens, even before the first "printk"!
At the point where the kernel is being started, all that
has happened is the basic image has been loaded to low
memory. The kernel then needs to set up the memory management
(to map things the way it wants to), then perform quite a
lot of initialization, then start up the generic kernel
which will then do things like initialize devices, etc.
Since you just say you have a board (and don't name it),
I assume that you are porting Linux yourself. In this case,
you'll either need some tools (like the BDI already mentioned)
or a lot of patience. You'll need to look at how the kernel
is trying to do its work, at least to the point where you can
get to the first "printk" (which comes during the memory 'find'
sequence on the PPC in arch/ppc/mm/ppc_mmu.c). Once you get
this far, and printk is working, you can then move on and find
out what else needs to be done.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: After Uncompresseing Linux..., what's next
2002-12-20 16:14 ` Prakash kanthi
2002-12-20 16:32 ` Prakash kanthi
2002-12-20 16:38 ` Gary Thomas
@ 2002-12-20 16:47 ` Jim Potter
2002-12-26 22:47 ` Smallest Initrd (ram disk) Prakash kanthi
3 siblings, 0 replies; 26+ messages in thread
From: Jim Potter @ 2002-12-20 16:47 UTC (permalink / raw)
To: Prakash kanthi; +Cc: LinuxPPC
Actually it executes quite a lot of code in head.S, before it gets to
start_kernel. Check to see if you can find out exactly where the problem
occurs (for example, on the 74xx cpus, registers SRR0 & SRR1 have this info).
> Folks,
>
> I just wanted to provide more info on my env. I have
> PPC405 based board with no network support forcing me
> to use zImage.initrd.elf.
>
> Can you suggest more on my problem described below? I
> saw the memory values at 0x00000000 onwards after
> uncompressing linux and they have changed. But when
> the control jumps to 0x0, my board hangs. I see that
> ESR is showing a value of 0x80000000, meaning either
> illegal instruction or Machine Check.
>
> Can you tell what's going on? What happens next after
> uncompressing? I am thinking it executes start_kernel
> function which calls lock_kernel. Let me know if i am
> wrong.
>
> thanks,
> Prakash
>
> --- James Don <JDon@spacebridge.com> wrote:
> > I just went thru this myself ... ;-)
> >
> > 1.) Get a BDM/JTAG tool look halt the processor
> > after you see " Now booting
> > the kernel" and look for valid asm at 0x0 ... make
> > sure it mathes your
> > start.s file ...
> >
> > 2.) Veryfy you have your mem map from ppcboot
> > matching requirements for the
> > kernel i.e ram (physical=0x0, virtual=0xc0000000)
> > and immr (phys 0xff000000
> > virtual 0xff000000) ... I had my immr in ppc boot at
> > 0x02200000 this screwed
> > me for quite a while ... otherwise you have no
> > printk ... the memory map is
> > very important not to screw with some things depend
> > on it (unless your
> > careful) ...
> >
> > 3.) verify you SMC1 (uart) is getting proper
> > clocking config ... i.e
> > bus->brg1 and brg1 is 16 times baud rate ...
> > otherwise you have no printk
> >
> > 4.) and always always keep in mind your RAM refesh
> > could be wrong ...
> > everyone will tell you this even when it has nothing
> > to do with your problem
> > ... try not to ignore them if you are still stuck
> > ;-) But verifying step 1
> > should prove your ok ...
> >
> > Best of luck,
> > Jim
> >
> >
> > -----Original Message-----
> > From: Prakash kanthi [mailto:pkanthi@yahoo.com]
> > Sent: Wednesday, December 18, 2002 7:14 PM
> > To: LinuxPPC
> > Subject: After Uncompresseing Linux..., what's next
> >
> >
> > Hi there,
> >
> > I was trying to load linuxppc_2_4_devel onto my
> > board.
> > It goes through the board info read, UART init and
> > Uncompressing the linux kernel. But after that, i do
> > not see any messages and board hangs.
> >
> > Here is the UART output:
> > ------------------------------------
> > OS Booting...
> >
> > loaded at: 00400000 0060D1CC
> > board data at: 00000030 00000044
> > relocated to: 00405C24 00405C38
> > zimage at: 00406290 004A08FF
> > initrd at: 004A1000 006097CA
> > avail ram: 0060E000 007F8000
> >
> > Linux/PPC load: console=ttyS0,9600 console=tty1
> > ip=on
> > root=/dev/xsysace/disc0/pa
> > rt3 rw
> > Uncompressing Linux...done.
> > Now booting the kernel
> > -------------------------------------------
> >
> > After the last line, it hangs. I get a feeling that,
> > the uncompressing process is not writing in the
> > memory
> > starting from 0x00000000 and, after uncompressing,
> > it
> > is jumping into 0x00000000 and is not able to find
> > anything.
> >
> > My questions are,
> > 1. How can i make sure that, the uncompressing
> > process
> > is going to start writing the data from 0x00000000.
> >
> > 2. How big a space this uncompressing process needs?
> > And also how much overall memory is required for
> > running linux. I just have 8MB SDRAM.
> >
> > 3. What is the next step in the booting process?
> > Which
> > Device (eth, pci, ide, ???) Initialization?
> >
> > Your help is appreciated.
> >
> > thanks,
> > Prakash
> >
> >
>
--
Sincerely,
Jim Potter
45th Parallel Processing
Firefighting: Bustin' ours, Savin' yours.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: After Uncompresseing Linux..., what's next
2002-12-20 16:38 ` Gary Thomas
@ 2002-12-20 16:48 ` Prakash kanthi
2002-12-20 16:52 ` Gary Thomas
0 siblings, 1 reply; 26+ messages in thread
From: Prakash kanthi @ 2002-12-20 16:48 UTC (permalink / raw)
To: Gary Thomas; +Cc: linuxppc embedded
I do have xilinx tools and i am working with their V2P
product. I completely understands what you are said.
But the problem is, right after the uncompression and
cpy to 0x00000000, i loose total control because i
don't have any clue what is getting executed.
And also, i have my boot monitor code at 0x00000000,
before uncompress process overwrites it. I see that
some of that code is getting executed after jump to
0x0. I reason i am overwriting 0x0 is because, i only
have 8MB RAM.
thanks,
Prakash
--- Gary Thomas <gary@chez-thomas.org> wrote:
> On Fri, 2002-12-20 at 09:14, Prakash kanthi wrote:
> >
> > Folks,
> >
> > I just wanted to provide more info on my env. I
> have
> > PPC405 based board with no network support forcing
> me
> > to use zImage.initrd.elf.
> >
> > Can you suggest more on my problem described
> below? I
> > saw the memory values at 0x00000000 onwards after
> > uncompressing linux and they have changed. But
> when
> > the control jumps to 0x0, my board hangs. I see
> that
> > ESR is showing a value of 0x80000000, meaning
> either
> > illegal instruction or Machine Check.
> >
> > Can you tell what's going on? What happens next
> after
> > uncompressing? I am thinking it executes
> start_kernel
> > function which calls lock_kernel. Let me know if i
> am
> > wrong.
> >
>
> A *lot* happens, even before the first "printk"!
>
> At the point where the kernel is being started, all
> that
> has happened is the basic image has been loaded to
> low
> memory. The kernel then needs to set up the memory
> management
> (to map things the way it wants to), then perform
> quite a
> lot of initialization, then start up the generic
> kernel
> which will then do things like initialize devices,
> etc.
>
> Since you just say you have a board (and don't name
> it),
> I assume that you are porting Linux yourself. In
> this case,
> you'll either need some tools (like the BDI already
> mentioned)
> or a lot of patience. You'll need to look at how
> the kernel
> is trying to do its work, at least to the point
> where you can
> get to the first "printk" (which comes during the
> memory 'find'
> sequence on the PPC in arch/ppc/mm/ppc_mmu.c). Once
> you get
> this far, and printk is working, you can then move
> on and find
> out what else needs to be done.
>
>
>
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: After Uncompresseing Linux..., what's next
2002-12-20 16:32 ` Prakash kanthi
@ 2002-12-20 16:49 ` Jim Potter
2002-12-20 17:02 ` Jim Potter
0 siblings, 1 reply; 26+ messages in thread
From: Jim Potter @ 2002-12-20 16:49 UTC (permalink / raw)
To: Prakash kanthi; +Cc: LinuxPPC
The early code needs to perform many privileged instructions; make sure that
you aren't restricting the cpu to only user instructions.
> I found the correct exception guys. It means
> Privileged Instruction Exception.
>
> --- Prakash kanthi <pkanthi@yahoo.com> wrote:
> >
> > Folks,
> >
> > I just wanted to provide more info on my env. I have
> > PPC405 based board with no network support forcing
> > me
> > to use zImage.initrd.elf.
> >
> > Can you suggest more on my problem described below?
> > I
> > saw the memory values at 0x00000000 onwards after
> > uncompressing linux and they have changed. But when
> > the control jumps to 0x0, my board hangs. I see that
> > ESR is showing a value of 0x80000000, meaning either
> > illegal instruction or Machine Check.
> >
> > Can you tell what's going on? What happens next
> > after
> > uncompressing? I am thinking it executes
> > start_kernel
> > function which calls lock_kernel. Let me know if i
> > am
> > wrong.
> >
> > thanks,
> > Prakash
> >
> >
> >
> >
> > --- James Don <JDon@spacebridge.com> wrote:
> > > I just went thru this myself ... ;-)
> > >
> > > 1.) Get a BDM/JTAG tool look halt the processor
> > > after you see " Now booting
> > > the kernel" and look for valid asm at 0x0 ... make
> > > sure it mathes your
> > > start.s file ...
> > >
> > > 2.) Veryfy you have your mem map from ppcboot
> > > matching requirements for the
> > > kernel i.e ram (physical=0x0, virtual=0xc0000000)
> > > and immr (phys 0xff000000
> > > virtual 0xff000000) ... I had my immr in ppc boot
> > at
> > > 0x02200000 this screwed
> > > me for quite a while ... otherwise you have no
> > > printk ... the memory map is
> > > very important not to screw with some things
> > depend
> > > on it (unless your
> > > careful) ...
> > >
> > > 3.) verify you SMC1 (uart) is getting proper
> > > clocking config ... i.e
> > > bus->brg1 and brg1 is 16 times baud rate ...
> > > otherwise you have no printk
> > >
> > > 4.) and always always keep in mind your RAM refesh
> > > could be wrong ...
> > > everyone will tell you this even when it has
> > nothing
> > > to do with your problem
> > > ... try not to ignore them if you are still stuck
> > > ;-) But verifying step 1
> > > should prove your ok ...
> > >
> > > Best of luck,
> > > Jim
> > >
> > >
> > > -----Original Message-----
> > > From: Prakash kanthi [mailto:pkanthi@yahoo.com]
> > > Sent: Wednesday, December 18, 2002 7:14 PM
> > > To: LinuxPPC
> > > Subject: After Uncompresseing Linux..., what's
> > next
> > >
> > >
> > > Hi there,
> > >
> > > I was trying to load linuxppc_2_4_devel onto my
> > > board.
> > > It goes through the board info read, UART init and
> > > Uncompressing the linux kernel. But after that, i
> > do
> > > not see any messages and board hangs.
> > >
> > > Here is the UART output:
> > > ------------------------------------
> > > OS Booting...
> > >
> > > loaded at: 00400000 0060D1CC
> > > board data at: 00000030 00000044
> > > relocated to: 00405C24 00405C38
> > > zimage at: 00406290 004A08FF
> > > initrd at: 004A1000 006097CA
> > > avail ram: 0060E000 007F8000
> > >
> > > Linux/PPC load: console=ttyS0,9600 console=tty1
> > > ip=on
> > > root=/dev/xsysace/disc0/pa
> > > rt3 rw
> > > Uncompressing Linux...done.
> > > Now booting the kernel
> > > -------------------------------------------
> > >
> > > After the last line, it hangs. I get a feeling
> > that,
> > > the uncompressing process is not writing in the
> > > memory
> > > starting from 0x00000000 and, after uncompressing,
> > > it
> > > is jumping into 0x00000000 and is not able to find
> > > anything.
> > >
> > > My questions are,
> > > 1. How can i make sure that, the uncompressing
> > > process
> > > is going to start writing the data from
> > 0x00000000.
> > >
> > > 2. How big a space this uncompressing process
> > needs?
> > > And also how much overall memory is required for
> > > running linux. I just have 8MB SDRAM.
> > >
> > > 3. What is the next step in the booting process?
> > > Which
> > > Device (eth, pci, ide, ???) Initialization?
> > >
> > > Your help is appreciated.
> > >
> > > thanks,
> > > Prakash
> > >
> > >
> >
> >
> >
>
--
Sincerely,
Jim Potter
45th Parallel Processing
Firefighting: Bustin' ours, Savin' yours.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: After Uncompresseing Linux..., what's next
2002-12-20 16:48 ` Prakash kanthi
@ 2002-12-20 16:52 ` Gary Thomas
2002-12-20 17:06 ` Prakash kanthi
0 siblings, 1 reply; 26+ messages in thread
From: Gary Thomas @ 2002-12-20 16:52 UTC (permalink / raw)
To: Prakash kanthi; +Cc: linuxppc embedded
On Fri, 2002-12-20 at 09:48, Prakash kanthi wrote:
> I do have xilinx tools and i am working with their V2P
> product. I completely understands what you are said.
> But the problem is, right after the uncompression and
> cpy to 0x00000000, i loose total control because i
> don't have any clue what is getting executed.
>
What sort of things can you do with the Xilinx tools? Is
there any way to set [hardware] breakpoints or single step?
> And also, i have my boot monitor code at 0x00000000,
> before uncompress process overwrites it. I see that
> some of that code is getting executed after jump to
> 0x0. I reason i am overwriting 0x0 is because, i only
> have 8MB RAM.
>
8M should be plenty of RAM.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: After Uncompresseing Linux..., what's next
2002-12-20 16:49 ` Jim Potter
@ 2002-12-20 17:02 ` Jim Potter
0 siblings, 0 replies; 26+ messages in thread
From: Jim Potter @ 2002-12-20 17:02 UTC (permalink / raw)
To: Prakash kanthi, LinuxPPC
I'm not especially familiar with the 4xx cpus, but on the 74xx cpus the MSR
register has the "privilege level" bit, which determines if the processor can
execute both user- and supervisor-level instructions, or only user-level
instructions.
This needs to be setup by the bootloader to allow supervisor-level instructions
to be executed, else you'll see some errors.
> The early code needs to perform many privileged instructions; make sure that
> you aren't restricting the cpu to only user instructions.
>
> > I found the correct exception guys. It means
> > Privileged Instruction Exception.
> >
> > --- Prakash kanthi <pkanthi@yahoo.com> wrote:
> > >
> > > Folks,
> > >
> > > I just wanted to provide more info on my env. I have
> > > PPC405 based board with no network support forcing
> > > me
> > > to use zImage.initrd.elf.
> > >
> > > Can you suggest more on my problem described below?
> > > I
> > > saw the memory values at 0x00000000 onwards after
> > > uncompressing linux and they have changed. But when
> > > the control jumps to 0x0, my board hangs. I see that
> > > ESR is showing a value of 0x80000000, meaning either
> > > illegal instruction or Machine Check.
> > >
> > > Can you tell what's going on? What happens next
> > > after
> > > uncompressing? I am thinking it executes
> > > start_kernel
> > > function which calls lock_kernel. Let me know if i
> > > am
> > > wrong.
> > >
> > > thanks,
> > > Prakash
> > >
> > >
> > >
> > >
> > > --- James Don <JDon@spacebridge.com> wrote:
> > > > I just went thru this myself ... ;-)
> > > >
> > > > 1.) Get a BDM/JTAG tool look halt the processor
> > > > after you see " Now booting
> > > > the kernel" and look for valid asm at 0x0 ... make
> > > > sure it mathes your
> > > > start.s file ...
> > > >
> > > > 2.) Veryfy you have your mem map from ppcboot
> > > > matching requirements for the
> > > > kernel i.e ram (physical=0x0, virtual=0xc0000000)
> > > > and immr (phys 0xff000000
> > > > virtual 0xff000000) ... I had my immr in ppc boot
> > > at
> > > > 0x02200000 this screwed
> > > > me for quite a while ... otherwise you have no
> > > > printk ... the memory map is
> > > > very important not to screw with some things
> > > depend
> > > > on it (unless your
> > > > careful) ...
> > > >
> > > > 3.) verify you SMC1 (uart) is getting proper
> > > > clocking config ... i.e
> > > > bus->brg1 and brg1 is 16 times baud rate ...
> > > > otherwise you have no printk
> > > >
> > > > 4.) and always always keep in mind your RAM refesh
> > > > could be wrong ...
> > > > everyone will tell you this even when it has
> > > nothing
> > > > to do with your problem
> > > > ... try not to ignore them if you are still stuck
> > > > ;-) But verifying step 1
> > > > should prove your ok ...
> > > >
> > > > Best of luck,
> > > > Jim
> > > >
> > > >
> > > > -----Original Message-----
> > > > From: Prakash kanthi [mailto:pkanthi@yahoo.com]
> > > > Sent: Wednesday, December 18, 2002 7:14 PM
> > > > To: LinuxPPC
> > > > Subject: After Uncompresseing Linux..., what's
> > > next
> > > >
> > > >
> > > > Hi there,
> > > >
> > > > I was trying to load linuxppc_2_4_devel onto my
> > > > board.
> > > > It goes through the board info read, UART init and
> > > > Uncompressing the linux kernel. But after that, i
> > > do
> > > > not see any messages and board hangs.
> > > >
> > > > Here is the UART output:
> > > > ------------------------------------
> > > > OS Booting...
> > > >
> > > > loaded at: 00400000 0060D1CC
> > > > board data at: 00000030 00000044
> > > > relocated to: 00405C24 00405C38
> > > > zimage at: 00406290 004A08FF
> > > > initrd at: 004A1000 006097CA
> > > > avail ram: 0060E000 007F8000
> > > >
> > > > Linux/PPC load: console=ttyS0,9600 console=tty1
> > > > ip=on
> > > > root=/dev/xsysace/disc0/pa
> > > > rt3 rw
> > > > Uncompressing Linux...done.
> > > > Now booting the kernel
> > > > -------------------------------------------
> > > >
> > > > After the last line, it hangs. I get a feeling
> > > that,
> > > > the uncompressing process is not writing in the
> > > > memory
> > > > starting from 0x00000000 and, after uncompressing,
> > > > it
> > > > is jumping into 0x00000000 and is not able to find
> > > > anything.
> > > >
> > > > My questions are,
> > > > 1. How can i make sure that, the uncompressing
> > > > process
> > > > is going to start writing the data from
> > > 0x00000000.
> > > >
> > > > 2. How big a space this uncompressing process
> > > needs?
> > > > And also how much overall memory is required for
> > > > running linux. I just have 8MB SDRAM.
> > > >
> > > > 3. What is the next step in the booting process?
> > > > Which
> > > > Device (eth, pci, ide, ???) Initialization?
> > > >
> > > > Your help is appreciated.
> > > >
> > > > thanks,
> > > > Prakash
> > > >
> > > >
> > >
> > >
> > >
> >
>
> --
> Sincerely,
>
> Jim Potter
> 45th Parallel Processing
>
> Firefighting: Bustin' ours, Savin' yours.
>
--
Sincerely,
Jim Potter
45th Parallel Processing
Firefighting: Bustin' ours, Savin' yours.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: After Uncompresseing Linux..., what's next
2002-12-20 16:52 ` Gary Thomas
@ 2002-12-20 17:06 ` Prakash kanthi
2002-12-20 17:22 ` Gary Thomas
2002-12-20 21:59 ` Serious Problem: " Prakash kanthi
0 siblings, 2 replies; 26+ messages in thread
From: Prakash kanthi @ 2002-12-20 17:06 UTC (permalink / raw)
To: Gary Thomas; +Cc: linuxppc embedded
Gary,
I really appreciate your help. Here is what i am
doing. Sorry it is little long. But was necessasry.
1. I have a boot loader(xrom.elf) of size around 400KB
which basically have menu driven tests along with an
option to jump to linux kernel(zImage.initrd.elf).
2. xrom.elf is compiled to start at 0xfffffffc and
jump to 0x00000000 to have rest of functionality.
zImage.initrd.elf is compiled to start at 0x00400000.
3. I load zImage.initrd.elf first and then xrom.elf
(xilinx tool makes sure that they are loaded to
corresponding locations based on ELF header).
4. After loading both, i start running xrom.elf and it
shows up a menu in my UART terminal. I jump to linux
(0x00400000).
5. I see that linux is basically reading the board
info, setting UART, prints some boot messages onto it
and then performs uncompression (gunzip function takes
the rest of linux image and puts the uncompressed code
starting from 0x0).
6. Up untill, everything is ok. After this, control
jumps to 0x0 and starts executing.
My problems are,
a. Once the uncompression process is done, i am not
sure if the image is copied to 0x0 (i do see value
changes in memory starting from 0x0).
b. As uncompression process is embedded into
zImage.initrd.elf, i do not objdump does not tell me
which function it is going to execute after
uncompression.
Please suggest.
Thanks,
Prakash
--- Gary Thomas <gary@chez-thomas.org> wrote:
> On Fri, 2002-12-20 at 09:48, Prakash kanthi wrote:
> > I do have xilinx tools and i am working with their
> V2P
> > product. I completely understands what you are
> said.
> > But the problem is, right after the uncompression
> and
> > cpy to 0x00000000, i loose total control because i
> > don't have any clue what is getting executed.
> >
>
> What sort of things can you do with the Xilinx
> tools? Is
> there any way to set [hardware] breakpoints or
> single step?
>
> > And also, i have my boot monitor code at
> 0x00000000,
> > before uncompress process overwrites it. I see
> that
> > some of that code is getting executed after jump
> to
> > 0x0. I reason i am overwriting 0x0 is because, i
> only
> > have 8MB RAM.
> >
>
> 8M should be plenty of RAM.
>
>
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: After Uncompresseing Linux..., what's next
2002-12-20 17:06 ` Prakash kanthi
@ 2002-12-20 17:22 ` Gary Thomas
2002-12-20 21:59 ` Serious Problem: " Prakash kanthi
1 sibling, 0 replies; 26+ messages in thread
From: Gary Thomas @ 2002-12-20 17:22 UTC (permalink / raw)
To: Prakash kanthi; +Cc: linuxppc embedded
On Fri, 2002-12-20 at 10:06, Prakash kanthi wrote:
>
> Gary,
>
> I really appreciate your help. Here is what i am
> doing. Sorry it is little long. But was necessasry.
>
> 1. I have a boot loader(xrom.elf) of size around 400KB
> which basically have menu driven tests along with an
> option to jump to linux kernel(zImage.initrd.elf).
>
> 2. xrom.elf is compiled to start at 0xfffffffc and
> jump to 0x00000000 to have rest of functionality.
> zImage.initrd.elf is compiled to start at 0x00400000.
>
> 3. I load zImage.initrd.elf first and then xrom.elf
> (xilinx tool makes sure that they are loaded to
> corresponding locations based on ELF header).
>
> 4. After loading both, i start running xrom.elf and it
> shows up a menu in my UART terminal. I jump to linux
> (0x00400000).
>
> 5. I see that linux is basically reading the board
> info, setting UART, prints some boot messages onto it
> and then performs uncompression (gunzip function takes
> the rest of linux image and puts the uncompressed code
> starting from 0x0).
>
This is just the secondary bootstrap, whose job is to
unpack the kernel image and put it at location 0x0.
> 6. Up untill, everything is ok. After this, control
> jumps to 0x0 and starts executing.
>
> My problems are,
>
> a. Once the uncompression process is done, i am not
> sure if the image is copied to 0x0 (i do see value
> changes in memory starting from 0x0).
> b. As uncompression process is embedded into
> zImage.initrd.elf, i do not objdump does not tell me
> which function it is going to execute after
> uncompression.
>
The code that executes first is found in arch/ppc/kernel/head.S
Try looking at it, and tracing the execution. If your hardware
(debug environment) can't do things like set breakpoints and
single step, then you're probably limited to very simple
debug techniques like leaving breadcrumbs (write some number
or pattern to a known location which hopefully you can look
at when it dies).
Also, as Jim Potter pointed out, the kernel needs to be started in
the most privileged execution mode since it will be taking
over the CPU completely.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 26+ messages in thread
* Serious Problem: After Uncompresseing Linux..., what's next
2002-12-20 17:06 ` Prakash kanthi
2002-12-20 17:22 ` Gary Thomas
@ 2002-12-20 21:59 ` Prakash kanthi
1 sibling, 0 replies; 26+ messages in thread
From: Prakash kanthi @ 2002-12-20 21:59 UTC (permalink / raw)
To: Gary Thomas; +Cc: linuxppc embedded
Hi Folks,
I think finally i have idea as to why boot process was
failing. After uncompressing linux image, the code
execution was aborting with an ESR value of
0x08000000, which stands for "ILLEGAL INSTRUCTION".
When i checked the instruction causing this, i figured
that, 'tlbia' (0x00002384) is the culprit. tlbia is a
valid instruction in PPC405 instruction set.
I still don;t understand, how come it is getting
rejected. Am i missing anything? Can anyone please
throw some light on this?
thanks,
Prakash
--- Prakash kanthi <pkanthi@yahoo.com> wrote:
>
> Gary,
>
> I really appreciate your help. Here is what i am
> doing. Sorry it is little long. But was necessasry.
>
> 1. I have a boot loader(xrom.elf) of size around
> 400KB
> which basically have menu driven tests along with an
> option to jump to linux kernel(zImage.initrd.elf).
>
> 2. xrom.elf is compiled to start at 0xfffffffc and
> jump to 0x00000000 to have rest of functionality.
> zImage.initrd.elf is compiled to start at
> 0x00400000.
>
> 3. I load zImage.initrd.elf first and then xrom.elf
> (xilinx tool makes sure that they are loaded to
> corresponding locations based on ELF header).
>
> 4. After loading both, i start running xrom.elf and
> it
> shows up a menu in my UART terminal. I jump to linux
> (0x00400000).
>
> 5. I see that linux is basically reading the board
> info, setting UART, prints some boot messages onto
> it
> and then performs uncompression (gunzip function
> takes
> the rest of linux image and puts the uncompressed
> code
> starting from 0x0).
>
> 6. Up untill, everything is ok. After this, control
> jumps to 0x0 and starts executing.
>
> My problems are,
>
> a. Once the uncompression process is done, i am not
> sure if the image is copied to 0x0 (i do see value
> changes in memory starting from 0x0).
> b. As uncompression process is embedded into
> zImage.initrd.elf, i do not objdump does not tell me
> which function it is going to execute after
> uncompression.
>
> Please suggest.
>
> Thanks,
> Prakash
>
>
>
>
>
> --- Gary Thomas <gary@chez-thomas.org> wrote:
> > On Fri, 2002-12-20 at 09:48, Prakash kanthi wrote:
> > > I do have xilinx tools and i am working with
> their
> > V2P
> > > product. I completely understands what you are
> > said.
> > > But the problem is, right after the
> uncompression
> > and
> > > cpy to 0x00000000, i loose total control because
> i
> > > don't have any clue what is getting executed.
> > >
> >
> > What sort of things can you do with the Xilinx
> > tools? Is
> > there any way to set [hardware] breakpoints or
> > single step?
> >
> > > And also, i have my boot monitor code at
> > 0x00000000,
> > > before uncompress process overwrites it. I see
> > that
> > > some of that code is getting executed after jump
> > to
> > > 0x0. I reason i am overwriting 0x0 is because, i
> > only
> > > have 8MB RAM.
> > >
> >
> > 8M should be plenty of RAM.
> >
> >
>
>
>
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Serious Problem: After Uncompresseing Linux..., what's next
@ 2002-12-23 8:35 Jaap-Jan Boor
0 siblings, 0 replies; 26+ messages in thread
From: Jaap-Jan Boor @ 2002-12-23 8:35 UTC (permalink / raw)
To: pkanthi; +Cc: linuxppc-embedded, gary
>
> Hi Folks,
>
> I think finally i have idea as to why boot process was
> failing. After uncompressing linux image, the code
> execution was aborting with an ESR value of
> 0x08000000, which stands for "ILLEGAL INSTRUCTION".
> When i checked the instruction causing this, i figured
> that, 'tlbia' (0x00002384) is the culprit. tlbia is a
> valid instruction in PPC405 instruction set.
>
> I still don;t understand, how come it is getting
> rejected. Am i missing anything? Can anyone please
> throw some light on this?
I don't know anything about your cpu (405) but make
sure you understand any prerequisites for the tlbia
instruction or what it's function is (may be your
instruction cache is totally invalid after this
instruction or your immu settings are not correct)
Jaap-Jan
>
> thanks,
> Prakash
>
>
>
>
> --- Prakash kanthi <pkanthi@yahoo.com> wrote:
> >
> > Gary,
> >
> > I really appreciate your help. Here is what i am
> > doing. Sorry it is little long. But was necessasry.
> >
> > 1. I have a boot loader(xrom.elf) of size around
> > 400KB
> > which basically have menu driven tests along with an
> > option to jump to linux kernel(zImage.initrd.elf).
> >
> > 2. xrom.elf is compiled to start at 0xfffffffc and
> > jump to 0x00000000 to have rest of functionality.
> > zImage.initrd.elf is compiled to start at
> > 0x00400000.
> >
> > 3. I load zImage.initrd.elf first and then xrom.elf
> > (xilinx tool makes sure that they are loaded to
> > corresponding locations based on ELF header).
> >
> > 4. After loading both, i start running xrom.elf and
> > it
> > shows up a menu in my UART terminal. I jump to linux
> > (0x00400000).
> >
> > 5. I see that linux is basically reading the board
> > info, setting UART, prints some boot messages onto
> > it
> > and then performs uncompression (gunzip function
> > takes
> > the rest of linux image and puts the uncompressed
> > code
> > starting from 0x0).
> >
> > 6. Up untill, everything is ok. After this, control
> > jumps to 0x0 and starts executing.
> >
> > My problems are,
> >
> > a. Once the uncompression process is done, i am not
> > sure if the image is copied to 0x0 (i do see value
> > changes in memory starting from 0x0).
> > b. As uncompression process is embedded into
> > zImage.initrd.elf, i do not objdump does not tell me
> > which function it is going to execute after
> > uncompression.
> >
> > Please suggest.
> >
> > Thanks,
> > Prakash
> >
> >
> >
> >
> >
> > --- Gary Thomas <gary@chez-thomas.org> wrote:
> > > On Fri, 2002-12-20 at 09:48, Prakash kanthi wrote:
> > > > I do have xilinx tools and i am working with
> > their
> > > V2P
> > > > product. I completely understands what you are
> > > said.
> > > > But the problem is, right after the
> > uncompression
> > > and
> > > > cpy to 0x00000000, i loose total control because
> > i
> > > > don't have any clue what is getting executed.
> > > >
> > >
> > > What sort of things can you do with the Xilinx
> > > tools? Is
> > > there any way to set [hardware] breakpoints or
> > > single step?
> > >
> > > > And also, i have my boot monitor code at
> > > 0x00000000,
> > > > before uncompress process overwrites it. I see
> > > that
> > > > some of that code is getting executed after jump
> > > to
> > > > 0x0. I reason i am overwriting 0x0 is because, i
> > > only
> > > > have 8MB RAM.
> > > >
> > >
> > > 8M should be plenty of RAM.
> > >
> > >
> >
> >
> >
>
>
>
---
J.G.J. Boor
Lucent Technologies Nederland b.v. Room: BE-525
Optical Networking Group TMS Data Phone: +31 (0)35 687 4721
Larenseweg 50, P.O. Box 1168, Fax: +31 (0)35 687 5976
1200 BD, Hilversum, The Netherlands mailto:jjboor@lucent.com
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 26+ messages in thread
* Smallest Initrd (ram disk)
2002-12-20 16:14 ` Prakash kanthi
` (2 preceding siblings ...)
2002-12-20 16:47 ` Jim Potter
@ 2002-12-26 22:47 ` Prakash kanthi
2002-12-26 22:55 ` Jim Potter
2002-12-27 0:22 ` Smallest Initrd (ram disk) Wolfgang Denk
3 siblings, 2 replies; 26+ messages in thread
From: Prakash kanthi @ 2002-12-26 22:47 UTC (permalink / raw)
To: LinuxPPC
Hi folks,
If i want to build a smallest possible initrd, can you
suggest where i can get it from or how i can build it?
I am working with a custom made PPC405 based board
with just 8MB RAM.
thanks,
Prakash
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Smallest Initrd (ram disk)
2002-12-26 22:47 ` Smallest Initrd (ram disk) Prakash kanthi
@ 2002-12-26 22:55 ` Jim Potter
2003-01-13 2:15 ` Prakash kanthi
2002-12-27 0:22 ` Smallest Initrd (ram disk) Wolfgang Denk
1 sibling, 1 reply; 26+ messages in thread
From: Jim Potter @ 2002-12-26 22:55 UTC (permalink / raw)
To: Prakash kanthi; +Cc: LinuxPPC
Check out Wolfgang Denk's example ramdisk images at:
ftp.denx.de/pub/LinuxPPC/usr/src/mini-2048kB-ramdisk.image.gz
ftp.denx.de/pub/LinuxPPC/usr/src/simple-ramdisk.image.gz
> Hi folks,
>
> If i want to build a smallest possible initrd, can you
> suggest where i can get it from or how i can build it?
> I am working with a custom made PPC405 based board
> with just 8MB RAM.
>
> thanks,
> Prakash
--
Sincerely,
Jim Potter
45th Parallel Processing
Firefighting: Bustin' ours, Savin' yours.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Smallest Initrd (ram disk)
2002-12-26 22:47 ` Smallest Initrd (ram disk) Prakash kanthi
2002-12-26 22:55 ` Jim Potter
@ 2002-12-27 0:22 ` Wolfgang Denk
1 sibling, 0 replies; 26+ messages in thread
From: Wolfgang Denk @ 2002-12-27 0:22 UTC (permalink / raw)
To: Prakash kanthi; +Cc: LinuxPPC
In message <20021226224730.21626.qmail@web41210.mail.yahoo.com> you wrote:
>
> If i want to build a smallest possible initrd, can you
The smallest possible ramdisk would probably contain just the
/dev/directory with an entry for /dev/console, and a statically
linked application program by the name of /sbin/init or so.
> suggest where i can get it from or how i can build it?
See Documentation/initrd.txt that comes with your Linux kernel
sources.
> I am working with a custom made PPC405 based board
> with just 8MB RAM.
8 MB is a lot. You can run pretty complex systems there - for
example, the default ramdisk size for the SELF package is 4 MB, about
half of which is unused. See the ELF package as included with our
ELDK, or see ftp://ftp.denx.de/pub/LinuxPPC/usr/src/SELF/ for am
older (and smaller) version.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de
"What is wanted is not the will to believe, but the will to find out,
which is the exact opposite." - Bertrand Russell, _Sceptical_Essays_,
1928
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Smallest Initrd (ram disk)
2002-12-26 22:55 ` Jim Potter
@ 2003-01-13 2:15 ` Prakash kanthi
2003-01-13 7:55 ` Wolfgang Denk
0 siblings, 1 reply; 26+ messages in thread
From: Prakash kanthi @ 2003-01-13 2:15 UTC (permalink / raw)
To: jpotter; +Cc: LinuxPPC
Hi,
I downloaded both the ramdisks. I would appreciate, if
you can tell me what should i have as the value for
"root=", in Kernel Command Line. Mine shows as
"Linux/PPC load: console=ttyS0,19200 console=tty1
ip=off root=/dev/part rw".
And also, if i select the baud rate 19200, do i have
to change anything in the linux code other than
initial configuration file (defconfig).
Thanks,
Prakash
--- Jim Potter <jrp@wvi.com> wrote:
>
> Check out Wolfgang Denk's example ramdisk images at:
>
>
ftp.denx.de/pub/LinuxPPC/usr/src/mini-2048kB-ramdisk.image.gz
>
ftp.denx.de/pub/LinuxPPC/usr/src/simple-ramdisk.image.gz
>
> > Hi folks,
> >
> > If i want to build a smallest possible initrd, can
> you
> > suggest where i can get it from or how i can build
> it?
> > I am working with a custom made PPC405 based board
> > with just 8MB RAM.
> >
> > thanks,
> > Prakash
>
> --
> Sincerely,
>
> Jim Potter
> 45th Parallel Processing
>
> Firefighting: Bustin' ours, Savin' yours.
>
>
>
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Smallest Initrd (ram disk)
2003-01-13 2:15 ` Prakash kanthi
@ 2003-01-13 7:55 ` Wolfgang Denk
2003-01-14 18:42 ` ramdisk mount problem Prakash kanthi
0 siblings, 1 reply; 26+ messages in thread
From: Wolfgang Denk @ 2003-01-13 7:55 UTC (permalink / raw)
To: Prakash kanthi; +Cc: LinuxPPC
In message <20030113021509.36487.qmail@web41214.mail.yahoo.com> you wrote:
>
> I downloaded both the ramdisks. I would appreciate, if
> you can tell me what should i have as the value for
> "root=", in Kernel Command Line. Mine shows as
> "Linux/PPC load: console=ttyS0,19200 console=tty1
> ip=off root=/dev/part rw".
root=/dev/ram rw console=ttyS0,19200 ip=off
should be what you need.
> And also, if i select the baud rate 19200, do i have
> to change anything in the linux code other than
> initial configuration file (defconfig).
You don't have to change anything in the kernel. The baudrate is
passed by the boot loader.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de
Veni, Vidi, VISA:
I came, I saw, I did a little shopping.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 26+ messages in thread
* ramdisk mount problem
2003-01-13 7:55 ` Wolfgang Denk
@ 2003-01-14 18:42 ` Prakash kanthi
2003-01-14 18:57 ` Wolfgang Denk
2003-01-15 8:33 ` Frederic Soulier
0 siblings, 2 replies; 26+ messages in thread
From: Prakash kanthi @ 2003-01-14 18:42 UTC (permalink / raw)
To: Wolfgang Denk; +Cc: LinuxPPC
Hi Folks,
I am trying to use 2MB ramdisk image from denx as my
linux filesystem. Linux kernel fails to mount the
'ext2' type file system from initrd. I pin pointed the
problem.
Looks like the problem is in 'do_mounts.c ->
mount_block_root' function where a call is made to
sys_mount as follows:
'int err = sys_mount(name, "/root", p, flags,
root_mount_data);'
In my case name="/dev/root", p="ext2", flags=32768 and
root_mount_data=<NULL>.
The result of this call is EINVAL, i.e. invalid
argument. Can anyone help me out find which one of the
arguements could be invalid? If 'root_mount_data' is
the culprit, why is it null? I see that it's value is
set in one of the __setup functions. When are these
functions supposed be executed? I know that all
__initcalls are executed from dO_initcalls.
This failure causes Kernel Panic, complaing about
"Unable to mount root fs at 01:00".
Thanks,
Prakash
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: ramdisk mount problem
2003-01-14 18:42 ` ramdisk mount problem Prakash kanthi
@ 2003-01-14 18:57 ` Wolfgang Denk
2003-01-15 8:33 ` Frederic Soulier
1 sibling, 0 replies; 26+ messages in thread
From: Wolfgang Denk @ 2003-01-14 18:57 UTC (permalink / raw)
To: Prakash kanthi; +Cc: LinuxPPC
In message <20030114184236.43688.qmail@web41211.mail.yahoo.com> you wrote:
>
> I am trying to use 2MB ramdisk image from denx as my
> linux filesystem. Linux kernel fails to mount the
> 'ext2' type file system from initrd. I pin pointed the
> problem.
There are at least two important preconditions:
* You must enable support for ramdisk, initial ramdisk, and ext2
filesystem, in your kernel config
* you must pass "root=/dev/ram rw" (and probably some more) as
kernel boot argument.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de
"Everything should be made as simple as possible, but not simpler."
- Albert Einstein
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: ramdisk mount problem
2003-01-14 18:42 ` ramdisk mount problem Prakash kanthi
2003-01-14 18:57 ` Wolfgang Denk
@ 2003-01-15 8:33 ` Frederic Soulier
2003-01-16 4:49 ` Ramdisk details; execve("/bin/sh") output Prakash kanthi
1 sibling, 1 reply; 26+ messages in thread
From: Frederic Soulier @ 2003-01-15 8:33 UTC (permalink / raw)
To: Prakash kanthi; +Cc: PPC-Linux list (E-mail)
Prakash,
It seems that your kernel didn't get any information about where is your
init ramdisk.
Which boot loader do you use ? On which board ?
In the kernel sources, I guess your initrd_start is set to NULL, so you
have to verify in the platform_init() function (usually found in
arch/ppc/platforms/<your board>_setup.c) that you are really handling
parameters from the boot loader. This is done something like that :
void __init
platform_init(unsigned long r3, unsigned long r4, unsigned long r5, unsigned
long r6, unsigned long r7)
{
[...]
if (r4) {
initrd_start = r4 + KERNELBASE;
initrd_end = r5 + KERNELBASE;
}
[...]
Hope this could help,
Frederic Soulier
----- Original Message -----
From: "Prakash kanthi" <pkanthi@yahoo.com>
To: "Wolfgang Denk" <wd@denx.de>
Cc: "LinuxPPC" <linuxppc-embedded@lists.linuxppc.org>
Sent: Tuesday, January 14, 2003 7:42 PM
Subject: ramdisk mount problem
>
> Hi Folks,
>
> I am trying to use 2MB ramdisk image from denx as my
> linux filesystem. Linux kernel fails to mount the
> 'ext2' type file system from initrd. I pin pointed the
> problem.
>
> Looks like the problem is in 'do_mounts.c ->
> mount_block_root' function where a call is made to
> sys_mount as follows:
>
> 'int err = sys_mount(name, "/root", p, flags,
> root_mount_data);'
>
> In my case name="/dev/root", p="ext2", flags=32768 and
> root_mount_data=<NULL>.
>
> The result of this call is EINVAL, i.e. invalid
> argument. Can anyone help me out find which one of the
> arguements could be invalid? If 'root_mount_data' is
> the culprit, why is it null? I see that it's value is
> set in one of the __setup functions. When are these
> functions supposed be executed? I know that all
> __initcalls are executed from dO_initcalls.
>
> This failure causes Kernel Panic, complaing about
> "Unable to mount root fs at 01:00".
>
>
> Thanks,
> Prakash
>
>
>
>
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 26+ messages in thread
* Ramdisk details; execve("/bin/sh") output
2003-01-15 8:33 ` Frederic Soulier
@ 2003-01-16 4:49 ` Prakash kanthi
2003-01-16 5:57 ` Hi Anish
2003-01-16 8:06 ` Ramdisk details; execve("/bin/sh") output Wolfgang Denk
0 siblings, 2 replies; 26+ messages in thread
From: Prakash kanthi @ 2003-01-16 4:49 UTC (permalink / raw)
To: Frederic Soulier; +Cc: PPC-Linux list (E-mail)
Hi FOlks,
I have couple of questions on ramdisk operation.
1. How can i see the contents of a ramdisk? I
downloaded one from denx and i want to see what is in
there?
2. In ${LINUX_ROOT}/init/main.c -> init(), after
prepare_namespace (which basically does the inintrd
mount), open syscall on '/dev/console' fails. But
still control goes further and executes
'execve("/bin/sh")'. My question is where does the
output of /bin/sh execution goes? Not to my dumb
terminal? I see nothing. Infact my dumb terminal just
stops there. No kernel panic. Any clues?
Note: In my case i do not have enough infrastructure
to have the standard NS16550 is working. So i have to
port some other driver as my serial driver. ANything
related to this?
Thanks,
Prakash
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 26+ messages in thread
* Hi
2003-01-16 4:49 ` Ramdisk details; execve("/bin/sh") output Prakash kanthi
@ 2003-01-16 5:57 ` Anish
2003-01-16 8:00 ` Hi Wolfgang Denk
2003-01-16 8:06 ` Ramdisk details; execve("/bin/sh") output Wolfgang Denk
1 sibling, 1 reply; 26+ messages in thread
From: Anish @ 2003-01-16 5:57 UTC (permalink / raw)
To: PPC-Linux list (E-mail)
Hi everybody,
Please forgive me for an off the track question. We want to develop a
Menu driven Console based user interface for MPC8260. The MPC8260 is
connected with a Windows based PC with Hyperterminal. We plan to display
the menu options on Hyperterminal screen running on Windows based PC. If
anybody has done similar things please inform me.
anish nema
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Hi
2003-01-16 5:57 ` Hi Anish
@ 2003-01-16 8:00 ` Wolfgang Denk
0 siblings, 0 replies; 26+ messages in thread
From: Wolfgang Denk @ 2003-01-16 8:00 UTC (permalink / raw)
To: Anish; +Cc: PPC-Linux list (E-mail)
In message <Pine.OSF.4.21.0301161051060.11807-100000@ws9.cdotb.ernet.in> you wrote:
>
> Please forgive me for an off the track question. We want to develop a
> Menu driven Console based user interface for MPC8260. The MPC8260 is
> connected with a Windows based PC with Hyperterminal. We plan to display
> the menu options on Hyperterminal screen running on Windows based PC. If
> anybody has done similar things please inform me.
Use [n]curses.
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de
Only in our dreams we are free. The rest of the time we need wages.
- Terry Pratchett, _Wyrd Sisters_
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Ramdisk details; execve("/bin/sh") output
2003-01-16 4:49 ` Ramdisk details; execve("/bin/sh") output Prakash kanthi
2003-01-16 5:57 ` Hi Anish
@ 2003-01-16 8:06 ` Wolfgang Denk
1 sibling, 0 replies; 26+ messages in thread
From: Wolfgang Denk @ 2003-01-16 8:06 UTC (permalink / raw)
To: Prakash kanthi; +Cc: Frederic Soulier, PPC-Linux list (E-mail)
In message <20030116044911.1234.qmail@web41201.mail.yahoo.com> you wrote:
>
> 1. How can i see the contents of a ramdisk? I
> downloaded one from denx and i want to see what is in
> there?
1. [in case of PPCBoot image:] strip header
2. Uncompress
3. Mount using the loopback device
For example:
# dd if=simple-ramdisk.PPCBoot of=simple-ramdisk.gz bs=64 skip=1
8874+1 records in
8874+1 records out
# gunzip simple-ramdisk.gz
# mount -o loop simple-ramdisk /mnt
# ls -lR /mnt
/mnt:
total 17
drwxr-xr-x 2 root root 1024 Jun 4 1999 bin
drwxr-xr-x 2 root root 1024 Oct 2 2000 dev
drwxr-xr-x 2 root root 1024 Jun 4 1999 etc
drwxr-xr-x 2 root root 1024 Jun 4 1999 lib
-rwxr-xr-x 1 root root 136 Jan 11 1999 linuxrc
drwxr-xr-x 2 root root 12288 Jun 4 1999 lost+found
/mnt/bin:
total 463
-rwxr-xr-x 1 root root 37480 Mar 1 1998 date
-rwxr-xr-x 1 root root 54584 Sep 8 1998 ls
-rwxr-xr-x 1 root root 375704 Sep 8 1998 sh
/mnt/dev:
total 0
crw-r--r-- 1 root root 5, 1 Mar 22 2000 console
crw-rw-rw- 1 root root 5, 0 Jun 4 1999 tty
crw-rw-rw- 1 root root 4, 64 Jun 4 1999 ttyS0
/mnt/etc:
total 0
-rw-r--r-- 1 root root 0 Jan 11 1999 mtab
/mnt/lib:
total 1042
-rwxr-xr-x 1 root root 83138 Apr 24 2001 ld.so.1
-rwxr-xr-x 1 root root 825404 Sep 8 1998 libc-1.99.so
-rw-r--r-- 1 root root 53356 Jan 11 1999 libcrypt.so.1
lrwxrwxrwx 1 root root 12 Jun 4 1999 libc.so.6 -> libc-1.99.so
-rw-r--r-- 1 root root 61586 Jan 11 1999 libproc.so.1.2.6
lrwxrwxrwx 1 root root 19 Jun 4 1999 libtermcap.so.2 -> libtermcap.so.2.0.8
-rwxr-xr-x 1 root root 30152 Sep 8 1998 libtermcap.so.2.0.8
/mnt/lost+found:
total 0
#
> 2. In ${LINUX_ROOT}/init/main.c -> init(), after
> prepare_namespace (which basically does the inintrd
> mount), open syscall on '/dev/console' fails. But
> still control goes further and executes
> 'execve("/bin/sh")'. My question is where does the
> output of /bin/sh execution goes? Not to my dumb
> terminal? I see nothing. Infact my dumb terminal just
> stops there. No kernel panic. Any clues?
Solve problems sequentially. Why does open '/dev/console' fail ?
> Note: In my case i do not have enough infrastructure
> to have the standard NS16550 is working. So i have to
> port some other driver as my serial driver. ANything
> related to this?
There may be some other problems. Sorry for being vague - I'm as
precise as you are with your statement about "some other driver". If
you want helpful answers you must provide all the little details.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de
"Probably the best operating system in the world is the [operating
system] made for the PDP-11 by Bell Laboratories."
- Ted Nelson, October 1977
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 26+ messages in thread
end of thread, other threads:[~2003-01-16 8:06 UTC | newest]
Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-19 16:10 After Uncompresseing Linux..., what's next James Don
2002-12-19 16:39 ` Tom Rini
2002-12-20 16:14 ` Prakash kanthi
2002-12-20 16:32 ` Prakash kanthi
2002-12-20 16:49 ` Jim Potter
2002-12-20 17:02 ` Jim Potter
2002-12-20 16:38 ` Gary Thomas
2002-12-20 16:48 ` Prakash kanthi
2002-12-20 16:52 ` Gary Thomas
2002-12-20 17:06 ` Prakash kanthi
2002-12-20 17:22 ` Gary Thomas
2002-12-20 21:59 ` Serious Problem: " Prakash kanthi
2002-12-20 16:47 ` Jim Potter
2002-12-26 22:47 ` Smallest Initrd (ram disk) Prakash kanthi
2002-12-26 22:55 ` Jim Potter
2003-01-13 2:15 ` Prakash kanthi
2003-01-13 7:55 ` Wolfgang Denk
2003-01-14 18:42 ` ramdisk mount problem Prakash kanthi
2003-01-14 18:57 ` Wolfgang Denk
2003-01-15 8:33 ` Frederic Soulier
2003-01-16 4:49 ` Ramdisk details; execve("/bin/sh") output Prakash kanthi
2003-01-16 5:57 ` Hi Anish
2003-01-16 8:00 ` Hi Wolfgang Denk
2003-01-16 8:06 ` Ramdisk details; execve("/bin/sh") output Wolfgang Denk
2002-12-27 0:22 ` Smallest Initrd (ram disk) Wolfgang Denk
-- strict thread matches above, loose matches on Subject: below --
2002-12-23 8:35 Serious Problem: After Uncompresseing Linux..., what's next Jaap-Jan Boor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).