Skip to content

Boxinit services

Boxinit is the init system in the Parrot images. It reads .rc files and starts services by class. The narrative of how these files were found is at /story/firmware-adventure/. Related pages: firmware images, Colibry config.

Status legend used in every table:

Word Meaning
Verified The file or bytes were read directly for this page.
Agent-cited Taken from a note and not re-checked.
Open Not established from the files.

Paths are relative to the image root (rootfs). Line numbers refer to the extracted files. Every entry on this page was read from the files, so no row is Agent-cited.

Image Directory read Files
Bebop 2 4.7.1 etc/boxinit.d/ 25 .rc files, 27 services
Skycontroller (nap) etc/boxinit.d/ 16 .rc files, 18 services
Bebop 1 4.0.6 etc/boxinit.d/ 17 .rc files, compared below

Bebop 2 also contains services defined outside boxinit.d, in etc/boxinit.rc and the etc/boxinit.standalone.*.rc files. They are listed in a separate table.

Image File and line Statement Status
Bebop 2 etc/boxinit.rc:38-39 on boot then class_start core Verified
Bebop 2 etc/boxinit.rc:41-42 on boot-main then class_start main Verified
Skycontroller etc/boxinit.rc:92,99 on boot then class_start core Verified
Skycontroller etc/boxinit.rc:101,103 on boot-main then class_start main Verified
Skycontroller etc/boxinit.rc:105,107 on property:mpp.services.start=1 then class_start mpp Verified

A service with no class line is not covered by these statements. Services marked disabled are skipped by class_start.

Columns: - means the keyword is absent from the declaration. Files are in etc/boxinit.d/.

File Service Command line as written Class User Group Flags setenv Status
10-rcs-init.rc rcs-init /etc/init.d/rcS core root - oneshot - Verified
11-dragon-services.rc shpoison /usr/bin/shpoison core root - - - Verified
20-dnsmasq.rc dnsmasq_eth0 /usr/bin/dnsmasq_wrapper.sh eth0 main root inet disabled - Verified
20-udhcpd.rc udhcpd /usr/bin/ulogwrapper /usr/sbin/udhcpd -f -S main root inet disabled - Verified
30-crashdump.rc crashdumpd /usr/bin/crashdumpd main root - - - Verified
30-publisher.rc publisherd /usr/bin/publisher ${ro.product.model.id} ${ro.serialno} main root - oneshot, disabled - Verified
30-ssr.rc ssr /usr/bin/ssr -o /data/ftp/internal_000/Debug/current/ssr - - - disabled, oneshot - Verified
30-udev.rc udevd /usr/bin/ulogwrapper /usr/bin/udevd core root inet - - Verified
40-jubamountd.rc jubamountd /usr/bin/jubamountd core root - - - Verified
50-adb.rc adbd /usr/bin/adbd core - - disabled - Verified
50-arducopter.rc arducopter /usr/bin/arducopter.sh followed by -A, -B, -C, -l, -t options (single line in the file) main root - disabled, oneshot - Verified
50-ledd.rc ledd /usr/bin/ledd main - - - - Verified
50-ptpd.rc ptpd /usr/bin/ptpd main root - disabled - Verified
50-telemetryd.rc telemetryd /usr/bin/telemetryd main root - disabled - Verified
50-telnetd.rc telnetd /usr/sbin/telnetd -F -l /bin/login.sh main - - disabled - Verified
60-inetd.rc inetd /usr/bin/ulogwrapper /usr/sbin/inetd -f main root root disabled - Verified
90-avahi-daemon.rc avahi-daemon /usr/bin/ulogwrapper /usr/sbin/avahi-daemon --no-drop-root -s main root - oneshot, disabled - Verified
90-kmsgd.rc kmsgd /usr/bin/kmsgd main root - - ULOG_DEVICE kmsgd Verified
90-lttngd.rc lttngd /usr/bin/chrt -r 1 /usr/bin/lttngd main root - disabled - Verified
90-lttngd.rc lttng-sessiond /usr/bin/chrt -r 1 /usr/bin/lttng-sessiond main root - disabled - Verified
90-macgyver.rc macgyverd /usr/bin/macgyverd -f main root root disabled - Verified
90-macgyver.rc make_report /usr/bin/report-generic ${system.report} - - - disabled, oneshot - Verified
90-netmon-bcmlog.rc bcmlogd /usr/bin/netmon-bcmlog --iface eth0 main root root disabled - Verified
90-ulogcatd.rc ulogcatd /usr/bin/ulogcat -F /etc/ulogcatd.conf main root log, inet disabled - Verified
91-flird.rc flird /usr/bin/flird main - - - - Verified
98-drone-reboot.rc drone-reboot /bin/reboot.sh - root - oneshot - Verified
99-netdata.rc netdata /usr/bin/ulogwrapper /usr/sbin/netdata -nd main root root disabled - Verified

Additional per-service keywords seen in these files:

File Service Keyword and value Status
20-udhcpd.rc:12 udhcpd capability NET_BIND_SERVICE NET_RAW Verified
30-crashdump.rc:8 crashdumpd capability SYS_PTRACE Verified
30-udev.rc:25-26 udevd oom_score_adj -1000, nice -4 Verified
30-udev.rc:33-35 udevd capability CHOWN MKNOD NET_ADMIN SYS_MODULE SYS_RAWIO Verified
40-jubamountd.rc:6 jubamountd capability SYS_ADMIN SETGID Verified
90-kmsgd.rc:10 kmsgd capability SYSLOG Verified
90-ulogcatd.rc:8 ulogcatd capability SYSLOG Verified
File and line Trigger Action Status
11-dragon-services.rc:5-6 on property:state.ptp=supported:state.media=ready start ptpd Verified
30-ssr.rc:5-6 on property:persist.enable_ssr=1:state.media=ready start ssr Verified
30-ssr.rc:8-9 on property:persist.enable_ssr=0 stop ssr Verified
30-ssr.rc:11-12 on property:state.media=off stop ssr Verified
90-macgyver.rc:11-12 on property:system.report=* start make_report Verified
90-netmon-bcmlog.rc:7-8 on property:state.wifi=ready start bcmlogd Verified
90-ulogcatd.rc:11-12 on property:ro.debuggable=1 start ulogcatd Verified
20-dnsmasq.rc:1-5 on post-fs-data mkdir /var/run/dnsmasq/ 0777, mkdir /var/lib/misc 0777 Verified
20-udhcpd.rc:1-3 on post-fs-data mkdir /var/lib/misc, copy /etc/udhcpd.leases /var/lib/misc/udhcpd.leases Verified
30-crashdump.rc:1-2 on post-fs-data mkdir /var/lib/crashdump Verified
30-udev.rc:37-38 on init write /proc/sys/kernel/hotplug "" Verified
30-udev.rc:40-42 on early-boot-main wait /dev/.udev_perms_done Verified
90-kmsgd.rc:2-3 on init write /sys/devices/virtual/misc/ulog_main/logs "ulog_kmsgd 17" Verified
91-flird.rc:4-5 on boot exec /sbin/modprobe hx270_vdec Verified
99-netdata.rc:3-4 on post-fs-data mkdir /var/cache/netdata/ Verified

Bebop 2 services declared outside boxinit.d

Section titled “Bebop 2 services declared outside boxinit.d”
File Service Command Class User Flags Status
etc/boxinit.rc:44 console /usr/bin/askfirst /bin/sh -l core root disabled, console Verified
etc/boxinit.standalone.mykonos3board.rc:4 flash_bldc /usr/bin/BLDC_Host_Bootloader main root oneshot, disabled Verified
etc/boxinit.standalone.mykonos3board.rc:11 fvt6 /bin/ardrone3_fvt6.sh main root oneshot, disabled Verified
etc/boxinit.standalone.mykonos3board.rc:18 running_mode /usr/bin/running_mode.sh main root oneshot, disabled Verified

etc/boxinit.standalone.milosboard.rc has the same start flash_bldc, start telemetryd, start webgndctrld, start fvt6 and start running_mode statements at the same line numbers. Which board file is read on a given unit depends on ro.hardware through etc/boxinit.standalone.rc:6. The value of ro.hardware is not in the image files. The log of one unit states that it runs the milosboard configuration, so etc/boxinit.standalone.milosboard.rc is the board file that unit would import (Confirmed independently; one unit).

File and line Trigger Action Status
etc/boxinit.rc:38-39 on boot class_start core Verified
etc/boxinit.standalone.mykonos3board.rc:42-43 on boot start flash_bldc Verified
etc/boxinit.standalone.mykonos3board.rc:48-50 on property:state.debug=1:rw.debuggable=1 start telemetryd, start webgndctrld Verified
etc/boxinit.standalone.mykonos3board.rc:52-53 on property:init.svc.flash_bldc=stopped:state.media=ready start fvt6 Verified
etc/boxinit.standalone.mykonos3board.rc:55-56 on property:init.svc.fvt6=stopped:state.debug=1:eeprom.dumped=1 start running_mode Verified
etc/boxinit.standalone.rc:49-50 on property:ro.debuggable=1 start console Verified

The service webgndctrld is started by these statements and by etc/init.d/rcS_mode_wifidev:17. No service webgndctrld declaration was found in etc/boxinit.d/ or in the board files (Open).

Bebop 2 scripts that start or stop services

Section titled “Bebop 2 scripts that start or stop services”

Commands in the scripts are pstart, pstop, prestart and pterm. pstart is an ELF executable at usr/bin/pstart.

Script and line Statement Status
etc/init.d/rcS:200 pstart macgyverd Verified
etc/init.d/rcS:208 pstart inetd (inside a background subshell after ifconfig lo and route add) Verified
etc/init.d/rcS:218 pstart avahi-daemon Verified
etc/init.d/rcS:247 pstart publisherd Verified
etc/init.d/rcS_mode_wifidev:14 pstart telemetryd Verified
etc/init.d/rcS_mode_wifidev:17 pstart webgndctrld Verified
bin/onoffbutton/shortpress_3.sh:18 prestart arducopter Verified
bin/asix_setup.sh:62 /usr/bin/pstart telnetd Verified
bin/asix_setup.sh:63 /usr/bin/pstart adbd Verified
sbin/broadcom_setup.sh:116 pstart dnsmasq_eth0 Verified
sbin/broadcom_setup.sh:234-235 pterm -w 3 dnsmasq_eth0, pstop dnsmasq_eth0 Verified
usr/bin/drone_gateway.sh:32-33 pstop publisherd, pstart "publisherd${option}" Verified
usr/bin/drone_gateway.sh:38 prestart dnsmasq_eth0 Verified

The other scripts in bin/onoffbutton/ (longpress_0.sh, shortpress_1.sh, shortpress_4.sh, verylongpress_0.sh) contain no pstart, pstop, prestart or pterm line.

Bebop 2 disabled services and their starters

Section titled “Bebop 2 disabled services and their starters”
Service Starter found Status
dnsmasq_eth0 sbin/broadcom_setup.sh:116, usr/bin/drone_gateway.sh:38 Verified
udhcpd none found in scripts or .rc files Open
publisherd etc/init.d/rcS:247, usr/bin/drone_gateway.sh:33 Verified
ssr 30-ssr.rc:5-6 Verified
adbd bin/asix_setup.sh:63 Verified
arducopter bin/onoffbutton/shortpress_3.sh:18 Verified
ptpd 11-dragon-services.rc:5-6 Verified
telemetryd etc/init.d/rcS_mode_wifidev:14, etc/boxinit.standalone.mykonos3board.rc:49 Verified
telnetd bin/asix_setup.sh:62 Verified
inetd etc/init.d/rcS:208 Verified
avahi-daemon etc/init.d/rcS:218 Verified
lttngd, lttng-sessiond none found Open
macgyverd etc/init.d/rcS:200 Verified
make_report 90-macgyver.rc:11-12 Verified
bcmlogd 90-netmon-bcmlog.rc:7-8 Verified
ulogcatd 90-ulogcatd.rc:11-12 Verified
netdata none found Open

The search for starters covered text files under etc, bin, sbin and usr/bin. A binary could start a service by name without appearing in that search.

Property default: etc/default.prop contains ro.debuggable=0. etc/boxinit.base.rc:8-10 sets rw.debuggable from persist.debuggable, then from ro.debuggable. The trigger in 90-ulogcatd.rc tests ro.debuggable, not rw.debuggable.

File Service Command line as written Class User Group Flags setenv Status
30-crashdump.rc crashdumpd /usr/bin/crashdump -d main root - - - Verified
30-udev.rc udevd /usr/bin/ulogwrapper /usr/bin/udevd core root inet - - Verified
40-jubamountd.rc jubamountd /usr/bin/jubamountd core root - - - Verified
50-adb.rc adbd /usr/bin/adbd core - - disabled - Verified
50-avabye.rc avabye /usr/bin/avabye main root - - - Verified
50-btgpsdemux.rc btgpsdemux /usr/bin/btgpsdemux main - - - - Verified
50-wifi.rc wifid /usr/bin/wifid --mode STA --ip 192.168.42.3 --dhclient main root - - WIFID_DRIVER cfg80211driver, WIFID_CFG80211_CHIP qca9375, WIFID_CFG80211_MODULE_PATH net/wireless/cfg80211.ko, WIFID_CFG80211_EXTRA_MODULES compat/compat.ko Verified
50-wifi.rc wifid-ap /usr/bin/wifid --mode AP --ip 192.168.44.1 --suffix ap main root - disabled WIFID_DRIVER cfg80211driver, WIFID_CFG80211_CHIP wl18xx, WIFID_CFG80211_MODULE_PATH net/wireless/cfg80211.ko, WIFID_CFG80211_EXTRA_MODULES compat/compat.ko Verified
50-wifi.rc wifid-dhclient /usr/bin/ulogwrapper /sbin/udhcpc -S -f -q -n -A10 main root - disabled, oneshot - Verified
60-gpsd.rc gpsd /usr/bin/gpsd main - - - - Verified
60-inetd.rc inetd /usr/bin/ulogwrapper /usr/sbin/inetd -f main root root - - Verified
60-sensorsd-mpp.rc sensorsd-mpp /usr/bin/sensorsd-mpp main root - - - Verified
90-aoad.rc aoad /usr/bin/aoad mpp root - - - Verified
90-kmsgd.rc kmsgd /usr/bin/kmsgd main root - - ULOG_DEVICE kmsgd Verified
90-ulogcatd.rc ulogcatd /usr/bin/ulogcat -F /etc/ulogcatd.conf main root log, inet disabled - Verified
99-dnsmasq.rc dnsmasq_wlan1 /usr/bin/ulogwrapper /usr/bin/start_dnsmasq_wlan1 main root - disabled, oneshot - Verified
99-hudd.rc hudd /usr/bin/hudd -platform eglfs mpp root - disabled - Verified
99-mppd.rc mppd /usr/bin/mppd mpp root - - - Verified

Additional per-service keywords: 50-adb.rc:8 declares socket adbd stream 660 0 0 for adbd. 30-crashdump.rc:8 declares capability SYS_PTRACE. 30-udev.rc has no capability line in this image. 40-jubamountd.rc:6 declares capability SYS_ADMIN SETGID. 90-kmsgd.rc:10 and 90-ulogcatd.rc:8 declare capability SYSLOG. All Verified.

File and line Trigger Action Status
50-adb.rc:2-3 on property:ro.debuggable=1 start adbd Verified
50-adb.rc:10-19 on boot-main write statements to /sys/class/android_usb/android0/ (enable 0, iSerial, bcdDevice, iManufacturer, iProduct, idVendor, idProduct, functions adb, enable 1) Verified
50-wifi.rc:25-26 on property:gps.socket.ready=0 stop wifid-ap Verified
50-wifi.rc:28-37 on property:gps.socket.ready=1 six insmod lines under /lib/modules/3.4.11+/extra/ (compat, wlcore_sdio, cfg80211, mac80211, wlcore, wl18xx), then start wifid-ap Verified
50-avabye.rc:1-3 on post-fs mkdir /tmp/avahi, mkdir /tmp/avahi/services Verified
30-crashdump.rc:1-2 on post-fs-data mkdir /var/lib/crashdump Verified
30-udev.rc:26-27 on init write /proc/sys/kernel/hotplug "" Verified
30-udev.rc:30-31 on early-boot-main wait /dev/.udev_perms_done Verified
90-kmsgd.rc:2-3 on init write /sys/devices/virtual/misc/ulog_main/logs "ulog_kmsgd 17" Verified
90-ulogcatd.rc:11-12 on property:ro.debuggable=1 start ulogcatd Verified
etc/boxinit.rc:14-15 on property:ro.debuggable=1 start console Verified
etc/boxinit.rc:105-107 on property:mpp.services.start=1 class_start mpp Verified

Skycontroller scripts that start or stop services

Section titled “Skycontroller scripts that start or stop services”
Script and line Statement Status
usr/bin/hdmi_hotplug:29 pstart hudd (branch where HDMI is plugged) Verified
usr/bin/hdmi_hotplug:33 pterm hudd (unplugged branch) Verified
usr/bin/bottom_board_update:7 sprop mpp.services.start 1 (sets the property that triggers class_start mpp) Verified

The image has no etc/init.d directory and no bin/onoffbutton/ directory.

Skycontroller disabled services and their starters

Section titled “Skycontroller disabled services and their starters”
Service Starter found Status
adbd 50-adb.rc:2-3 Verified
wifid-ap 50-wifi.rc:37 Verified
wifid-dhclient none in .rc files or scripts; the wifid binary contains the strings /usr/share/udhcpc/wifid-dhclient.sh and @wifid-dhclient Open
ulogcatd 90-ulogcatd.rc:11-12 Verified
dnsmasq_wlan1 none in .rc files or scripts; the wifid binary contains the format string dnsmasq_%s Open
hudd usr/bin/hdmi_hotplug:29 Verified

The value of ro.debuggable on this image was not found. The image has no etc/default.prop (Open).

Keyword Form seen Where Status
service service <name> <command> [args] all service files Verified
class class core, class main, class mpp all images Verified
user user root all images Verified
group group inet, group root, group log inet (one or more names) all images Verified
disabled no argument see service tables Verified
oneshot no argument see service tables Verified
setenv setenv <NAME> <value> 90-kmsgd.rc, Skycontroller 50-wifi.rc Verified
capability one or more capability names, line continuation with \ in 30-udev.rc:33-35 several Verified
oom_score_adj oom_score_adj -1000 Bebop 2 30-udev.rc:25 Verified
nice nice -4 Bebop 2 30-udev.rc:26 Verified
socket socket <name> stream <mode> <uid> <gid> Skycontroller 50-adb.rc:8 Verified
console no argument Bebop 2 etc/boxinit.rc console service Verified
on <stage> on init, on post-fs, on post-fs-data, on early-boot-main, on boot, on boot-main several Verified
on property: on property:<name>=<value>; conditions joined with :; * as value see trigger tables Verified
start, stop start <service>, stop <service> trigger bodies Verified
class_start class_start <class> etc/boxinit.rc of both images Verified
mkdir mkdir <path> [mode] on post-fs, on post-fs-data bodies Verified
write write <path> <value> on init, on boot-main bodies Verified
copy copy <src> <dst> Bebop 2 20-udhcpd.rc:3 Verified
wait wait <path> 30-udev.rc Verified
exec exec <command> Bebop 2 91-flird.rc:5 Verified
insmod insmod <module.ko path> Skycontroller 50-wifi.rc:30-35 Verified
${name} property expansion in arguments 30-publisher.rc:1, 90-macgyver.rc:7, Skycontroller 50-adb.rc Verified
# comment line all files Verified

Indentation is a tab in some files and four spaces in others. A service block ends at the next service or on line.

Seventeen files exist in etc/boxinit.d/. Twelve are byte-identical to the Bebop 2 file of the same name. The rest differ as follows.

File Difference from Bebop 2 Status
01-libsegfault.rc Present in Bebop 1 only Verified
20-udhcpd.rc No capability NET_BIND_SERVICE NET_RAW line Verified
30-crashdump.rc service crashdump /usr/bin/crashdump -i, class core, oneshot, no user, no post-fs-data mkdir Verified
90-kmsgd.rc No capability SYSLOG line Verified
90-netmon-bcmlog.rc Command adds --optlog; no on property:state.wifi=ready trigger Verified
11-dragon-services.rc, 30-udev.rc, 40-jubamountd.rc, 50-arducopter.rc, 50-ledd.rc, 90-macgyver.rc, 90-ulogcatd.rc, 91-flird.rc, 98-drone-reboot.rc Present in Bebop 2 only Verified

30-publisher.rc passes ${ro.serialno} as an argument. The value is not recorded on this page. No Wi-Fi key or passphrase appears in any .rc file read for this page.

Comments

Spotted a mistake, or tried this on your own Bebop? Leave a note. Comments are kept on this site's own server.