Starting the QNX Startup via UBoot

Dear Newsgroup,
actually I am trying to port QNX onto the DNP9200 Board and I ran into
another problem.

We managed to create a complete QNX Image with our own Startup Programm
written as described in the QNX documentation.

Since UBoot does a lot of hardware initialization we have not written our
own IPL programm and want to use UBoot.
For testing the image we want to start it via UBoot and executing the
startup by jumping to our startup code entry point.

The question is:
Is that possible and if so how do we find out the adress of the entry point
of our startup code?
Actually we are try to use the offset value that is printed when building
the QNX image.

At the moment UBoot says: Starting Kernel…

And thats all…

Thanks a lot in advance!
Greetings
Jan

Hi Jan,

I’m currently using uBoot for booting QNX on an MPC5200 board.
My build file is as following :

[image=0x20000]
[virtual=ppcbe/elf +compress] .bootstrap = {
startup_puc5200 -K mgt5200.psc1.57600.33000000
PATH=/proc/boot procnto-600

}

[+script] .script = {

I use mkifs for building an elf file :
mkifs -v image.build image.elf

and after I use mkimage (tool provided with uBoot) for building an uBoot
bootable image:
mkimage -n “my image” -O QNX -C none -a 0x20000 -e 0x20000 -d image.elf
image.img

In uBoot, I use the bootm command for booting my image :
tftpboot 0x800000 /tftpdir/image.img
bootm 0x800000

Best regards


Jan Raddatz wrote:

Dear Newsgroup,
actually I am trying to port QNX onto the DNP9200 Board and I ran into
another problem.

We managed to create a complete QNX Image with our own Startup Programm
written as described in the QNX documentation.

Since UBoot does a lot of hardware initialization we have not written our
own IPL programm and want to use UBoot.
For testing the image we want to start it via UBoot and executing the
startup by jumping to our startup code entry point.

The question is:
Is that possible and if so how do we find out the adress of the entry point
of our startup code?
Actually we are try to use the offset value that is printed when building
the QNX image.

At the moment UBoot says: Starting Kernel…

And thats all…

Thanks a lot in advance!
Greetings
Jan


\

Jan Raddatz <jan.raddatz@gmail.com> wrote:

Dear Newsgroup,
actually I am trying to port QNX onto the DNP9200 Board and I ran into
another problem.

We managed to create a complete QNX Image with our own Startup Programm
written as described in the QNX documentation.

Since UBoot does a lot of hardware initialization we have not written our
own IPL programm and want to use UBoot.
For testing the image we want to start it via UBoot and executing the
startup by jumping to our startup code entry point.

The question is:
Is that possible and if so how do we find out the adress of the entry point
of our startup code?

Booting QNX from U-Boot is possible, and quite common. There are various ways
of specifying the start address for U-Boot to jump to, depending on what type
of image you generated.

Here are some examples - assume DRAM starts at 0xA0000000.

In your build file, if you have:

[image=0xa0020000]
[virtual=armle,binary]

when you generate the image, you will obtain an offset where the QNX image
execution begins:

mkifs -vvvv build image.bin


Offset Size Entry Ramoff Target=Host
a0020000 100 ---- — Startup-header
a0020100 c008 a00224e0 — /tmp/DAA065960
^^^^^^^^
this is the address for U-Boot to jump to (startup_vaddr)

So, at the U-Boot prompt, you would download and run the image as follows:

U-Boot=>tftpboot 0xA0020000 /xfer/image
…[image loads]
U-Boot=>go 0xA00224e0

The problem with this method is, if you change the startup code at all, the
entry address may change, and it’s tiresome to obtain the address each time,
and manually enter it. A better method is to configure your build file as follows:

[image=0xa0020000]
[virtual=armle,raw]

A ‘raw’ format image is the same as a binary, except it has a jump instruction,
right at the beginning, which jumps to startup_vaddr. So, each time you load the
image, you can enter:

U-Boot=>tftpboot 0xA0020000 /xfer/image.raw
…[image loads]
U-Boot=>go 0xA0020000


Actually we are try to use the offset value that is printed when building
the QNX image.

At the moment UBoot says: Starting Kernel…

And thats all…

Thanks a lot in advance!
Greetings
Jan


David Green (dgreen@qnx.com)
QNX Software Systems Ltd.
http://www.qnx.com

Dear Pierre,
thanks a lot for your help!

I will try doing it as you described!

Thanks again and have a nice day
Jan



“Pierre AUBERT” <p.aubert@nospam.please> schrieb im Newsbeitrag
news:e695fd$e61$1@inn.qnx.com

Hi Jan,

I’m currently using uBoot for booting QNX on an MPC5200 board.
My build file is as following :

[image=0x20000]
[virtual=ppcbe/elf +compress] .bootstrap = {
startup_puc5200 -K mgt5200.psc1.57600.33000000
PATH=/proc/boot procnto-600

}

[+script] .script = {

I use mkifs for building an elf file :
mkifs -v image.build image.elf

and after I use mkimage (tool provided with uBoot) for building an uBoot
bootable image:
mkimage -n “my image” -O QNX -C none -a 0x20000 -e 0x20000 -d image.elf
image.img

In uBoot, I use the bootm command for booting my image :
tftpboot 0x800000 /tftpdir/image.img
bootm 0x800000

Best regards


Jan Raddatz wrote:

Dear Newsgroup,
actually I am trying to port QNX onto the DNP9200 Board and I ran into
another problem.

We managed to create a complete QNX Image with our own Startup Programm
written as described in the QNX documentation.

Since UBoot does a lot of hardware initialization we have not written our
own IPL programm and want to use UBoot.
For testing the image we want to start it via UBoot and executing the
startup by jumping to our startup code entry point.

The question is:
Is that possible and if so how do we find out the adress of the entry
point of our startup code?
Actually we are try to use the offset value that is printed when building
the QNX image.

At the moment UBoot says: Starting Kernel…

And thats all…

Thanks a lot in advance!
Greetings
Jan

\

Dear Dave,
thanks a lot for your quick answer. It sounds similar to Pierre’s answer and
I will try to get it running at Uni now.

Thanks again and have a great day !
Jan


“Dave Green” <dgreen@dgreen.ott.qnx.com> schrieb im Newsbeitrag
news:e695om$e6e$1@inn.qnx.com

Jan Raddatz <> jan.raddatz@gmail.com> > wrote:
Dear Newsgroup,
actually I am trying to port QNX onto the DNP9200 Board and I ran into
another problem.

We managed to create a complete QNX Image with our own Startup Programm
written as described in the QNX documentation.

Since UBoot does a lot of hardware initialization we have not written our
own IPL programm and want to use UBoot.
For testing the image we want to start it via UBoot and executing the
startup by jumping to our startup code entry point.

The question is:
Is that possible and if so how do we find out the adress of the entry
point
of our startup code?

Booting QNX from U-Boot is possible, and quite common. There are various
ways
of specifying the start address for U-Boot to jump to, depending on what
type
of image you generated.

Here are some examples - assume DRAM starts at 0xA0000000.

In your build file, if you have:

[image=0xa0020000]
[virtual=armle,binary]

when you generate the image, you will obtain an offset where the QNX image
execution begins:

mkifs -vvvv build image.bin


Offset Size Entry Ramoff Target=Host
a0020000 100 ---- — Startup-header
a0020100 c008 a00224e0 — /tmp/DAA065960
^^^^^^^^
this is the address for U-Boot to jump to (startup_vaddr)

So, at the U-Boot prompt, you would download and run the image as follows:

U-Boot=>tftpboot 0xA0020000 /xfer/image
…[image loads]
U-Boot=>go 0xA00224e0

The problem with this method is, if you change the startup code at all,
the
entry address may change, and it’s tiresome to obtain the address each
time,
and manually enter it. A better method is to configure your build file as
follows:

[image=0xa0020000]
[virtual=armle,raw]

A ‘raw’ format image is the same as a binary, except it has a jump
instruction,
right at the beginning, which jumps to startup_vaddr. So, each time you
load the
image, you can enter:

U-Boot=>tftpboot 0xA0020000 /xfer/image.raw
…[image loads]
U-Boot=>go 0xA0020000


Actually we are try to use the offset value that is printed when building
the QNX image.

At the moment UBoot says: Starting Kernel…

And thats all…

Thanks a lot in advance!
Greetings
Jan




\

David Green (> dgreen@qnx.com> )
QNX Software Systems Ltd.
http://www.qnx.com

You don’t have to build ‘Uboot image’ using that tool. If you generate QNX
boot image in ELF multiboot-compatible format (this is supported starting
from 6.3 I think) Uboot can load it directly by “bootelf” command.

One neat feature that you can use is that Uboot has ‘autoboot’ command that
can include a sequence of commands. It also tries to verify an image before
jumping and skips the jump if it is invalid. Together these features allow
for something like this:

autoboot=“bootelf; tftp; bootm primary write xxxxxxx; reset”

(not sure about the bootm - it might have been some other command, it’s been
few years…).

Which means ‘try to boot, if that fails try to TFTP and reflash the boot
image, then reset’.
This allows fail-safe boot using network, which is nice during development
when you can mess up your board. If you want to deploy a new image all you
have to do is to put in onto your TFTP server and invalidate the image
signature on the board (this can be done by interrupting the autoboot with
ESC and using command like “erase 2:2”). The target will pick it up and
reflash itself on next boot…

– igor


“Jan Raddatz” <jan.raddatz@gmail.com> wrote in message
news:e698cg$g11$1@inn.qnx.com

Dear Dave,
thanks a lot for your quick answer. It sounds similar to Pierre’s answer
and I will try to get it running at Uni now.

Thanks again and have a great day !
Jan


“Dave Green” <> dgreen@dgreen.ott.qnx.com> > schrieb im Newsbeitrag
news:e695om$e6e$> 1@inn.qnx.com> …
Jan Raddatz <> jan.raddatz@gmail.com> > wrote:
Dear Newsgroup,
actually I am trying to port QNX onto the DNP9200 Board and I ran into
another problem.

We managed to create a complete QNX Image with our own Startup Programm
written as described in the QNX documentation.

Since UBoot does a lot of hardware initialization we have not written
our
own IPL programm and want to use UBoot.
For testing the image we want to start it via UBoot and executing the
startup by jumping to our startup code entry point.

The question is:
Is that possible and if so how do we find out the adress of the entry
point
of our startup code?

Booting QNX from U-Boot is possible, and quite common. There are various
ways
of specifying the start address for U-Boot to jump to, depending on what
type
of image you generated.

Here are some examples - assume DRAM starts at 0xA0000000.

In your build file, if you have:

[image=0xa0020000]
[virtual=armle,binary]

when you generate the image, you will obtain an offset where the QNX
image
execution begins:

mkifs -vvvv build image.bin


Offset Size Entry Ramoff Target=Host
a0020000 100 ---- — Startup-header
a0020100 c008 a00224e0 — /tmp/DAA065960
^^^^^^^^
this is the address for U-Boot to jump to (startup_vaddr)

So, at the U-Boot prompt, you would download and run the image as
follows:

U-Boot=>tftpboot 0xA0020000 /xfer/image
…[image loads]
U-Boot=>go 0xA00224e0

The problem with this method is, if you change the startup code at all,
the
entry address may change, and it’s tiresome to obtain the address each
time,
and manually enter it. A better method is to configure your build file as
follows:

[image=0xa0020000]
[virtual=armle,raw]

A ‘raw’ format image is the same as a binary, except it has a jump
instruction,
right at the beginning, which jumps to startup_vaddr. So, each time you
load the
image, you can enter:

U-Boot=>tftpboot 0xA0020000 /xfer/image.raw
…[image loads]
U-Boot=>go 0xA0020000


Actually we are try to use the offset value that is printed when
building
the QNX image.

At the moment UBoot says: Starting Kernel…

And thats all…

Thanks a lot in advance!
Greetings
Jan




\

David Green (> dgreen@qnx.com> )
QNX Software Systems Ltd.
http://www.qnx.com

Hi Igor,
thanks a lot for your help. We will try your way. Until now the Image just
denies to boot.

UBoot says: Starting Kernel… and then the board hangs.


Thanks again :slight_smile:
Greetings
Jan


“Igor Kovalenko” <kovalenko@comcast.net> schrieb im Newsbeitrag
news:e7all5$64g$1@inn.qnx.com

You don’t have to build ‘Uboot image’ using that tool. If you generate QNX
boot image in ELF multiboot-compatible format (this is supported starting
from 6.3 I think) Uboot can load it directly by “bootelf” command.

One neat feature that you can use is that Uboot has ‘autoboot’ command
that can include a sequence of commands. It also tries to verify an image
before jumping and skips the jump if it is invalid. Together these
features allow for something like this:

autoboot=“bootelf; tftp; bootm primary write xxxxxxx; reset”

(not sure about the bootm - it might have been some other command, it’s
been few years…).

Which means ‘try to boot, if that fails try to TFTP and reflash the boot
image, then reset’.
This allows fail-safe boot using network, which is nice during development
when you can mess up your board. If you want to deploy a new image all you
have to do is to put in onto your TFTP server and invalidate the image
signature on the board (this can be done by interrupting the autoboot with
ESC and using command like “erase 2:2”). The target will pick it up and
reflash itself on next boot…

– igor


“Jan Raddatz” <> jan.raddatz@gmail.com> > wrote in message
news:e698cg$g11$> 1@inn.qnx.com> …
Dear Dave,
thanks a lot for your quick answer. It sounds similar to Pierre’s answer
and I will try to get it running at Uni now.

Thanks again and have a great day !
Jan


“Dave Green” <> dgreen@dgreen.ott.qnx.com> > schrieb im Newsbeitrag
news:e695om$e6e$> 1@inn.qnx.com> …
Jan Raddatz <> jan.raddatz@gmail.com> > wrote:
Dear Newsgroup,
actually I am trying to port QNX onto the DNP9200 Board and I ran into
another problem.

We managed to create a complete QNX Image with our own Startup Programm
written as described in the QNX documentation.

Since UBoot does a lot of hardware initialization we have not written
our
own IPL programm and want to use UBoot.
For testing the image we want to start it via UBoot and executing the
startup by jumping to our startup code entry point.

The question is:
Is that possible and if so how do we find out the adress of the entry
point
of our startup code?

Booting QNX from U-Boot is possible, and quite common. There are various
ways
of specifying the start address for U-Boot to jump to, depending on what
type
of image you generated.

Here are some examples - assume DRAM starts at 0xA0000000.

In your build file, if you have:

[image=0xa0020000]
[virtual=armle,binary]

when you generate the image, you will obtain an offset where the QNX
image
execution begins:

mkifs -vvvv build image.bin


Offset Size Entry Ramoff Target=Host
a0020000 100 ---- — Startup-header
a0020100 c008 a00224e0 — /tmp/DAA065960
^^^^^^^^
this is the address for U-Boot to jump to (startup_vaddr)

So, at the U-Boot prompt, you would download and run the image as
follows:

U-Boot=>tftpboot 0xA0020000 /xfer/image
…[image loads]
U-Boot=>go 0xA00224e0

The problem with this method is, if you change the startup code at all,
the
entry address may change, and it’s tiresome to obtain the address each
time,
and manually enter it. A better method is to configure your build file
as follows:

[image=0xa0020000]
[virtual=armle,raw]

A ‘raw’ format image is the same as a binary, except it has a jump
instruction,
right at the beginning, which jumps to startup_vaddr. So, each time you
load the
image, you can enter:

U-Boot=>tftpboot 0xA0020000 /xfer/image.raw
…[image loads]
U-Boot=>go 0xA0020000


Actually we are try to use the offset value that is printed when
building
the QNX image.

At the moment UBoot says: Starting Kernel…

And thats all…

Thanks a lot in advance!
Greetings
Jan




\

David Green (> dgreen@qnx.com> )
QNX Software Systems Ltd.
http://www.qnx.com
\

Dear Newsgroup,

i have arm at91rm9200 processor board. i have arm integrator bsp with
only binary of ipl and startup. i m trying to load QNX image in board
via u-boot. i have successfully loade u-boot in the board. when i read
posts in this group. i read that we can load qnx’s elf image via
u-boot. but when i try to make elf image by the command mkifs -v
image.build image.elf, it shows error that host file elf.boot not
available. can any one help in this issue. where to get this file?

thanks in advance.
greetings
ulhas

Hello,

Which version of QNX Momentics are you using? Support for ELF multiboot images
was included starting from 6.2.1B version only.

Regards,
Igor.

ulhasce wrote:

Dear Newsgroup,

i have arm at91rm9200 processor board. i have arm integrator bsp with
only binary of ipl and startup. i m trying to load QNX image in board
via u-boot. i have successfully loade u-boot in the board. when i read
posts in this group. i read that we can load qnx’s elf image via
u-boot. but when i try to make elf image by the command mkifs -v
image.build image.elf, it shows error that host file elf.boot not
available. can any one help in this issue. where to get this file?

thanks in advance.
greetings
ulhas

Hello igor,



Thanks for your reply. I am using QNX momentics 6.3.0 but in the directory
%QNXtarget%\qnx6\armle\boot\sys there is no elf.boot. I found this file in
all other hardware’s corresponding directories like x86, mips, armbe, etc.
but not in armle’s corresponding directory. Due to this reason I m not able
to run mkifs -v image.build image.elf command which shows error that host
file elf.boot not available. Whether there is problem in installation of qnx
momentics or it is due to my use of evaluation version? Please tell me why
elf.boot is not in that directory if u know the reason.



Thanks in advance.

Greetings

Ulhas





“Igor Mazanov” <i.mazanov@swd.ru> wrote in message
news:f0n4bv$2bh$1@inn.qnx.com

Hello,

Which version of QNX Momentics are you using? Support for ELF multiboot
images was included starting from 6.2.1B version only.

Regards,
Igor.

ulhasce wrote:
Dear Newsgroup,

i have arm at91rm9200 processor board. i have arm integrator bsp with
only binary of ipl and startup. i m trying to load QNX image in board
via u-boot. i have successfully loade u-boot in the board. when i read
posts in this group. i read that we can load qnx’s elf image via
u-boot. but when i try to make elf image by the command mkifs -v
image.build image.elf, it shows error that host file elf.boot not
available. can any one help in this issue. where to get this file? thanks
in advance.
greetings
ulhas

I think they simply omitted it from the ARM version. Should not have
anything to do with eval version. Call your support rep…

– igor

“ulhas” <ulhasce@gmail.com> wrote in message
news:f48qqn$arb$1@inn.qnx.com

Hello igor,



Thanks for your reply. I am using QNX momentics 6.3.0 but in the directory
%QNXtarget%\qnx6\armle\boot\sys there is no elf.boot. I found this file in
all other hardware’s corresponding directories like x86, mips, armbe, etc.
but not in armle’s corresponding directory. Due to this reason I m not
able to run mkifs -v image.build image.elf command which shows error that
host file elf.boot not available. Whether there is problem in installation
of qnx momentics or it is due to my use of evaluation version? Please tell
me why elf.boot is not in that directory if u know the reason.



Thanks in advance.

Greetings

Ulhas





“Igor Mazanov” <> i.mazanov@swd.ru> > wrote in message
news:f0n4bv$2bh$> 1@inn.qnx.com> …
Hello,

Which version of QNX Momentics are you using? Support for ELF multiboot
images was included starting from 6.2.1B version only.

Regards,
Igor.

ulhasce wrote:
Dear Newsgroup,

i have arm at91rm9200 processor board. i have arm integrator bsp with
only binary of ipl and startup. i m trying to load QNX image in board
via u-boot. i have successfully loade u-boot in the board. when i read
posts in this group. i read that we can load qnx’s elf image via
u-boot. but when i try to make elf image by the command mkifs -v
image.build image.elf, it shows error that host file elf.boot not
available. can any one help in this issue. where to get this file?
thanks in advance.
greetings
ulhas
\