Skip to content

Commit 9131418

Browse files
committed
Improve the kernel rescue plan
1 parent 6aa3209 commit 9131418

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

build-armbian/armbian-files/common-files/usr/sbin/armbian-update

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,8 +542,12 @@ sos_kernel() {
542542

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

0 commit comments

Comments
 (0)