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
699c7712
Commit
699c7712
authored
9 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
If a configuration file is supplied then run it at the end of image generation
parent
71503f22
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/freedombone-image
+11
-3
11 additions, 3 deletions
src/freedombone-image
src/freedombone-image-customise
+12
-0
12 additions, 0 deletions
src/freedombone-image-customise
src/freedombone-image-make
+2
-0
2 additions, 0 deletions
src/freedombone-image-make
with
25 additions
and
3 deletions
src/freedombone-image
+
11
−
3
View file @
699c7712
...
...
@@ -28,12 +28,12 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
PROJECT_NAME
=
'freedombone'
IMAGE_TYPE
=
'beaglebone'
CURR_DIR
=
$(
pwd
)
BUILD_DIR
=
~/.tmp_
freedombone
_build
BUILD_DIR
=
~/.tmp_
${
PROJECT_NAME
}
_build
VMDEBOOTSTRAP_REPO
=
git://git.liw.fi/vmdebootstrap
VMDEBOOTSTRAP_VERSION
=
0.8
PROJECT_NAME
=
freedombone
MAKEFILE
=
${
PROJECT_NAME
}
-image-makefile
USERNAME
=
$(
echo
$USER
)
...
...
@@ -49,6 +49,9 @@ BOX_IP_ADDRESS="192.168.1.55"
NAMESERVER1
=
'213.73.91.35'
NAMESERVER2
=
'85.214.20.141'
# An optional freedombone configuration file
CONFIG_FILENAME
=
while
[[
$#
>
1
]]
do
key
=
"
$1
"
...
...
@@ -57,6 +60,10 @@ case $key in
-h
|
--help
)
show_help
;;
-c
|
--config
)
shift
CONFIG_FILENAME
=
"
$1
"
;;
-t
|
--target
|
--board
)
shift
IMAGE_TYPE
=
"
$1
"
...
...
@@ -138,7 +145,8 @@ make $IMAGE_TYPE \
BOX_IP_ADDRESS
=
"
$BOX_IP_ADDRESS
"
\
NAMESERVER1
=
"
$NAMESERVER1
"
\
NAMESERVER2
=
"
$NAMESERVER2
"
\
PROJECT_NAME
=
"
$PROJECT_NAME
"
PROJECT_NAME
=
"
$PROJECT_NAME
"
\
CONFIG_FILENAME
=
"
$CONFIG_FILENAME
"
shopt
-s
nullglob
imgfiles
=(
build/
${
PROJECT_NAME
}*
.img
)
...
...
This diff is collapsed.
Click to expand it.
src/freedombone-image-customise
+
12
−
0
View file @
699c7712
...
...
@@ -29,6 +29,8 @@
set
-e
set
-x
PROJECT_NAME
=
'freedombone'
MY_USERNAME
=
'debian'
MY_PASSWORD
=
'freedombone'
...
...
@@ -233,6 +235,16 @@ fi
set_apt_sources
$MIRROR
chroot
$rootdir
apt-get update
# If a configuration file exists then run with it
# otherwise the interactive installer can be used
# This is equivalent to installing freedombox-setup on freedombox
if
[
$CONFIG_FILENAME
]
;
then
if
[
${#
CONFIG_FILENAME
}
-gt
2
]
;
then
cp
$CONFIG_FILENAME
$rootdir
/root/
$PROJECT_NAME
.cfg
chroot
$rootdir
$PROJECT_NAME
-c
/root/
$PROJECT_NAME
.cfg
fi
fi
cd
/
echo
"info: killing leftover processes in chroot"
# 2014-11-04 this killed /usr/lib/erlang/erts-6.2/bin/epmd, see
...
...
This diff is collapsed.
Click to expand it.
src/freedombone-image-make
+
2
−
0
View file @
699c7712
...
...
@@ -43,6 +43,7 @@ export BOX_IP_ADDRESS
export
NAMESERVER1
export
NAMESERVER2
export
PROJECT_NAME
export
CONFIG_FILENAME
# Locate vmdebootstrap program fetched in Makefile
basedir
=
`
pwd
`
...
...
@@ -134,6 +135,7 @@ sudo sed -i "s|ROUTER_IP_ADDRESS=.*|ROUTER_IP_ADDRESS=${ROUTER_IP_ADDRESS}|g" $T
sudo sed
-i
"s|BOX_IP_ADDRESS=.*|BOX_IP_ADDRESS=
${
BOX_IP_ADDRESS
}
|g"
$TEMP_CUSTOMISE
sudo sed
-i
"s|NAMESERVER1=.*|NAMESERVER1=
${
NAMESERVER1
}
|g"
$TEMP_CUSTOMISE
sudo sed
-i
"s|NAMESERVER2=.*|NAMESERVER2=
${
NAMESERVER1
}
|g"
$TEMP_CUSTOMISE
sudo sed
-i
"s|PROJECT_NAME=.*|PROJECT_NAME=
${
PROJECT_NAME
}
|g"
$TEMP_CUSTOMISE
echo
"starting
$VMDEBOOTSTRAP
"
# Run vmdebootstrap script to create image
...
...
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