Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
apertis-image-recipes
Manage
Activity
Members
Labels
Plan
Custom issue tracker
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
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
infrastructure
apertis-image-recipes
Merge requests
!92
Wip/martyn/u boot installer
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Wip/martyn/u boot installer
WIP/martyn/u-boot_installer
into
apertis/v2019dev0
Overview
28
Commits
2
Pipelines
0
Changes
3
Merged
Martyn Welch
requested to merge
WIP/martyn/u-boot_installer
into
apertis/v2019dev0
6 years ago
Overview
14
Commits
2
Pipelines
0
Changes
9
Expand
0
0
Merge request reports
Compare
version 5
version 26
ba0af72f
6 years ago
version 25
592b7cc4
6 years ago
version 24
1751c285
6 years ago
version 23
5c8c1065
6 years ago
version 22
753cfc75
6 years ago
version 21
b214107b
6 years ago
version 20
03bb5200
6 years ago
version 19
e0e5692b
6 years ago
version 18
40e97dfa
6 years ago
version 17
afdb9bb9
6 years ago
version 16
01860a78
6 years ago
version 15
5915d81f
6 years ago
version 14
82fa6de4
6 years ago
version 13
7a884765
6 years ago
version 12
1f2651fc
6 years ago
version 11
27d935cd
6 years ago
version 10
dd434317
6 years ago
version 9
8a5e38b5
6 years ago
version 8
854edbc4
6 years ago
version 7
a7caa08c
6 years ago
version 6
6e372f62
6 years ago
version 5
582ed7ad
6 years ago
version 4
1e326e96
6 years ago
version 3
42c2392e
6 years ago
version 2
e17f6381
6 years ago
version 1
cad5bfce
6 years ago
apertis/v2019dev0 (base)
and
version 6
latest version
28c962f6
2 commits,
6 years ago
version 26
ba0af72f
2 commits,
6 years ago
version 25
592b7cc4
2 commits,
6 years ago
version 24
1751c285
2 commits,
6 years ago
version 23
5c8c1065
2 commits,
6 years ago
version 22
753cfc75
2 commits,
6 years ago
version 21
b214107b
2 commits,
6 years ago
version 20
03bb5200
2 commits,
6 years ago
version 19
e0e5692b
2 commits,
6 years ago
version 18
40e97dfa
2 commits,
6 years ago
version 17
afdb9bb9
2 commits,
6 years ago
version 16
01860a78
2 commits,
6 years ago
version 15
5915d81f
2 commits,
6 years ago
version 14
82fa6de4
2 commits,
6 years ago
version 13
7a884765
2 commits,
6 years ago
version 12
1f2651fc
2 commits,
6 years ago
version 11
27d935cd
2 commits,
6 years ago
version 10
dd434317
2 commits,
6 years ago
version 9
8a5e38b5
2 commits,
6 years ago
version 8
854edbc4
2 commits,
6 years ago
version 7
a7caa08c
2 commits,
6 years ago
version 6
6e372f62
2 commits,
6 years ago
version 5
582ed7ad
2 commits,
6 years ago
version 4
1e326e96
1 commit,
6 years ago
version 3
42c2392e
1 commit,
6 years ago
version 2
e17f6381
1 commit,
6 years ago
version 1
cad5bfce
2 commits,
6 years ago
Show latest version
9 files
+
236
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
9
Search (e.g. *.vue) (Ctrl+P)
overlays/apertis-dev/usr/sbin/apertis-dev
0 → 100755
+
128
−
0
Options
#!/bin/sh
# Copyright © 2015 Collabora Ltd.
#
# SPDX-License-Identifier: MPL-2.0
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Reconfigure an Apertis target system for debugging and basic development.
set
-e
die
()
{
echo
"
$0
:
$@
"
>
&2
exit
1
}
packages
=
"openssh-server rsync"
build
=
build_dep
=
""
gpl3
=
enable_debug
=
disable_debug
=
while
[
"$#"
-gt
0
]
;
do
case
"
$1
"
in
(
--help
)
echo
"usage: sudo apertis-dev [OPTIONS]"
echo
"Enable debugging and basic development."
echo
"OPTIONS are:"
echo
" -b|--build: install basic build tools"
echo
" -d|--build-dep PACKAGE: install build-deps of PACKAGE"
echo
" -g|--debug: install basic debugging tools"
echo
" -3|--gpl3: install GPL3 versions of tar, coreutils"
echo
" --enable-debug: enable debug logging from applications"
echo
" --disable-debug: disable debug logging from applications"
echo
"For developer use only: do not do this in production."
exit
0
;;
(
-b
|
--build
)
build
=
1
shift
;;
(
-d
|
--build-dep
)
build
=
1
build_dep
=
"
$build_dep
$2
"
shift
2
;;
(
-g
|
--debug
)
# devscripts is mainly here so we have debi
packages
=
"
$packages
apertis-tests devscripts gdb strace valgrind bash-completion less systemd-coredump"
shift
;;
(
-3
|
--gpl3
)
gpl3
=
1
shift
;;
(
--enable-debug
)
enable_debug
=
1
shift
;;
(
--disable-debug
)
disable_debug
=
1
shift
;;
(
*
)
die
"unknown option
\"
$1
\"
"
;;
esac
done
[
"
$(
id
-u
)
"
=
0
]
||
die
"must be run as root"
if
[
-n
"
$enable_debug
"
]
&&
[
-n
"
$disable_debug
"
]
;
then
echo
"Both --enable-debug and --disable-debug specified. Doing neither."
enable_debug
=
disable_debug
=
fi
if
[
-n
"
$build
"
]
;
then
packages
=
"
$packages
build-essential ccache devscripts fakeroot"
packages
=
"
$packages
pristine-tar python3-debian"
fi
mount
-o
remount,rw /
# replace "target" component with "development" unless "development" is
# already there
sed
-i
.orig
-e
'/\bdevelopment\b/! s/ target\( \|$\)/ target development\1/'
/etc/apt/sources.list
apt update
apt-get
-y
install
--no-install-recommends
eatmydata
eatmydata apt-get
-y
install
--no-install-recommends
$packages
if
[
-n
"
$build_dep
"
]
;
then
eatmydata apt-get
-y
build-dep
--no-install-recommends
$build_dep
fi
if
[
-n
"
$gpl3
"
]
;
then
# Workaround for https://bugs.apertis.org/show_bug.cgi?id=626
# dpkg will fail if there isn't a tar and an rm on $PATH
cp
/bin/rm /bin/tar /usr/local/bin
apt-get
-y
install
coreutils
tar
rm
/usr/local/bin/rm /usr/local/bin/tar
fi
if
[
-n
"
$enable_debug
"
]
;
then
# Enable debug logging for Canterbury and all the applications it spawns.
mkdir
-p
/etc/systemd/user/canterbury.service.d
cat
<<
EOF
> /etc/systemd/user/canterbury.service.d/apertis-dev.conf
[Service]
Environment=G_MESSAGES_DEBUG=all
EOF
echo
"Wrote /etc/systemd/user/canterbury.service.d/apertis-dev.conf"
fi
if
[
-n
"
$disable_debug
"
]
;
then
# Undo what --enable-debug does.
rm
/etc/systemd/user/canterbury.service.d/apertis-dev.conf
echo
"Deleted /etc/systemd/user/canterbury.service.d/apertis-dev.conf"
fi
if
[
-n
"
$enable_debug
"
]
||
[
-n
"
$disable_debug
"
]
;
then
# The user needs to run `systemctl --user daemon-reload` and restart Canterbury,
# but restarting Canterbury by itself will probably produce weird state; so just
# advise to restart the system.
echo
"*** Now reboot the system, or stop and restart the SDK simulator."
fi
# vim:set sw=4 sts=4 et:
Loading