Does anyone know how HHL boots?
I'm somewhat curious...
MontaVista has HHL support for several MIPS boards... including one that my company makes. We've never actually seen their HHL distribution for our board, tho... and we're wondering, how does it boot?
I mean, our boards have an elementary boot loader that can load a kernel from the network, and disk-booting is something we're trying to figure out. But how does HHL accomplish this? And is it a general solution for multiple platforms?
Matt
Signature · 2 lines
Matthew Dharm Work: [email protected] Senior Software Designer, Momentum Computer
Matt,
Quoted 6 lines
MontaVista has HHL support for several MIPS boards... including one that my
...
I mean, our boards have an elementary boot loader that can load a kernel from the network, and disk-booting is something we're trying to figure out. But how does HHL accomplish this? And is it a general solution for multiple platforms?
I went thru the same pain and confusion myself 9 months ago. My understanding is MontaVista uses whatever the manufacturer supplies with the hardware. And/or they have an internal version of PMON. There are probably a dozen differernt MIPS loaders... some of which you might be able to find source for, but probably won't be even close to working on your board without weeks+ of effort.
If you have some assembly startup code that turns off interrupts, sets up the memory controller then you maybe able to use my "LinuxMon" solution which only works on the Korva(Markham) NEC Vr41xx chip but is very generic. Sheese, every monitor says it's generic. After turning off interrupts and setting up the memory controller it copies (optionally gunzips) the remainder of flash then jumps to your linux kernel. A 1-stage boot. It can then be used to load a second linux kernel if it has been linked elsewhere.
I wasn't successful in getting it submitted/accepted unfortunately.
You can get a copy of my 2.4.16 release containing it, at:
http://www.idiom.com/~espin/nec
The important files are arch/mips/korva/{Boot.make,vrboot.S,misc.c} If you have an already working linux kernel then these few files should turn it into a boot monitor. These were posted to [email protected] so you can find them in the mail archive in Nov/Dec. Or I can post.
Geoff
Signature · 2 lines
Geoffrey Espin [email protected]
Quoted 9 lines · Geoffrey Espin
Matt,
Quoted 6 lines
MontaVista has HHL support for several MIPS boards... including one that my
...
I mean, our boards have an elementary boot loader that can load a kernel from the network, and disk-booting is something we're trying to figure out. But how does HHL accomplish this? And is it a general solution for multiple platforms?
Quoted 6 lines
I went thru the same pain and confusion myself 9 months ago. My understanding is MontaVista uses whatever the manufacturer supplies with the hardware. And/or they have an internal version of PMON. There are probably a dozen differernt MIPS loaders... some of which you might be able to find source for, but probably won't be even close to working on your board without weeks+ of effort.
There is pmon2000 which was ported to mips and runs on the ev96100 (rm7k). Porting it to the Ocelot should be straight forward. The CPU is the same. The system controller is different, but the gt96100 is a superset of the gt64120, so that part should be easy too. I believe the low level code that initializes the memory controller will be the same. I did find a bug in the mem init code that reports the wrong memory size and sets up the sub decoder incorrectly, but ... it still worked and I didn't have time to fix it.
Pmon2000 is rather large because it's openbsd based. What's nice though is that porting drivers to it is much easier since you can just grab it from openbsd and get rid of some of the memory/bus code.
Another option I like a lot is yamon from MIPS T. I don't know how long it would take to port it to the rm7k and the gt64120, but it can't be that bad.
Pete
Quoted 10 lines · Matthew Dharm
I'm somewhat curious...
MontaVista has HHL support for several MIPS boards... including one that my company makes. We've never actually seen their HHL distribution for our board, tho... and we're wondering, how does it boot?
I mean, our boards have an elementary boot loader that can load a kernel from the network, and disk-booting is something we're trying to figure out. But how does HHL accomplish this? And is it a general solution for multiple platforms?
HHL, or now MontaVista Linux, MVL, is a cross dev environment. The tools and all apps are installed on the host system. The target boots over the net, which requires that the boot code support net booting, and then mounts the root fs over nfs. You can then proceed to develop your apps on the host system, install it in the target directory, test it, etc. When you're ready for deployment, you can use the Target Configurator Tool to build a custom file system.
How you deploy the system varies. I'll give you an example of a board I'm working on right now. The Pb1500 from Alchemy has yamon as the boot code. I've added boot from flash support so you can compile a zImage kernel. The image is then turned to srecords, which yamon can download directly to flash (if the srecords' addresses are those of the flash). You can then set a "start" variable in yamon which is a string that yamon parses, such as: "go bfd00000 root=/dev/mtdblock0". Assuming that you have the zImage at 0xbfd00000, yamon will just jump there and the kernel loader that's part of the zImage will do the rest. The root file system, in this case, is in flash. This means that you need mtd and jffs or jffs2 support. Another option for this board is to put the root fs on a pcmcia card or on a hard disk, since the board has the HPT370A IDE controller. I've tested both.
I guess the short answer is that MVL boots over the network and mounts the root fs over nfs. For deployment, it depends on what you need or what your customers need. It also depends on the features of your boot code and the level of support for your board in the kernel tree (mtd, jffs, etc). It might be very easy to deploy the board, or you might have to either pay someone PS or add the additional features you need yourself.
Pete
Quoted 5 lines · Matthew Dharm
I'm somewhat curious...
MontaVista has HHL support for several MIPS boards... including one that my company makes.
I suppose you are referring to Ocelot. It is supported in HHL2.0.
Quoted 2 lines
We've never actually seen their HHL distribution for our board, tho...
Strange. You should get one set of CD's. I am not sure about the business arrangment. Please contact [email protected].
Quoted 1 line
and we're wondering, how does it boot?
Kernel is booted through netboot. Root fs is NFS. It is documented in the CD's.
Jun