Where is the first entry point for linux-mips boot?
Hello,all:
Now I plan to port linux on our mips-based board. Since it is the first
time for me to work on linux-mips, I have several questions to ask:
There are many many subdirectories in arch/mips, I don't know where is
the FIRST entry point for embedded linux-mips boot process? I find that there is "kernel_entry" in arch/mips/kernel/head.S. I know this is the entry point for linux kernel ,but it is not the FIRST entry point for embedded linux-mips boot process. So my questions is :
After the board initializations finish, it should load linux kernel into
RAM and jump there . Just before it runs the linux kernel, who calls "kernel_entry"?
I don't know whether I have expressed my meaning apparently. Hope you
can understand me.
Thank you very much.
machael thailer
Quoted 8 lines · machael thailer
There are many many subdirectories in
arch/mips, I don't know where is
the FIRST entry point for embedded linux-mips boot process? I find that there is "kernel_entry" inarch/mips/kernel/head.S. I know this is the entry point for linux kernel ,but it is not the FIRST entry point for embedded linux-mips boot process. So my questions is :
After the board initializations finish, it should load linux kernel into
RAM and jump there . Just before it runs the linux kernel, who calls "kernel_entry"?
The firmware or bootloader.
Ralf
The firmware or bootloader. For some examples of this look at redboot from RedHat or yamon (yet another monitor) from MIPS (I think).
Keep in mind these will prob require a seperate cross-compiler. I have yet to test compiling a boot monitor with linux gcc cross compiler. You can get one from either MIPS or Algorythmics (www.algor.co.uk). I have used both of these to build both of the above monitors.
Any other questions, email me..
/*************************
Marc Karasek
Sr. Firmware Engineer
iVivity Inc.
[email protected]
(770) 986-8925
(770) 986-8926 Fax
*************************/
Quoted 21 lines · machael thailer
Hello,all:
Now I plan to port linux on our mips-based board. Since it is the first
time for me to work on linux-mips, I have several questions to ask:There are many many subdirectories in
arch/mips, I don't know where is
the FIRST entry point for embedded linux-mips boot process? I find that there is "kernel_entry" inarch/mips/kernel/head.S. I know this is the entry point for linux kernel ,but it is not the FIRST entry point for embedded linux-mips boot process. So my questions is :
After the board initializations finish, it should load linux kernel into
RAM and jump there . Just before it runs the linux kernel, who calls "kernel_entry"?
I don't know whether I have expressed my meaning apparently. Hope you
can understand me.Thank you very much.
machael thailer
Signature · 8 lines
/************************* Marc Karasek Sr. Firmware Engineer iVivity Inc. [email protected] (770) 986-8925 (770) 986-8926 Fax *************************/
----- Original Message -----
From: "Ralf Baechle" <[email protected]>
To: "machael thailer" <[email protected]>
Cc: <[email protected]>
Sent: Saturday, August 04, 2001 1:10 PM
Subject: Re: Where is the first entry point for linux-mips boot?
Quoted 3 lines · machael thailer
Quoted 2 lines
There are many many subdirectories in
arch/mips, I don't know where
is
Quoted 2 lines
Quoted 2 lines
the FIRST entry point for embedded linux-mips boot process? I find that there is "
kernel_entry" inarch/mips/kernel/head.S. I know this is the
entry
Quoted 3 lines
Quoted 3 lines
point for linux kernel ,but it is not the FIRST entry point for embedded linux-mips boot process. So my questions is :
After the board initializations finish, it should load linux kernel
into
Quoted 4 lines
Quoted 2 lines
RAM and jump there . Just before it runs the linux kernel, who calls "
kernel_entry"?The firmware or bootloader.
Another question:
After my custom board finished initializations, It should load "linux kernel" into RAM.
The question is : Is this a compressed "linux kernel" just like vmlinux.gz of X86 that I should load? Or is it "/usr/src/linux/vmlinux" that is not compressed that I should load? And what RAM address should it loaded at? Since it is linked at 0x80200000,Should I load there or at somewhere else?
Thanks very much.
machael
----- Original Message -----
From: "Ralf Baechle" <[email protected]>
To: "machael thailer" <[email protected]>
Cc: <[email protected]>
Sent: Friday, August 17, 2001 11:26 AM
Subject: Re: Where is the first entry point for linux-mips boot?
Quoted 5 lines · machael thailer
Quoted 4 lines
After my custom board finished initializations, It should load "linux kernel" into RAM.
The question is : Is this a compressed "linux kernel" just like
vmlinux.gz
Quoted 5 lines
Quoted 2 lines
of X86 that I should load? Or is it "
/usr/src/linux/vmlinux" that is not compressed that I should load?The standard MIPS kernel doesn't support compressed kernels on MIPS.
Quoted 7 lines
Quoted 2 lines
And what RAM address should it loaded at? Since it is linked at 0x80200000,Should I load there or at somewhere else?
Obviously to the address it's linked for. You can adjust that address as you need. With compressed kernels it may be necessary to choose a different address however so the decompressed kernel doesn't overwrite the compressed kernel during compression.
If I load the kernel to RAM address 0x80200000, is this a virtual address or physical address at this time? Since my RAM can not be so large, I guess this is virtual address,right? Should I enable MMU in my board initializations?
Thank you once again.
machael
Quoted 4 lines · machael thailer
If I load the kernel to RAM address
0x80200000, is this a virtual address or physical address at this time? Since my RAM can not be so large, I guess this is virtual address,right? Should I enable MMU in my board initializations?
A virtual address in KSEG0. A MIPS MMU has no enable bit, it's always active.
Ralf
Quoted 5 lines · machael thailer
After my custom board finished initializations, It should load "linux kernel" into RAM.
The question is : Is this a compressed "linux kernel" just like vmlinux.gz of X86 that I should load? Or is it "/usr/src/linux/vmlinux" that is not compressed that I should load?
The standard MIPS kernel doesn't support compressed kernels on MIPS.
Quoted 2 lines
And what RAM address should it loaded at? Since it is linked at 0x80200000,Should I load there or at somewhere else?
Obviously to the address it's linked for. You can adjust that address as you need. With compressed kernels it may be necessary to choose a different address however so the decompressed kernel doesn't overwrite the compressed kernel during compression.
Ralf