Commit be0a428e authored by Igor Pecovnik's avatar Igor Pecovnik
Browse files

Improve kernel switching

parent 0b5bc630
...@@ -374,14 +374,14 @@ function reload_bsp(){ ...@@ -374,14 +374,14 @@ function reload_bsp(){
PACKAGE_PURGE="linux-image* linux-dtb*" PACKAGE_PURGE="linux-image* linux-dtb*"
# create install and remove logic # 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) 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 ]]; then if [[ $? -eq 0 && -z $(echo $command | grep "not possible") ]]; then
PACKAGE_INSTALL+=" linux-${DISTROID}-root-${BRANCH}-${BOARD}" PACKAGE_INSTALL+=" linux-${DISTROID}-root-${BRANCH}-${BOARD}"
PACKAGE_PURGE+=" linux-${DISTROID}-root*" PACKAGE_PURGE+=" linux-${DISTROID}-root*"
fi fi
command=$(apt-get --download-only --simulate --reinstall --allow-downgrades -y --no-install-recommends install linux-u-boot-${BOARD}-${BRANCH} 2>/dev/null) 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 ]]; then if [[ $? -eq 0 && -z $(echo $command | grep "not possible") ]]; then
PACKAGE_INSTALL+=" linux-u-boot-${BOARD}-${BRANCH}" PACKAGE_INSTALL+=" linux-u-boot-${BOARD}-${BRANCH}"
PACKAGE_PURGE+=" linux-u-boot-${BOARD}-*" PACKAGE_PURGE+=" linux-u-boot-${BOARD}-*"
fi fi
...@@ -396,8 +396,7 @@ function reload_bsp(){ ...@@ -396,8 +396,7 @@ function reload_bsp(){
PACKAGE_PURGE+=" linux-headers*" PACKAGE_PURGE+=" linux-headers*"
fi 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 download is ok, remove old packages
if [[ $? = 0 ]]; then if [[ $? = 0 ]]; then
...@@ -406,6 +405,7 @@ function reload_bsp(){ ...@@ -406,6 +405,7 @@ function reload_bsp(){
find "/boot/" -name "config*" -type f -delete find "/boot/" -name "config*" -type f -delete
find "/boot/" -name "vmlinuz*" -type f -delete find "/boot/" -name "vmlinuz*" -type f -delete
find "/boot/" -name "*nitrd*" -type f -delete find "/boot/" -name "*nitrd*" -type f -delete
find "/boot/" -name "*Image" -type l -delete
# install packages # install packages
echo $PACKAGE_INSTALL >> /var/log/upgrade.log echo $PACKAGE_INSTALL >> /var/log/upgrade.log
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment