Has anyone successfully built an os image that is suitable for loading
over a network from a bootp/tftp server? I have been playing around
with ‘etherboot’ but can’t seem to get an os image built that
etherboot likes…any ideas?
Has anyone successfully built an os image that is suitable for loading
over a network from a bootp/tftp server? I have been playing around
with ‘etherboot’ but can’t seem to get an os image built that
etherboot likes…any ideas?
Did you specify the location of the the image (in memory when the ROM code
loads the image) in the build file? Does the etherboot system download the
image from the bootp server? or does that step not succeed either?
With PPC I use prepboot because the network loaders tend to jump to the base address
after loading the image into ram, prepboot will put a jump there that jumps to
the correct entry point for startup.
“Carlton Haycock” <> chaycock@bytewise.com> > wrote in message
news:> ExkzPGIVaKRmYc7mo8BYpDspeGri@4ax.com> …
Has anyone successfully built an os image that is suitable for loading
over a network from a bootp/tftp server? I have been playing around
with ‘etherboot’ but can’t seem to get an os image built that
etherboot likes…any ideas?
Did you specify the location of the the image (in memory when the ROM code
loads the image) in the build file? Does the etherboot system download the
image from the bootp server? or does that step not succeed either?
“Carlton Haycock” <> chaycock@bytewise.com> > wrote in message
news:> ExkzPGIVaKRmYc7mo8BYpDspeGri@4ax.com> …
Has anyone successfully built an os image that is suitable for loading
over a network from a bootp/tftp server? I have been playing around
with ‘etherboot’ but can’t seem to get an os image built that
etherboot likes…any ideas?
Did you specify the location of the the image (in memory when the ROM code
loads the image) in the build file? Does the etherboot system download the
image from the bootp server? or does that step not succeed either?
-Adam
Adam,
Etherboot downloaded successfully via bootp. Apparently etherboot is
expecting a file in ELF or Tagged format. I just used one of the .ifs
files that was already built in the /boot/fs dir…and Etherboot did
not like the format of the file…I know that is probably not what I
need to be doing…therefore if you can point
me in the right direction I would appreciate it.
I’m not sure if that will help or not…I think that etherboot is
expecting an ELF formated file, from which it can determine the load
address and other info…
With PPC I use prepboot because the network loaders tend to jump to the base address
after loading the image into ram, prepboot will put a jump there that jumps to
the correct entry point for startup.
“Carlton Haycock” <> chaycock@bytewise.com> > wrote in message
news:> ExkzPGIVaKRmYc7mo8BYpDspeGri@4ax.com> …
Has anyone successfully built an os image that is suitable for loading
over a network from a bootp/tftp server? I have been playing around
with ‘etherboot’ but can’t seem to get an os image built that
etherboot likes…any ideas?
Did you specify the location of the the image (in memory when the ROM code
loads the image) in the build file? Does the etherboot system download the
image from the bootp server? or does that step not succeed either?
Etherboot downloaded successfully via bootp. Apparently etherboot is
expecting a file in ELF or Tagged format. I just used one of the .ifs
files that was already built in the /boot/fs dir…and Etherboot did
not like the format of the file…I know that is probably not what I
need to be doing…therefore if you can point
me in the right direction I would appreciate it.
You’re right - the OS image files are not in elf format, but I wouldn’t
expect the Network loader to expect that either. It should just clock the
image in at a certain well-known location, and simply jump to the start of
the image. I don’t see where in the docs for etherboot it says you must
have elf format for an image.
Etherboot downloaded successfully via bootp. Apparently etherboot is
expecting a file in ELF or Tagged format. I just used one of the .ifs
files that was already built in the /boot/fs dir…and Etherboot did
not like the format of the file…I know that is probably not what I
need to be doing…therefore if you can point
me in the right direction I would appreciate it.
You’re right - the OS image files are not in elf format, but I wouldn’t
expect the Network loader to expect that either. It should just clock the
image in at a certain well-known location, and simply jump to the start of
the image.
that what I thought too…it would seem logical, but thats not the
way it is…
I don’t see where in the docs for etherboot it says you must
have elf format for an image.
I have also been playing around with trying to get an ifs image
to boot from floppy…not having much luck there…I am able
to build and ifs image, but when transfered to floppy and boot
it, it just hangs…I used the ‘finstall.build’ sample file in the
/boot directory to build the ifs…could you give me some
step-by-step on what to do once I get an ifs? I have looked at
the online docs and the sys-admin book, but they all stop short
of telling you exactly what you need to do…
Etherboot downloaded successfully via bootp. Apparently etherboot is
expecting a file in ELF or Tagged format. I just used one of the .ifs
files that was already built in the /boot/fs dir…and Etherboot did
not like the format of the file…I know that is probably not what I
need to be doing…therefore if you can point
me in the right direction I would appreciate it.
You’re right - the OS image files are not in elf format, but I wouldn’t
expect the Network loader to expect that either. It should just clock
the
image in at a certain well-known location, and simply jump to the start
of
the image.
that what I thought too…it would seem logical, but thats not the
way it is…
I don’t see where in the docs for etherboot it says you must
have elf format for an image.
I have also been playing around with trying to get an ifs image
to boot from floppy…not having much luck there…I am able
to build and ifs image, but when transfered to floppy and boot
it, it just hangs…I used the ‘finstall.build’ sample file in the
/boot directory to build the ifs…could you give me some
step-by-step on what to do once I get an ifs? I have looked at
the online docs and the sys-admin book, but they all stop short
of telling you exactly what you need to do…
The number is the errno for that error, if you look in the errno.h file
you’ll see that 83 = “Can’t access shared library”. Looking at your build
file, you haven’t included the shared libc (ie. libc.so) which is required.
Reading over some of the Etherboot doc’s it looks like you may need to
port/modify the tool called mknbi . According to the docs each kernel (ie.
OS) requires their own port of the tool to create the network boot image
that etherboot expects.
That is actually what I did…after reading Bill’s suggestion and
checking out the man page for fdformat, it pointed me to the dinit
section that describes that…it seemed to work, now however I am
getting errors starting the executables when the disk boots…stuff
like:
Unable to start “/proc/boot/seedres” (83)
Unable to start “/proc/boot/devc-con” (83)
…and so on for all the execs called by the startup script…
if anyone is interested, attached below is the build file I used to
generate the ifs image…
That is actually what I did…after reading Bill’s suggestion and
checking out the man page for fdformat, it pointed me to the dinit
section that describes that…it seemed to work, now however I am
getting errors starting the executables when the disk boots…stuff
like:
Unable to start “/proc/boot/seedres” (83)
Unable to start “/proc/boot/devc-con” (83)
…and so on for all the execs called by the startup script…
if anyone is interested, attached below is the build file I used to
generate the ifs image…
: The number is the errno for that error, if you look in the errno.h file
: you’ll see that 83 = “Can’t access shared library”. Looking at your build
: file, you haven’t included the shared libc (ie. libc.so) which is required.
Here’s how to determine which shared libraries you need. This is now in
the Building Embedded Systems guide:
Shared libraries
The first thing you’ll need to do is to ensure that the shared objects
required by the various drivers you’ll be running are present. All drivers
require at least the standard C library shared object (libc.so). Since
the shared object search order looks in /proc/boot, you don’t have
to do anything special, except include the shared library into the image.
This is done by simply specifying the name of the shared library on a
line by itself, meaning “include this file.”
How do you determine which shared objects you need in the image?
You can use the objdump utility to display information about the
executables you’re including in the image; look for the objects marked
as NEEDED For example, suppose you’re including ping in your image:
$ objdump -x which ping | grep NEEDED
objdump: /usr/bin/ping: no symbols
NEEDED libsocket.so.2
NEEDED libc.so.2
The ping executable needs libsocket.so.2 and libc.so.2.
You need to use objdump recursively to see what these shared
objects need:
The libsocket.so.2 shared object needs only libc.so.2, which,
in turn, needs nothing. So, if you’re including ping in your image, you
also need to include these two shared objects.
Steve Reid stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems
Thanks for the quick reply. I appreciate the pointer on where to look
up error numbers…I did not know if that error number was the same
as the ones listed in errno.h…apparently it is.
I can’t believe I left out the shared lib…I did go back and put it
in and tried the procedure again…unfortunately I still must be
doing something wrong…here is what I tried:
first, I tried putting in the line libc.so, still got the same
results, then I tried libc.so.1, still got the same results…I did a
‘dumpifs’ and it shows the library and corresponding link that mkifs
created to the library…but I still get the error 83
I was also wondering about something, I did a search on the system
and noticed that there is also a libc.so.2…how do I know which one
to use…and what is the difference between the libc.so.1 and
libc.so.2?
The number is the errno for that error, if you look in the errno.h file
you’ll see that 83 = “Can’t access shared library”. Looking at your build
file, you haven’t included the shared libc (ie. libc.so) which is required.
Reading over some of the Etherboot doc’s it looks like you may need to
port/modify the tool called mknbi . According to the docs each kernel (ie.
OS) requires their own port of the tool to create the network boot image
that etherboot expects.
first, I tried putting in the line libc.so, still got the same
results, then I tried libc.so.1, still got the same results…I did a
‘dumpifs’ and it shows the library and corresponding link that mkifs
created to the library…but I still get the error 83
and just include the libs as libc.so and libcam.so
I was also wondering about something, I did a search on the system
and noticed that there is also a libc.so.2…how do I know which one
to use…and what is the difference between the libc.so.1 and
libc.so.2?
The so.1 series is build against GNU libs and is there for backwards
compatability from 6.0. The so.2 series is build against the Dinkum
libraries and/or a change in compatability (to the so.1) was made. In the
end you should use the so.2 series most of the time - unless a program
requires the so.1 (objdump -x | grep “NEEDED” ), in which case you
should keep everything the same (see above) but include libc.so.1 and
libc.so.2
With a PC, I always felt limited by the software available.
On Unix, I am limited only by my knowledge.
–Peter J. Schoenster <pschon@baste.magibox.net>
Thanks for your input Steve. I have done what you suggested
and the modules that I included all needed libc.so.2, which I
included and still get the same error. I did a dumpifs to verify
that they were indeed included and they are. I’m sure it is something
small that I am overlooking, but have no idea what it is.
: The number is the errno for that error, if you look in the errno.h file
: you’ll see that 83 = “Can’t access shared library”. Looking at your build
: file, you haven’t included the shared libc (ie. libc.so) which is required.
Here’s how to determine which shared libraries you need. This is now in
the Building Embedded Systems guide:
Shared libraries
The first thing you’ll need to do is to ensure that the shared objects
required by the various drivers you’ll be running are present. All drivers
require at least the standard C library shared object (libc.so). Since
the shared object search order looks in /proc/boot, you don’t have
to do anything special, except include the shared library into the image.
This is done by simply specifying the name of the shared library on a
line by itself, meaning “include this file.”
How do you determine which shared objects you need in the image?
You can use the objdump utility to display information about the
executables you’re including in the image; look for the objects marked
as NEEDED For example, suppose you’re including ping in your image:
$ objdump -x which ping | grep NEEDED
objdump: /usr/bin/ping: no symbols
NEEDED libsocket.so.2
NEEDED libc.so.2
The ping executable needs libsocket.so.2 and libc.so.2.
You need to use objdump recursively to see what these shared
objects need:
The libsocket.so.2 shared object needs only libc.so.2, which,
in turn, needs nothing. So, if you’re including ping in your image, you
also need to include these two shared objects.
Steve Reid > stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems
first, I tried putting in the line libc.so, still got the same
results, then I tried libc.so.1, still got the same results…I did a
‘dumpifs’ and it shows the library and corresponding link that mkifs
created to the library…but I still get the error 83
and just include the libs as libc.so and libcam.so
I was also wondering about something, I did a search on the system
and noticed that there is also a libc.so.2…how do I know which one
to use…and what is the difference between the libc.so.1 and
libc.so.2?
The so.1 series is build against GNU libs and is there for backwards
compatability from 6.0. The so.2 series is build against the Dinkum
libraries and/or a change in compatability (to the so.1) was made. In the
end you should use the so.2 series most of the time - unless a program
requires the so.1 (objdump -x | grep “NEEDED” ), in which case you
should keep everything the same (see above) but include libc.so.1 and
libc.so.2
Has anyone successfully built an os image that is suitable for loading
over a network from a bootp/tftp server? I have been playing around
with ‘etherboot’ but can’t seem to get an os image built that
etherboot likes…any ideas?
I saw this posting and that’s why I wanna ask you the one little question. Did
you get any valuable results with this stuff?
As for me I got something - there is a Anders Larsen’s mkQNXnbi program which
produce the network boot image (tagged image) from the QNX boot image. Program’s
documentation mentions about QNX 4.2x only, but it works with QNX 6.x images too,
at least for me The only one bad thing I saw - OS boot image size has limit in
512K (it looks like QNX 4.2x heritage). I haven’t enough time to catch this problem
now. But… At least, it works at all.
You can find mkQNXnbi program in the contrib directory, see in the Etherboot source
tree.
Bye for now,
Igor Mazanov,
SWD Software Ltd.,
Technical Support Team.