From b68a2beb9ef5d4d1d489e18606b68296160204a7 Mon Sep 17 00:00:00 2001 From: Peter Steenbergen Date: Fri, 26 Oct 2018 19:51:01 +0200 Subject: [PATCH] MycroftOS: Initial setup for rpi3 --- .../raspberrypi/genimage-raspberrypi.cfg | 32 + .../raspberrypi/genimage-raspberrypi0.cfg | 30 + .../raspberrypi/genimage-raspberrypi0w.cfg | 31 + .../raspberrypi/genimage-raspberrypi2.cfg | 30 + .../raspberrypi/genimage-raspberrypi3-64.cfg | 31 + .../raspberrypi/genimage-raspberrypi3.cfg | 33 + .../board/raspberrypi/post-build.sh | 11 + .../board/raspberrypi/post-image.sh | 61 + .../board/raspberrypi/readme.txt | 93 ++ buildroot-external/board/raspberrypi3 | 1 + buildroot-external/busybox.config | 1151 +++++++++++++++++ .../configs/mycroftos_rpi3_defconfig | 183 +++ buildroot-external/external.desc | 2 +- .../rootfs-overlay/fs_overlay/etc/asound.conf | 19 + .../rootfs-overlay/fs_overlay/etc/fstab | 11 + .../fs_overlay/etc/init.d/S00resizefs_once | 23 + .../fs_overlay/etc/init.d/S15modules | 2 + .../fs_overlay/etc/init.d/S45alsasound | 4 + .../fs_overlay/etc/init.d/S90mycroft_prepare | 31 + .../fs_overlay/etc/init.d/S91mycroft_services | 37 + .../fs_overlay/etc/init.d/init_resize.sh | 31 + .../fs_overlay/etc/mycroft/mycroft.conf | 7 + .../fs_overlay/etc/pulse/system.pa | 57 + .../fs_overlay/opt/mycroft/skills}/.empty | 0 .../fs_overlay/ramdisk}/.empty | 0 .../rootfs-overlay/fs_overlay/root/.mycroft | 1 + .../fs_overlay/usr/bin/start-mycroft.sh | 161 +++ .../fs_overlay/usr/bin/stop-mycroft.sh | 131 ++ 28 files changed, 2203 insertions(+), 1 deletion(-) create mode 100644 buildroot-external/board/raspberrypi/genimage-raspberrypi.cfg create mode 100644 buildroot-external/board/raspberrypi/genimage-raspberrypi0.cfg create mode 100644 buildroot-external/board/raspberrypi/genimage-raspberrypi0w.cfg create mode 100644 buildroot-external/board/raspberrypi/genimage-raspberrypi2.cfg create mode 100644 buildroot-external/board/raspberrypi/genimage-raspberrypi3-64.cfg create mode 100644 buildroot-external/board/raspberrypi/genimage-raspberrypi3.cfg create mode 100755 buildroot-external/board/raspberrypi/post-build.sh create mode 100755 buildroot-external/board/raspberrypi/post-image.sh create mode 100644 buildroot-external/board/raspberrypi/readme.txt create mode 120000 buildroot-external/board/raspberrypi3 create mode 100644 buildroot-external/busybox.config create mode 100644 buildroot-external/configs/mycroftos_rpi3_defconfig create mode 100644 buildroot-external/rootfs-overlay/fs_overlay/etc/asound.conf create mode 100644 buildroot-external/rootfs-overlay/fs_overlay/etc/fstab create mode 100644 buildroot-external/rootfs-overlay/fs_overlay/etc/init.d/S00resizefs_once create mode 100755 buildroot-external/rootfs-overlay/fs_overlay/etc/init.d/S15modules create mode 100755 buildroot-external/rootfs-overlay/fs_overlay/etc/init.d/S45alsasound create mode 100755 buildroot-external/rootfs-overlay/fs_overlay/etc/init.d/S90mycroft_prepare create mode 100755 buildroot-external/rootfs-overlay/fs_overlay/etc/init.d/S91mycroft_services create mode 100644 buildroot-external/rootfs-overlay/fs_overlay/etc/init.d/init_resize.sh create mode 100644 buildroot-external/rootfs-overlay/fs_overlay/etc/mycroft/mycroft.conf create mode 100644 buildroot-external/rootfs-overlay/fs_overlay/etc/pulse/system.pa rename buildroot-external/{board => rootfs-overlay/fs_overlay/opt/mycroft/skills}/.empty (100%) rename buildroot-external/{configs => rootfs-overlay/fs_overlay/ramdisk}/.empty (100%) create mode 120000 buildroot-external/rootfs-overlay/fs_overlay/root/.mycroft create mode 100755 buildroot-external/rootfs-overlay/fs_overlay/usr/bin/start-mycroft.sh create mode 100755 buildroot-external/rootfs-overlay/fs_overlay/usr/bin/stop-mycroft.sh diff --git a/buildroot-external/board/raspberrypi/genimage-raspberrypi.cfg b/buildroot-external/board/raspberrypi/genimage-raspberrypi.cfg new file mode 100644 index 00000000..bd5166a0 --- /dev/null +++ b/buildroot-external/board/raspberrypi/genimage-raspberrypi.cfg @@ -0,0 +1,32 @@ +image boot.vfat { + vfat { + files = { + "bcm2708-rpi-b.dtb", + "bcm2708-rpi-b-plus.dtb", + "bcm2708-rpi-cm.dtb", + "rpi-firmware/bootcode.bin", + "rpi-firmware/cmdline.txt", + "rpi-firmware/config.txt", + "rpi-firmware/fixup.dat", + "rpi-firmware/start.elf", + "zImage" + } + } + size = 32M +} + +image sdcard.img { + hdimage { + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot-external/board/raspberrypi/genimage-raspberrypi0.cfg b/buildroot-external/board/raspberrypi/genimage-raspberrypi0.cfg new file mode 100644 index 00000000..a9d4c450 --- /dev/null +++ b/buildroot-external/board/raspberrypi/genimage-raspberrypi0.cfg @@ -0,0 +1,30 @@ +image boot.vfat { + vfat { + files = { + "bcm2708-rpi-b-plus.dtb", + "rpi-firmware/bootcode.bin", + "rpi-firmware/cmdline.txt", + "rpi-firmware/config.txt", + "rpi-firmware/fixup.dat", + "rpi-firmware/start.elf", + "zImage" + } + } + size = 32M +} + +image sdcard.img { + hdimage { + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot-external/board/raspberrypi/genimage-raspberrypi0w.cfg b/buildroot-external/board/raspberrypi/genimage-raspberrypi0w.cfg new file mode 100644 index 00000000..3aafd9b6 --- /dev/null +++ b/buildroot-external/board/raspberrypi/genimage-raspberrypi0w.cfg @@ -0,0 +1,31 @@ +image boot.vfat { + vfat { + files = { + "bcm2708-rpi-0-w.dtb", + "rpi-firmware/bootcode.bin", + "rpi-firmware/cmdline.txt", + "rpi-firmware/config.txt", + "rpi-firmware/fixup.dat", + "rpi-firmware/start.elf", + "rpi-firmware/overlays", + "zImage" + } + } + size = 32M +} + +image sdcard.img { + hdimage { + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot-external/board/raspberrypi/genimage-raspberrypi2.cfg b/buildroot-external/board/raspberrypi/genimage-raspberrypi2.cfg new file mode 100644 index 00000000..a3be2a34 --- /dev/null +++ b/buildroot-external/board/raspberrypi/genimage-raspberrypi2.cfg @@ -0,0 +1,30 @@ +image boot.vfat { + vfat { + files = { + "bcm2709-rpi-2-b.dtb", + "rpi-firmware/bootcode.bin", + "rpi-firmware/cmdline.txt", + "rpi-firmware/config.txt", + "rpi-firmware/fixup.dat", + "rpi-firmware/start.elf", + "zImage" + } + } + size = 32M +} + +image sdcard.img { + hdimage { + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot-external/board/raspberrypi/genimage-raspberrypi3-64.cfg b/buildroot-external/board/raspberrypi/genimage-raspberrypi3-64.cfg new file mode 100644 index 00000000..c5f86527 --- /dev/null +++ b/buildroot-external/board/raspberrypi/genimage-raspberrypi3-64.cfg @@ -0,0 +1,31 @@ +image boot.vfat { + vfat { + files = { + "bcm2710-rpi-3-b.dtb", + "bcm2837-rpi-3-b.dtb", + "rpi-firmware/bootcode.bin", + "rpi-firmware/cmdline.txt", + "rpi-firmware/config.txt", + "rpi-firmware/fixup.dat", + "rpi-firmware/start.elf", + "Image" + } + } + size = 32M +} + +image sdcard.img { + hdimage { + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot-external/board/raspberrypi/genimage-raspberrypi3.cfg b/buildroot-external/board/raspberrypi/genimage-raspberrypi3.cfg new file mode 100644 index 00000000..0a547241 --- /dev/null +++ b/buildroot-external/board/raspberrypi/genimage-raspberrypi3.cfg @@ -0,0 +1,33 @@ +image boot.vfat { + vfat { + files = { + "bcm2710-rpi-3-b.dtb", + "bcm2710-rpi-3-b-plus.dtb", + "bcm2710-rpi-cm3.dtb", + "rpi-firmware/bootcode.bin", + "rpi-firmware/cmdline.txt", + "rpi-firmware/config.txt", + "rpi-firmware/fixup.dat", + "rpi-firmware/start.elf", + "rpi-firmware/overlays", + "zImage" + } + } + size = 32M +} + +image sdcard.img { + hdimage { + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot-external/board/raspberrypi/post-build.sh b/buildroot-external/board/raspberrypi/post-build.sh new file mode 100755 index 00000000..5e5eb711 --- /dev/null +++ b/buildroot-external/board/raspberrypi/post-build.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +set -u +set -e + +# Add a console on tty1 +if [ -e ${TARGET_DIR}/etc/inittab ]; then + grep -qE '^tty1::' ${TARGET_DIR}/etc/inittab || \ + sed -i '/GENERIC_SERIAL/a\ +tty1::respawn:/sbin/getty -L tty1 0 vt100 # HDMI console' ${TARGET_DIR}/etc/inittab +fi diff --git a/buildroot-external/board/raspberrypi/post-image.sh b/buildroot-external/board/raspberrypi/post-image.sh new file mode 100755 index 00000000..3c6c9384 --- /dev/null +++ b/buildroot-external/board/raspberrypi/post-image.sh @@ -0,0 +1,61 @@ +#!/bin/bash + +set -e + +BOARD_DIR="$(dirname $0)" +BOARD_NAME="$(basename ${BOARD_DIR})" +GENIMAGE_CFG="${BOARD_DIR}/genimage-${BOARD_NAME}.cfg" +GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" + +for arg in "$@" +do + case "${arg}" in + --add-pi3-miniuart-bt-overlay) + if ! grep -qE '^dtoverlay=' "${BINARIES_DIR}/rpi-firmware/config.txt"; then + echo "Adding 'dtoverlay=pi3-miniuart-bt' to config.txt (fixes ttyAMA0 serial console)." + cat << __EOF__ >> "${BINARIES_DIR}/rpi-firmware/config.txt" + +# fixes rpi3 ttyAMA0 serial console +dtoverlay=pi3-miniuart-bt +__EOF__ + fi + ;; + --aarch64) + # Run a 64bits kernel (armv8) + sed -e '/^kernel=/s,=.*,=Image,' -i "${BINARIES_DIR}/rpi-firmware/config.txt" + if ! grep -qE '^arm_control=0x200' "${BINARIES_DIR}/rpi-firmware/config.txt"; then + cat << __EOF__ >> "${BINARIES_DIR}/rpi-firmware/config.txt" + +# enable 64bits support +arm_control=0x200 +__EOF__ + fi + + # Enable uart console + if ! grep -qE '^enable_uart=1' "${BINARIES_DIR}/rpi-firmware/config.txt"; then + cat << __EOF__ >> "${BINARIES_DIR}/rpi-firmware/config.txt" + +# enable rpi3 ttyS0 serial console +enable_uart=1 +__EOF__ + fi + ;; + --gpu_mem_256=*|--gpu_mem_512=*|--gpu_mem_1024=*) + # Set GPU memory + gpu_mem="${arg:2}" + sed -e "/^${gpu_mem%=*}=/s,=.*,=${gpu_mem##*=}," -i "${BINARIES_DIR}/rpi-firmware/config.txt" + ;; + esac + +done + +rm -rf "${GENIMAGE_TMP}" + +genimage \ + --rootpath "${TARGET_DIR}" \ + --tmppath "${GENIMAGE_TMP}" \ + --inputpath "${BINARIES_DIR}" \ + --outputpath "${BINARIES_DIR}" \ + --config "${GENIMAGE_CFG}" + +exit $? diff --git a/buildroot-external/board/raspberrypi/readme.txt b/buildroot-external/board/raspberrypi/readme.txt new file mode 100644 index 00000000..9f915810 --- /dev/null +++ b/buildroot-external/board/raspberrypi/readme.txt @@ -0,0 +1,93 @@ +Raspberry Pi + +Intro +===== + +These instructions apply to all models of the Raspberry Pi: + - the original models A and B, + - the "enhanced" models A+ and B+, + - the model B2 (aka Raspberry Pi 2) + - the model B3 (aka Raspberry Pi 3). + +How to build it +=============== + +Configure Buildroot +------------------- + +There are two RaspberryPi defconfig files in Buildroot, one for each +major variant, which you should base your work on: + +For models A, B, A+ or B+: + + $ make raspberrypi_defconfig + +For model Zero (model A+ in smaller form factor): + + $ make raspberrypi0_defconfig + +For model 2 B: + + $ make raspberrypi2_defconfig + +For model 3 B and B+: + + $ make raspberrypi3_defconfig + +Build the rootfs +---------------- + +Note: you will need to have access to the network, since Buildroot will +download the packages' sources. + +You may now build your rootfs with: + + $ make + +(This may take a while, consider getting yourself a coffee ;-) ) + +Result of the build +------------------- + +After building, you should obtain this tree: + + output/images/ + +-- bcm2708-rpi-b.dtb [1] + +-- bcm2708-rpi-b-plus.dtb [1] + +-- bcm2709-rpi-2-b.dtb [1] + +-- bcm2710-rpi-3-b.dtb [1] + +-- bcm2710-rpi-3-b-plus.dtb [1] + +-- boot.vfat + +-- rootfs.ext4 + +-- rpi-firmware/ + | +-- bootcode.bin + | +-- cmdline.txt + | +-- config.txt + | +-- fixup.dat + | +-- start.elf + | `-- overlays/ [2] + +-- sdcard.img + `-- zImage + +[1] Not all of them will be present, depending on the RaspberryPi + model you are using. + +[2] Only for the Raspberry Pi 3 Model (overlay pi3-miniuart-bt is needed + to enable the RPi3 serial console otherwise occupied by the bluetooth + chip). Alternative would be to disable the serial console in cmdline.txt + and /etc/inittab. + +How to write the SD card +======================== + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX + +Insert the SDcard into your Raspberry Pi, and power it up. Your new system +should come up now and start two consoles: one on the serial port on +the P1 header, one on the HDMI output where you can login using a USB +keyboard. diff --git a/buildroot-external/board/raspberrypi3 b/buildroot-external/board/raspberrypi3 new file mode 120000 index 00000000..fcdafc81 --- /dev/null +++ b/buildroot-external/board/raspberrypi3 @@ -0,0 +1 @@ +raspberrypi \ No newline at end of file diff --git a/buildroot-external/busybox.config b/buildroot-external/busybox.config new file mode 100644 index 00000000..38de13d4 --- /dev/null +++ b/buildroot-external/busybox.config @@ -0,0 +1,1151 @@ +# +# Automatically generated make config: don't edit +# Busybox version: 1.28.0 +# Wed Feb 7 09:44:57 2018 +# +CONFIG_HAVE_DOT_CONFIG=y + +# +# Settings +# +CONFIG_DESKTOP=y +# CONFIG_EXTRA_COMPAT is not set +# CONFIG_FEDORA_COMPAT is not set +CONFIG_INCLUDE_SUSv2=y +CONFIG_LONG_OPTS=y +CONFIG_SHOW_USAGE=y +CONFIG_FEATURE_VERBOSE_USAGE=y +# CONFIG_FEATURE_COMPRESS_USAGE is not set +CONFIG_LFS=y +# CONFIG_PAM is not set +CONFIG_FEATURE_DEVPTS=y +CONFIG_FEATURE_UTMP=y +CONFIG_FEATURE_WTMP=y +# CONFIG_FEATURE_PIDFILE is not set +CONFIG_PID_FILE_PATH="" +CONFIG_BUSYBOX=y +CONFIG_FEATURE_INSTALLER=y +# CONFIG_INSTALL_NO_USR is not set +CONFIG_FEATURE_SUID=y +# CONFIG_FEATURE_SUID_CONFIG is not set +# CONFIG_FEATURE_SUID_CONFIG_QUIET is not set +# CONFIG_FEATURE_PREFER_APPLETS is not set +CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe" +# CONFIG_SELINUX is not set +# CONFIG_FEATURE_CLEAN_UP is not set +CONFIG_FEATURE_SYSLOG=y +CONFIG_PLATFORM_LINUX=y + +# +# Build Options +# +# CONFIG_STATIC is not set +# CONFIG_PIE is not set +# CONFIG_NOMMU is not set +# CONFIG_BUILD_LIBBUSYBOX is not set +# CONFIG_FEATURE_LIBBUSYBOX_STATIC is not set +# CONFIG_FEATURE_INDIVIDUAL is not set +# CONFIG_FEATURE_SHARED_BUSYBOX is not set +CONFIG_CROSS_COMPILER_PREFIX="" +CONFIG_SYSROOT="" +CONFIG_EXTRA_CFLAGS="" +CONFIG_EXTRA_LDFLAGS="" +CONFIG_EXTRA_LDLIBS="" +# CONFIG_USE_PORTABLE_CODE is not set + +# +# Installation Options ("make install" behavior) +# +CONFIG_INSTALL_APPLET_SYMLINKS=y +# CONFIG_INSTALL_APPLET_HARDLINKS is not set +# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set +# CONFIG_INSTALL_APPLET_DONT is not set +# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set +# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set +# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set +CONFIG_PREFIX="./_install" + +# +# Debugging Options +# +# CONFIG_DEBUG is not set +# CONFIG_DEBUG_PESSIMIZE is not set +# CONFIG_DEBUG_SANITIZE is not set +# CONFIG_UNIT_TEST is not set +# CONFIG_WERROR is not set +CONFIG_NO_DEBUG_LIB=y +# CONFIG_DMALLOC is not set +# CONFIG_EFENCE is not set + +# +# Library Tuning +# +# CONFIG_FEATURE_USE_BSS_TAIL is not set +CONFIG_FEATURE_RTMINMAX=y +CONFIG_FEATURE_BUFFERS_USE_MALLOC=y +# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set +# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set +CONFIG_PASSWORD_MINLEN=6 +CONFIG_MD5_SMALL=1 +CONFIG_SHA3_SMALL=1 +# CONFIG_FEATURE_FAST_TOP is not set +# CONFIG_FEATURE_ETC_NETWORKS is not set +CONFIG_FEATURE_EDITING=y +CONFIG_FEATURE_EDITING_MAX_LEN=1024 +CONFIG_FEATURE_EDITING_VI=y +CONFIG_FEATURE_EDITING_HISTORY=999 +CONFIG_FEATURE_EDITING_SAVEHISTORY=y +# CONFIG_FEATURE_EDITING_SAVE_ON_EXIT is not set +CONFIG_FEATURE_REVERSE_SEARCH=y +CONFIG_FEATURE_TAB_COMPLETION=y +# CONFIG_FEATURE_USERNAME_COMPLETION is not set +CONFIG_FEATURE_EDITING_FANCY_PROMPT=y +# CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set +# CONFIG_LOCALE_SUPPORT is not set +# CONFIG_UNICODE_SUPPORT is not set +# CONFIG_UNICODE_USING_LOCALE is not set +# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set +CONFIG_SUBST_WCHAR=0 +CONFIG_LAST_SUPPORTED_WCHAR=0 +# CONFIG_UNICODE_COMBINING_WCHARS is not set +# CONFIG_UNICODE_WIDE_WCHARS is not set +# CONFIG_UNICODE_BIDI_SUPPORT is not set +# CONFIG_UNICODE_NEUTRAL_TABLE is not set +# CONFIG_UNICODE_PRESERVE_BROKEN is not set +CONFIG_FEATURE_NON_POSIX_CP=y +# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set +CONFIG_FEATURE_USE_SENDFILE=y +CONFIG_FEATURE_COPYBUF_KB=4 +CONFIG_FEATURE_SKIP_ROOTFS=y +CONFIG_MONOTONIC_SYSCALL=y +CONFIG_IOCTL_HEX2STR_ERROR=y +CONFIG_FEATURE_HWIB=y + +# +# Applets +# + +# +# Archival Utilities +# +# CONFIG_FEATURE_SEAMLESS_XZ is not set +# CONFIG_FEATURE_SEAMLESS_LZMA is not set +# CONFIG_FEATURE_SEAMLESS_BZ2 is not set +# CONFIG_FEATURE_SEAMLESS_GZ is not set +# CONFIG_FEATURE_SEAMLESS_Z is not set +CONFIG_AR=y +# CONFIG_FEATURE_AR_LONG_FILENAMES is not set +CONFIG_FEATURE_AR_CREATE=y +# CONFIG_UNCOMPRESS is not set +CONFIG_GUNZIP=y +CONFIG_ZCAT=y +CONFIG_FEATURE_GUNZIP_LONG_OPTIONS=y +CONFIG_BUNZIP2=y +CONFIG_BZCAT=y +CONFIG_UNLZMA=y +CONFIG_LZCAT=y +CONFIG_LZMA=y +CONFIG_UNXZ=y +CONFIG_XZCAT=y +CONFIG_XZ=y +# CONFIG_BZIP2 is not set +CONFIG_FEATURE_BZIP2_DECOMPRESS=y +CONFIG_CPIO=y +# CONFIG_FEATURE_CPIO_O is not set +# CONFIG_FEATURE_CPIO_P is not set +# CONFIG_DPKG is not set +# CONFIG_DPKG_DEB is not set +CONFIG_GZIP=y +# CONFIG_FEATURE_GZIP_LONG_OPTIONS is not set +CONFIG_GZIP_FAST=0 +# CONFIG_FEATURE_GZIP_LEVELS is not set +CONFIG_FEATURE_GZIP_DECOMPRESS=y +# CONFIG_LZOP is not set +CONFIG_UNLZOP=y +CONFIG_LZOPCAT=y +# CONFIG_LZOP_COMPR_HIGH is not set +# CONFIG_RPM is not set +# CONFIG_RPM2CPIO is not set +CONFIG_TAR=y +CONFIG_FEATURE_TAR_LONG_OPTIONS=y +CONFIG_FEATURE_TAR_CREATE=y +# CONFIG_FEATURE_TAR_AUTODETECT is not set +CONFIG_FEATURE_TAR_FROM=y +# CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY is not set +# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set +CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y +CONFIG_FEATURE_TAR_TO_COMMAND=y +# CONFIG_FEATURE_TAR_UNAME_GNAME is not set +# CONFIG_FEATURE_TAR_NOPRESERVE_TIME is not set +# CONFIG_FEATURE_TAR_SELINUX is not set +CONFIG_UNZIP=y +CONFIG_FEATURE_UNZIP_CDF=y +CONFIG_FEATURE_UNZIP_BZIP2=y +CONFIG_FEATURE_UNZIP_LZMA=y +CONFIG_FEATURE_UNZIP_XZ=y +# CONFIG_FEATURE_LZMA_FAST is not set + +# +# Coreutils +# +CONFIG_BASENAME=y +CONFIG_CAT=y +CONFIG_FEATURE_CATN=y +CONFIG_FEATURE_CATV=y +CONFIG_CHGRP=y +CONFIG_CHMOD=y +CONFIG_CHOWN=y +# CONFIG_FEATURE_CHOWN_LONG_OPTIONS is not set +CONFIG_CHROOT=y +CONFIG_CKSUM=y +# CONFIG_COMM is not set +CONFIG_CP=y +# CONFIG_FEATURE_CP_LONG_OPTIONS is not set +CONFIG_CUT=y +CONFIG_DATE=y +CONFIG_FEATURE_DATE_ISOFMT=y +# CONFIG_FEATURE_DATE_NANO is not set +CONFIG_FEATURE_DATE_COMPAT=y +CONFIG_DD=y +CONFIG_FEATURE_DD_SIGNAL_HANDLING=y +# CONFIG_FEATURE_DD_THIRD_STATUS_LINE is not set +CONFIG_FEATURE_DD_IBS_OBS=y +CONFIG_FEATURE_DD_STATUS=y +CONFIG_DF=y +# CONFIG_FEATURE_DF_FANCY is not set +CONFIG_DIRNAME=y +CONFIG_DOS2UNIX=y +CONFIG_UNIX2DOS=y +CONFIG_DU=y +CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y +CONFIG_ECHO=y +CONFIG_FEATURE_FANCY_ECHO=y +CONFIG_ENV=y +# CONFIG_EXPAND is not set +# CONFIG_UNEXPAND is not set +CONFIG_EXPR=y +CONFIG_EXPR_MATH_SUPPORT_64=y +CONFIG_FACTOR=y +CONFIG_FALSE=y +CONFIG_FOLD=y +# CONFIG_FSYNC is not set +CONFIG_HEAD=y +CONFIG_FEATURE_FANCY_HEAD=y +CONFIG_HOSTID=y +CONFIG_ID=y +# CONFIG_GROUPS is not set +CONFIG_INSTALL=y +CONFIG_FEATURE_INSTALL_LONG_OPTIONS=y +CONFIG_LINK=y +CONFIG_LN=y +CONFIG_LOGNAME=y +CONFIG_LS=y +CONFIG_FEATURE_LS_FILETYPES=y +CONFIG_FEATURE_LS_FOLLOWLINKS=y +CONFIG_FEATURE_LS_RECURSIVE=y +CONFIG_FEATURE_LS_WIDTH=y +CONFIG_FEATURE_LS_SORTFILES=y +CONFIG_FEATURE_LS_TIMESTAMPS=y +CONFIG_FEATURE_LS_USERNAME=y +CONFIG_FEATURE_LS_COLOR=y +CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y +CONFIG_MD5SUM=y +CONFIG_SHA1SUM=y +CONFIG_SHA256SUM=y +CONFIG_SHA512SUM=y +CONFIG_SHA3SUM=y + +# +# Common options for md5sum, sha1sum, sha256sum, sha512sum, sha3sum +# +CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y +CONFIG_MKDIR=y +CONFIG_MKFIFO=y +CONFIG_MKNOD=y +CONFIG_MKTEMP=y +CONFIG_MV=y +CONFIG_NICE=y +CONFIG_NL=y +CONFIG_NOHUP=y +CONFIG_NPROC=y +CONFIG_OD=y +CONFIG_PASTE=y +CONFIG_PRINTENV=y +CONFIG_PRINTF=y +CONFIG_PWD=y +CONFIG_READLINK=y +CONFIG_FEATURE_READLINK_FOLLOW=y +CONFIG_REALPATH=y +CONFIG_RM=y +CONFIG_RMDIR=y +CONFIG_SEQ=y +CONFIG_SHRED=y +# CONFIG_SHUF is not set +CONFIG_SLEEP=y +CONFIG_FEATURE_FANCY_SLEEP=y +CONFIG_FEATURE_FLOAT_SLEEP=y +CONFIG_SORT=y +CONFIG_FEATURE_SORT_BIG=y +# CONFIG_SPLIT is not set +# CONFIG_FEATURE_SPLIT_FANCY is not set +# CONFIG_STAT is not set +# CONFIG_FEATURE_STAT_FORMAT is not set +# CONFIG_FEATURE_STAT_FILESYSTEM is not set +CONFIG_STTY=y +# CONFIG_SUM is not set +CONFIG_SYNC=y +# CONFIG_FEATURE_SYNC_FANCY is not set +# CONFIG_TAC is not set +CONFIG_TAIL=y +CONFIG_FEATURE_FANCY_TAIL=y +CONFIG_TEE=y +CONFIG_FEATURE_TEE_USE_BLOCK_IO=y +CONFIG_TEST=y +CONFIG_TEST1=y +CONFIG_TEST2=y +CONFIG_FEATURE_TEST_64=y +# CONFIG_TIMEOUT is not set +CONFIG_TOUCH=y +# CONFIG_FEATURE_TOUCH_NODEREF is not set +CONFIG_FEATURE_TOUCH_SUSV3=y +CONFIG_TR=y +CONFIG_FEATURE_TR_CLASSES=y +CONFIG_FEATURE_TR_EQUIV=y +CONFIG_TRUE=y +CONFIG_TRUNCATE=y +CONFIG_TTY=y +CONFIG_UNAME=y +CONFIG_UNAME_OSNAME="GNU/Linux" +CONFIG_BB_ARCH=y +CONFIG_UNIQ=y +CONFIG_UNLINK=y +CONFIG_USLEEP=y +CONFIG_UUDECODE=y +# CONFIG_BASE64 is not set +CONFIG_UUENCODE=y +CONFIG_WC=y +# CONFIG_FEATURE_WC_LARGE is not set +CONFIG_WHOAMI=y +CONFIG_WHO=y +CONFIG_W=y +# CONFIG_USERS is not set +CONFIG_YES=y + +# +# Common options +# +CONFIG_FEATURE_VERBOSE=y + +# +# Common options for cp and mv +# +CONFIG_FEATURE_PRESERVE_HARDLINKS=y + +# +# Common options for df, du, ls +# +CONFIG_FEATURE_HUMAN_READABLE=y + +# +# Console Utilities +# +CONFIG_CHVT=y +CONFIG_CLEAR=y +CONFIG_DEALLOCVT=y +CONFIG_DUMPKMAP=y +# CONFIG_FGCONSOLE is not set +# CONFIG_KBD_MODE is not set +CONFIG_LOADFONT=y +# CONFIG_SETFONT is not set +# CONFIG_FEATURE_SETFONT_TEXTUAL_MAP is not set +CONFIG_DEFAULT_SETFONT_DIR="" + +# +# Common options for loadfont and setfont +# +CONFIG_FEATURE_LOADFONT_PSF2=y +CONFIG_FEATURE_LOADFONT_RAW=y +CONFIG_LOADKMAP=y +CONFIG_OPENVT=y +CONFIG_RESET=y +CONFIG_RESIZE=y +CONFIG_FEATURE_RESIZE_PRINT=y +CONFIG_SETCONSOLE=y +# CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS is not set +CONFIG_SETKEYCODES=y +CONFIG_SETLOGCONS=y +# CONFIG_SHOWKEY is not set + +# +# Debian Utilities +# +CONFIG_PIPE_PROGRESS=y +CONFIG_RUN_PARTS=y +CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y +# CONFIG_FEATURE_RUN_PARTS_FANCY is not set +CONFIG_START_STOP_DAEMON=y +CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y +CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y +CONFIG_WHICH=y + +# +# klibc-utils +# +# CONFIG_MINIPS is not set +CONFIG_NUKE=y +CONFIG_RESUME=y +CONFIG_RUN_INIT=y + +# +# Editors +# +CONFIG_AWK=y +# CONFIG_FEATURE_AWK_LIBM is not set +CONFIG_FEATURE_AWK_GNU_EXTENSIONS=y +CONFIG_CMP=y +CONFIG_DIFF=y +# CONFIG_FEATURE_DIFF_LONG_OPTIONS is not set +CONFIG_FEATURE_DIFF_DIR=y +# CONFIG_ED is not set +CONFIG_PATCH=y +CONFIG_SED=y +CONFIG_VI=y +CONFIG_FEATURE_VI_MAX_LEN=4096 +CONFIG_FEATURE_VI_8BIT=y +CONFIG_FEATURE_VI_COLON=y +CONFIG_FEATURE_VI_YANKMARK=y +CONFIG_FEATURE_VI_SEARCH=y +# CONFIG_FEATURE_VI_REGEX_SEARCH is not set +CONFIG_FEATURE_VI_USE_SIGNALS=y +CONFIG_FEATURE_VI_DOT_CMD=y +CONFIG_FEATURE_VI_READONLY=y +CONFIG_FEATURE_VI_SETOPTS=y +CONFIG_FEATURE_VI_SET=y +CONFIG_FEATURE_VI_WIN_RESIZE=y +CONFIG_FEATURE_VI_ASK_TERMINAL=y +CONFIG_FEATURE_VI_UNDO=y +CONFIG_FEATURE_VI_UNDO_QUEUE=y +CONFIG_FEATURE_VI_UNDO_QUEUE_MAX=256 +CONFIG_FEATURE_ALLOW_EXEC=y + +# +# Finding Utilities +# +CONFIG_FIND=y +CONFIG_FEATURE_FIND_PRINT0=y +CONFIG_FEATURE_FIND_MTIME=y +CONFIG_FEATURE_FIND_MMIN=y +CONFIG_FEATURE_FIND_PERM=y +CONFIG_FEATURE_FIND_TYPE=y +CONFIG_FEATURE_FIND_XDEV=y +CONFIG_FEATURE_FIND_MAXDEPTH=y +CONFIG_FEATURE_FIND_NEWER=y +# CONFIG_FEATURE_FIND_INUM is not set +CONFIG_FEATURE_FIND_EXEC=y +CONFIG_FEATURE_FIND_EXEC_PLUS=y +CONFIG_FEATURE_FIND_USER=y +CONFIG_FEATURE_FIND_GROUP=y +CONFIG_FEATURE_FIND_NOT=y +CONFIG_FEATURE_FIND_DEPTH=y +CONFIG_FEATURE_FIND_PAREN=y +CONFIG_FEATURE_FIND_SIZE=y +CONFIG_FEATURE_FIND_PRUNE=y +# CONFIG_FEATURE_FIND_DELETE is not set +CONFIG_FEATURE_FIND_PATH=y +CONFIG_FEATURE_FIND_REGEX=y +# CONFIG_FEATURE_FIND_CONTEXT is not set +# CONFIG_FEATURE_FIND_LINKS is not set +CONFIG_GREP=y +CONFIG_EGREP=y +CONFIG_FGREP=y +CONFIG_FEATURE_GREP_CONTEXT=y +CONFIG_XARGS=y +# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set +CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y +CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y +CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y +CONFIG_FEATURE_XARGS_SUPPORT_REPL_STR=y +CONFIG_FEATURE_XARGS_SUPPORT_PARALLEL=y +CONFIG_FEATURE_XARGS_SUPPORT_ARGS_FILE=y + +# +# Init Utilities +# +# CONFIG_BOOTCHARTD is not set +# CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER is not set +# CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE is not set +CONFIG_HALT=y +CONFIG_POWEROFF=y +CONFIG_REBOOT=y +# CONFIG_FEATURE_CALL_TELINIT is not set +CONFIG_TELINIT_PATH="" +CONFIG_INIT=y +CONFIG_LINUXRC=y +CONFIG_FEATURE_USE_INITTAB=y +CONFIG_FEATURE_KILL_REMOVED=y +CONFIG_FEATURE_KILL_DELAY=0 +CONFIG_FEATURE_INIT_SCTTY=y +CONFIG_FEATURE_INIT_SYSLOG=y +CONFIG_FEATURE_INIT_QUIET=y +# CONFIG_FEATURE_INIT_COREDUMPS is not set +CONFIG_INIT_TERMINAL_TYPE="linux" +CONFIG_FEATURE_INIT_MODIFY_CMDLINE=y + +# +# Login/Password Management Utilities +# +CONFIG_FEATURE_SHADOWPASSWDS=y +# CONFIG_USE_BB_PWD_GRP is not set +# CONFIG_USE_BB_SHADOW is not set +CONFIG_USE_BB_CRYPT=y +# CONFIG_USE_BB_CRYPT_SHA is not set +CONFIG_ADDGROUP=y +# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set +# CONFIG_ADD_SHELL is not set +# CONFIG_REMOVE_SHELL is not set +CONFIG_ADDUSER=y +# CONFIG_FEATURE_CHECK_NAMES is not set +CONFIG_LAST_ID=60000 +CONFIG_FIRST_SYSTEM_ID=100 +CONFIG_LAST_SYSTEM_ID=999 +# CONFIG_CHPASSWD is not set +CONFIG_FEATURE_DEFAULT_PASSWD_ALGO="md5" +# CONFIG_CRYPTPW is not set +CONFIG_MKPASSWD=y +CONFIG_DELUSER=y +CONFIG_DELGROUP=y +# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set +CONFIG_GETTY=y +CONFIG_LOGIN=y +# CONFIG_LOGIN_SESSION_AS_CHILD is not set +# CONFIG_LOGIN_SCRIPTS is not set +CONFIG_FEATURE_NOLOGIN=y +CONFIG_FEATURE_SECURETTY=y +CONFIG_PASSWD=y +CONFIG_FEATURE_PASSWD_WEAK_CHECK=y +CONFIG_SU=y +CONFIG_FEATURE_SU_SYSLOG=y +CONFIG_FEATURE_SU_CHECKS_SHELLS=y +# CONFIG_FEATURE_SU_BLANK_PW_NEEDS_SECURE_TTY is not set +CONFIG_SULOGIN=y +CONFIG_VLOCK=y + +# +# Linux Ext2 FS Progs +# +CONFIG_CHATTR=y +CONFIG_FSCK=y +CONFIG_LSATTR=y +# CONFIG_TUNE2FS is not set + +# +# Linux Module Utilities +# +# CONFIG_MODPROBE_SMALL is not set +# CONFIG_DEPMOD is not set +CONFIG_INSMOD=y +CONFIG_LSMOD=y +CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y +# CONFIG_MODINFO is not set +CONFIG_MODPROBE=y +# CONFIG_FEATURE_MODPROBE_BLACKLIST is not set +CONFIG_RMMOD=y + +# +# Options common to multiple modutils +# +CONFIG_FEATURE_CMDLINE_MODULE_OPTIONS=y +# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set +# CONFIG_FEATURE_2_4_MODULES is not set +# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set +# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set +# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set +# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set +# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set +CONFIG_FEATURE_CHECK_TAINTED_MODULE=y +# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set +CONFIG_FEATURE_MODUTILS_ALIAS=y +CONFIG_FEATURE_MODUTILS_SYMBOLS=y +CONFIG_DEFAULT_MODULES_DIR="/lib/modules" +CONFIG_DEFAULT_DEPMOD_FILE="modules.dep" + +# +# Linux System Utilities +# +# CONFIG_ACPID is not set +# CONFIG_FEATURE_ACPID_COMPAT is not set +# CONFIG_BLKDISCARD is not set +CONFIG_BLKID=y +# CONFIG_FEATURE_BLKID_TYPE is not set +# CONFIG_BLOCKDEV is not set +# CONFIG_CAL is not set +CONFIG_CHRT=y +CONFIG_DMESG=y +CONFIG_FEATURE_DMESG_PRETTY=y +CONFIG_EJECT=y +# CONFIG_FEATURE_EJECT_SCSI is not set +CONFIG_FALLOCATE=y +# CONFIG_FATATTR is not set +CONFIG_FBSET=y +CONFIG_FEATURE_FBSET_FANCY=y +CONFIG_FEATURE_FBSET_READMODE=y +CONFIG_FDFORMAT=y +CONFIG_FDISK=y +# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set +CONFIG_FEATURE_FDISK_WRITABLE=y +# CONFIG_FEATURE_AIX_LABEL is not set +# CONFIG_FEATURE_SGI_LABEL is not set +# CONFIG_FEATURE_SUN_LABEL is not set +# CONFIG_FEATURE_OSF_LABEL is not set +CONFIG_FEATURE_GPT_LABEL=y +CONFIG_FEATURE_FDISK_ADVANCED=y +# CONFIG_FINDFS is not set +CONFIG_FLOCK=y +CONFIG_FDFLUSH=y +CONFIG_FREERAMDISK=y +# CONFIG_FSCK_MINIX is not set +CONFIG_FSFREEZE=y +CONFIG_FSTRIM=y +CONFIG_GETOPT=y +CONFIG_FEATURE_GETOPT_LONG=y +CONFIG_HEXDUMP=y +# CONFIG_FEATURE_HEXDUMP_REVERSE is not set +# CONFIG_HD is not set +CONFIG_XXD=y +CONFIG_HWCLOCK=y +CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y +# CONFIG_IONICE is not set +CONFIG_IPCRM=y +CONFIG_IPCS=y +CONFIG_LAST=y +# CONFIG_FEATURE_LAST_FANCY is not set +CONFIG_LOSETUP=y +CONFIG_LSPCI=y +CONFIG_LSUSB=y +CONFIG_MDEV=y +CONFIG_FEATURE_MDEV_CONF=y +CONFIG_FEATURE_MDEV_RENAME=y +# CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set +CONFIG_FEATURE_MDEV_EXEC=y +# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set +CONFIG_MESG=y +CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP=y +CONFIG_MKE2FS=y +# CONFIG_MKFS_EXT2 is not set +# CONFIG_MKFS_MINIX is not set +# CONFIG_FEATURE_MINIX2 is not set +# CONFIG_MKFS_REISER is not set +CONFIG_MKDOSFS=y +# CONFIG_MKFS_VFAT is not set +CONFIG_MKSWAP=y +# CONFIG_FEATURE_MKSWAP_UUID is not set +CONFIG_MORE=y +CONFIG_MOUNT=y +# CONFIG_FEATURE_MOUNT_FAKE is not set +# CONFIG_FEATURE_MOUNT_VERBOSE is not set +# CONFIG_FEATURE_MOUNT_HELPERS is not set +# CONFIG_FEATURE_MOUNT_LABEL is not set +# CONFIG_FEATURE_MOUNT_NFS is not set +CONFIG_FEATURE_MOUNT_CIFS=y +CONFIG_FEATURE_MOUNT_FLAGS=y +CONFIG_FEATURE_MOUNT_FSTAB=y +CONFIG_FEATURE_MOUNT_OTHERTAB=y +CONFIG_MOUNTPOINT=y +# CONFIG_NSENTER is not set +CONFIG_PIVOT_ROOT=y +CONFIG_RDATE=y +# CONFIG_RDEV is not set +CONFIG_READPROFILE=y +CONFIG_RENICE=y +# CONFIG_REV is not set +# CONFIG_RTCWAKE is not set +# CONFIG_SCRIPT is not set +# CONFIG_SCRIPTREPLAY is not set +CONFIG_SETARCH=y +CONFIG_LINUX32=y +CONFIG_LINUX64=y +CONFIG_SETPRIV=y +CONFIG_FEATURE_SETPRIV_DUMP=y +CONFIG_FEATURE_SETPRIV_CAPABILITIES=y +CONFIG_FEATURE_SETPRIV_CAPABILITY_NAMES=y +CONFIG_SETSID=y +CONFIG_SWAPON=y +# CONFIG_FEATURE_SWAPON_DISCARD is not set +# CONFIG_FEATURE_SWAPON_PRI is not set +CONFIG_SWAPOFF=y +CONFIG_FEATURE_SWAPONOFF_LABEL=y +CONFIG_SWITCH_ROOT=y +# CONFIG_TASKSET is not set +# CONFIG_FEATURE_TASKSET_FANCY is not set +CONFIG_UEVENT=y +CONFIG_UMOUNT=y +CONFIG_FEATURE_UMOUNT_ALL=y +# CONFIG_UNSHARE is not set +# CONFIG_WALL is not set + +# +# Common options for mount/umount +# +CONFIG_FEATURE_MOUNT_LOOP=y +CONFIG_FEATURE_MOUNT_LOOP_CREATE=y +# CONFIG_FEATURE_MTAB_SUPPORT is not set +CONFIG_VOLUMEID=y + +# +# Filesystem/Volume identification +# +# CONFIG_FEATURE_VOLUMEID_BCACHE is not set +# CONFIG_FEATURE_VOLUMEID_BTRFS is not set +# CONFIG_FEATURE_VOLUMEID_CRAMFS is not set +CONFIG_FEATURE_VOLUMEID_EXFAT=y +CONFIG_FEATURE_VOLUMEID_EXT=y +CONFIG_FEATURE_VOLUMEID_F2FS=y +CONFIG_FEATURE_VOLUMEID_FAT=y +# CONFIG_FEATURE_VOLUMEID_HFS is not set +# CONFIG_FEATURE_VOLUMEID_ISO9660 is not set +# CONFIG_FEATURE_VOLUMEID_JFS is not set +# CONFIG_FEATURE_VOLUMEID_LINUXRAID is not set +# CONFIG_FEATURE_VOLUMEID_LINUXSWAP is not set +# CONFIG_FEATURE_VOLUMEID_LUKS is not set +CONFIG_FEATURE_VOLUMEID_MINIX=y +# CONFIG_FEATURE_VOLUMEID_NILFS is not set +# CONFIG_FEATURE_VOLUMEID_NTFS is not set +# CONFIG_FEATURE_VOLUMEID_OCFS2 is not set +# CONFIG_FEATURE_VOLUMEID_REISERFS is not set +# CONFIG_FEATURE_VOLUMEID_ROMFS is not set +# CONFIG_FEATURE_VOLUMEID_SQUASHFS is not set +# CONFIG_FEATURE_VOLUMEID_SYSV is not set +CONFIG_FEATURE_VOLUMEID_UBIFS=y +# CONFIG_FEATURE_VOLUMEID_UDF is not set +# CONFIG_FEATURE_VOLUMEID_XFS is not set + +# +# Miscellaneous Utilities +# +# CONFIG_ADJTIMEX is not set +# CONFIG_BBCONFIG is not set +# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set +# CONFIG_BEEP is not set +CONFIG_FEATURE_BEEP_FREQ=0 +CONFIG_FEATURE_BEEP_LENGTH_MS=0 +# CONFIG_CHAT is not set +# CONFIG_FEATURE_CHAT_NOFAIL is not set +# CONFIG_FEATURE_CHAT_TTY_HIFI is not set +# CONFIG_FEATURE_CHAT_IMPLICIT_CR is not set +# CONFIG_FEATURE_CHAT_SWALLOW_OPTS is not set +# CONFIG_FEATURE_CHAT_SEND_ESCAPES is not set +# CONFIG_FEATURE_CHAT_VAR_ABORT_LEN is not set +# CONFIG_FEATURE_CHAT_CLR_ABORT is not set +# CONFIG_CONSPY is not set +CONFIG_CROND=y +# CONFIG_FEATURE_CROND_D is not set +# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set +CONFIG_FEATURE_CROND_SPECIAL_TIMES=y +CONFIG_FEATURE_CROND_DIR="/var/spool/cron" +CONFIG_CRONTAB=y +CONFIG_DC=y +# CONFIG_FEATURE_DC_LIBM is not set +# CONFIG_DEVFSD is not set +# CONFIG_DEVFSD_MODLOAD is not set +# CONFIG_DEVFSD_FG_NP is not set +# CONFIG_DEVFSD_VERBOSE is not set +# CONFIG_FEATURE_DEVFS is not set +CONFIG_DEVMEM=y +# CONFIG_FBSPLASH is not set +# CONFIG_FLASHCP is not set +# CONFIG_FLASH_ERASEALL is not set +# CONFIG_FLASH_LOCK is not set +# CONFIG_FLASH_UNLOCK is not set +CONFIG_HDPARM=y +CONFIG_FEATURE_HDPARM_GET_IDENTITY=y +# CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET is not set +# CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA is not set +CONFIG_HEXEDIT=y +CONFIG_I2CGET=y +CONFIG_I2CSET=y +CONFIG_I2CDUMP=y +CONFIG_I2CDETECT=y +# CONFIG_INOTIFYD is not set +CONFIG_LESS=y +CONFIG_FEATURE_LESS_MAXLINES=9999999 +CONFIG_FEATURE_LESS_BRACKETS=y +CONFIG_FEATURE_LESS_FLAGS=y +CONFIG_FEATURE_LESS_TRUNCATE=y +# CONFIG_FEATURE_LESS_MARKS is not set +CONFIG_FEATURE_LESS_REGEXP=y +# CONFIG_FEATURE_LESS_WINCH is not set +# CONFIG_FEATURE_LESS_ASK_TERMINAL is not set +# CONFIG_FEATURE_LESS_DASHCMD is not set +# CONFIG_FEATURE_LESS_LINENUMS is not set +CONFIG_LSSCSI=y +CONFIG_MAKEDEVS=y +# CONFIG_FEATURE_MAKEDEVS_LEAF is not set +CONFIG_FEATURE_MAKEDEVS_TABLE=y +# CONFIG_MAN is not set +CONFIG_MICROCOM=y +CONFIG_MT=y +# CONFIG_NANDWRITE is not set +# CONFIG_NANDDUMP is not set +CONFIG_PARTPROBE=y +# CONFIG_RAIDAUTORUN is not set +# CONFIG_READAHEAD is not set +# CONFIG_RFKILL is not set +CONFIG_RUNLEVEL=y +# CONFIG_RX is not set +CONFIG_SETFATTR=y +CONFIG_SETSERIAL=y +CONFIG_STRINGS=y +CONFIG_TIME=y +# CONFIG_TTYSIZE is not set +CONFIG_UBIRENAME=y +# CONFIG_UBIATTACH is not set +# CONFIG_UBIDETACH is not set +# CONFIG_UBIMKVOL is not set +# CONFIG_UBIRMVOL is not set +# CONFIG_UBIRSVOL is not set +# CONFIG_UBIUPDATEVOL is not set +# CONFIG_VOLNAME is not set +CONFIG_WATCHDOG=y + +# +# Networking Utilities +# +CONFIG_FEATURE_IPV6=y +# CONFIG_FEATURE_UNIX_LOCAL is not set +CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y +# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set +CONFIG_ARP=y +CONFIG_ARPING=y +# CONFIG_BRCTL is not set +# CONFIG_FEATURE_BRCTL_FANCY is not set +# CONFIG_FEATURE_BRCTL_SHOW is not set +CONFIG_DNSD=y +CONFIG_ETHER_WAKE=y +# CONFIG_FTPD is not set +# CONFIG_FEATURE_FTPD_WRITE is not set +# CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST is not set +# CONFIG_FEATURE_FTPD_AUTHENTICATION is not set +# CONFIG_FTPGET is not set +# CONFIG_FTPPUT is not set +# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set +CONFIG_HOSTNAME=y +CONFIG_DNSDOMAINNAME=y +# CONFIG_HTTPD is not set +# CONFIG_FEATURE_HTTPD_RANGES is not set +# CONFIG_FEATURE_HTTPD_SETUID is not set +# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set +# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set +# CONFIG_FEATURE_HTTPD_CGI is not set +# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set +# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set +# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set +# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set +# CONFIG_FEATURE_HTTPD_PROXY is not set +# CONFIG_FEATURE_HTTPD_GZIP is not set +CONFIG_IFCONFIG=y +CONFIG_FEATURE_IFCONFIG_STATUS=y +CONFIG_FEATURE_IFCONFIG_SLIP=y +CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ=y +CONFIG_FEATURE_IFCONFIG_HW=y +# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set +# CONFIG_IFENSLAVE is not set +# CONFIG_IFPLUGD is not set +CONFIG_IFUP=y +CONFIG_IFDOWN=y +CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate" +CONFIG_FEATURE_IFUPDOWN_IP=y +CONFIG_FEATURE_IFUPDOWN_IPV4=y +CONFIG_FEATURE_IFUPDOWN_IPV6=y +CONFIG_FEATURE_IFUPDOWN_MAPPING=y +# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set +CONFIG_INETD=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN=y +# CONFIG_FEATURE_INETD_RPC is not set +CONFIG_IP=y +CONFIG_IPADDR=y +CONFIG_IPLINK=y +CONFIG_IPROUTE=y +CONFIG_IPTUNNEL=y +CONFIG_IPRULE=y +CONFIG_IPNEIGH=y +CONFIG_FEATURE_IP_ADDRESS=y +CONFIG_FEATURE_IP_LINK=y +CONFIG_FEATURE_IP_ROUTE=y +CONFIG_FEATURE_IP_ROUTE_DIR="/etc/iproute2" +CONFIG_FEATURE_IP_TUNNEL=y +CONFIG_FEATURE_IP_RULE=y +CONFIG_FEATURE_IP_NEIGH=y +# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set +# CONFIG_IPCALC is not set +# CONFIG_FEATURE_IPCALC_LONG_OPTIONS is not set +# CONFIG_FEATURE_IPCALC_FANCY is not set +# CONFIG_FAKEIDENTD is not set +CONFIG_NAMEIF=y +# CONFIG_FEATURE_NAMEIF_EXTENDED is not set +# CONFIG_NBDCLIENT is not set +# CONFIG_NC is not set +# CONFIG_NETCAT is not set +# CONFIG_NC_SERVER is not set +# CONFIG_NC_EXTRA is not set +# CONFIG_NC_110_COMPAT is not set +CONFIG_NETSTAT=y +# CONFIG_FEATURE_NETSTAT_WIDE is not set +# CONFIG_FEATURE_NETSTAT_PRG is not set +CONFIG_NSLOOKUP=y +# CONFIG_NTPD is not set +# CONFIG_FEATURE_NTPD_SERVER is not set +# CONFIG_FEATURE_NTPD_CONF is not set +CONFIG_PING=y +# CONFIG_PING6 is not set +CONFIG_FEATURE_FANCY_PING=y +# CONFIG_PSCAN is not set +CONFIG_ROUTE=y +# CONFIG_SLATTACH is not set +# CONFIG_SSL_CLIENT is not set +# CONFIG_TCPSVD is not set +# CONFIG_UDPSVD is not set +CONFIG_TELNET=y +CONFIG_FEATURE_TELNET_TTYPE=y +CONFIG_FEATURE_TELNET_AUTOLOGIN=y +CONFIG_FEATURE_TELNET_WIDTH=y +# CONFIG_TELNETD is not set +# CONFIG_FEATURE_TELNETD_STANDALONE is not set +# CONFIG_FEATURE_TELNETD_INETD_WAIT is not set +CONFIG_TFTP=y +# CONFIG_FEATURE_TFTP_PROGRESS_BAR is not set +# CONFIG_TFTPD is not set + +# +# Common options for tftp/tftpd +# +CONFIG_FEATURE_TFTP_GET=y +CONFIG_FEATURE_TFTP_PUT=y +CONFIG_FEATURE_TFTP_BLOCKSIZE=y +# CONFIG_TFTP_DEBUG is not set +# CONFIG_TLS is not set +CONFIG_TRACEROUTE=y +# CONFIG_TRACEROUTE6 is not set +# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set +# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set +# CONFIG_TUNCTL is not set +# CONFIG_FEATURE_TUNCTL_UG is not set +CONFIG_VCONFIG=y +CONFIG_WGET=y +CONFIG_FEATURE_WGET_LONG_OPTIONS=y +CONFIG_FEATURE_WGET_STATUSBAR=y +CONFIG_FEATURE_WGET_AUTHENTICATION=y +CONFIG_FEATURE_WGET_TIMEOUT=y +# CONFIG_FEATURE_WGET_HTTPS is not set +# CONFIG_FEATURE_WGET_OPENSSL is not set +# CONFIG_WHOIS is not set +# CONFIG_ZCIP is not set +# CONFIG_UDHCPD is not set +# CONFIG_FEATURE_UDHCPD_BASE_IP_ON_MAC is not set +# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set +CONFIG_DHCPD_LEASES_FILE="" +# CONFIG_DUMPLEASES is not set +# CONFIG_DHCPRELAY is not set +CONFIG_UDHCPC=y +CONFIG_FEATURE_UDHCPC_ARPING=y +CONFIG_FEATURE_UDHCPC_SANITIZEOPT=y +CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script" +# CONFIG_UDHCPC6 is not set +# CONFIG_FEATURE_UDHCPC6_RFC3646 is not set +# CONFIG_FEATURE_UDHCPC6_RFC4704 is not set +# CONFIG_FEATURE_UDHCPC6_RFC4833 is not set + +# +# Common options for DHCP applets +# +# CONFIG_FEATURE_UDHCP_PORT is not set +CONFIG_UDHCP_DEBUG=0 +CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80 +# CONFIG_FEATURE_UDHCP_RFC3397 is not set +CONFIG_FEATURE_UDHCP_8021Q=y +CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n" + +# +# Print Utilities +# +# CONFIG_LPD is not set +# CONFIG_LPR is not set +# CONFIG_LPQ is not set + +# +# Mail Utilities +# +# CONFIG_MAKEMIME is not set +# CONFIG_POPMAILDIR is not set +# CONFIG_FEATURE_POPMAILDIR_DELIVERY is not set +# CONFIG_REFORMIME is not set +# CONFIG_FEATURE_REFORMIME_COMPAT is not set +# CONFIG_SENDMAIL is not set +CONFIG_FEATURE_MIME_CHARSET="" + +# +# Process Utilities +# +CONFIG_FREE=y +CONFIG_FUSER=y +# CONFIG_IOSTAT is not set +CONFIG_KILL=y +CONFIG_KILLALL=y +CONFIG_KILLALL5=y +CONFIG_LSOF=y +# CONFIG_MPSTAT is not set +# CONFIG_NMETER is not set +# CONFIG_PGREP is not set +# CONFIG_PKILL is not set +CONFIG_PIDOF=y +CONFIG_FEATURE_PIDOF_SINGLE=y +CONFIG_FEATURE_PIDOF_OMIT=y +# CONFIG_PMAP is not set +# CONFIG_POWERTOP is not set +# CONFIG_FEATURE_POWERTOP_INTERACTIVE is not set +CONFIG_PS=y +# CONFIG_FEATURE_PS_WIDE is not set +# CONFIG_FEATURE_PS_LONG is not set +# CONFIG_FEATURE_PS_TIME is not set +# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set +# CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS is not set +# CONFIG_PSTREE is not set +# CONFIG_PWDX is not set +# CONFIG_SMEMCAP is not set +CONFIG_BB_SYSCTL=y +CONFIG_TOP=y +CONFIG_FEATURE_TOP_INTERACTIVE=y +CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y +CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y +# CONFIG_FEATURE_TOP_SMP_CPU is not set +# CONFIG_FEATURE_TOP_DECIMALS is not set +# CONFIG_FEATURE_TOP_SMP_PROCESS is not set +# CONFIG_FEATURE_TOPMEM is not set +CONFIG_UPTIME=y +# CONFIG_FEATURE_UPTIME_UTMP_SUPPORT is not set +CONFIG_WATCH=y +# CONFIG_FEATURE_SHOW_THREADS is not set + +# +# Runit Utilities +# +# CONFIG_CHPST is not set +# CONFIG_SETUIDGID is not set +# CONFIG_ENVUIDGID is not set +# CONFIG_ENVDIR is not set +# CONFIG_SOFTLIMIT is not set +# CONFIG_RUNSV is not set +# CONFIG_RUNSVDIR is not set +# CONFIG_FEATURE_RUNSVDIR_LOG is not set +# CONFIG_SV is not set +CONFIG_SV_DEFAULT_SERVICE_DIR="" +CONFIG_SVC=y +# CONFIG_SVLOGD is not set +# CONFIG_CHCON is not set +# CONFIG_GETENFORCE is not set +# CONFIG_GETSEBOOL is not set +# CONFIG_LOAD_POLICY is not set +# CONFIG_MATCHPATHCON is not set +# CONFIG_RUNCON is not set +# CONFIG_SELINUXENABLED is not set +# CONFIG_SESTATUS is not set +# CONFIG_SETENFORCE is not set +# CONFIG_SETFILES is not set +# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set +# CONFIG_RESTORECON is not set +# CONFIG_SETSEBOOL is not set + +# +# Shells +# +CONFIG_SH_IS_ASH=y +# CONFIG_SH_IS_HUSH is not set +# CONFIG_SH_IS_NONE is not set +# CONFIG_BASH_IS_ASH is not set +# CONFIG_BASH_IS_HUSH is not set +CONFIG_BASH_IS_NONE=y +CONFIG_ASH=y +CONFIG_ASH_OPTIMIZE_FOR_SIZE=y +CONFIG_ASH_INTERNAL_GLOB=y +CONFIG_ASH_BASH_COMPAT=y +CONFIG_ASH_JOB_CONTROL=y +CONFIG_ASH_ALIAS=y +CONFIG_ASH_RANDOM_SUPPORT=y +CONFIG_ASH_EXPAND_PRMT=y +CONFIG_ASH_IDLE_TIMEOUT=y +# CONFIG_ASH_MAIL is not set +CONFIG_ASH_ECHO=y +CONFIG_ASH_PRINTF=y +CONFIG_ASH_TEST=y +CONFIG_ASH_HELP=y +CONFIG_ASH_GETOPTS=y +CONFIG_ASH_CMDCMD=y +# CONFIG_CTTYHACK is not set +# CONFIG_HUSH is not set +# CONFIG_HUSH_BASH_COMPAT is not set +# CONFIG_HUSH_BRACE_EXPANSION is not set +# CONFIG_HUSH_INTERACTIVE is not set +# CONFIG_HUSH_SAVEHISTORY is not set +# CONFIG_HUSH_JOB is not set +# CONFIG_HUSH_TICK is not set +# CONFIG_HUSH_IF is not set +# CONFIG_HUSH_LOOPS is not set +# CONFIG_HUSH_CASE is not set +# CONFIG_HUSH_FUNCTIONS is not set +# CONFIG_HUSH_LOCAL is not set +# CONFIG_HUSH_RANDOM_SUPPORT is not set +# CONFIG_HUSH_MODE_X is not set +# CONFIG_HUSH_ECHO is not set +# CONFIG_HUSH_PRINTF is not set +# CONFIG_HUSH_TEST is not set +# CONFIG_HUSH_HELP is not set +# CONFIG_HUSH_EXPORT is not set +# CONFIG_HUSH_EXPORT_N is not set +# CONFIG_HUSH_READONLY is not set +# CONFIG_HUSH_KILL is not set +# CONFIG_HUSH_WAIT is not set +# CONFIG_HUSH_TRAP is not set +# CONFIG_HUSH_TYPE is not set +# CONFIG_HUSH_TIMES is not set +# CONFIG_HUSH_READ is not set +# CONFIG_HUSH_SET is not set +# CONFIG_HUSH_UNSET is not set +# CONFIG_HUSH_ULIMIT is not set +# CONFIG_HUSH_UMASK is not set +# CONFIG_HUSH_GETOPTS is not set +# CONFIG_HUSH_MEMLEAK is not set + +# +# Options common to all shells +# +CONFIG_FEATURE_SH_MATH=y +CONFIG_FEATURE_SH_MATH_64=y +CONFIG_FEATURE_SH_EXTRA_QUIET=y +# CONFIG_FEATURE_SH_STANDALONE is not set +# CONFIG_FEATURE_SH_NOFORK is not set +CONFIG_FEATURE_SH_READ_FRAC=y +# CONFIG_FEATURE_SH_HISTFILESIZE is not set + +# +# System Logging Utilities +# +CONFIG_KLOGD=y +CONFIG_FEATURE_KLOGD_KLOGCTL=y +CONFIG_LOGGER=y +# CONFIG_LOGREAD is not set +# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set +CONFIG_SYSLOGD=y +CONFIG_FEATURE_ROTATE_LOGFILE=y +CONFIG_FEATURE_REMOTE_LOG=y +# CONFIG_FEATURE_SYSLOGD_DUP is not set +# CONFIG_FEATURE_SYSLOGD_CFG is not set +CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=256 +# CONFIG_FEATURE_IPC_SYSLOG is not set +CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0 +# CONFIG_FEATURE_KMSG_SYSLOG is not set diff --git a/buildroot-external/configs/mycroftos_rpi3_defconfig b/buildroot-external/configs/mycroftos_rpi3_defconfig new file mode 100644 index 00000000..5fd691a0 --- /dev/null +++ b/buildroot-external/configs/mycroftos_rpi3_defconfig @@ -0,0 +1,183 @@ +BR2_arm=y +BR2_cortex_a53=y +BR2_ARM_FPU_NEON_VFPV4=y +BR2_DL_DIR="../downloads" +BR2_CCACHE=y +BR2_CCACHE_DIR="../ccache" +BR2_OPTIMIZE_FAST=y +BR2_GLOBAL_PATCH_DIR="../buildroot-patches" +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TARGET_GENERIC_HOSTNAME="MycroftOS" +BR2_TARGET_GENERIC_ISSUE="Welcome to MycroftOS" +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y +BR2_TARGET_GENERIC_ROOT_PASSWD="mycroft" +BR2_SYSTEM_BIN_SH_BASH=y +BR2_SYSTEM_DHCP="eth0" +# BR2_ENABLE_LOCALE_PURGE is not set +BR2_GENERATE_LOCALE="en_US en_US.UTF-8" +BR2_TARGET_TZ_INFO=y +BR2_ROOTFS_OVERLAY="../buildroot-external/rootfs-overlay" +BR2_ROOTFS_POST_BUILD_SCRIPT="../buildroot-external/board/raspberrypi3/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="../buildroot-external/board/raspberrypi3/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="--add-pi3-miniuart-bt-overlay" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/raspberrypi/linux.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="7c063ed121b219110602993d09d021fbf82628b6" +BR2_LINUX_KERNEL_DEFCONFIG="bcm2709" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2710-rpi-3-b bcm2710-rpi-3-b-plus bcm2710-rpi-cm3" +BR2_PACKAGE_BUSYBOX_CONFIG="../buildroot-external/busybox.config" +BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y +BR2_PACKAGE_BUSYBOX_INDIVIDUAL_BINARIES=y +BR2_PACKAGE_ALSA_UTILS=y +BR2_PACKAGE_ALSA_UTILS_ALSACONF=y +BR2_PACKAGE_ALSA_UTILS_ACONNECT=y +BR2_PACKAGE_ALSA_UTILS_ALSALOOP=y +BR2_PACKAGE_ALSA_UTILS_ALSAUCM=y +BR2_PACKAGE_ALSA_UTILS_ALSATPLG=y +BR2_PACKAGE_ALSA_UTILS_AMIDI=y +BR2_PACKAGE_ALSA_UTILS_AMIXER=y +BR2_PACKAGE_ALSA_UTILS_APLAY=y +BR2_PACKAGE_ALSA_UTILS_APLAYMIDI=y +BR2_PACKAGE_ALSA_UTILS_ARECORDMIDI=y +BR2_PACKAGE_ALSA_UTILS_ASEQDUMP=y +BR2_PACKAGE_ALSA_UTILS_ASEQNET=y +BR2_PACKAGE_ALSA_UTILS_BAT=y +BR2_PACKAGE_ALSA_UTILS_IECSET=y +BR2_PACKAGE_ALSA_UTILS_SPEAKER_TEST=y +BR2_PACKAGE_BLUEZ_ALSA=y +BR2_PACKAGE_ESPEAK=y +BR2_PACKAGE_ESPEAK_AUDIO_BACKEND_ALSA=y +BR2_PACKAGE_FFMPEG_GPL=y +BR2_PACKAGE_FFMPEG_NONFREE=y +BR2_PACKAGE_FLAC=y +BR2_PACKAGE_MIMIC=y +BR2_PACKAGE_MIMIC_AUDIO_BACKEND_ALSA=y +BR2_PACKAGE_MPG123=y +BR2_PACKAGE_MPV=y +BR2_PACKAGE_PULSEAUDIO=y +BR2_PACKAGE_PULSEAUDIO_DAEMON=y +BR2_PACKAGE_VLC=y +BR2_PACKAGE_GZIP=y +BR2_PACKAGE_LZ4=y +BR2_PACKAGE_P7ZIP=y +BR2_PACKAGE_UNRAR=y +BR2_PACKAGE_UNZIP=y +BR2_PACKAGE_BINUTILS=y +BR2_PACKAGE_BINUTILS_TARGET=y +BR2_PACKAGE_CHECK=y +BR2_PACKAGE_DIFFUTILS=y +BR2_PACKAGE_FINDUTILS=y +BR2_PACKAGE_GIT=y +BR2_PACKAGE_GREP=y +BR2_PACKAGE_JQ=y +BR2_PACKAGE_MAKE=y +BR2_PACKAGE_PKGCONF=y +BR2_PACKAGE_E2FSPROGS=y +BR2_PACKAGE_E2FSPROGS_RESIZE2FS=y +BR2_PACKAGE_NTFS_3G=y +BR2_PACKAGE_RPI_BT_FIRMWARE=y +BR2_PACKAGE_RPI_FIRMWARE=y +BR2_PACKAGE_RPI_FIRMWARE_X=y +BR2_PACKAGE_RPI_WIFI_FIRMWARE=y +BR2_PACKAGE_DBUS_PYTHON=y +BR2_PACKAGE_KBD=y +BR2_PACKAGE_PARTED=y +BR2_PACKAGE_RPI_USERLAND=y +BR2_PACKAGE_PYTHON3=y +BR2_PACKAGE_PYTHON3_PY_ONLY=y +BR2_PACKAGE_PYTHON3_BZIP2=y +BR2_PACKAGE_PYTHON3_CODECSCJK=y +BR2_PACKAGE_PYTHON3_CURSES=y +BR2_PACKAGE_PYTHON3_DECIMAL=y +BR2_PACKAGE_PYTHON3_OSSAUDIODEV=y +BR2_PACKAGE_PYTHON3_SQLITE=y +BR2_PACKAGE_PYTHON3_XZ=y +BR2_PACKAGE_PYTHON_ALSAAUDIO=y +BR2_PACKAGE_PYTHON_ARROW=y +BR2_PACKAGE_PYTHON_BEAUTIFULSOUP4=y +BR2_PACKAGE_PYTHON_CFFI=y +BR2_PACKAGE_PYTHON_CONFIGSHELL_FB=y +BR2_PACKAGE_PYTHON_DAEMONIZE=y +BR2_PACKAGE_PYTHON_GOBJECT=y +BR2_PACKAGE_PYTHON_LXML=y +BR2_PACKAGE_PYTHON_NETADDR=y +BR2_PACKAGE_PYTHON_NETIFACES=y +BR2_PACKAGE_PYTHON_OAUTHLIB=y +BR2_PACKAGE_PYTHON_PILLOW=y +BR2_PACKAGE_PYTHON_PSUTIL=y +BR2_PACKAGE_PYTHON_PYCLI=y +BR2_PACKAGE_PYTHON_PYCRYPTO=y +BR2_PACKAGE_PYTHON_PYTZ=y +BR2_PACKAGE_PYTHON_PYYAML=y +BR2_PACKAGE_PYTHON_SERIAL=y +BR2_PACKAGE_PYTHON_TEXTTABLE=y +BR2_PACKAGE_PYTHON_TORNADO=y +BR2_PACKAGE_PYTHON_WEBSOCKET_CLIENT=y +BR2_PACKAGE_AUDIOFILE=y +BR2_PACKAGE_PORTAUDIO_OSS=y +BR2_PACKAGE_SPEEXDSP=y +BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING=y +BR2_PACKAGE_LIBARCHIVE=y +BR2_PACKAGE_LIBARCHIVE_BSDTAR=y +BR2_PACKAGE_LIBARCHIVE_BSDCPIO=y +BR2_PACKAGE_LIBARCHIVE_BSDCAT=y +BR2_PACKAGE_LIBZIP=y +BR2_PACKAGE_LZO=y +BR2_PACKAGE_SNAPPY=y +BR2_PACKAGE_CA_CERTIFICATES=y +BR2_PACKAGE_LIBOPENSSL_BIN=y +BR2_PACKAGE_LIBOPENSSL_ENGINES=y +BR2_PACKAGE_LIBCONFIG=y +BR2_PACKAGE_LIBNFS=y +BR2_PACKAGE_JPEG=y +BR2_PACKAGE_LIBPNG=y +BR2_PACKAGE_BCM2835=y +BR2_PACKAGE_WIRINGPI=y +BR2_PACKAGE_LIBMPEG2=y +BR2_PACKAGE_LIBMPEG2_BINS=y +BR2_PACKAGE_LIBOPENH264=y +BR2_PACKAGE_LIBTHEORA=y +BR2_PACKAGE_LIBCURL=y +BR2_PACKAGE_CURL=y +BR2_PACKAGE_LIBFRIBIDI=y +BR2_PACKAGE_LIBUNISTRING=y +BR2_PACKAGE_NCURSES_WCHAR=y +BR2_PACKAGE_NCURSES_TARGET_PROGS=y +BR2_PACKAGE_PCRE_16=y +BR2_PACKAGE_PCRE_32=y +BR2_PACKAGE_CONNMAN=y +BR2_PACKAGE_CONNMAN_WIFI=y +BR2_PACKAGE_CONNMAN_BLUETOOTH=y +BR2_PACKAGE_DROPBEAR=y +BR2_PACKAGE_IW=y +BR2_PACKAGE_NTP=y +BR2_PACKAGE_OPENSSH=y +BR2_PACKAGE_WGET=y +BR2_PACKAGE_WPA_SUPPLICANT_AP_SUPPORT=y +BR2_PACKAGE_WPA_SUPPLICANT_CLI=y +BR2_PACKAGE_WPA_SUPPLICANT_WPA_CLIENT_SO=y +BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y +BR2_PACKAGE_BASH_COMPLETION=y +BR2_PACKAGE_FILE=y +BR2_PACKAGE_SCREEN=y +BR2_PACKAGE_TIME=y +BR2_PACKAGE_WHICH=y +BR2_PACKAGE_HTOP=y +BR2_PACKAGE_START_STOP_DAEMON=y +BR2_PACKAGE_TAR=y +BR2_PACKAGE_UTIL_LINUX_FSCK=y +BR2_PACKAGE_UTIL_LINUX_HWCLOCK=y +BR2_PACKAGE_UTIL_LINUX_KILL=y +BR2_PACKAGE_UTIL_LINUX_MORE=y +BR2_PACKAGE_UTIL_LINUX_MOUNT=y +BR2_PACKAGE_NANO=y +BR2_PACKAGE_VIM=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="768M" +# BR2_TARGET_ROOTFS_TAR is not set +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot-external/external.desc b/buildroot-external/external.desc index 2b828fd8..9c217880 100644 --- a/buildroot-external/external.desc +++ b/buildroot-external/external.desc @@ -1,2 +1,2 @@ -name: MycroftOS +name: MYCROFTOS desc: MycroftOS Buildroot tree diff --git a/buildroot-external/rootfs-overlay/fs_overlay/etc/asound.conf b/buildroot-external/rootfs-overlay/fs_overlay/etc/asound.conf new file mode 100644 index 00000000..a6e739b0 --- /dev/null +++ b/buildroot-external/rootfs-overlay/fs_overlay/etc/asound.conf @@ -0,0 +1,19 @@ +defaults.ctl.card 0 +defaults.pcm.card 0 +defaults.pcm.device 0 + +pcm.!default { + type plug + slave.pcm "master" +} + +ctl.!default { + type hw card 0 +} + +pcm.master { + type softvol + slave.pcm "plughw:0" + control.name "Master" + control.card 0 +} diff --git a/buildroot-external/rootfs-overlay/fs_overlay/etc/fstab b/buildroot-external/rootfs-overlay/fs_overlay/etc/fstab new file mode 100644 index 00000000..0a983ae3 --- /dev/null +++ b/buildroot-external/rootfs-overlay/fs_overlay/etc/fstab @@ -0,0 +1,11 @@ +# +/dev/root / ext2 rw,noauto 0 1 +proc /proc proc defaults 0 0 +devpts /dev/pts devpts defaults,gid=5,mode=620,ptmxmode=0666 0 0 +tmpfs /dev/shm tmpfs mode=0777 0 0 +tmpfs /tmp tmpfs mode=1777 0 0 +tmpfs /run tmpfs mode=0755,nosuid,nodev 0 0 +sysfs /sys sysfs defaults 0 0 +tmpfs /var/log tmpfs defaults 0 0 +tmpfs /var/tmp tmpfs defaults 0 0 +tmpfs /ramdisk tmpfs rw,nodev,nosuid,size=20M 0 0 diff --git a/buildroot-external/rootfs-overlay/fs_overlay/etc/init.d/S00resizefs_once b/buildroot-external/rootfs-overlay/fs_overlay/etc/init.d/S00resizefs_once new file mode 100644 index 00000000..39cc5fb4 --- /dev/null +++ b/buildroot-external/rootfs-overlay/fs_overlay/etc/init.d/S00resizefs_once @@ -0,0 +1,23 @@ +#!/bin/sh +# +# Auto resize root partition at first boot after init_resize +# + +start() { + printf "Starting resize2fs_once: " + ROOT_DEV=$(findmnt / -o source -n) && + resize2fs $ROOT_DEV && + rm /etc/init.d/S00resizefs_once && + echo "OK" +} + +case "$1" in + start) + start + ;; + *) + echo "Usage: $0 {start}" + exit 1 +esac + +exit $? diff --git a/buildroot-external/rootfs-overlay/fs_overlay/etc/init.d/S15modules b/buildroot-external/rootfs-overlay/fs_overlay/etc/init.d/S15modules new file mode 100755 index 00000000..987426e0 --- /dev/null +++ b/buildroot-external/rootfs-overlay/fs_overlay/etc/init.d/S15modules @@ -0,0 +1,2 @@ +modprobe snd-bcm2835 +#modprobe snd-usb-audio diff --git a/buildroot-external/rootfs-overlay/fs_overlay/etc/init.d/S45alsasound b/buildroot-external/rootfs-overlay/fs_overlay/etc/init.d/S45alsasound new file mode 100755 index 00000000..d5c89b24 --- /dev/null +++ b/buildroot-external/rootfs-overlay/fs_overlay/etc/init.d/S45alsasound @@ -0,0 +1,4 @@ +alsactl init +amixer cset numid=3 1 +amixer sset PCM 95% + diff --git a/buildroot-external/rootfs-overlay/fs_overlay/etc/init.d/S90mycroft_prepare b/buildroot-external/rootfs-overlay/fs_overlay/etc/init.d/S90mycroft_prepare new file mode 100755 index 00000000..7fe316ac --- /dev/null +++ b/buildroot-external/rootfs-overlay/fs_overlay/etc/init.d/S90mycroft_prepare @@ -0,0 +1,31 @@ +#!/bin/sh +# +# Prepare Mycroft software stack. +# + +start() { + # set the right locale / language settings + export LC_ALL=en_US.UTF-8 + export LANG=en_US.UTF-8 + export LANGUAGE=en_US.UTF-8 + + # Check if Mycroft log folders are present and if not + # create those logging folders + if [[ ! -w /var/log/mycroft/ ]] ; then + # Creating needed folders + printf "Creating /var/log/mycroft/ directory" + if [[ ! -d /var/log/mycroft/ ]] ; then + mkdir /var/log/mycroft/ + fi + fi +} +case "$1" in + start) + start + ;; + *) + echo "Usage: $0 {start}" + exit 1 +esac + +exit $? diff --git a/buildroot-external/rootfs-overlay/fs_overlay/etc/init.d/S91mycroft_services b/buildroot-external/rootfs-overlay/fs_overlay/etc/init.d/S91mycroft_services new file mode 100755 index 00000000..00a8dfc6 --- /dev/null +++ b/buildroot-external/rootfs-overlay/fs_overlay/etc/init.d/S91mycroft_services @@ -0,0 +1,37 @@ +#!/bin/sh +# +# Starts Mycroft services. +# + +start() { + printf "Starting Mycroft services: " + umask 077 + bash /usr/bin/start-mycroft.sh all + echo "OK" +} +stop() { + printf "Stopping Mycroft services: " + bash /usr/bin/stop-mycroft.sh all + echo "OK" +} +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + restart + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/buildroot-external/rootfs-overlay/fs_overlay/etc/init.d/init_resize.sh b/buildroot-external/rootfs-overlay/fs_overlay/etc/init.d/init_resize.sh new file mode 100644 index 00000000..e792e123 --- /dev/null +++ b/buildroot-external/rootfs-overlay/fs_overlay/etc/init.d/init_resize.sh @@ -0,0 +1,31 @@ +#!/bin/bash +set -e + +mount -t proc proc /proc +mount -t sysfs sys /sys +mount -t tmpfs tmp /run + +mount /boot +mount / -o remount,rw + +sed -i 's| init=/etc/init.d/init_resize.sh||' /boot/cmdline.txt +sync + +DEVICE="/dev/mmcblk0" +PARTNR="p2" + +CURRENTSIZEB=`fdisk -l $DEVICE$PARTNR | grep "Disk $DEVICE$PARTNR" | cut -d' ' -f5` +CURRENTSIZE=`expr $CURRENTSIZEB / 1024 / 1024` +MAXSIZEMB=`printf %s\\n 'unit MB print list' | parted | grep "Disk ${DEVICE}" | cut -d' ' -f3 | tr -d MB` + +echo "[ok] applying resize operation.." +parted ${DEVICE} resizepart ${PARTNR} ${MAXSIZEMB} +echo "[done]" + +partprobe $DEVICE + +umount /boot +mount / -o remount,ro +sync + +reboot diff --git a/buildroot-external/rootfs-overlay/fs_overlay/etc/mycroft/mycroft.conf b/buildroot-external/rootfs-overlay/fs_overlay/etc/mycroft/mycroft.conf new file mode 100644 index 00000000..f5adf9b0 --- /dev/null +++ b/buildroot-external/rootfs-overlay/fs_overlay/etc/mycroft/mycroft.conf @@ -0,0 +1,7 @@ +{ + "play_wav_cmdline": "aplay -Dhw:0,0 %1", + "play_mp3_cmdline": "mpg123 -a hw:0,0 %1", + "ipc_path": "/ramdisk/mycroft/ipc/", + "ignore_logs": ["enclosure.mouth.viseme", "enclosure.mouth.display"], + "log_level": "INFO" +} diff --git a/buildroot-external/rootfs-overlay/fs_overlay/etc/pulse/system.pa b/buildroot-external/rootfs-overlay/fs_overlay/etc/pulse/system.pa new file mode 100644 index 00000000..5d1746b8 --- /dev/null +++ b/buildroot-external/rootfs-overlay/fs_overlay/etc/pulse/system.pa @@ -0,0 +1,57 @@ +#!/usr/bin/pulseaudio -nF +# +# This file is part of PulseAudio. +# +# PulseAudio is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# PulseAudio is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with PulseAudio; if not, see . + +# This startup script is used only if PulseAudio is started in system +# mode. + +### Automatically load driver modules depending on the hardware available +.ifexists module-detect.so +### Use the static hardware detection module (for systems that lack udev/hal support) +load-module module-detect +.endif + +### Load several protocols +.ifexists module-esound-protocol-unix.so +load-module module-esound-protocol-unix +.endif +load-module module-native-protocol-unix + +### Automatically restore the volume of streams and devices +load-module module-stream-restore +load-module module-device-restore + +### Automatically restore the default sink/source when changed by the user +### during runtime +### NOTE: This should be loaded as early as possible so that subsequent modules +### that look up the default sink/source get the right value +load-module module-default-device-restore + +### Automatically move streams to the default sink if the sink they are +### connected to dies, similar for sources +load-module module-rescue-streams + +### Make sure we always have a sink around, even if it is a null sink. +load-module module-always-sink + +### Automatically suspend sinks/sources that become idle for too long +#load-module module-suspend-on-idle + +### Enable positioned event sounds +load-module module-position-event-sounds + +#allow localhost connections +load-module module-native-protocol-tcp auth-anonymous=true diff --git a/buildroot-external/board/.empty b/buildroot-external/rootfs-overlay/fs_overlay/opt/mycroft/skills/.empty similarity index 100% rename from buildroot-external/board/.empty rename to buildroot-external/rootfs-overlay/fs_overlay/opt/mycroft/skills/.empty diff --git a/buildroot-external/configs/.empty b/buildroot-external/rootfs-overlay/fs_overlay/ramdisk/.empty similarity index 100% rename from buildroot-external/configs/.empty rename to buildroot-external/rootfs-overlay/fs_overlay/ramdisk/.empty diff --git a/buildroot-external/rootfs-overlay/fs_overlay/root/.mycroft b/buildroot-external/rootfs-overlay/fs_overlay/root/.mycroft new file mode 120000 index 00000000..1d8c98c4 --- /dev/null +++ b/buildroot-external/rootfs-overlay/fs_overlay/root/.mycroft @@ -0,0 +1 @@ +../.mycroft \ No newline at end of file diff --git a/buildroot-external/rootfs-overlay/fs_overlay/usr/bin/start-mycroft.sh b/buildroot-external/rootfs-overlay/fs_overlay/usr/bin/start-mycroft.sh new file mode 100755 index 00000000..61c71a1c --- /dev/null +++ b/buildroot-external/rootfs-overlay/fs_overlay/usr/bin/start-mycroft.sh @@ -0,0 +1,161 @@ +#!/usr/bin/env bash + +# Copyright 2017 Mycroft AI Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +SOURCE="${BASH_SOURCE[0]}" + +script=${0} +script=${script##*/} +cd -P "$( dirname "$SOURCE" )" +DIR="$( pwd )" + +function help() { + echo "${script}: Mycroft command/service launcher" + echo "usage: ${script} [command] [params]" + echo + echo "Services:" + echo " all runs core services: bus, audio, skills, voice" + echo " debug runs core services, then starts the CLI" + echo + echo "Services:" + echo " audio the audio playback service" + echo " bus the messagebus service" + echo " skills the skill service" + echo " voice voice capture service" + echo " enclosure mark_1 enclosure service" + echo + echo "Tools:" + echo " cli the Command Line Interface" + echo " unittest run mycroft-core unit tests (requires pytest)" + echo " skillstest run the skill autotests for all skills (requires pytest)" + echo + echo "Utils:" + echo " audiotest attempt simple audio validation" + echo " audioaccuracytest more complex audio validation" + echo " sdkdoc generate sdk documentation" + echo + echo "Examples:" + echo " ${script} all" + echo " ${script} cli" + echo " ${script} unittest" + + exit 1 +} + +_module="" +function name-to-script-path() { + case ${1} in + "bus") _module="mycroft.messagebus.service" ;; + "skills") _module="mycroft.skills" ;; + "audio") _module="mycroft.audio" ;; + "voice") _module="mycroft.client.speech" ;; + "cli") _module="mycroft.client.text" ;; + "audiotest") _module="mycroft.util.audio_test" ;; + "audioaccuracytest") _module="mycroft.audio-accuracy-test" ;; + "enclosure") _module="mycroft.client.enclosure" ;; + + *) + echo "Error: Unknown name '${1}'" + exit 1 + esac +} + +function launch-process() { + name-to-script-path ${1} + + # Launch process in foreground + echo "Starting $1" + python3 -m ${_module} $_params +} + +function launch-background() { + # Check if given module is running and start (or restart if running) + name-to-script-path ${1} + if pgrep -f "python3 -m ${_module}" > /dev/null ; then + echo "Restarting: ${1}" + "${DIR}/stop-mycroft.sh" ${1} + else + echo "Starting background service $1" + fi + + # Security warning/reminder for the user + if [[ "${1}" == "bus" ]] ; then + echo "CAUTION: The Mycroft bus is an open websocket with no built-in security" + echo " measures. You are responsible for protecting the local port" + echo " 8181 with a firewall as appropriate." + fi + + # Launch process in background, sending logs to standard location + python3 -m ${_module} $_params >> /var/log/mycroft/${1}.log 2>&1 & +} + +function launch-all() { + echo "Starting all mycroft-core services" + launch-background bus + launch-background skills + launch-background audio + launch-background voice + + # Determine platform type + if [[ -r /etc/mycroft/mycroft.conf ]] ; then + mycroft_platform=$( jq -r ".enclosure.platform" < /etc/mycroft/mycroft.conf ) + if [[ $mycroft_platform = "mycroft_mark_1" ]] ; then + # running on a Mark 1, start enclosure service + launch-background enclosure + fi + fi +} + +_opt=$1 +shift +_params=$@ + +case ${_opt} in + "all") + launch-all + ;; + "bus") + launch-background ${_opt} + ;; + "audio") + launch-background ${_opt} + ;; + "skills") + launch-background ${_opt} + ;; + "voice") + launch-background ${_opt} + ;; + "debug") + launch-all + launch-process cli + ;; + "cli") + launch-process ${_opt} + ;; + "audiotest") + launch-process ${_opt} + ;; + "audioaccuracytest") + launch-process ${_opt} + ;; + "enclosure") + launch-background ${_opt} + ;; + *) + help + ;; +esac + diff --git a/buildroot-external/rootfs-overlay/fs_overlay/usr/bin/stop-mycroft.sh b/buildroot-external/rootfs-overlay/fs_overlay/usr/bin/stop-mycroft.sh new file mode 100755 index 00000000..a71ccac7 --- /dev/null +++ b/buildroot-external/rootfs-overlay/fs_overlay/usr/bin/stop-mycroft.sh @@ -0,0 +1,131 @@ +#!/usr/bin/env bash + +# Copyright 2017 Mycroft AI Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +SOURCE="${BASH_SOURCE[0]}" + +script=${0} +script=${script##*/} +cd -P "$( dirname "$SOURCE" )" + +function help() { + echo "${script}: Mycroft service stopper" + echo "usage: ${script} [service]" + echo + echo "Service:" + echo " all ends core services: bus, audio, skills, voice" + echo " (none) same as \"all\"" + echo " bus stop the Mycroft messagebus service" + echo " audio stop the audio playback service" + echo " skills stop the skill service" + echo " voice stop voice capture service" + echo " enclosure stop mark_1 enclosure service" + echo + echo "Examples:" + echo " ${script}" + echo " ${script} audio" + + exit 0 +} + +function process-running() { + if [[ $( pgrep -f "python3 -m mycroft.*${1}" ) ]] ; then + return 0 + else + return 1 + fi +} + +function end-process() { + if process-running $1 ; then + echo -n "Stopping $1..." + pid=$( pgrep -f "python3 -m mycroft.*${1}" ) + kill -SIGINT ${pid} + + # Wait up to 5 seconds (50 * 0.1) for process to stop + c=1 + while [ $c -le 50 ] ; do + if process-running $1 ; then + sleep 0.1 + (( c++ )) + else + c=999 # end loop + fi + done + + if process-running $1 ; then + echo "failed to stop." + echo -n " Killing $1..." + kill -9 ${pid} + echo "killed." + result=120 + else + echo "stopped." + if [ $result -eq 0 ] ; then + result=100 + fi + fi + fi +} + +result=0 # default, no change + +OPT=$1 +shift + +case ${OPT} in + "all") + ;& + "") + echo "Stopping all mycroft-core services" + end-process messagebus.service + end-process skills + end-process audio + end-process speech + + # determine platform type + if [[ -r /etc/mycroft/mycroft.conf ]] ; then + mycroft_platform=$( jq -r ".enclosure.platform" < /etc/mycroft/mycroft.conf ) + if [[ $mycroft_platform == "mycroft_mark_1" ]] ; then + # running on a Mark 1, stop enclosure service + end-process enclosure + fi + fi + ;; + "bus") + end-process messagebus.service + ;; + "audio") + end-process audio + ;; + "skills") + end-process skills + ;; + "voice") + end-process speech + ;; + "enclosure") + end-process enclosure + ;; + *) + help + ;; +esac + +# Exit codes: +# 0 if nothing changed (e.g. --help or no process was running) +# 100 at least one process was stopped +# 120 if any process had to be killed +exit $result