TCP/IP with network filesystem

QNX SDP8.0Building Embedded SystemsConfigurationDeveloper

This buildfile starts up an Ethernet driver, the TCP/IP stack, and the network filesystem.

-d specifies the driver that should be loaded; in this case, the driver for a fictional Horatio Ethernet controller. The -m options load the general drivers for Flattened Device Tree (FDT) bus and Ethernet PHY devices:
[virtual=aarch64le,elf +compress] .bootstrap = {
    startup-abc123 -u reg -vvv
    PATH=/proc/boot procnto-smp-instr
}

[+script] .script = {
 devc-ser8250 -e -b9600 0x1d0003f8,0x23 &

 waitfor /dev/ser1 4

 reopen /dev/ser1

# Start the logging server
 slogger2
 waitfor /dev/slog

# Start the entropy server
 random

# Network drivers and filesystems
 io-sock -m fdt -m phy -d horatio
 if_up -p horatio0
 ifconfig horatio0 192.0.2.2/24
 if_up horatio0

 fs-nfs3 192.0.2.1:/srv /mnt
 waitfor /mnt

 [+session] sh &
}

# make /tmp point to the shared memory area
[type=link] /tmp=/dev/shmem

# Redirect console messages
[type=link] /dev/console=/dev/ser1

# We use the runtime linker (ldqnx-64.so)
/usr/lib/ldqnx-64.so.2=ldqnx-64.so.2

# Automatically add the dependent libraries
[-autolink]
[autoso=add]

# Serial Driver
devc-serpl011

# Logging daemon
slogger2

# Entropy
random
qcrypto-openssl-3.so
/etc/qcrypto.conf = {
openssl-3   tags=*
}

# Shell
sh

# Include the network files so we can access files across the net
devs-horatio.so
io-sock
mods-fdt.so
mods-phy.so
if_up
ifconfig
fs-nfs3

The startup adds the FDT (flattened device tree) support that this networking driver requires (by specifying -u reg).

Once the network manager is running, the ifconfig horatio0 192.0.2.2/24 command then specifies the IP address of the interface.

The NFS filesystem module, fs-nfs3, is started with options telling it that it should mount the filesystem present on 192.0.2.1.

Because it may take some time to go over the network and establish the mounting, another waitfor instance ensures that the filesystem on the remote system has been correctly mounted.

Page updated: