Browse Source

Separate functions

Bob Mottram 7 years ago
parent
commit
873f5378e8
1 changed files with 11 additions and 7 deletions
  1. 11
    7
      src/freedombone-image-hardware-setup

+ 11
- 7
src/freedombone-image-hardware-setup View File

@@ -94,16 +94,20 @@ EOF
94 94
 }
95 95
 
96 96
 beaglebone_flash() {
97
-    bbb_version=$1
98 97
     # allow flash-kernel to work without valid /proc contents
99 98
     # ** this doesn't *really* work, since there are too many checks
100 99
     #    that fail in an emulated environment!  We'll have to do it by
101 100
     #    hand below anyway...
102
-    if [[ "$bbb_version" == 'wireless' ]]; then
103
-        export FK_MACHINE="TI AM335x BeagleBone Black Wireless"
104
-    else
105
-        export FK_MACHINE="TI AM335x BeagleBone Black"
106
-    fi
101
+    export FK_MACHINE="TI AM335x BeagleBone Black"
102
+    apt-get install -y flash-kernel
103
+}
104
+
105
+beaglebone_flash_wireless() {
106
+    # allow flash-kernel to work without valid /proc contents
107
+    # ** this doesn't *really* work, since there are too many checks
108
+    #    that fail in an emulated environment!  We'll have to do it by
109
+    #    hand below anyway...
110
+    export FK_MACHINE="TI AM335x BeagleBone Black Wireless"
107 111
     apt-get install -y flash-kernel
108 112
 }
109 113
 
@@ -252,7 +256,7 @@ case "$MACHINE" in
252 256
         ;;
253 257
     beaglebonewifi)
254 258
         beaglebone_setup_boot wireless
255
-        beaglebone_flash wireless
259
+        beaglebone_flash_wireless
256 260
         beaglebone_repack_kernel wireless
257 261
         enable_serial_console ttyO0
258 262
         ;;