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
25c34527
Commit
25c34527
authored
Aug 03, 2020
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update compile-kernel script
parent
126217da
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
37 deletions
+44
-37
img-kernel-utils/scripts/vm-scripts/compile-kernel
img-kernel-utils/scripts/vm-scripts/compile-kernel
+44
-37
No files found.
img-kernel-utils/scripts/vm-scripts/compile-kernel
View file @
25c34527
#!/bin/bash
usage
()
{
echo
"Usage:
$0
[-hdkms] [-l LINUX_PATH] [-o OUTPUT_STR] (-u CONFIG_PATH | -c CONFIG_PATH | -n OLD_CONFIG_PATH NEW_CONFIG_PATH)"
echo
"Usage:
$0
[-hdkms] [-l LINUX_PATH] [-o OUTPUT_STR] (-
p | -
u CONFIG_PATH | -c CONFIG_PATH | -n OLD_CONFIG_PATH NEW_CONFIG_PATH)"
exit
1
;
}
linux_path
=
$HOME
/linux
output_str
=
""
while
getopts
"hdkmsu:c:nl:o:"
opt
;
do
while
getopts
"hdkm
p
su:c:nl:o:"
opt
;
do
case
"
${
opt
}
"
in
h
)
usage
...
...
@@ -28,6 +28,10 @@ while getopts "hdkmsu:c:nl:o:" opt; do
compile_modules
=
1
install_opts+
=
"-m "
;;
p
)
partial_compile
=
1
config_set
=
1
;;
n
)
new_config
=
1
config_set
=
1
...
...
@@ -63,21 +67,22 @@ fi
# Setup
linux_path
=
$(
readlink
-m
$linux_path
)
if
[
-n
"
${
new_config
}
"
]
;
then
export
ARCH
=
arm
;
export
CROSS_COMPILE
=
arm-linux-gnueabihf-
;
cd
$linux_path
;
if
[
-z
"
$partial_compile
"
]
;
then
if
[
-n
"
${
new_config
}
"
]
;
then
if
[
"$#"
-ne
2
]
;
then
usage
fi
old_config_path
=
$(
readlink
-m
$1
)
new_config_path
=
$(
readlink
-m
$2
)
fi
export
ARCH
=
arm
;
export
CROSS_COMPILE
=
arm-linux-gnueabihf-
;
cd
$linux_path
;
fi
# Kernel configuration
# Kernel configuration
if
[
-n
"
${
new_config
}
"
]
;
then
if
[
-n
"
${
new_config
}
"
]
;
then
make mrproper
;
cp
$old_config_path
$linux_path
/.config
;
...
...
@@ -85,7 +90,7 @@ if [ -n "${new_config}" ]; then
make menuconfig
;
cp
$linux_path
/.config
$new_config_path
elif
[
-n
"
${
update_config
}
"
]
;
then
elif
[
-n
"
${
update_config
}
"
]
;
then
make mrproper
;
cp
$config_path
${
config_path
}
_old
;
...
...
@@ -94,12 +99,13 @@ elif [ -n "${update_config}" ]; then
make menuconfig
;
cp
$linux_path
/.config
$config_path
else
else
make mrproper
;
cp
$config_path
$linux_path
/.config
;
make olddefconfig
;
fi
fi
# Compilation
...
...
@@ -162,5 +168,6 @@ echo "Archive saved to $output_name.tar.gz"
if
[
-n
"
$copy_to_sepia
"
]
;
then
echo
"Copying to sepia..."
;
scp
$output_name
.tar.gz sepia:Documents/tsn-internship/img-kernel-utils/custom-kernels
;
scp
$output_name
.tar.gz sepia:Documents/tsn-internship/tsn-rt-measures/img-kernel-utils/custom-kernels
;
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