Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RTEMS-build-workflows
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thanassis Tsiodras
RTEMS-build-workflows
Commits
e9feeaf0
Commit
e9feeaf0
authored
Nov 10, 2016
by
Thanassis Tsiodras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added script for 4.11 (RC rightnow)
parent
e22b190a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
122 additions
and
0 deletions
+122
-0
OAR/contrib/build.rtems.4.11.smp.sh
OAR/contrib/build.rtems.4.11.smp.sh
+122
-0
No files found.
OAR/contrib/build.rtems.4.11.smp.sh
0 → 100755
View file @
e9feeaf0
#!/bin/bash
#
# This script builds the RTEMS/SPARC cross-compiler and the
# Leon2/Leon3/NGMP BSPs.
#
# To have a reproducible setup, it would be prudent if you
# executed this script under a Debian jessie chroot,
# bootstrapped via the following:
#
# mkdir /opt/jessie-chroot
# debootstrap jessie /opt/jessie-chroot
# mount -t proc none /opt/jessie-chroot/proc/
# mount -t sysfs none /opt/jessie-chroot/sys/
# mount -o bind /dev /opt/jessie-chroot/dev/
# mount -o bind /dev/pts /opt/jessie-chroot/dev/pts/
# chroot /opt/jessie-chroot
# apt-get update
# apt-get build-dep binutils gcc g++ gdb unzip git python2.7-dev pax
#
# Then chroot inside it and run this script:
#
# chroot /opt/jessie-chroot
# /path/to/build.rtems.4.12.sh
# Stop on any error
set
-e
DATE
=
$(
date
+
"%Y.%m.%d"
)
mkdir
-p
~/rtems.build.logs
BUILD_LOG
=
~/rtems.build.logs/
${
DATE
}
.log
[
-f
${
BUILD_LOG
}
]
&&
{
echo
"There's already a build log:"
echo
" "
${
BUILD_LOG
}
echo
Remove it to
continue
.
exit
1
}
# Record the output in $BUILD_LOG (see matching brace)
{
# Begin by checking out the RTEMS Source Builder
mkdir
-p
~/development/rtems/src
RSB
=
~/development/rtems/src/rtems-source-builder-
${
DATE
}
RTPREFIX
=
/opt/rtems-4.11-
${
DATE
}
rm
-rf
${
RTPREFIX
}
[
!
-d
$RSB
]
&&
{
cd
~/development/rtems/src/
git clone git://git.rtems.org/rtems-source-builder.git rtems-source-builder-
${
DATE
}
}
cd
$RSB
# Get the 4.11 branch
git checkout
-f
4.11
# Verify that we have all we need to build
source-builder/sb-check
# ESA's network is a pain ; PASV FTP is not allowed, so we basically fetched all the
# tarballs and hardlink to them each time (so no FTP action is triggered)
cd
rtems
[
!
-d
sources
]
&&
{
mkdir
-p
sources
cd
sources
cp
-al
/root/development/rtems/src/rtems-source-builder.working/rtems/sources/
*
.
cd
..
for
i
in
config/tools/
*
cfg
;
do
cat
"
$i
"
|
sed
's,ftp://ftp.gnu.org,http://ftp.gnu.org,;s,ftp://gcc.gnu.org,http://gcc.gnu.org,;'
>
"
$i
"
.new
&&
mv
"
$i
"
.new
"
$i
"
done
}
# Your network firewall may or may not be an issue at this point:
# Many of the source tarballs needed by the RSB are fetched over
# PASV-enabled FTP servers.
#
# If your network is like the one in ESA/ESTEC and this is forbidden,
# you'll have to fetch these tarballs and hardlink to them each time
# (so no FTP action is triggered by the RTEMS RSB builder).
# The sed invocation below also replaces ftp: with http:
# (since this needs no PASV port meddling - which some firewalls object to)
#
# This is the way I do it - adapt it according to your needs:
#
# [ ! -d sources ] && {
# mkdir -p sources
# cd sources
# cp -al ~/development/rtems/pkg_sources_cache/* .
# cd ..
# for i in config/tools/*cfg ; do
# cat "$i" | sed 's,ftp://ftp.gnu.org,http://ftp.gnu.org,;s,ftp://gcc.gnu.org,http://gcc.gnu.org,;' > "$i".new && mv "$i".new "$i"
# done
# }
# Build the cross compiling toolchain
../source-builder/sb-set-builder
--log
=
stage1.log
--prefix
=
${
RTPREFIX
}
4.11/rtems-sparc
# Add the cross compiler to the PATH
export
PATH
=
${
RTPREFIX
}
/bin:
$PATH
cd
..
# checkout RTEMS4.11 - avoid doing it twice :-)
[
!
-d
rtems-git
]
&&
{
git clone https://github.com/RTEMS/rtems.git rtems-git
cd
rtems-git
git checkout
-f
4.11
cd
..
}
# Build RTEMS
cd
rtems-git
./bootstrap
cd
..
rm
-rf
build.
${
DATE
}
mkdir
build.
${
DATE
}
cd
build.
${
DATE
}
../rtems-git/configure
\
--target
=
sparc-rtems4.11
--prefix
=
${
RTPREFIX
}
\
--enable-rtemsbsp
=
"leon2 leon3 ngmp"
--enable-posix
\
--enable-smp
--enable-cxx
--enable-networking
--enable-experimental-smp
make all
make
install
}
|&
tee
${
BUILD_LOG
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment