Startup

Packaging Tools Requires: project open

Choose when your app releases startup to the system, and set up the target's network, environment variables and GPS location service.

When the target boots, your app starts from a systemd service that holds the rest of the system — networking, SSH and so on — until the app releases it. Auto Release System and After Start Delay decide when that happens. The Network, Environment and Location sub-tabs set up the target's USB and Ethernet networking, environment variables for your app, and its GPS daemon (gpsd).

Note: Only appears for an OpenView platform project.
Note: These settings save with the rest of the project — click Save... on the toolbar. They're written into the package when you build it, and only take effect once it's installed on the target.

The Startup panel is shown below, on the Network sub-tab, with each numbered item described in turn:

  1. Auto Release System — when the app's start script tells systemd the app is ready, releasing the rest of the system: NoAutoStart (never — your app must call ApplicationContext.ReleaseStartup() itself), BeforeApplicationStart (just before the app starts) or AfterApplicationStart (after the app starts, once After Start Delay has passed).
  2. After Start Delay — how many seconds (3, 5 or 10) to wait after the app starts. Only used with AfterApplicationStart.
  3. Network — the target's USB gadget addresses and its Ethernet port.
  4. Environment — environment variables set for your app when it starts.
  5. Location — the GPS daemon (gpsd) that feeds location data to your app.
The Startup panel, numbered
The Startup panel, numbered

Set When Your App Releases Startup

Watch video walkthrough

  1. Click Auto Release System and choose when the system is released — here, AfterApplicationStart.

    The Auto Release System choices
    The Auto Release System choices
  2. Click After Start Delay and choose how long to wait after the app starts — here, 5 seconds.

    The After Start Delay choices
    The After Start Delay choices
  3. When the package is built, the app's start script waits that long after starting your app, then releases the system.

    AfterApplicationStart with a 5-second delay
    AfterApplicationStart with a 5-second delay
Note: With NoAutoStart, networking and SSH wait until your app calls ApplicationContext.ReleaseStartup() — if it never does, they never come up.

Configure the Network

Watch video walkthrough

  1. The target shows up on your PC as a network adapter over its USB connection. To change its addresses, tick Update Gadget Driver Configuration.

    The Update Gadget Driver Configuration checkbox
    The Update Gadget Driver Configuration checkbox
  2. RNDIS IP Address (used by Windows PCs and some Linux hosts) and CDC/NCM IP Address (used by Macs and some Linux hosts) are now editable. To set up the target's physical Ethernet port as well, tick Update Ethernet Port (If Available).

    The gadget addresses unlocked, and the Update Ethernet Port checkbox
    The gadget addresses unlocked, and the Update Ethernet Port checkbox
  3. Enter a static Default IP Address, Default Gateway and Default DNS for the port. To have the target hand out addresses to devices plugged into that port, tick Enable DHCP Server.

    The Ethernet settings, with the Enable DHCP Server checkbox
    The Ethernet settings, with the Enable DHCP Server checkbox
  4. Set the pool's Start Address (the last part of the first address handed out) and Pool Size. DNS Address is the DNS server it tells those devices to use. If the port should get its own address from your network instead, tick Fetch IP using DHCP.

    The DHCP Server settings, and the Fetch IP using DHCP checkbox
    The DHCP Server settings, and the Fetch IP using DHCP checkbox
  5. The static address, gateway and DNS are greyed out — the port asks your network for them instead.

    Fetch IP using DHCP ticked
    Fetch IP using DHCP ticked
Note: The target can only run a DHCP server when its port has a static address. With Fetch IP using DHCP ticked, the DHCP server settings stay editable but aren't used.
Note: Default DNS and the DHCP server's DNS Address are one setting — changing either one changes both.
Note: None of these fields check what you type — a mistyped address is written into the package as-is, with no warning here or when you build.

Set Environment Variables

Watch video walkthrough

  1. On the Environment sub-tab, click +.

    The + button on the Environment sub-tab
    The + button on the Environment sub-tab
  2. A new row is added as New Variable = Value. Double-click New Variable to edit it.

    The new variable row
    The new variable row
  3. Type the variable's name — here, WAYLAND_DEBUG — and press Enter. Then double-click Value.

    The variable name typed in
    The variable name typed in
  4. Type its value — here, 1 — and press Enter.

    The value typed in
    The value typed in
  5. To remove a variable, select its row and click −.

    WAYLAND_DEBUG selected, with the − button
    WAYLAND_DEBUG selected, with the − button
  6. It's removed right away, with no confirmation.

    The variable list after removing the variable
    The variable list after removing the variable
Note: Each variable becomes an export Name=Value line in the app's start script, so it's set before your app starts.

Configure the Location Service

Watch video walkthrough

  1. On the Location sub-tab, Connection Type starts on Serial, for a GPS receiver on a serial port. Set Device Path to the receiver's port (such as /dev/ttyUSB0) and tick Start Daemon to start gpsd at boot. Under GPSD Arguments, Don't wait to poll (-n), Read-Only mode (-b), Debug Level (-d) and Baud Rate (-s) set gpsd's own options — leave Baud Rate blank to detect it automatically.

    The Location sub-tab, with Serial settings
    The Location sub-tab, with Serial settings
  2. If the GPS data comes over CAN instead, click Connection Type and choose CAN.

    The Connection Type choices
    The Connection Type choices
  3. The serial settings are hidden — with CAN, the toolkit sets gpsd up itself when the package is built.

    CAN selected, with the serial settings hidden
    CAN selected, with the serial settings hidden
Note: These settings are only installed on OpenViewLinuxPro targets. Other OpenView platforms show the same tab, but its settings aren't included in the package.
Note: This sets up a real gpsd reading an actual GPS receiver — it isn't a fake location for testing.