mirror of
https://github.com/ps5-linux/ps5-linux-image.git
synced 2026-07-16 01:50:40 +00:00
18 lines
557 B
Bash
Executable File
18 lines
557 B
Bash
Executable File
#!/bin/bash
|
|
# Copies the latest kernel + initrd to the EFI partition.
|
|
# Runs on every kernel install/update.
|
|
set -e
|
|
BOOT_PART="/boot/efi"
|
|
KVER="$1"
|
|
[ -z "$KVER" ] && KVER="$(ls -1t /lib/modules | head -1)"
|
|
|
|
if [ -f "$BOOT_PART/bzImage" ]; then
|
|
mv "$BOOT_PART/bzImage" "$BOOT_PART/bzImage.old"
|
|
fi
|
|
if [ -f "$BOOT_PART/initrd.img" ]; then
|
|
mv "$BOOT_PART/initrd.img" "$BOOT_PART/initrd.img.old"
|
|
fi
|
|
cp "/boot/vmlinuz-$KVER" "$BOOT_PART/bzImage"
|
|
cp "/boot/initrd.img-$KVER" "$BOOT_PART/initrd.img"
|
|
echo ">> Kernel $KVER deployed to $BOOT_PART"
|