Skip to content

Commit

Permalink
v6.0
Browse files Browse the repository at this point in the history
+ PineA64 reduced to one G_HW_MODEL
  • Loading branch information
Fourdee committed Jan 11, 2018
1 parent 6bfb08e commit 6440d14
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 35 deletions.
14 changes: 9 additions & 5 deletions PREP_SYSTEM_FOR_DIETPI.sh
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,7 @@ _EOF_
'51' 'BananaPi Pro (Lemaker)'
'50' 'BananaPi M2+ (sinovoip)'
'43' 'Rock64'
'42' 'Pine A64+ (2048mb)'
'41' 'Pine A64+ (1024mb)'
'40' 'Pine A64 (512mb)'
'40' 'Pine A64'
'38' 'OrangePi PC 2'
'37' 'OrangePi Prime'
'36' 'OrangePi Win'
Expand Down Expand Up @@ -614,6 +612,11 @@ _EOF_

G_AGI device-tree-compiler #Kern

# Asus TB
# elif (( $G_HW_MODEL == 100 )); then

# G_AGI linaro-overlay-minimal

fi

G_DIETPI-NOTIFY 2 "WiFi selection"
Expand Down Expand Up @@ -1056,7 +1059,7 @@ ACTION=="add", SUBSYSTEM=="leds", ENV{DEVPATH}=="*/input*::scrolllock", ATTR{tri
_EOF_

# - PINE64 (and possibily others): Cursor fix for FB
elif (( $G_HW_MODEL >= 40 && $G_HW_MODEL <= 42 )); then
elif (( $G_HW_MODEL == 40 )); then

cat << _EOF_ >> "$HOME"/.bashrc
infocmp > terminfo.txt
Expand Down Expand Up @@ -1112,6 +1115,7 @@ _EOF_
G_DIETPI-NOTIFY 2 'Disabling swapfile'

/DietPi/dietpi/func/dietpi-set_dphys-swapfile 0 /var/swap
rm /var/swap &> /dev/null # still exists on some images...

# BBB disable swapfile gen
if (( $G_HW_MODEL == 71 )); then
Expand All @@ -1123,7 +1127,7 @@ _EOF_
G_DIETPI-NOTIFY 2 'Resetting boot.ini, config.txt, cmdline.txt etc'

# - PineA64 - delete ethaddr from uEnv.txt file
if (( $G_HW_MODEL >= 40 && $G_HW_MODEL <= 42 )); then
if (( $G_HW_MODEL == 40 )); then

sed -i '/^ethaddr/ d' /boot/uEnv.txt

Expand Down
4 changes: 2 additions & 2 deletions dietpi/dietpi-config
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,7 @@
fi

#Pine a64
elif (( $G_HW_MODEL >= 40 && $G_HW_MODEL <= 42 )); then
elif (( $G_HW_MODEL == 40 )); then

#Get Current Values
local current_resolution=$(cat /DietPi/uEnv.txt | grep -m1 'optargs=disp.screen0_output_mode=' | sed 's/.*=//')
Expand Down Expand Up @@ -1351,7 +1351,7 @@
fi

#PineA64
elif (( $G_HW_MODEL >= 40 && $G_HW_MODEL <= 42 )); then
elif (( $G_HW_MODEL == 40 )); then
WHIP_QUESTION=" Would you like to update the firmware on your $G_HW_MODEL_DESCRIPTION? \n - This will run longsleep's update scripts to update the U-Boot and kernel."
whiptail --title "$WHIP_TITLE" --yesno "$WHIP_QUESTION" --yes-button "Ok" --no-button "Back" --defaultno --backtitle "$WHIP_BACKTITLE" 12 60
CHOICE=$?
Expand Down
25 changes: 3 additions & 22 deletions dietpi/dietpi-obtain_hw_model
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@
# G_HW_MODEL 51 BananaPi Pro (Lemaker)
# G_HW_MODEL 50 BananaPi M2+ (sinovoip)
# G_HW_MODEL 43 Rock64
# G_HW_MODEL 42 Pine A64+ (2048mb)
# G_HW_MODEL 41 Pine A64+ (1024mb)
# G_HW_MODEL 40 Pine A64 (512mb)
# G_HW_MODEL 40 Pine A64
# G_HW_MODEL 38 OrangePi PC 2
# G_HW_MODEL 37 OrangePi Prime
# G_HW_MODEL 36 OrangePi Win
Expand Down Expand Up @@ -478,27 +476,10 @@
IMAGE_ADDITIONAL_CREDITS='Longsleep, Ayufan'

#PineA64
elif (( $G_HW_MODEL >= 40 && $G_HW_MODEL <= 42 )); then
elif (( $G_HW_MODEL == 40 )); then

IMAGE_ADDITIONAL_CREDITS='Longsleep, Rhkean'

MEMTOTAL=$(free | awk '/^Mem:/{print $2}')
if (( $MEMTOTAL > 2000000 )); then

G_HW_MODEL_DESCRIPTION='Pine A64+ 2GB'
G_HW_MODEL=42

elif (( $MEMTOTAL > 1000000 )); then

G_HW_MODEL_DESCRIPTION='Pine A64+ 1GB'
G_HW_MODEL=41

else

G_HW_MODEL_DESCRIPTION='Pine A64 512MB'
G_HW_MODEL=40

fi
G_HW_MODEL_DESCRIPTION='Pine A64'

#OrangePi PC 2
elif (( $G_HW_MODEL == 38 )); then
Expand Down
2 changes: 1 addition & 1 deletion dietpi/dietpi-software
Original file line number Diff line number Diff line change
Expand Up @@ -7114,7 +7114,7 @@ _EOF_
cp /DietPi/dietpi/conf/xorg_c1.conf /etc/X11/xorg.conf

#Pine64
elif (( $G_HW_MODEL >= 40 && $G_HW_MODEL <= 42 )); then
elif (( $G_HW_MODEL == 40 )); then

INSTALL_URL_ADDRESS='http://dietpi.com/downloads/binaries/all/libump_1-1_arm64.deb'
G_CHECK_URL "$INSTALL_URL_ADDRESS"
Expand Down
2 changes: 1 addition & 1 deletion dietpi/func/dietpi-globals
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ $print_logfile_info
# NanoPi M3
# H3 3.x
# H2+ 3.x
if (( ( $G_HW_MODEL >= 40 && $G_HW_MODEL <= 42 ) ||
if (( $G_HW_MODEL == 40 ||
$G_HW_MODEL == 61 ||
$G_HW_MODEL == 62 ||
( $G_HW_CPUID == 1 && $(uname -r | grep -ci -m1 '^3.') ) ||
Expand Down
8 changes: 4 additions & 4 deletions dietpi/func/dietpi-set_hardware
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ _EOF_
aWIFI_MODULES+=("8189es")

# + Pine A64 / Asus tinker board (onboard)
elif (( ( $G_HW_MODEL >= 40 && $G_HW_MODEL <= 42 ) || $G_HW_MODEL == 100 )); then
elif (( $G_HW_MODEL == 40 || $G_HW_MODEL == 100 )); then

aWIFI_MODULES+=("8723bs")

Expand Down Expand Up @@ -1420,7 +1420,7 @@ _EOF_
sed -i '/^setenv condev/c\setenv condev "console=tty0 console=ttyS0,115200n8"' /DietPi/boot.ini

# - Pine A64
elif (( $G_HW_MODEL >= 40 && $G_HW_MODEL <= 42 )); then
elif (( $G_HW_MODEL == 40 )); then

if (( ! $(cat /DietPi/uEnv.txt | grep -ci -m1 'console=ttyS0,115200n8 ') )); then

Expand Down Expand Up @@ -1484,7 +1484,7 @@ _EOF_
sed -i '/^setenv condev/c\setenv condev "console=tty0"' /DietPi/boot.ini

# - Pine A64
elif (( $G_HW_MODEL >= 40 && $G_HW_MODEL <= 42 )); then
elif (( $G_HW_MODEL == 40 )); then

sed -i 's/console=ttyS0,115200n8 //' /DietPi/uEnv.txt

Expand Down Expand Up @@ -1547,7 +1547,7 @@ _EOF_
Soundcard_Reset_H3

# - Pine a64
elif (( $G_HW_MODEL >= 40 && $G_HW_MODEL <= 42 )); then
elif (( $G_HW_MODEL == 40 )); then

Soundcard_Reset_PineA64

Expand Down

0 comments on commit 6440d14

Please sign in to comment.