How do I put a branch instruction at the reset vector?
>I am running Linux 2.6.26 on a PPC. I want to boot linux without using
>a bootloader to speed up the boot process but, due to the size of the
>kernel, I cannot put it at the reset vector. I was told that I have
>to put a branch instruction at the reset vector location and branch to
>the location where my kernel is.
No idea what you are talking about. Whatever you do, you need a bootloader.
The kernel must be put into memory. Now if you do not like the 10 sec
delay, put in a 1 sec delay, or 0 sec delay. (Not advised since that means
you can never get at the boot sequence and alter things if something goes
wrong).
>How do I put a branch instruction at the reset vector?
Why in the world would you want to write your own bootloader? You do not
have enough to do in your life, but want to spend half a year doing
something others have already done far better?
I was told bu a consultant that it is possible to boot Linux in about
3 seconds. All one has to do is put vmlinux.gz at the reset vector.
He said he has done this. No bootloader is needed. But, I cannot put
vmlinux.gz at the reset vector because there is not enough space for
me to put vmlinux.gz there. So, he said to put a branch instruction
at the reset vector that would say to branch to an address where I
could put vmlinux.gz.
But...that's the compressed kernel image. Compressed as in
non-executable. Non-executable as in your processor can't treat it as
instructions, and therefore shouldn't have a reset vector pointing into
it. Unless I'm seriously mistaken you've either misunderstood your
consultant or hired the wrong one.
--
Rob Gaddi, Highland Technology
Email address is currently out of order
Since you are posting this in comp.arch.embedded, I'll assume the
consultant meant to put the images into ROM and boot from ROM. Even
decompressing and loading to RAM will be a lot faster reading ROM than
reading the image from disc. You would still need a boot loader.
As far as setting the boot vector, try reading the documentation of
your motherboard hardware. Changing the boot vector possibly means
changing the BIOS, or changing basic hardware settings. I'm guessing
changing the BIOS (ROM).
Ed
> consultant meant to put the images into ROM and boot from ROM. Even
Maybe he meant XIP? Who knows, the OP is so vague.
> Unless I'm seriously mistaken you've either misunderstood your
> consultant or hired the wrong one.
That's one and the same thing. A consultant whose advice could not be
understood was the wrong one to hire.
No comment on your purposes. To put a branch instruction in read
the manual for the CPU, find out what the opcode is, how the
operands are arranged, and install that in the code loaded. It's
called assembly language.
--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
You may be barking up the wrong tree here.
Please check that the main culprit of the
boot-up speed is the bootloader. The Linux
start-up contains much more and slower
operations than loading the kernel (and
maybe the initial root disk image).
--
Tauno Voipio
tauno voipio (at) iki fi