Implementing "pseudo" alternate boot on the embedded system

Hi,

How having one OS image (.ifs) can I implement two
different boot configurations?

Are conditional statements in-line in the buildfile supported?

Regards,
Jacek

Jacek Rudnicki wrote:

Hi,

How having one OS image (.ifs) can I implement two
different boot configurations?

Are conditional statements in-line in the buildfile supported?

I heard that’s why diskboot exists in the Momentics distro - to perform conditional operations on bringing up the root filesystem, so I guess the simple answer is no.

On this note, anyone got the low-down on how to remount self-hosted Momentics on to another block device after boot up without the whole system collapsing in a screaming heap?


Evan

One more question.

Is it possible to stop macro called from OS image on target
(i.e. sh /root/config/sysinit) through HyperTerminal connection?

Jacek

Jacek Rudnicki <jacek.rudnicki@quantum.com.pl> wrote:

Hi,

How having one OS image (.ifs) can I implement two
different boot configurations?

Are conditional statements in-line in the buildfile supported?

No. The boot scripting language has no conditionals.

By two different boot configurations, how different are you
looking at, and what are you looking at for the differentiation
point?

Within one IFS you can not have 2 different startup or Procnto
choices.

Within an IFS, by having the only thing that is started be a
shell script or program that does the branch and init decisions,
you can split after Procnto has started up. (In many ways, this
is what diskboot and the scripts it invokes do for QNX x86 desktop boots.)

Working with two different IFS setups, you can have an IPL that will
choose between them. (On x86, our standard IPL does this, at the
point where it says “hit Esc for .altboot”, allowing you to choose
a different IFS.)

-David

David Gibbs
QNX Training Services
dagibbs@qnx.com

In article <d80u26$hor$1@inn.qnx.com>, evanh@clear.net.nz says…

Jacek Rudnicki wrote:
Hi,

How having one OS image (.ifs) can I implement two
different boot configurations?

Are conditional statements in-line in the buildfile supported?


I heard that’s why diskboot exists in the Momentics distro - to perform conditional operations on bringing up the root filesystem, so I guess the simple answer is no.

On this note, anyone got the low-down on how to remount self-hosted Momentics on to another block device after boot up without the whole system collapsing in a screaming heap?

You can search a few years old discussion on how to restart devb-eide
driver somewhere in old newsgroups at inn.qnx.com (those newsgroups
should be read-only now).

Or you can take a look at a few shell scripts that worked fine for me, I
still keep them. Of course you’ll have to adopt one of them to your
needs:

ftp://qnx.org.ru/pub/projects/ed1k/Eide.rst
ftp://qnx.org.ru/pub/projects/ed1k/eide.rst.kabe

Eduard.

Evan

By two different boot configurations, how different are you
looking at, and what are you looking at for the differentiation
point?

There will be the only one small difference at the last stage of OS
image script execution.

In the first boot configuration called “safe mode” I would like to start
shell on first serial port. This will be for low-level diagnositics, fast
system
“rescue”, etc…

The second configuration will start macro (i.e. sh …/sysinit) insted of
shell.
The “sysinit” file written on the flash starts some common services and
user applications. In this scenario all serial ports are used by apps, so
shell is not available. Because this is a automatic procedure “safe mode”
will be a emergency protection.

Jacek

How implement something like this:
→ wait for about 2 sec for key pressed ?

It must be done in the IPL or startup code.

Jacek

Problem solved :slight_smile:.

ed1k wrote:

Or you can take a look at a few shell scripts that worked fine for me, I
still keep them. Of course you’ll have to adopt one of them to your
needs:

ftp://qnx.org.ru/pub/projects/ed1k/Eide.rst
ftp://qnx.org.ru/pub/projects/ed1k/eide.rst.kabe

Excellent!

Thanks,
Evan

Jacek Rudnicki wrote:

Hi,

How having one OS image (.ifs) can I implement two
different boot configurations?

Are conditional statements in-line in the buildfile supported?

Regards,
Jacek

Hello Jacek.

We only have a real boot manager for QNX6 which allows to boot into
different OS images. Would this help you ?

Luzt