EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Booting from a different location

Started by Washington Ratso March 19, 2009
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.

How do I put a branch instruction at the reset vector?
Washington Ratso <jobhunts02@aol.com> writes:

>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?
On Mar 19, 8:33=A0pm, Unruh <unruh-s...@physics.ubc.ca> wrote:
> Washington Ratso <jobhunt...@aol.com> writes: > >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. =A0I 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 bootloade=
r.
> 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 mean=
s
> 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.
On Fri, 20 Mar 2009 09:24:46 -0700 (PDT)
Washington Ratso <jobhunts02@aol.com> wrote:

> On Mar 19, 8:33=A0pm, Unruh <unruh-s...@physics.ubc.ca> wrote: > > Washington Ratso <jobhunt...@aol.com> writes: > > >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. =A0I 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? >=20 > 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. --=20 Rob Gaddi, Highland Technology Email address is currently out of order
On Mar 20, 11:24=A0am, Washington Ratso <jobhunt...@aol.com> wrote:
> On Mar 19, 8:33=A0pm, Unruh <unruh-s...@physics.ubc.ca> wrote: > > > > > Washington Ratso <jobhunt...@aol.com> writes: > > >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. =A0I 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 bootloa=
der.
> > 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 me=
ans
> > you can never get at the boot sequence and alter things if something go=
es
> > 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 no=
t
> > 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. =A0All one has to do is put vmlinux.gz at the reset vector. > He said he has done this. =A0No bootloader is needed. =A0But, I cannot pu=
t
> vmlinux.gz at the reset vector because there is not enough space for > me to put vmlinux.gz there. =A0So, 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.
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
On Mar 20, 3:07=A0pm, Ed Prochak <edproc...@gmail.com> wrote:

> consultant meant to put the images into ROM and boot from ROM. Even
Maybe he meant XIP? Who knows, the OP is so vague.
Washington Ratso wrote:
> > 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. > > How do I put a branch instruction at the reset vector?
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.
Rob Gaddi wrote:

> 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.
Washington Ratso wrote:
> 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. > > How do I put a branch instruction at the reset vector?
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

The 2024 Embedded Online Conference