Few more OMV and OPi Zero Plus 2 H3 fixes

This commit is contained in:
Thomas Kaiser 2017-04-11 14:05:46 +02:00
parent 8ca3dcd622
commit 0d975ca074
5 changed files with 22 additions and 17 deletions

View File

@ -4,13 +4,11 @@
; TODO:
; - try to boot
; - verify DRAM parameters
; - check whether AP6212 is connected to uart1 or uart2
; - check whether red led is still connected to PA17
; - check which USB port is missing: usbc1, usbc2 or usbc3
; - fix powering on AP6212
;
[product]
version = "100"
machine = "Xunlong Orange Pi Zero Plus 2"
machine = "Xunlong Orange Pi Zero Plus 2 H3"
[platform]
debug_mode = 1
@ -553,7 +551,7 @@ usb_regulator_vol = 0
usb_not_suspend = 0
[usbc1]
usb_used = 1
usb_used = 0
usb_drv_vbus_gpio =
usb_restrict_gpio =
usb_host_init_state = 1

View File

@ -17,7 +17,7 @@ MAINTAINERMAIL="igor.pecovnik@****l.com" # deb signature
TZDATA=`cat /etc/timezone` # Timezone for target is taken from host or defined here.
USEALLCORES=yes # Use all CPU cores for compiling
EXIT_PATCHING_ERROR="" # exit patching if failed
HOST="$BOARD" # set hostname to the board
HOST="$(echo "$BOARD" | cut -f1 -d-)" # set hostname to the board
CACHEDIR=$DEST/cache
ROOTFSCACHE_VERSION=3

View File

@ -48,8 +48,7 @@ InstallOpenMediaVault() {
cp -p /etc/default/cpufrequtils /etc/default/cpufrequtils.bak
locale-gen "en_US.UTF-8"
locale-gen "C"
export LANG=C
export LC_ALL="en_US.UTF-8"
export LANG=C LC_ALL="en_US.UTF-8"
#Add OMV source.list and Update System
cat > /etc/apt/sources.list.d/openmediavault.list <<- EOF
@ -88,7 +87,7 @@ InstallOpenMediaVault() {
-o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install \
openmediavault
#install OMV extras
# install OMV extras, enable folder2ram, tweak some settings
FILE=$(mktemp)
wget http://omv-extras.org/openmediavault-omvextrasorg_latest_all3.deb -qO $FILE && dpkg -i $FILE && rm $FILE
/usr/sbin/omv-update
@ -107,16 +106,20 @@ InstallOpenMediaVault() {
# rootfs resize to 4GB max and adding omv-initsystem to firstrun -- q&d but shouldn't matter
echo 8388608s >/root/.rootfs_resize
sed -i '/systemctl\ disable\ firstrun/i \
\tmv /usr/bin/newaliases.bak /usr/bin/newaliases \
\texport DEBIAN_FRONTEND=noninteractive \
\tapt-get install -f || exit 0 \
\t/usr/sbin/omv-initsystem \
\tmv /etc/default/cpufrequtils.bak /etc/default/cpufrequtils' /etc/init.d/firstrun
mv /usr/bin/newaliases.bak /usr/bin/newaliases \
export DEBIAN_FRONTEND=noninteractive \
apt-get install -f || exit 0 \
/usr/sbin/omv-initsystem \
mv /etc/default/cpufrequtils.bak /etc/default/cpufrequtils \
. /etc/default/cpufrequtils \
echo -e "OMV_CPUFREQUTILS_GOVERNOR=${GOVERNOR}" >>/etc/default/openmediavault \
echo -e "OMV_CPUFREQUTILS_MINSPEED=${MIN_SPEED}" >>/etc/default/openmediavault \
echo -e "OMV_CPUFREQUTILS_MAXSPEED=${MAX_SPEED}" >>/etc/default/openmediavault' /etc/init.d/firstrun
sed -i '/systemctl\ disable\ firstrun/a \
\tsync && sleep 30 && reboot' /etc/init.d/firstrun
sync && sleep 30 && reboot' /etc/init.d/firstrun
# some performance tuning
sed -i '/^exit\ 0/i \
grep -q ondemand /etc/default/cpufrequtils && sed -i '/^exit\ 0/i \
echo ondemand >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor \
sleep 0.1 \
echo 1 >/sys/devices/system/cpu/cpufreq/ondemand/io_is_busy \

View File

@ -14,6 +14,10 @@ done
KERNELID=$(uname -r)
TERM=linux toilet -f standard -F metal $BOARD_NAME
if [ $(echo $BOARD_NAME | wc -c) -ge 18 ]; then
TERM=linux toilet -f standard -F metal $(echo $BOARD_NAME | sed 's/Orange Pi/OPi/')
else
TERM=linux toilet -f standard -F metal $BOARD_NAME
fi
printf '\nWelcome to \e[0;91mARMBIAN\x1B[0m %s %s %s %s\n' "$VERSION $IMAGE_TYPE $PRETTY_NAME $KERNELID"