瀏覽代碼

Separate functions

Bob Mottram 7 年之前
父節點
當前提交
873f5378e8
共有 1 個檔案被更改,包括 11 行新增7 行删除
  1. 11
    7
      src/freedombone-image-hardware-setup

+ 11
- 7
src/freedombone-image-hardware-setup 查看文件

94
 }
94
 }
95
 
95
 
96
 beaglebone_flash() {
96
 beaglebone_flash() {
97
-    bbb_version=$1
98
     # allow flash-kernel to work without valid /proc contents
97
     # allow flash-kernel to work without valid /proc contents
99
     # ** this doesn't *really* work, since there are too many checks
98
     # ** this doesn't *really* work, since there are too many checks
100
     #    that fail in an emulated environment!  We'll have to do it by
99
     #    that fail in an emulated environment!  We'll have to do it by
101
     #    hand below anyway...
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
     apt-get install -y flash-kernel
111
     apt-get install -y flash-kernel
108
 }
112
 }
109
 
113
 
252
         ;;
256
         ;;
253
     beaglebonewifi)
257
     beaglebonewifi)
254
         beaglebone_setup_boot wireless
258
         beaglebone_setup_boot wireless
255
-        beaglebone_flash wireless
259
+        beaglebone_flash_wireless
256
         beaglebone_repack_kernel wireless
260
         beaglebone_repack_kernel wireless
257
         enable_serial_console ttyO0
261
         enable_serial_console ttyO0
258
         ;;
262
         ;;