Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
tsn-measures
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
tsn-measures
Commits
682b8420
Commit
682b8420
authored
Jul 29, 2020
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update scripts
Fix directory name Add configure-all-boards script
parent
2d15c9bb
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
69 additions
and
19 deletions
+69
-19
img-kernel-utils/scripts/configure-all-boards
img-kernel-utils/scripts/configure-all-boards
+5
-0
img-kernel-utils/scripts/configure-board
img-kernel-utils/scripts/configure-board
+12
-17
img-kernel-utils/scripts/configure-to-sd
img-kernel-utils/scripts/configure-to-sd
+50
-0
img-kernel-utils/scripts/vm-scripts/compile-kernel
img-kernel-utils/scripts/vm-scripts/compile-kernel
+2
-2
No files found.
img-kernel-utils/scripts/configure-all-boards
0 → 100755
View file @
682b8420
#!/bin/bash
./configure-board emerald
;
./configure-board onyx
;
./configure-board slate
;
img-kernel-utils/scripts/configure-board
View file @
682b8420
#!/bin/bash
#!/bin/bash
usage
()
{
usage
()
{
echo
"Usage:
$0
[-h]
[-p PARTITION_NUMBER] (emerald | onyx | slate) DEVICE
"
echo
"Usage:
$0
[-h]
(emerald | onyx | slate)
"
exit
1
;
exit
1
;
}
}
...
@@ -12,9 +12,6 @@ while getopts "hp:" opt; do
...
@@ -12,9 +12,6 @@ while getopts "hp:" opt; do
h
)
h
)
usage
usage
;;
;;
p
)
partition_number
=
${
OPTARG
}
;;
*
)
*
)
usage
usage
;;
;;
...
@@ -23,28 +20,26 @@ done
...
@@ -23,28 +20,26 @@ done
shift
$((
OPTIND-1
))
shift
$((
OPTIND-1
))
if
[
-z
"
$
2
"
]
;
then
if
[
-z
"
$
1
"
]
;
then
usage
usage
fi
fi
board_name
=
$1
board_name
=
$1
device
=
$2
cfg_dir
=
../config
cfg_dir
=
../config
if
[
$board_name
!=
"emerald"
]
&&
[
$board_name
!=
"onyx"
]
&&
[
$board_name
!=
"slate"
]
;
then
if
[
$board_name
!=
"emerald"
]
&&
[
$board_name
!=
"onyx"
]
&&
[
$board_name
!=
"slate"
]
;
then
usage
usage
fi
fi
rm
-rf
mnt_sd
;
scp
-r
$cfg_dir
/common
$board_name
:
;
mkdir
-p
mnt_sd
;
scp
-r
$cfg_dir
/
$board_name
$board_name
:
;
echo
"mount
${
device
}${
partition_number
}
mnt_sd"
;
heredoc
=
$(
cat
<<
ENDSSH
mount
${
device
}${
partition_number
}
mnt_sd
;
sudo cp -r common/* /;
echo
"cp -r
$cfg_dir
/common/* mnt_sd"
;
sudo cp -r
$board_name
/* /;
cp
-r
$cfg_dir
/common/
*
mnt_sd
;
rm -rf common;
echo
"cp -r
$cfg_dir
/
$board_name
/* mnt_sd"
;
rm -rf
$board_name
;
cp
-r
$cfg_dir
/
$board_name
/
*
mnt_sd
;
ENDSSH
echo
"umount
${
device
}${
partition_number
}
"
;
)
umount
${
device
}${
partition_number
}
;
rm
-rf
mnt_sd
;
ssh
-t
$board_name
"
$heredoc
"
;
img-kernel-utils/scripts/configure-to-sd
0 → 100755
View file @
682b8420
#!/bin/bash
usage
()
{
echo
"Usage:
$0
[-h] [-p PARTITION_NUMBER] (emerald | onyx | slate) DEVICE"
exit
1
;
}
partition_number
=
2
while
getopts
"hp:"
opt
;
do
case
"
${
opt
}
"
in
h
)
usage
;;
p
)
partition_number
=
${
OPTARG
}
;;
*
)
usage
;;
esac
done
shift
$((
OPTIND-1
))
if
[
-z
"
$2
"
]
;
then
usage
fi
board_name
=
$1
device
=
$2
cfg_dir
=
../config
if
[
$board_name
!=
"emerald"
]
&&
[
$board_name
!=
"onyx"
]
&&
[
$board_name
!=
"slate"
]
;
then
usage
fi
rm
-rf
mnt_sd
;
mkdir
-p
mnt_sd
;
echo
"mount
${
device
}${
partition_number
}
mnt_sd"
;
mount
${
device
}${
partition_number
}
mnt_sd
;
echo
"cp -r
$cfg_dir
/common/* mnt_sd"
;
cp
-r
$cfg_dir
/common/
*
mnt_sd
;
echo
"cp -r
$cfg_dir
/
$board_name
/* mnt_sd"
;
cp
-r
$cfg_dir
/
$board_name
/
*
mnt_sd
;
echo
"umount
${
device
}${
partition_number
}
"
;
umount
${
device
}${
partition_number
}
;
rm
-rf
mnt_sd
;
img-kernel-utils/scripts/vm-scripts/compile-kernel
View file @
682b8420
...
@@ -126,7 +126,7 @@ fi
...
@@ -126,7 +126,7 @@ fi
# Compression
# Compression
kernel_version
=
$(
git
branch |
sed
-n
-e
's/^\* (HEAD detached at \(.*\))/\1/p'
)
kernel_version
=
$(
git
describe
--tags
)
output_name
=
${
kernel_version
}
_kernel
${
output_str
}
output_name
=
${
kernel_version
}
_kernel
${
output_str
}
echo
"Creating output folder"
;
echo
"Creating output folder"
;
...
@@ -162,5 +162,5 @@ echo "Archive saved to $output_name.tar.gz"
...
@@ -162,5 +162,5 @@ echo "Archive saved to $output_name.tar.gz"
if
[
-n
"
$copy_to_sepia
"
]
;
then
if
[
-n
"
$copy_to_sepia
"
]
;
then
echo
"Copying to sepia..."
;
echo
"Copying to sepia..."
;
scp
$output_name
.tar.gz sepia:
/home/vlaya/Documents/tsn-internship/img-kernel-utils/scripts/kernels/
;
scp
$output_name
.tar.gz sepia:
Documents/tsn-internship/img-kernel-utils/custom-kernels
;
fi
fi
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