Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Context Sensitive Group
freedombone
Commits
a6ed6c0a
Commit
a6ed6c0a
authored
9 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Prep can use a given disk image
parent
0f91280e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/freedombone-prep
+33
-10
33 additions, 10 deletions
src/freedombone-prep
with
33 additions
and
10 deletions
src/freedombone-prep
+
33
−
10
View file @
a6ed6c0a
...
...
@@ -51,10 +51,11 @@ NAMESERVER2='85.214.20.141'
MICROSD_MOUNT_POINT
=
"/media/
$USER
"
DEBIAN_FILE_NAME
=
"bone-debian-8.1-console-armhf-2015-07-12-2gb"
DEBIAN_IMAGE_FILENAME
=
DEBIAN_FILE_NAME
=
"bone-debian-8.1-console-armhf-2015-07-12-2gb.img"
# Downloads for the Debian installer
DOWNLOAD_LINK1
=
"https://rcn-ee.com/rootfs/bb.org/testing/2015-07-12/console/
$DEBIAN_FILE_NAME
.
img.
xz"
DOWNLOAD_LINK1
=
"https://rcn-ee.com/rootfs/bb.org/testing/2015-07-12/console/
$DEBIAN_FILE_NAME
.xz"
ROOTFS
=
'rootfs'
...
...
@@ -106,6 +107,11 @@ case $key in
MICROSD_DRIVE
=
"
$1
"
;;
# BBB static IP address on the LAN
-i
|
--image
)
shift
DEBIAN_IMAGE_FILENAME
=
"
$1
"
;;
# BBB static IP address on the LAN
--ip
)
shift
BBB_FIXED_IP_ADDRESS
=
"
$1
"
...
...
@@ -172,22 +178,39 @@ if [ ! -d ~/freedombone ]; then
mkdir
~/freedombone
fi
cd
~/freedombone
if
[
!
-f
~/freedombone/
$DEBIAN_FILE_NAME
.img.xz
]
;
then
if
[
!
-f
~/freedombone/
$DEBIAN_FILE_NAME
.img
]
;
then
wget
$DOWNLOAD_LINK1
# extract the image
if
[
$DEBIAN_IMAGE_FILENAME
]
;
then
# debian image filename specified as an option
if
[[
$DEBIAN_IMAGE_FILENAME
==
*
".bz2"
]]
;
then
tar
-xjvf
$DEBIAN_IMAGE_FILENAME
pattern
=
"*.img"
files
=(
$pattern
)
DEBIAN_IMAGE_FILENAME
=
${
files
[0]
}
fi
if
[[
$DEBIAN_IMAGE_FILENAME
!=
*
".img"
]]
;
then
echo
'Debian image (.img) file expected'
exit
62394
fi
DEBIAN_FILE_NAME
=
$DEBIAN_IMAGE_FILENAME
else
# default debian image downloaded from elsewhere
if
[
!
-f
~/freedombone/
$DEBIAN_FILE_NAME
.xz
]
;
then
if
[
!
-f
~/freedombone/
$DEBIAN_FILE_NAME
]
;
then
wget
$DOWNLOAD_LINK1
fi
fi
xz
-d
$DEBIAN_FILE_NAME
.xz
fi
echo
'Extracting image...'
xz
-d
$DEBIAN_FILE_NAME
.img.xz
if
[
!
-f
~/freedombone/
$DEBIAN_FILE_NAME
.img
]
;
then
echo
"Couldn't extract image"
if
[
!
-f
~/freedombone/
$DEBIAN_FILE_NAME
]
;
then
echo
"Couldn't extract image
$DEBIAN_FILE_NAME
"
exit
4
fi
cd
~/freedombone
echo
'Flashing image. This may take a while.'
$SUDO
dd
if
=
$DEBIAN_FILE_NAME
.img
of
=
$MICROSD_DRIVE
$SUDO
dd
if
=
$DEBIAN_FILE_NAME
of
=
$MICROSD_DRIVE
sync
sleep
5
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment