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
be0a428e
Commit
be0a428e
authored
Jul 07, 2020
by
Igor Pecovnik
Browse files
Improve kernel switching
parent
0b5bc630
Changes
1
Hide whitespace changes
Inline
Side-by-side
debian-config-functions
View file @
be0a428e
...
...
@@ -374,14 +374,14 @@ function reload_bsp(){
PACKAGE_PURGE
=
"linux-image* linux-dtb*"
# create install and remove logic
command
=
$(
apt-get
--download-only
--simulate
--allow-downgrades
-y
--no-install-recommends
install
linux-
${
DISTROID
}
-root-
${
BRANCH
}
-
${
BOARD
}
2>/dev/null
)
if
[[
$?
-eq
0
]]
;
then
command
=
$(
LC_ALL
=
C
apt-get
--download-only
--simulate
--allow-downgrades
-y
--no-install-recommends
install
linux-
${
DISTROID
}
-root-
${
BRANCH
}
-
${
BOARD
}
2>/dev/null
)
if
[[
$?
-eq
0
&&
-z
$(
echo
$command
|
grep
"not possible"
)
]]
;
then
PACKAGE_INSTALL+
=
" linux-
${
DISTROID
}
-root-
${
BRANCH
}
-
${
BOARD
}
"
PACKAGE_PURGE+
=
" linux-
${
DISTROID
}
-root*"
fi
command
=
$(
apt-get
--download-only
--simulate
--reinstall
--allow-downgrades
-y
--no-install-recommends
install
linux-u-boot-
${
BOARD
}
-
${
BRANCH
}
2>/dev/null
)
if
[[
$?
-eq
0
]]
;
then
command
=
$(
LC_ALL
=
C
apt-get
--download-only
--simulate
--reinstall
--allow-downgrades
-y
--no-install-recommends
install
linux-u-boot-
${
BOARD
}
-
${
BRANCH
}
2>/dev/null
)
if
[[
$?
-eq
0
&&
-z
$(
echo
$command
|
grep
"not possible"
)
]]
;
then
PACKAGE_INSTALL+
=
" linux-u-boot-
${
BOARD
}
-
${
BRANCH
}
"
PACKAGE_PURGE+
=
" linux-u-boot-
${
BOARD
}
-*"
fi
...
...
@@ -396,8 +396,7 @@ function reload_bsp(){
PACKAGE_PURGE+
=
" linux-headers*"
fi
debconf-apt-progress
--
apt
--download-only
--allow-downgrades
-y
--no-install-recommends
install
$PACKAGE_INSTALL
debconf-apt-progress
--
apt-get
--download-only
--allow-downgrades
-y
--no-install-recommends
install
$PACKAGE_INSTALL
# if download is ok, remove old packages
if
[[
$?
=
0
]]
;
then
...
...
@@ -406,6 +405,7 @@ function reload_bsp(){
find
"/boot/"
-name
"config*"
-type
f
-delete
find
"/boot/"
-name
"vmlinuz*"
-type
f
-delete
find
"/boot/"
-name
"*nitrd*"
-type
f
-delete
find
"/boot/"
-name
"*Image"
-type
l
-delete
# install packages
echo
$PACKAGE_INSTALL
>>
/var/log/upgrade.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