-
Notifications
You must be signed in to change notification settings - Fork 6
/
install_uboot_mtd0.sh
executable file
·572 lines (489 loc) · 18 KB
/
install_uboot_mtd0.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
#!/bin/sh
#
# Install uBoot on mtd0
# Copyright (c) 2010-2012 Jeff Doozan
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
# Version 1.1 [6/2/2012] Download files from download.doozan.com
VALID_UBOOT_MD5=http://jeff.doozan.com/uboot/valid-uboot.md5
# It is NOT a good idea to start your own mirror
# You should leave this as-is
MIRROR=http://download.doozan.com/uboot
UBOOT_MTD0_BASE_URL=$MIRROR/files/uboot/uboot.mtd0 # .platform.version.kwb will be appended to this
UBOOT_ENV_URL=$MIRROR/files/environment/uboot.environment
BLPARAM_URL=$MIRROR/blparam
NANDDUMP_URL=$MIRROR/nanddump
NANDWRITE_URL=$MIRROR/nandwrite
FLASH_ERASE_URL=$MIRROR/flash_erase
FW_PRINTENV_URL=$MIRROR/fw_printenv
FW_CONFIG_URL=$MIRROR/fw_env.config
UBOOT_MTD0=/tmp/uboot.mtd0.kwb
UBOOT_ORIGINAL=/uboot-original-mtd0.kwb
UBOOT_ENV=/tmp/uboot.environment
BLPARAM=/usr/sbin/blparam
NANDDUMP=/usr/sbin/nanddump
NANDWRITE=/usr/sbin/nandwrite
FLASH_ERASE=/usr/sbin/flash_erase
FW_PRINTENV=/usr/sbin/fw_printenv
FW_SETENV=/usr/sbin/fw_setenv
FW_CONFIG=/etc/fw_env.config
verify_md5 ()
{
local file=$1
local md5=$2
local check_md5=$(cat "$md5" | cut -d' ' -f1)
local file_md5=$(md5sum "$file" | cut -d' ' -f1)
if [ "$check_md5" = "$file_md5" ]; then
return 0
else
return 1
fi
}
download_and_verify ()
{
local file_dest=$1
local file_url=$2
local md5_dest="$file_dest.md5"
local md5_url="$file_url.md5"
# Always download a fresh MD5, in case a newer version is available
if [ -f "$md5_dest" ]; then rm -f "$md5_dest"; fi
wget -O "$md5_dest" "$md5_url"
# retry the download if it failed
if [ ! -f "$md5_dest" ]; then
wget -O "$md5_dest" "$md5_url"
if [ ! -f "$md5_dest" ]; then
return 1 # Could not get md5
fi
fi
# If the file already exists, check the MD5
if [ -f "$file_dest" ]; then
verify_md5 "$file_dest" "$md5_dest"
if [ "$?" -ne "0" ]; then
rm -f "$md5_dest"
return 0
else
rm -f "$file_dest"
fi
fi
# Download the file
wget -O "$file_dest" "$file_url"
# retry the download if it failed
verify_md5 "$file_dest" "$md5_dest"
if [ "$?" -ne "0" ]; then
# Download failed or MD5 did not match, try again
if [ -f "$file_dest" ]; then rm -f "$file_dest"; fi
wget -O "$file_dest" "$file_url"
verify_md5 "$file_dest" "$md5_dest"
if [ "$?" -ne "0" ]; then
rm -f "$md5_dest"
return 1
fi
fi
rm -f "$md5_dest"
return 0
}
install ()
{
local file_dest=$1
local file_url=$2
local file_pmask=$3 # Permissions mask
echo "# checking for $file_dest..."
# Install target file if it doesn't already exist
if [ ! -s "$file_dest" ]; then
echo ""
echo "# Installing $file_dest..."
# Check for read-only filesystem by testing
# if we can delete the existing 0 byte file
# or, if we can create a 0 byte file
local is_readonly=0
if [ -f "$file_dest" ]; then
rm -f "$file_dest" 2> /dev/null
else
touch "$file_dest" 2> /dev/null
fi
if [ "$?" -ne "0" ]; then
local is_readonly=0
mount -o remount,rw /
fi
rm -f "$file_dest" 2> /dev/null
download_and_verify "$file_dest" "$file_url"
if [ "$?" -ne "0" ]; then
echo "## Could not install $file_dest from $file_url, exiting."
if [ "$is_readonly" = "1" ]; then
mount -o remount,ro /
fi
exit 1
fi
chmod $file_pmask "$file_dest"
if [ "$is_readonly" = "1" ]; then
mount -o remount,ro /
fi
echo "# Successfully installed $file_dest."
fi
return 0
}
# Parse command line
for i in $*
do
case $i in
--force-platform=*)
FORCE_PLATFORM=`echo $i | sed 's/[-a-zA-Z0-9]*=//'`
echo "Forcing platform to [$FORCE_PLATFORM]"
;;
--no-uboot-check)
NO_UBOOT_CHECK=1
;;
--noprompt)
NOPROMPT=1
;;
*)
;;
esac
done
if [ "$NOPROMPT" != "1" ]; then
echo ""
echo ""
echo "!!!!!! DANGER DANGER DANGER DANGER DANGER DANGER !!!!!!"
echo ""
echo "If you lose power to your device while running this script,"
echo "it could be left in an unusable state."
echo ""
echo "This script will replace the bootloader on /dev/mtd0."
echo ""
echo "This installer will only work on the following devices:"
echo " Seagate Dockstar"
echo " Seagate GoFlex Net"
echo " Seagate GoFlex Home"
echo " Pogoplug v1"
echo " Pogoplug Pink (v2)"
echo "Do not run this installer on any other device."
echo ""
echo "By typing ok, you agree to assume all liabilities and risks "
echo "associated with running this installer."
echo ""
echo -n "If you agree, type 'ok' and press ENTER to continue: "
read IS_OK
if [ "$IS_OK" != "OK" -a "$IS_OK" != "Ok" -a "$IS_OK" != "ok" ];
then
echo "Exiting. uBoot was not installed."
exit 1
fi
fi
install "$NANDWRITE" "$NANDWRITE_URL" 755
install "$NANDDUMP" "$NANDDUMP_URL" 755
install "$FLASH_ERASE" "$FLASH_ERASE_URL" 755
install "$FW_PRINTENV" "$FW_PRINTENV_URL" 755
install "$FW_CONFIG" "$FW_CONFIG_URL" 644
if [ ! -f "$FW_SETENV" ]; then
ln -s "$FW_PRINTENV" "$FW_SETENV" 2> /dev/null
if [ "$?" -ne "0" ]; then
mount -o remount,rw /
ln -s "$FW_PRINTENV" "$FW_SETENV"
mount -o remount,ro /
fi
fi
# Dump existing uBoot and compare it to a database of known versions
echo ""
echo "# Validating existing uBoot..."
# dump the first 512k of mtd0 to /tmp
$NANDDUMP --noecc --omitoob -l 0x80000 -f /tmp/uboot-mtd0-dump /dev/mtd0
wget -O "/tmp/valid-uboot.md5" "$VALID_UBOOT_MD5"
UPDATE_UBOOT=1
UBOOT_PLATFORM=
CURRENT_UBOOT_MD5=$(md5sum "/tmp/uboot-mtd0-dump" | cut -d' ' -f1)
UBOOT_DETAILS=$(grep $CURRENT_UBOOT_MD5 /tmp/valid-uboot.md5 | head -1)
if [ "$UBOOT_DETAILS" != "" ]; then
UBOOT_PLATFORM=$(echo $UBOOT_DETAILS | sed 's/^\w* \(\w*\) .*$/\1/')
UBOOT_VERSION=$(echo $UBOOT_DETAILS | sed 's/^\w* \w* \(.*\)$/\1/')
echo "## Valid uBoot detected: [$UBOOT_PLATFORM $UBOOT_VERSION]"
else
echo "## Unknown uBoot detected on mtd0: $CURRENT_UBOOT_MD5"
echo "##"
if [ "$NO_UBOOT_CHECK" != "1" ]; then
echo "## The installer could not detect the version of your current uBoot"
echo "## This may happen if you have installed a different uBoot on"
echo "## /dev/mtd0 or if you have bad blocks on /dev/mtd0"
echo "##"
echo "## If you have bad blocks on mtd0, you should not try to install uBoot."
# echo "##"
# echo "## If you have installed a diffirent uBoot on mtd0, and understand the"
# echo "## risks, you can re-run the installer with the --no-uboot-check parameter"
echo "##"
echo "## Installation cancelled."
rm "/tmp/valid-uboot.md5"
exit 1
else
echo "## --no-uboot-check flag detected, continuing installation"
while [ "$UBOOT_PLATFORM" = "" ]; do
echo ""
echo "############################################"
echo "Your device could not be auto-detected."
echo ""
echo "You must be using a device listed below to run this installer."
echo ""
echo "What device are you using? Type the number of your device and press ENTER."
echo "1 - Seagate Dockstar"
echo "2 - Seagate GoFlex Net"
echo "3 - Seagate GoFlex Home"
echo "4 - Pogoplug v1"
echo "5 - Pogoplug v2 - Pink"
echo "6 - Other"
read device
if [ "$device" = "1" ]; then
echo "Selected Dockstar"
UBOOT_PLATFORM="dockstar"
UBOOT_VERSION="unknown"
elif [ "$device" = "2" ]; then
echo "Selected Seagate GoFlex Net"
UBOOT_PLATFORM="goflexnet"
UBOOT_VERSION="unknown"
elif [ "$device" = "3" ]; then
echo "Selected Seagate GoFlex Home"
UBOOT_PLATFORM="goflexhome"
UBOOT_VERSION="unknown"
elif [ "$device" = "4" ]; then
echo "Selected Pogoplug v1"
UBOOT_PLATFORM="pogov1"
UBOOT_VERSION="unknown"
elif [ "$device" = "5" ]; then
echo "Selected Pogoplug v2 - Pink"
UBOOT_PLATFORM="pinkpogo"
UBOOT_VERSION="unknown"
elif [ "$device" = "6" ]; then
echo "Selected Other Device, exiting"
echo "This installer is only compatible with the listed devices."
exit 1
else
echo "Invalid Input"
fi
done
fi
fi
if [ "$FORCE_PLATFORM" != "" -a "$FORCE_PLATFORM" != "$UBOOT_PLATFORM" ]; then
echo "## --force-platform paramater [$FORCE_PLATFORM] does not match detected platform [$UBOOT_PLATFORM]."
echo -n "Are you sure your device is a "$FORCE_PLATFORM"? [y/N] "
read FORCE
if [ "$FORCE" = "y" -o "$FORCE" = "Y" ]; then
echo "## Forcing installation of [$FORCE_PLATFORM] platform"
UBOOT_PLATFORM=$FORCE_PLATFORM
UBOOT_VERSION="unknown"
else
echo "## Exiting. No changes were made to mtd0."
exit 1
fi
fi
UBOOT_IS_CURRENT=$(echo $UBOOT_VERSION | grep -c current)
if [ "$UBOOT_IS_CURRENT" = "1" ]; then
echo "## The newest uBoot is already installed on mtd0."
UPDATE_UBOOT=0
else
UBOOT_CURRENT=$(grep $UBOOT_PLATFORM /tmp/valid-uboot.md5 | grep current | head -1 | sed 's/^\w* \w* \(.*\)-current$/\1/')
fi
rm "/tmp/valid-uboot.md5"
# If this is the first time this installer has been run in the
# original Pogoplug enviroment, check if the user wants to disable
# the Pogoplug services
if [ -d /usr/local/cloudengines/ -a ! -e $UBOOT_ORIGINAL ]; then
killall hbwd
echo ""
echo ""
echo ""
echo "DISABLE POGOPLUG SERVICES"
echo ""
echo "The pogoplug service includes an auto-update feature which could"
echo "be used to cripple or disable your device. It is recommended"
echo "that you disable this service."
echo ""
echo "NOTE: The pogoplug service is proprietary software"
echo "created by Cloud Engines. It is not available for use"
echo "in other distributions and will not be available in"
echo "your new linux installation even if you choose not to disable it."
echo ""
echo -n "Would you like to disable the pogoplug services? [Y/n] "
read DISABLE
if [ "$DISABLE" = "" -o "$DISABLE" = "y" -o "$DISABLE" = "Y" ];
then
echo "Applying fixes to the pogoplug environment..."
mount -o rw,remount /
# Add /sbin to the path and cleanup the shell prompt
if [ ! -f /root/.bash_profile ]; then
echo -e \
"export PS1='\h:\w\$ '
export PATH='/usr/bin:/bin:/sbin'
" > /root/.bash_profile
fi
chmod go+w /dev/null
# Re-enable dropbear (updated dockstars only)
sed -i 's/^#\/usr\/sbin\/dropbear/\/usr\/sbin\/dropbear/' /etc/init.d/db > /dev/null 2>&1
echo "Disabling the pogoplug service..."
# Comment out the line that starts hmbgr.sh
sed -i 's/^\/etc\/init.d\/hbmgr.sh start/#Uncomment the line below to enable the pogoplug service\n#\/etc\/init.d\/hbmgr.sh start/' /etc/init.d/rcS
mount -o ro,remount /
echo "Done fixing pogoplug environment."
echo ""
fi
UBOOT_ORIGINAL_URL="$UBOOT_MTD0_BASE_URL.$UBOOT_PLATFORM.original.kwb"
install "$UBOOT_ORIGINAL" "$UBOOT_ORIGINAL_URL" 644
install "$BLPARAM" "$BLPARAM_URL" 755
if [ "$UBOOT_PLATFORM" = "pinkpogo" ]; then BOOTCMD='nand read.e 0x800000 0x100000 0x200000; setenv bootargs $(console) $(bootargs_root); bootm 0x800000'
# dockstar, goflex, and pogov1 have the same bootcmd
else BOOTCMD='nand read.e 0x800000 0x100000 0x300000; setenv bootargs $(console) $(bootargs_root); bootm 0x800000'
fi
$BLPARAM "bootcmd=$BOOTCMD" > /dev/null 2>&1
# Preserve the MAC address
ENV_ETHADDR=`$BLPARAM | grep "^ethaddr=" | cut -d'=' -f 2-`
fi
# Download and install the latest uBoot
if [ "$UPDATE_UBOOT" = "1" ]; then
echo ""
echo "# Installing uBoot"
UBOOT_MTD0_URL="$UBOOT_MTD0_BASE_URL.$UBOOT_PLATFORM.$UBOOT_CURRENT.kwb"
echo "## Installing $UBOOT_PLATFORM $UBOOT_CURRENT"
if [ -f "$UBOOT_MTD0" ]; then rm "$UBOOT_MTD0"; fi
download_and_verify "$UBOOT_MTD0" "$UBOOT_MTD0_URL"
if [ "$?" -ne "0" ]; then
echo "## uBoot could not be downloaded, or the MD5 does not match."
echo "## Exiting. No changes were made to mtd0."
exit 1
fi
# Write new uBoot to mtd0
# Erase the first 512k
$FLASH_ERASE /dev/mtd0 0 4
$NANDWRITE /dev/mtd0 $UBOOT_MTD0
# dump mtd0 and compare the checksum, to make sure it installed properly
$NANDDUMP --noecc --omitoob -l 0x80000 -f /tmp/mtd0.uboot /dev/mtd0
echo "## Verifying new uBoot..."
if [ -f "$UBOOT_MTD0.md5" ]; then rm "$UBOOT_MTD0.md5"; fi
wget -O "$UBOOT_MTD0.md5" "$UBOOT_MTD0_URL.md5"
verify_md5 "/tmp/mtd0.uboot" "$UBOOT_MTD0.md5"
if [ "$?" -ne "0" ]; then
rm -f "$UBOOT.md5"
echo "##"
echo "##"
echo "## VERIFICATION FAILED!"
echo "##"
echo "## uBoot was not properly installed to mtd0."
echo "##"
echo "##"
echo "## YOUR DEVICE MAY BE IN AN UNUSABLE STATE."
echo "## DO NOT REBOOT OR POWER OFF YOUR DEVICE"
echo "##"
echo "##"
echo "## Make a backup of /tmp/uboot-mtd0-dump someplace safe and"
echo "## then re-run this installer."
exit 1
else
echo "# Verified successfully!"
fi
rm -f "$UBOOT_MTD0.md5"
fi
if [ "$UPDATE_UBOOT" = "0" ]; then
UPDATE_UBOOT_ENVIRONMENT=0
elif [ "$UBOOT_VERSION" = "original" -o "$UBOOT_VERSION" = "unknown" ]; then
UPDATE_UBOOT_ENVIRONMENT=1
else # Updating uboot, but it's from a known "new" uboot, no need to reset the environment
UPDATE_UBOOT_ENVIRONMENT=0
fi
if [ "$UPDATE_UBOOT_ENVIRONMENT" = "0" -a "$1" != "--noprompt" ]; then
echo ""
echo ""
if [ "$UPDATE_UBOOT" = "0" ]; then
echo "You are already running the latest uBoot."
else
echo "You are already running a modern uBoot."
fi
echo "Your current uBoot environment should be reasonable. However, if you're having"
echo "any probems booting, you can reset the environment variables to know good values."
echo -n "Would you like to reset the uBoot environment? [N/y] "
read PROMPT
if [ "$PROMPT" = "y" -o "$PROMPT" = "Y" ]; then
UPDATE_UBOOT_ENVIRONMENT=1
fi
fi
if [ "$UPDATE_UBOOT_ENVIRONMENT" = "1" ]; then
echo ""
echo "# Installing uBoot environment"
# Preserve the MAC address
if [ "$ENV_ETHADDR" = "" ]; then
ENV_ETHADDR=`$FW_PRINTENV ethaddr 2> /dev/null | cut -d'=' -f 2-`
fi
# Preserve the 'rescue_installed' setting
ENV_RESCUE_INSTALLED=`$FW_PRINTENV rescue_installed 2> /dev/null | cut -d'=' -f 2-`
if [ "$ENV_RESCUE_INSTALLED" = "" ]; then
ENV_BOOTCMD_RESCUE=`$FW_PRINTENV bootcmd_rescue 2> /dev/null`
if [ "$ENV_BOOTCMD_RESCUE" != "" ]; then
ENV_RESCUE_INSTALLED=1
fi
fi
# Preserve the arcNumber value
ENV_ARCNUMBER=`$FW_PRINTENV arcNumber 2> /dev/null | cut -d'=' -f 2-`
# Preserve the custom kernel parameters
ENV_RESCUE_CUSTOM=`$FW_PRINTENV rescue_custom_params 2> /dev/null | cut -d'=' -f 2-`
ENV_USB_CUSTOM=`$FW_PRINTENV usb_custom_params 2> /dev/null | cut -d'=' -f 2-`
ENV_UBIFS_CUSTOM=`$FW_PRINTENV ubifs_custom_params 2> /dev/null | cut -d'=' -f 2-`
# Install the uBoot environment
download_and_verify "$UBOOT_ENV" "$UBOOT_ENV_URL"
if [ "$?" -ne "0" ]; then
echo "## Could not install uBoot environment, exiting"
exit 1
fi
$FLASH_ERASE /dev/mtd0 0xc0000 1
$NANDWRITE -s 786432 /dev/mtd0 "$UBOOT_ENV"
echo ""
echo "# Verifying uBoot environment"
# Verify the uBoot environment
$NANDDUMP --noecc --omitoob -f "/tmp/uboot.environment" -s 0xc0000 -l 0x20000 /dev/mtd0
wget -O "$UBOOT_ENV.md5" "$UBOOT_ENV_URL.md5"
verify_md5 "/tmp/uboot.environment" "$UBOOT_ENV.md5"
if [ "$?" -ne "0" ]; then
rm -f "$UBOOT_ENV.md5"
echo "## VERIFICATION FAILED!"
echo "## uBoot environment was not properly written to mtd0. Please re-run this installer."
exit 1
fi
rm -f "$UBOOT_ENV.md5"
$FW_SETENV ethaddr $ENV_ETHADDR
if [ "$ENV_RESCUE_INSTALLED" = "1" ]; then $FW_SETENV rescue_installed $ENV_RESCUE_INSTALLED; fi
if [ "$ENV_RESCUE_CUSTOM" != "" ]; then $FW_SETENV rescue_custom_params $ENV_RESCUE_CUSTOM; fi
if [ "$ENV_USB_CUSTOM" != "" ]; then $FW_SETENV usb_custom_params $ENV_USB_CUSTOM; fi
if [ "$ENV_UBIFS_CUSTOM" != "" ]; then $FW_SETENV ubifs_custom_params $ENV_UBIFS_CUSTOM; fi
if [ "$ENV_ARCNUMBER" != "" ]; then
$FW_SETENV arcNumber $ENV_ARCNUMBER
# If there was no arcNumber set, then this is probably a new install.
# Set the default arcNumber for the platform
# Note: As of 10/24/2010 everything will default to the SHEEVAPLUG arcNumber (2097)
# at some point, they should start using the newer dockstar ID (2998) but currently the most
# common kernels do not support the Dockstar machine ID
else
$FW_SETENV arcNumber 2097
echo ""
echo ""
echo "# Setting arcNumber to 2097 (SheevaPlug)"
echo "# Note: if you have a kernel that supports your platform, you should use the proper arcNumber."
echo "# You can set the correct arcNumber by running the following command:"
if [ "$UBOOT_PLATFORM" = "dockstar" ]; then echo $FW_SETENV arcNumber 2998
elif [ "$UBOOT_PLATFORM" = "goflexhome" ]; then echo $FW_SETENV arcNumber 3089
elif [ "$UBOOT_PLATFORM" = "goflexnet" ]; then echo $FW_SETENV arcNumber 3089
elif [ "$UBOOT_PLATFORM" = "pinkpogo" ]; then echo $FW_SETENV arcNumber 2998
elif [ "$UBOOT_PLATFORM" = "pogov1" ]; then echo $FW_SETENV arcNumber 2998
fi
fi
fi
echo ""
echo "# uBoot installation has completed successfully."