Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
gluon-builder
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ffbs
gluon-builder
Commits
a7af9e6f
Commit
a7af9e6f
authored
7 years ago
by
chrissi^
Browse files
Options
Downloads
Patches
Plain Diff
Renaming Files and extending BuildID
Signed-off-by:
Chrissi^
<
chris@tinyhost.de
>
parent
919ca739
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
builder.sh
+33
-8
33 additions, 8 deletions
builder.sh
with
33 additions
and
8 deletions
builder.sh
100644 → 100755
+
33
−
8
View file @
a7af9e6f
#!/bin/bash
set
-e
cd
../
# Setting environment
# ###################
ARCHITECTURES
=(
ar71xx-tiny ar71xx-generic ar71xx-nand brcm2708-bcm2708 brcm2708-bcm2709 mpc85xx-generic x86-64 x86-generic
)
#ARCHITECTURES=( ar71xx-tiny )
BRANCH
=
stable
#
BRANCH=stable
#BRANCH=unbranded_stable
#BRANCH=experimental
BRANCH
=
experimental
#BRANCH=beta
# prepare needed strings
GLUONVERSION
=
$(
git describe
--tags
|
cut
-d
"-"
-f
1
)
SITECOMMIT
=
$(
cd
site
;
git log
-1
--format
=
"%H"
)
ARCHSTRING
=
multiarch
if
[
"
${#
ARCHITECTURES
[@]
}
"
-eq
"1"
]
;
then
ARCHSTRING
=
${
ARCHITECTURES
[0]
}
fi
RELEASENAME
=
${
GLUONVERSION
}
-
$(
date
'+%Y%m%d%H%M'
)
-
${
BRANCH
}
RELEASETAG
=
ffbs_
${
GLUONVERSION
}
_
${
BRANCH
}
_
${
ARCHSTRING
}
_
$(
date
'+%Y%m%d-%H%M'
)
_
${
SITECOMMIT
}
echo
$RELEASETAG
#DEBUG="V=s"
DEBUG
=
""
...
...
@@ -22,7 +35,7 @@ PRIO=2
# prepare site.conf from template
rm
site/site.conf
cp
site/site.in site/site.conf
cp
site/site.in site/site.conf
sed
-i
-e
"s/AUTOUPDATERBRANCH/
$BRANCH
/g"
site/site.conf
# remove old images to make sure we only upload the new shiny stuff
...
...
@@ -31,7 +44,6 @@ rm -rf output/images
# update toolchain to current release
make update
RELEASENAME
=
${
GLUONVERSION
}
-
$(
date
'+%Y%m%d'
)
-
${
BRANCH
}
for
ARCHITECTURE
in
"
${
ARCHITECTURES
[@]
}
"
do
...
...
@@ -60,7 +72,9 @@ do
# Doing the Build
# ###############
make all
GLUON_TARGET
=
$ARCHITECTURE
$DEBUG
-j16
GLUON_RELEASE
=
${
RELEASENAME
}
GLUON_BRANCH
=
$BRANCH
GLUON_PRIORITY
=
$PRIO
make all
GLUON_TARGET
=
$ARCHITECTURE
$DEBUG
-j16
GLUON_RELEASE
=
${
RELEASENAME
}
GLUON_BRANCH
=
$BRANCH
GLUON_PRIORITY
=
$PRIO
GLUON_ATH10K_MESH
=
ibss
echo
Exiting with Code
$?
done
# build manifests
...
...
@@ -72,8 +86,19 @@ make manifest GLUON_BRANCH=$BRANCH GLUON_PRIORITY=${PRIO} GLUON_RELEASE=${RELEAS
# ###############
(
cd
site/
;
git show
>
../output/images/commit.txt
)
# shorten resulting image names for some TP-Link routers
(
cd
output/images/factory
;
for
f
in
*
;
do
mv
"
$f
"
"
${
f
#gluon-ffbs-
}
"
;
done
)
# rename files to match the ffbs-naming conventions
# TODO: give explanation or further resources
(
cd
output/images/factory
;
for
f
in
*
;
do
sudo mv
"
$f
"
"
${
f
#gluon-ffbs-
}
"
;
done
)
(
cd
output/images/factory
;
for
f
in
*
raspberry-pi.img.gz
;
do
echo
"
${
f
/raspberry-pi.img.gz/raspberry-pi-1.img.gz
}
"
;
done
)
(
cd
output/images/factory
;
for
f
in
*
x86-64
*
;
do
echo
"
${
f
/x86-64/x86-64-generic
}
"
;
done
)
(
cd
output/images/factory
;
for
f
in
*
raspberry-pi.img.gz
;
do
mv
"
$f
"
"
${
f
/raspberry-pi.img.gz/raspberry-pi-1.img.gz
}
"
;
done
)
(
cd
output/images/factory
;
for
f
in
*
x86-64.vmdk
;
do
mv
"
$f
"
"
${
f
/.vmdk/-vmware.vmdk
}
"
;
done
)
(
cd
output/images/factory
;
for
f
in
*
x86-64.vdi
;
do
mv
"
$f
"
"
${
f
/.vdi/-virtualbox.vdi
}
"
;
done
)
(
cd
output/images/factory
;
for
f
in
*
x86-64.img.gz
;
do
mv
"
$f
"
"
${
f
/.img.gz/-generic.img.gz
}
"
;
done
)
(
cd
output/images/factory
;
for
f
in
*
x86-generic.vmdk
;
do
mv
"
$f
"
"
${
f
/x86-generic/x86-vmware
}
"
;
done
)
(
cd
output/images/factory
;
for
f
in
*
x86-generic.vdi
;
do
mv
"
$f
"
"
${
f
/x86-generic/x86-virtualbox
}
"
;
done
)
# rename image dir to represent build
mv
output/images
"output/
${
RELEASETAG
}
"
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