|
| 1 | +# ******************************************************************************* |
| 2 | +# Copyright (c) 2025 Contributors to the Eclipse Foundation |
| 3 | +# |
| 4 | +# See the NOTICE file(s) distributed with this work for additional |
| 5 | +# information regarding copyright ownership. |
| 6 | +# |
| 7 | +# This program and the accompanying materials are made available under the |
| 8 | +# terms of the Apache License Version 2.0 which is available at |
| 9 | +# https://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# SPDX-License-Identifier: Apache-2.0 |
| 12 | +# ******************************************************************************* |
| 13 | + |
| 14 | + |
| 15 | +############################################################################### |
| 16 | +# |
| 17 | +# Example image built based on minimal configuration from QNX |
| 18 | +# |
| 19 | +############################################################################### |
| 20 | + |
| 21 | +[-optional] |
| 22 | + |
| 23 | +[image=0x3600000] # Set image size to 56MB (0x3600000 bytes) |
| 24 | +[virtual=aarch64le,raw -compress] boot = { # Configure for aarch64le architecture with raw compressed boot |
| 25 | + # TODO: replace startup-virt with the actual aarch64 startup binary for the target BSP. |
| 26 | + # QNX SDP 8.0.0 ships no generic QEMU-virt startup; source one from the appropriate BSP. |
| 27 | + startup-virt -v # Start aarch64 kernel - board-specific startup binary required |
| 28 | + PATH=/proc/boot # Set executable search path to boot directory |
| 29 | + LD_LIBRARY_PATH=/proc/boot # Set library search path to boot directory |
| 30 | + [+keeplinked] procnto-smp-instr # Keep process manager linked and instrumented for SMP |
| 31 | +} |
| 32 | + |
| 33 | +[+script] startup-script = { # Define startup script that runs during boot |
| 34 | + procmgr_symlink /dev/shmem /tmp # Create symbolic link from shared memory to /tmp |
| 35 | + # /tmp will be mounted later as a proper RAM disk |
| 36 | + |
| 37 | + display_msg Welcome to QNX OS 8.0 on aarch64 tweaked for S-CORE! # Display welcome message |
| 38 | + |
| 39 | + # These env variables get inherited by all programs which follow |
| 40 | + SYSNAME=nto # Set system name to "nto" (Neutrino) |
| 41 | + TERM=qansi # Set terminal type to QNX ANSI |
| 42 | + |
| 43 | + devc-ser8250 & # Start serial driver in background |
| 44 | + waitfor /dev/ser1 # Wait for serial device to be available |
| 45 | + reopen /dev/ser1 # Reopen serial device for console I/O |
| 46 | + |
| 47 | + display_msg Placeholder for startup script # Display startup message |
| 48 | + etc/startup.sh # Execute main startup script |
| 49 | + |
| 50 | + [+session] /bin/sh & # Start shell session in background |
| 51 | +} |
| 52 | + |
| 53 | +# Essential utilities - core system commands needed for basic operation |
| 54 | +# These binaries provide fundamental system functionality and process management |
| 55 | + |
| 56 | +# Process and system management utilities |
| 57 | +on # Command execution utility - runs commands with specific options |
| 58 | +[type=link] waitfor=on # Create symbolic link: waitfor -> on (waits for resources to become available) |
| 59 | +[type=link] ability=on # Create symbolic link: ability -> on (manages process abilities/privileges) |
| 60 | + |
| 61 | +# Shell and command interpreter |
| 62 | +ksh # Korn shell - provides command-line interface and scripting |
| 63 | +pidin # Process information display - shows running processes (like 'ps' on Linux) |
| 64 | +[type=link] /bin/sh=/proc/boot/ksh # Create symbolic link: sh -> ksh (standard shell link) |
| 65 | + |
| 66 | +# File system utilities |
| 67 | +mount # File system mount utility - mounts/unmounts file systems |
| 68 | +getconf # System configuration query utility - retrieves system parameters |
| 69 | +[type=link] setconf=getconf # Create symbolic link: setconf -> getconf (sets configuration parameters) |
| 70 | + |
| 71 | +# Device drivers for hardware access |
| 72 | +devc-ser8250 # Serial port driver for 8250/16550 UART controllers (console access) |
| 73 | + |
| 74 | +# System logging utilities |
| 75 | +slog2info # System log viewer - displays logged messages |
| 76 | +slogger2 # System logging daemon - collects and manages log messages |
| 77 | + |
| 78 | +# Essential libraries - core runtime libraries required for system operation |
| 79 | +# These libraries provide fundamental services like C runtime, networking, and logging |
| 80 | + |
| 81 | +# Standard C library - provides basic C runtime functions |
| 82 | +libc.so.6 # Main C library (malloc, printf, file I/O, etc.) |
| 83 | + |
| 84 | +# Dynamic linker/loader - handles dynamic library loading at runtime |
| 85 | +/usr/lib/ldqnx-64.so.2=ldqnx-64.so.2 # 64-bit QNX dynamic linker (loads shared libraries) |
| 86 | + |
| 87 | +# Networking library - provides socket and network communication functions |
| 88 | +libsocket.so.4 # Socket library (TCP/IP, UDP, network I/O functions) |
| 89 | +[type=link] libsocket.so=libsocket.so.4 # Create version-neutral symbolic link |
| 90 | + |
| 91 | +# System logging library - provides logging services for applications |
| 92 | +libslog2.so.1 # System logging library (slog2_* functions) |
| 93 | +[type=link] libslog2.so=libslog2.so.1 # Create version-neutral symbolic link |
| 94 | + |
| 95 | +# Orchestrator example needed |
| 96 | +[type=link] /data=/tmp_ram |
| 97 | + |
| 98 | +[+include] ${MAIN_BUILD_FILE_DIR}/system.build # Include additional system build configurations |
0 commit comments