From b737ff64cc6965842bf1bca3b26b8c6b5de87e08 Mon Sep 17 00:00:00 2001 From: Jamez Date: Thu, 4 Apr 2019 19:33:26 -0700 Subject: [PATCH] Initial checkin of scripts --- etc/wpa_supplicant.conf | 11 +++++++++++ rc.local | 40 ++++++++++++++++++++++++++++++++++++++++ script/flashunit.service | 14 ++++++++++++++ 3 files changed, 65 insertions(+) create mode 100644 etc/wpa_supplicant.conf create mode 100755 rc.local create mode 100755 script/flashunit.service diff --git a/etc/wpa_supplicant.conf b/etc/wpa_supplicant.conf new file mode 100644 index 0000000..6d60653 --- /dev/null +++ b/etc/wpa_supplicant.conf @@ -0,0 +1,11 @@ +# reading passphrase from stdin +ctrl_interface=DIR=/var/run/wpa_supplicant +ctrl_interface_group=0 +update_config=1 + +network={ + ssid="WIT Public 2" + psk="aaaabbbb" + #psk=d71443ef7c2b45ad06e565184371f0150e2eed35fa87cc8168bc02a77ab7d430 + key_mgmt=WPA-PSK +} diff --git a/rc.local b/rc.local new file mode 100755 index 0000000..8196891 --- /dev/null +++ b/rc.local @@ -0,0 +1,40 @@ +#!/bin/bash -x + +# mount /home/internal-mmc + +echo +echo +echo STARTING PINEBOOK IMAGING IN 5 SECONDS +echo STARTING PINEBOOK IMAGING IN 5 SECONDS +echo STARTING PINEBOOK IMAGING IN 5 SECONDS +echo STARTING PINEBOOK IMAGING IN 5 SECONDS +echo STARTING PINEBOOK IMAGING IN 5 SECONDS +echo +echo CONTROL-C TO STOP +echo +echo Sleep 10 +sleep 10 +echo Sleep 10 +sleep 10 +echo Sleep 10 +sleep 10 + +echo mount /dev/mmcblk0p2 /home/factory +mount /dev/mmcblk0p2 /home/factory + +#exit + +echo dd if=/home/factory/emmc.img.armbian of=/dev/mmcblk2 +dd if=/home/factory/emmc.img.armbian of=/dev/mmcblk2 status=progress + +echo sync +sync + +echo +echo +echo INSTALL SUCCEEDED +echo INSTALL SUCCEEDED +echo INSTALL SUCCEEDED +echo INSTALL SUCCEEDED +echo +echo diff --git a/script/flashunit.service b/script/flashunit.service new file mode 100755 index 0000000..15d046d --- /dev/null +++ b/script/flashunit.service @@ -0,0 +1,14 @@ +[Unit] +Description=Flasher service +After=getty.target +Conflicts=getty@tty1.service + +[Service] +Type=oneshot +ExecStart=/bin/bash -c "/root/rc.local" +StandardInput=tty-force +StandardOutput=inherit +StandardError=inherit +[Install] +WantedBy=getty.target +