startup-* options

Generic options for startup programs (QNX Neutrino)

Description:

All QNX Neutrino startup programs support the generic options described below. There are additional options for the following architectures:

Note: Individual startup programs can override these options and may support additional board-specific options. The order of precedence is as follows:
  1. board-specific options
  2. architecture-specific options
  3. generic options

Generic options

-A
Reboot the system on any abnormal termination of the kernel. The default is to display information about the crash, and then halt.
-C
Clear (i.e., zero) any memory allocated by the startup library.
-D channel[.channel_opts]
Specify an output channel for debugging information. The format of this option and the default value vary from board to board.
-F [~]value
Control the flags field in the cpuinfo section of the system page:
  • value — OR the flags field with value
  • ~value — AND the flags field with ~value

For more information about the flags, see "Structure of the system page" in the Customizing Image Startup Programs chapter of the Building Embedded Systems guide.

-f [cpu_freq][,[cycles_freq][,timer_freq]]
Specify CPU frequencies. All frequencies can be followed by H for hertz, K for kilohertz, or M for megahertz (these suffixes aren't case-sensitive). If no suffix is given, the library assumes megahertz if the number is less than 1000; otherwise it assumes hertz.

If they're specified, cpu_freq, cycles_freq, and timer_freq are used to set the corresponding variables in the startup code:

  • cpu_freq — the CPU clock frequency. It's also used to set the speed field in the cpuinfo section of the system page.
  • cycles_freq — the frequency at which the value returned by ClockCycles() increments. It's also used to set the cycles_per_sec field in the qtime section of the system page.
  • timer_freq — the frequency at which the timer chip input runs. It's also used to set the timer_rate and timer_scale values of the qtime section of the system page.

If a variable is zero when it comes time to set the field(s) on the system page, the library code attempts to deduce the proper value by using one of the other frequency variables. Which one it uses depends on the particular CPU and hardware.

-I flag
Enable kernel restoration as part of IFS restoration. The flag is 0 to disable checksum verification, or 1 to enable it.

If checksum verification is enabled and fails, the entire image is reloaded.

Note: Even if the IFS checksum verification is disabled, a checksum is still performed on the IFS Restoration internal data structure (approximately 32 bytes) to ensure at least some data integrity.

For more information, see Reloadable Image Filesystems in the QNX Neutrino technotes.

-i ifs2_size[,flags][,paddr_src][,paddr_dst]
Enable secondary IFS restoration.

The arguments are:

ifs2_size
The size of the secondary IFS (note: this can be larger than the actual size).
flags
  • Not specified — load the secondary IFS but don't try to restore on wake-up
  • R — load the secondary IFS and restore
  • K or RK — load the secondary IFS and restore with a checksum
paddr_src
  • Not specified — the secondary IFS is located in flash after the primary IFS
  • Specified — the secondary IFS is located at the physical address specified
paddr_dst
  • Not specified — the secondary IFS will be copied to a default location in RAM
  • Specified — the secondary IFS will be copied to the physical address specified (choose an address in a "safe" place, such as at the end of RAM away from where the primary image is copied)

If the checksum is enabled and fails, the entire secondary IFS is reloaded.

Note: Even if the secondary IFS checksum is disabled, a checksum is still performed on the IFS Restoration internal data structure (approximately 16 bytes) to ensure at least some data integrity.

For more information, see Reloadable Image Filesystems in the QNX Neutrino technotes.

-j addr
For use with JTAG/hardware debuggers.

Reserve 4 bytes of RAM at the physical address specified by addr, and copy the physical address of the location of the system page to addr in RAM so that it can be retrieved by a hardware debugger.

-K channel[.channel_opts]
Specify an output channel for kernel debugger information. The format of this option and the default value vary from board to board.
-N hostname
Specify the node name. The default is the local host.
-o hundred_loop,overhead
Specify the calibration data (100 loop time and overhead) to store in the system page. In order to make startup faster and reduce jitter, nanospin_calibrate() tries to read the calibration data from values stored in the system page.
-P max_CPUs
Specify the maximum number of processors to activate in a multicore system. This is useful for testing how well your application runs on a system with fewer CPUs. This option requires procnto-smp instead of procnto to have an effect.
-R size[,align]
Remove size memory from system use, optionally specifying the alignment. This is useful for testing in a restricted-memory environment. The size and alignment are in bytes, unless followed by one of K (kilobytes), M (megabytes), or G (gigabytes).
-r addr,size[,flag]
Remove size memory from system use starting at addr.

The flag is an optional argument used to specify if the memory should be cleared:

Flag: Memory:
None Clears to 0
0 Clears to 0
1 Does not clear
-S [~]section
Turn on (or, if you use ~section, off) output of the specified syspage section's information. Use this to restrict the amount of syspage information. For more information, see the description of print_syspage() in the Customizing Image Startup Programs chapter of Building Embedded Systems.
-T
Prevent the startup program from setting the SYSPAGE_ENTRY(qtime)->boot_time field. If this field is 0 the first time you call ClockTime() to change the time of day, the kernel sets it to the appropriate value. This is useful if the RTC hardware isn't in UTC.
-v[v]...
Be verbose. More v characters cause even more verbosity.
-Z
Enable tickless operation. In this mode, when the system is idle, the clock tick is "turned off" until just after the next active timer is to fire. For more information, see "Clocks, timers, and power management" in the Tick, Tock: Understanding the Microkernel's Concept of Time chapter of the QNX Neutrino Programmer's Guide.

Options for ARM startups

The following options are supported in the startup programs for ARM targets:

-w value
Set the cache policy:
  • -wb sets write-back, read-allocate (no write-allocate) caching
  • -wa sets write-back, write-allocate caching
  • -wt sets write-through caching

The actual behavior depends on the processor; not all processors implement all these types of caching. If the processor doesn't implement the requested option, the default cache policy is used.

The supported cache policies are specified in the processor configuration file, armv_chip_xxxx.c:

This field: Specifies PTE encodings for the:
pte Default cache policy
pte_wb Write-back (-wb) policy
pte_wa Write-allocate (-wa) policy
pte_wt Write-through (-wt) policy

The configuration must specify at least the default (pte) field. Any unsupported policy should specify 0 in the appropriate field, and if that policy is requested via the -w option, it's ignored, and the default policy is used.

Options for x86 startups

The following options are supported in the startup programs for x86 targets:

-B
By default, x86 startups use the Advanced Control and Power Interface (ACPI) table to determine the number of logical CPUs on hyperthreaded systems. Use this option to avoid checking for ACPI in the case of buggy BIOSs; if ACPI isn't present or you specify -B, the startup uses the Intel Multiprocessor Specification to determine the number of CPUs.
-x
Enable extended addressing. This lets you access physical addresses above 4 GB.
Note: This option has an effect only if the CPU supports more than 32 address lines. On x86 CPUs, extended addressing is supported if the X86_CPU_PAE bit is on in the SYSPAGE_ENTRY(cpuinfo)->flags. For more information, see "Structure of the system page" in the Customizing Image Startup Programs chapter of Building Embedded Systems.