Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Config
Commits
177ae8c4
Commit
177ae8c4
authored
May 04, 2019
by
Igor Pecovnik
Browse files
Improved sources handling: decompress and prepare for onboard compilation
parent
2691d038
Changes
2
Show whitespace changes
Inline
Side-by-side
debian-config-jobs
View file @
177ae8c4
...
...
@@ -164,6 +164,7 @@ function jobs ()
fi
if
[[
-n
$(
dpkg
-l
|
grep
linux-headers
)
]]
;
then
debconf-apt-progress
--
apt-get
-y
purge
${
REMOVE_PKG
}
rm
-rf
/usr/src/linux-headers
*
else
debconf-apt-progress
--
apt-get
-y
install
${
INSTALL_PKG
}
fi
...
...
@@ -180,13 +181,19 @@ function jobs ()
#
"Source"
)
if
!
is_package_manager_running
;
then
PACKAGE
=
$(
echo
"
$SOURCE_PKG
"
|
sed
"s/-next//"
|
sed
"s/-dev//"
|
sed
"s/-default//"
)
if
[[
-n
$(
dpkg
-l
|
grep
$SOURCE_PKG
)
]]
;
then
debconf-apt-progress
--
apt-get
-y
purge
${
SOURCE_PKG
}
debconf-apt-progress
--
apt-get
-y
purge
linux-source
*
# cleanup
debconf-apt-progress
--
apt
-y
autoremove
rm
-r
/usr/src/linux-source
*
else
debconf-apt-progress
--
apt-get
-y
install
${
SOURCE_PKG
}
dialog
--colors
--backtitle
"
$BACKTITLE
"
--no-collapse
--title
" Kernel source "
--clear
--msgbox
"
\n
You will find compressed kernel source and configuration in /usr/src"
7 72
mkdir
-p
/usr/src/
$PACKAGE
(
pv
-n
/usr/src/
$PACKAGE
".tar.xz"
| xz
-d
-T0
- |
tar
xf -
-C
/usr/src/
$PACKAGE
)
2>&1 | dialog
--colors
--backtitle
"
$BACKTITLE
"
--title
" Please wait! "
--gauge
"
\n
Decompressing kernel sources to /usr/src/
$PACKAGE
"
8 80
xz
-d
/usr/src/
*
config.xz
--stdout
>
/usr/src/
$PACKAGE
/.config
rm
/usr/src/
$PACKAGE
".tar.xz"
/usr/src/
*
config.xz
dialog
--colors
--backtitle
"
$BACKTITLE
"
--no-collapse
--title
" Kernel source "
--clear
--msgbox
"
\n
You will find pre-configured kernel sources in /usr/src/
$PACKAGE
"
7 72
fi
fi
;;
...
...
debian-config-submenu
View file @
177ae8c4
...
...
@@ -354,7 +354,7 @@ while true; do
if
[[
-n
$(
dpkg
-l
|
grep
linux-headers
)
]]
;
then
LIST+
=(
"Headers"
"Remove kernel headers"
)
;
else
\
LIST+
=(
"Headers"
"Install kernel headers"
)
;
fi
SOURCE_PKG
=
$(
apt-cache
--names-only
search ^linux-source-
*
|
awk
'{ print $1 }'
|
grep
${
BRANCH
}
-
${
LINUXFAMILY
}
|
tail
-1
)
SOURCE_PKG
=
$(
apt-cache
--names-only
search ^linux-source-
*
|
awk
'{ print $1 }'
|
grep
${
BRANCH
}
-
${
LINUXFAMILY
}
|
head
-1
)
if
[[
-n
$SOURCE_PKG
]]
;
then
if
[[
-n
$(
dpkg
-l
|
grep
$SOURCE_PKG
)
]]
;
then
LIST+
=(
"Source"
"Remove kernel source"
)
;
else
\
LIST+
=(
"Source"
"Install kernel source"
)
;
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