-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
5,941 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/sh | ||
|
||
BOARD=`hostname` | ||
echo "\033[31m\033[1m***********************************************" | ||
echo "Welcome to ${BOARD}:" | ||
echo "At first! please configure your ${BOARD}:" | ||
echo "sudo orangepi-config" | ||
echo "Have good trip on ${BOARD}!" | ||
echo "***********************************************\033[22m\033[37m" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
#!/bin/sh | ||
|
||
Usage(){ | ||
printf "\033[32mUsage: " | ||
printf "\t$0 [-h] [-f]... [-s <frequencies> <cpu number>]\n | ||
Arguments: | ||
-h Print Help (this message) | ||
-f CPU0~3 supported frequencies | ||
-s Set the maximum frequency of CPU0~3 | ||
e.g: -s 1008000 1 (Set the maximum frequency of cpu1 to 1008000) | ||
-c View the current frequency of cpu0~3 | ||
-t View the current CPU temperature | ||
-l List CPU ID | ||
-i Viewing cpu statistics | ||
\033[0m" | ||
} | ||
|
||
while getopts ":hfFs:ctli" varname | ||
do | ||
case $varname in | ||
h) | ||
Usage | ||
exit | ||
;; | ||
|
||
f) | ||
echo "CPU0~3 supported frequencies: " | ||
echo " " | ||
echo "CPU[0]: " | ||
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies | ||
echo "CPU[1]: " | ||
cat /sys/devices/system/cpu/cpu1/cpufreq/scaling_available_frequencies | ||
echo "CPU[2]: " | ||
cat /sys/devices/system/cpu/cpu2/cpufreq/scaling_available_frequencies | ||
echo "CPU[3]: " | ||
cat /sys/devices/system/cpu/cpu3/cpufreq/scaling_available_frequencies | ||
exit | ||
;; | ||
|
||
s) | ||
echo "Set the maximum frequency of CPU$3: $OPTARG" | ||
echo $OPTARG > /sys/devices/system/cpu/cpu$3/cpufreq/scaling_max_freq | ||
exit | ||
;; | ||
|
||
c) | ||
echo "The current frequency of cpu0~3: " | ||
cat /sys/devices/system/cpu/cpu[0123]/cpufreq/cpuinfo_cur_freq | ||
exit | ||
;; | ||
|
||
t) | ||
echo "The current CPU temperature: " | ||
cat /sys/class/thermal/thermal_zone0/temp | ||
exit | ||
;; | ||
|
||
l) | ||
echo "List CPU ID: " | ||
cat /sys/class/sunxi_info/sys_info | grep "sunxi_chipid" | ||
exit | ||
;; | ||
|
||
i) | ||
echo "Viewing cpu statistics: " | ||
lscpu | ||
exit | ||
;; | ||
|
||
*) | ||
echo "\033[31mUnknow Option, Please use 'cpu_sh -h' for more commands.\033[0m" | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
|
||
Usage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# ~/.profile: executed by Bourne-compatible login shells. | ||
|
||
if [ "$BASH" ]; then | ||
if [ -f ~/.bashrc ]; then | ||
. ~/.bashrc | ||
fi | ||
fi | ||
|
||
tty -s && mesg n || true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# Package generated configuration file | ||
# See the sshd_config(5) manpage for details | ||
|
||
# What ports, IPs and protocols we listen for | ||
Port 22 | ||
# Use these options to restrict which interfaces/protocols sshd will bind to | ||
#ListenAddress :: | ||
#ListenAddress 0.0.0.0 | ||
Protocol 2 | ||
# HostKeys for protocol version 2 | ||
HostKey /etc/ssh/ssh_host_rsa_key | ||
HostKey /etc/ssh/ssh_host_dsa_key | ||
HostKey /etc/ssh/ssh_host_ecdsa_key | ||
HostKey /etc/ssh/ssh_host_ed25519_key | ||
|
||
# Logging | ||
SyslogFacility AUTH | ||
LogLevel INFO | ||
|
||
# Authentication: | ||
LoginGraceTime 120 | ||
PermitRootLogin yes | ||
StrictModes yes | ||
|
||
PubkeyAuthentication yes | ||
# AuthorizedKeysFile %h/.ssh/authorized_keys | ||
|
||
# Don't read the user's ~/.rhosts and ~/.shosts files | ||
IgnoreRhosts yes | ||
# For this to work you will also need host keys in /etc/ssh_known_hosts | ||
# similar for protocol version 2 | ||
HostbasedAuthentication no | ||
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication | ||
#IgnoreUserKnownHosts yes | ||
|
||
# To enable empty passwords, change to yes (NOT RECOMMENDED) | ||
PermitEmptyPasswords no | ||
|
||
# Change to yes to enable challenge-response passwords (beware issues with | ||
# some PAM modules and threads) | ||
ChallengeResponseAuthentication no | ||
|
||
# Change to no to disable tunnelled clear text passwords | ||
PasswordAuthentication yes | ||
|
||
# Kerberos options | ||
#KerberosAuthentication no | ||
#KerberosGetAFSToken no | ||
#KerberosOrLocalPasswd yes | ||
#KerberosTicketCleanup yes | ||
|
||
# GSSAPI options | ||
#GSSAPIAuthentication no | ||
#GSSAPICleanupCredentials yes | ||
|
||
X11Forwarding yes | ||
X11DisplayOffset 10 | ||
PrintMotd no | ||
PrintLastLog yes | ||
TCPKeepAlive yes | ||
#UseLogin no | ||
|
||
#MaxStartups 10:30:60 | ||
#Banner /etc/issue.net | ||
|
||
# Allow client to pass locale environment variables | ||
AcceptEnv LANG LC_* | ||
|
||
Subsystem sftp /usr/lib/openssh/sftp-server | ||
|
||
# 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 yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.