Commit d4181f34 authored by Michael Mrozek's avatar Michael Mrozek

init-hwtest.sh: Started the basic setup for the tester script (font size,...

init-hwtest.sh: Started the basic setup for the tester script (font size, disable console-logging, prepare functions).
parent 63a57d7b
#!/bin/bash
# Pyra Testing Script v0.1
LOG_TTY=3
LOG_DEVICE="/dev/tty$LOG_TTY"
ver="2018-06-25"
sd_dir=`pwd`
# Setup some functions to make the log easier.
log()
{
echo "$@"
echo "$@" > $LOG_DEVICE
}
log_err()
{
echo -en "\033[1;31m"
echo "$@"
echo -en "\033[0m"
echo -en "\033[1;31m" > $LOG_DEVICE
echo "$@" > $LOG_DEVICE
echo -en "\033[0m" > $LOG_DEVICE
}
# This is just a preparation for the summary - it's not used yet.
print_ok()
{
if $2; then
log "$1 OK"
else
log_err "$1 FAILED"
fi
}
print_status()
{
log "---------------"
print_ok "LEDs: " $leds_passed
print_ok "Sensors: " $sensors_passed
print_ok "GPS: " $gps_passed
print_ok "Modem: " $modem_passed
print_ok "SD WriteProt: " $sdprot_passed
print_ok "USB/SD2: " $mass_passed
print_ok "Bluetooth: " $bt_passed
print_ok "WiFi: " $wifi_passed
log "Pyra Version:" $pnd_version
}
[ -d /dev ] || mkdir -m 0755 /dev
[ -d /root ] || mkdir -m 0700 /root
[ -d /sys ] || mkdir /sys
[ -d /proc ] || mkdir /proc
[ -d /tmp ] || mkdir /tmp
mkdir -p /var/lock
mount -t sysfs -o nodev,noexec,nosuid sysfs /sys
mount -t proc -o nodev,noexec,nosuid proc /proc
......@@ -23,6 +75,18 @@ modprobe connector_hdmi
modprobe panel_boe_w677l
modprobe pwm_bl
# Disable Logging on-screen and switch to TTY3, use a nicer font size
chvt 3
echo 0 > /sys/module/printk/parameters/ignore_loglevel
dmesg -D
setfont Lat15-Terminus24x12.psf.gz
clear
log ""
log "Pyra Testing Script $ver"
log "" > $LOG_DEVICE
log "This is a work-in-progress - barely anything works right now :))"
log ""
# touchscreen
modprobe tsc2007
......@@ -36,7 +100,16 @@ modprobe as5013
#usb
modprobe ehci_omap
# Tests will run here.
# Results will be shown here.
log "Press ENTER to start the input-tester..."
read a < $LOG_DEVICE
/usr/share/pyra/bin/pyra_test_inputs
# Flashing to eMMC will start here.
/bin/bash
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment