Skip to content
Permalink
Browse files

Distinguish between 2 GB / 4 GB NanoPi M4

  • Loading branch information...
Cat5TV committed Apr 2, 2019
1 parent 6f84663 commit a4a8a664cc407711bba929987015871edd8a89ae
Showing with 16 additions and 4 deletions.
  1. +16 −4 hw_model.sh
@@ -28,7 +28,8 @@
# HW_MODEL 90 A20-OLinuXino-MICRO
# HW_MODEL 80 Cubieboard 3
# HW_MODEL 70 Sparky SBC
# HW_MODEL 67 NanoPi M4
# HW_MODEL 68 NanoPi M4 (4 GB)
# HW_MODEL 67 NanoPi M4 (2 GB)
# HW_MODEL 66 NanoPi M1 Plus
# HW_MODEL 65 NanoPi NEO 2
# HW_MODEL 64 NanoPi NEO Air
@@ -442,9 +443,20 @@
#NanoPi M4
elif (( $HW_MODEL == 67 )); then

HW_MODEL_DESCRIPTION='NanoPi M4'
IMAGE_ADDITIONAL_CREDITS='ARMbian'
HW_CPUID=1
MEMTOTAL=$(free | awk '/^Mem:/{print $2}')
if (( $MEMTOTAL > 3900000 )); then

HW_MODEL_DESCRIPTION='NanoPi M4 (4 GB)'
IMAGE_ADDITIONAL_CREDITS='ARMbian'
HW_CPUID=1

else

HW_MODEL_DESCRIPTION='NanoPi M4 (2 GB)'
IMAGE_ADDITIONAL_CREDITS='ARMbian'
HW_CPUID=1

fi

#NanoPi M1 Plus
elif (( $HW_MODEL == 66 )); then

0 comments on commit a4a8a66

Please sign in to comment.
You can’t perform that action at this time.