Skip to content

Commit

Permalink
Improve the kernel rescue plan
Browse files Browse the repository at this point in the history
  • Loading branch information
ophub committed Apr 6, 2023
1 parent 6aa3209 commit 9131418
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -542,8 +542,12 @@ sos_kernel() {

# 01. For /boot files
cd ${rescue_path}/bootfs
rm -rf config-* initrd.img-* System.map-* vmlinuz-* uInitrd* *Image dtb*
[[ "${PLATFORM}" == "amlogic" ]] && cp -rf /boot/{u-boot.ext,u-boot.emmc} -t . 2>/dev/null
rm -rf config-* initrd.img-* System.map-* vmlinuz-* uInitrd* *Image dtb* u-boot.ext u-boot.emmc
[[ "${PLATFORM}" == "amlogic" && -f "/boot/u-boot.ext" ]] && {
cp -rf /boot/u-boot.ext -t .
cp -rf /boot/u-boot.ext -t u-boot.emmc
chmod +x u-boot.ext u-boot.emmc
}
cp -rf /boot/{*-${kernel_signature},uInitrd,*Image,dtb} -t .
[[ "${?}" -ne "0" ]] && error_msg "(1/3) [ boot ] kernel files rescue failed."
echo -e "${INFO} (1/3) [ boot ] kernel files rescue succeeded."
Expand Down

0 comments on commit 9131418

Please sign in to comment.