Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 115 additions & 0 deletions configs/nonlinear_usb_os_restore_defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
BR2_arm=y
BR2_cortex_a8=y
BR2_PRIMARY_SITE="http://h2949050.stratoserver.net/buildroot/"
BR2_CCACHE=y
BR2_OPTIMIZE_3=y
BR2_KERNEL_HEADERS_VERSION=y
BR2_DEFAULT_KERNEL_VERSION="4.0"
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_0=y
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
BR2_GLIBC_VERSION_2_23=y
BR2_GCC_VERSION_5_X=y
BR2_EXTRA_GCC_CONFIG_OPTIONS="--with-fpu=vfpv3 --with-float=hard"
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_GENERATE_LOCALE="en_US"
BR2_TARGET_GENERIC_HOSTNAME="nonlinux"
BR2_TARGET_GENERIC_ISSUE="Nonlinux by Nonlinear-Labs"
BR2_INIT_SYSTEMD=y
BR2_SYSTEM_BIN_SH_BASH=y
BR2_ROOTFS_OVERLAY="nonlinear/fs-overlay-usb-os-restore"
BR2_ROOTFS_POST_BUILD_SCRIPT="nonlinear/scripts/run.sh"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_GIT=y
BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/nonlinear-labs-dev/linux.git"
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="e02b6242a72c1cc81d4aec8153897efdab2e6ec8"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/nonlinear-labs-c15/.config"
BR2_LINUX_KERNEL_UIMAGE=y
BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x80008000"
BR2_PACKAGE_BUSYBOX_SELINUX=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_AMIDI=y
BR2_PACKAGE_ALSA_UTILS_AMIXER=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_BZIP2=y
BR2_PACKAGE_E2FSPROGS=y
# BR2_PACKAGE_E2FSPROGS_BADBLOCKS is not set
# BR2_PACKAGE_E2FSPROGS_CHATTR is not set
# BR2_PACKAGE_E2FSPROGS_DUMPE2FS is not set
# BR2_PACKAGE_E2FSPROGS_E2FREEFRAG is not set
# BR2_PACKAGE_E2FSPROGS_E2FSCK is not set
# BR2_PACKAGE_E2FSPROGS_E2LABEL is not set
# BR2_PACKAGE_E2FSPROGS_E2UNDO is not set
# BR2_PACKAGE_E2FSPROGS_FILEFRAG is not set
# BR2_PACKAGE_E2FSPROGS_FSCK is not set
# BR2_PACKAGE_E2FSPROGS_LOGSAVE is not set
# BR2_PACKAGE_E2FSPROGS_LSATTR is not set
# BR2_PACKAGE_E2FSPROGS_MKLOSTFOUND is not set
# BR2_PACKAGE_E2FSPROGS_TUNE2FS is not set
# BR2_PACKAGE_E2FSPROGS_UUIDGEN is not set
BR2_PACKAGE_LINUX_FIRMWARE=y
BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT61=y
BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT73=y
BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT2XX=y
BR2_PACKAGE_LINUX_FIRMWARE_RTL_81XX=y
BR2_PACKAGE_LINUX_FIRMWARE_RTL_87XX=y
BR2_PACKAGE_AVRDUDE=y
BR2_PACKAGE_FREETYPE=y
BR2_PACKAGE_DTC=y
BR2_PACKAGE_DTC_PROGRAMS=y
BR2_PACKAGE_TSLIB=y
BR2_PACKAGE_LIBSOUP=y
BR2_PACKAGE_LIBSOUP_SSL=y
BR2_PACKAGE_BOOST=y
BR2_PACKAGE_GLIBMM=y
BR2_PACKAGE_DHCP=y
BR2_PACKAGE_DHCP_SERVER=y
BR2_PACKAGE_HOSTAPD=y
BR2_PACKAGE_HOSTAPD_EAP=y
BR2_PACKAGE_HOSTAPD_WPS=y
BR2_PACKAGE_IW=y
BR2_PACKAGE_OPENSSH=y
BR2_PACKAGE_RSYNC=y
BR2_PACKAGE_SOCAT=y
BR2_PACKAGE_SSHPASS=y
BR2_PACKAGE_THTTPD=y
BR2_PACKAGE_WIRELESS_TOOLS=y
BR2_PACKAGE_WIRELESS_TOOLS_LIB=y
BR2_PACKAGE_WPA_SUPPLICANT=y
BR2_PACKAGE_WPA_SUPPLICANT_AP_SUPPORT=y
BR2_PACKAGE_WPA_SUPPLICANT_EAP=y
BR2_PACKAGE_WPA_SUPPLICANT_HOTSPOT=y
BR2_PACKAGE_WPA_SUPPLICANT_WPS=y
BR2_PACKAGE_WPA_SUPPLICANT_CLI=y
BR2_PACKAGE_WPA_SUPPLICANT_WPA_CLIENT_SO=y
BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y
BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS=y
BR2_PACKAGE_UTIL_LINUX_SFDISK=y
BR2_PACKAGE_C15=y
BR2_PACKAGE_ESPI_DRIVER=y
BR2_PACKAGE_PLAYCONTROLLER_DRIVER=y
BR2_PACKAGE_NONLINEAR_USB_DTS=y
BR2_PACKAGE_NONLINEAR_USB_DTS_REPOSITORY="https://github.com/nonlinear-labs-dev/am335x-dts.git"
BR2_PACKAGE_MXLI=y
BR2_PACKAGE_NLIMAGEMAKER=y
BR2_TARGET_ROOTFS_TAR_GZIP=y
BR2_TARGET_ROOTFS_INITRAMFS=y
BR2_TARGET_UBOOT=y
BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
BR2_TARGET_UBOOT_CUSTOM_GIT=y
BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/nonlinear-labs-dev/u-boot.git"
BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="nonlinear_v2021.47"
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nonlinear"
BR2_TARGET_UBOOT_FORMAT_IMG=y
BR2_TARGET_UBOOT_SPL=y
BR2_TARGET_UBOOT_SPL_NAME="MLO"
BR2_PACKAGE_HOST_DTC=y
BR2_PACKAGE_HOST_MKE2IMG=y
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
BR2_PACKAGE_HOST_UTIL_LINUX=y
10 changes: 9 additions & 1 deletion create_usb_stick.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
#!/bin/bash

if [ $# -eq 0 ]; then
printf "Assuming nonlinear-labs-2D.dtb for device tree. \n"
DTB_FILE="nonlinear-labs-2D.dtb"
else
printf "Setting device tree to ${1} \n"
DTB_FILE="${1}"
fi

# THIS MUST POINT TO BUILT BUILDROOT
SOURCES=$(readlink -f ../nonlinux)
BASEDIR=$(dirname "${0}")
Expand All @@ -12,6 +20,6 @@ echo ${NLIMAGEMAKER}
echo ${SOURCES}

gzip -c ${SOURCES}/output/images/rootfs.tar > ${SOURCES}/output/images/rootfs.tar.gz
${NLIMAGEMAKER} -k ${BASEDIR}/output/images/uImage -r ${SOURCES}/output/images/rootfs.tar.gz -d ${BASEDIR}/output/images/am335x-boneblack.dtb -o /tmp/nonlinear.img
${NLIMAGEMAKER} -k ${BASEDIR}/output/images/uImage -r ${SOURCES}/output/images/rootfs.tar.gz -d ${BASEDIR}/output/images/${DTB_FILE} -o /tmp/nonlinear.img

echo "Image created: /tmp/nonlinear.img"
11 changes: 11 additions & 0 deletions nonlinear/fs-overlay-usb-os-restore/etc/dhcpd-usbnet.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
default-lease-time 600;
max-lease-time 7200;
option domain-name "nonlinear-labs.de";
option broadcast-address 192.168.7.3;
option subnet-mask 255.255.255.252;

subnet 192.168.7.0 netmask 255.255.255.252
{
range 192.168.7.1 192.168.7.1;
}

11 changes: 11 additions & 0 deletions nonlinear/fs-overlay-usb-os-restore/etc/dhcpd-wlan.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
default-lease-time 600;
max-lease-time 7200;
option domain-name "nonlinear-labs.de";
option broadcast-address 192.168.8.31;
option subnet-mask 255.255.255.224;

subnet 192.168.8.0 netmask 255.255.255.224
{
range 192.168.8.3 192.168.8.30;
}

9 changes: 9 additions & 0 deletions nonlinear/fs-overlay-usb-os-restore/etc/fstab
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# <file system> <mount pt> <type> <options> <dump> <pass>
/dev/root / ext2 rw,noauto 0 1
proc /proc proc defaults 0 0
devpts /dev/pts devpts defaults,gid=5,mode=620 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
/dev/sda1 /mnt/usb-stick auto rw,auto,nofail,user,umask=0000 0 0
10 changes: 10 additions & 0 deletions nonlinear/fs-overlay-usb-os-restore/etc/hostapd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
ssid=NonLinearInstrument
interface=wlan0
channel=7
hw_mode=g
wpa_passphrase=88888888
wpa=2
rsn_preauth=1
rsn_preauth_interfaces=wlan0
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Load NonlinearLabs espi_driver.ko for emphase devices at boot
espi_driver
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Load NonlinearLabs lpc_bb_driver.ko for emphase devices at boot
lpc_bb_driver
8 changes: 8 additions & 0 deletions nonlinear/fs-overlay-usb-os-restore/etc/network/interfaces
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.10.11
netmask 255.255.255.0

124 changes: 124 additions & 0 deletions nonlinear/fs-overlay-usb-os-restore/etc/ssh/sshd_config
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
# $OpenBSD: sshd_config,v 1.80 2008/07/02 02:24:18 djm Exp $

# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options change a
# default value.

#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

# Disable legacy (protocol version 1) support in the server for new
# installations. In future the default will change to require explicit
# activation of protocol 1
Protocol 2

# HostKey for protocol version 1
#HostKey /etc/ssh_host_key
# HostKeys for protocol version 2
#HostKey /etc/ssh_host_rsa_key
#HostKey /etc/ssh_host_dsa_key

# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 1024

# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
#LogLevel INFO

# Authentication:

#LoginGraceTime 2m
PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10

#RSAAuthentication yes
#PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys

# For this to work you will also need host keys in /etc/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
PermitEmptyPasswords yes

# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
#UsePAM no

#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
PrintMotd no
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
UseDNS no
#PidFile /var/run/sshd.pid
#MaxStartups 10
#PermitTunnel no
#ChrootDirectory none

# no default banner path
#Banner none

ClientAliveInterval 15
ClientAliveCountMax 4
AcceptEnv LANG LC_*

# override default of no subsystems
Subsystem sftp /usr/libexec/sftp-server

# Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
# ForceCommand cvs server
35 changes: 35 additions & 0 deletions nonlinear/fs-overlay-usb-os-restore/etc/systemd/journald.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This file is part of systemd.
#
# systemd 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.1 of the License, or
# (at your option) any later version.
#
# See journald.conf(5) for details

[Journal]
Storage=persistent
#Compress=yes
#Seal=yes
#SplitMode=uid
#SyncIntervalSec=5m
#RateLimitInterval=30s
#RateLimitBurst=1000
#SystemMaxUse=
#SystemKeepFree=
#SystemMaxFileSize=
#RuntimeMaxUse=
#RuntimeKeepFree=
#RuntimeMaxFileSize=
#MaxRetentionSec=
#MaxFileSec=1month
#ForwardToSyslog=no
#ForwardToKMsg=no
#ForwardToConsole=no
#ForwardToWall=yes
#TTYPath=/dev/console
#MaxLevelStore=debug
#MaxLevelSyslog=debug
#MaxLevelKMsg=notice
#MaxLevelConsole=info
#MaxLevelWall=emerg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Unit]
Description=AccessPoint daemon
After=syslog.target network.target

[Service]
ExecStart=/usr/sbin/hostapd /etc/hostapd.conf

[Install]
WantedBy=multi-user.target
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Unit]
Description=DHCP Server for usbnet
After=syslog.target network.target

[Service]
ExecStartPre=/bin/touch /tmp/dhcpd-usbnet.leases
ExecStart=/usr/sbin/dhcpd -d -q -cf /etc/dhcpd-usbnet.conf -lf /tmp/dhcpd-usbnet.leases -pf /tmp/usbnet.pid usb0

[Install]
WantedBy=multi-user.target
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Description=DHCP Server for wlan
After=syslog.target network.target

[Service]
ExecStartPre=/bin/touch /tmp/dhcpd-wlan.leases
ExecStart=/usr/sbin/dhcpd -d -q -cf /etc/dhcpd-wlan.conf -lf /tmp/dhcpd-wlan.leases -pf /tmp/wlan.pid wlan0
Restart=on-failure
RestartSec=3

[Install]
WantedBy=multi-user.target
Loading