mirror of
https://github.com/ps5-linux/ps5-linux-image.git
synced 2026-07-15 21:42:27 +00:00
zram for ubuntu; kexec.sh for single distro
This commit is contained in:
5
boot/kexec.sh
Normal file
5
boot/kexec.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
BOOT=/boot/efi
|
||||
kexec -l "$BOOT/bzImage" --initrd="$BOOT/initrd.img" --command-line="$(cat $BOOT/cmdline.txt)"
|
||||
kexec -e
|
||||
@@ -46,6 +46,7 @@ packages:
|
||||
- fonts-liberation
|
||||
- fonts-dejavu
|
||||
- fontconfig
|
||||
- systemd-zram-generator
|
||||
action: install
|
||||
|
||||
files:
|
||||
@@ -131,6 +132,9 @@ actions:
|
||||
sed -i 's/^#*PasswordAuthentication.*/PasswordAuthentication yes/' /etc/ssh/sshd_config
|
||||
systemctl enable ssh
|
||||
|
||||
# zram swap: half of RAM, zstd compressed
|
||||
printf '[zram0]\nzram-size = ram / 2\ncompression-algorithm = zstd\n' > /etc/systemd/zram-generator.conf
|
||||
|
||||
- trigger: post-files
|
||||
action: |-
|
||||
#!/bin/bash
|
||||
|
||||
@@ -46,6 +46,7 @@ packages:
|
||||
- fonts-liberation
|
||||
- fonts-dejavu
|
||||
- fontconfig
|
||||
- systemd-zram-generator
|
||||
action: install
|
||||
|
||||
files:
|
||||
@@ -112,6 +113,9 @@ actions:
|
||||
sed -i 's/^#*PasswordAuthentication.*/PasswordAuthentication yes/' /etc/ssh/sshd_config
|
||||
systemctl enable ssh
|
||||
|
||||
# zram swap: half of RAM, zstd compressed
|
||||
printf '[zram0]\nzram-size = ram / 2\ncompression-algorithm = zstd\n' > /etc/systemd/zram-generator.conf
|
||||
|
||||
- trigger: post-files
|
||||
action: |-
|
||||
#!/bin/bash
|
||||
|
||||
@@ -158,6 +158,7 @@ echo "=== Assembling boot partition ==="
|
||||
mv /tmp/usb_root/boot/efi/* /tmp/usb_efi/ 2>/dev/null || true
|
||||
sed "s|__DISTRO__|$ROOT_LABEL|" /repo/boot/cmdline.txt > /tmp/usb_efi/cmdline.txt
|
||||
cp /repo/boot/vram.txt /tmp/usb_efi/
|
||||
cp /repo/boot/kexec.sh /tmp/usb_efi/
|
||||
sync
|
||||
|
||||
umount /tmp/usb_root /tmp/usb_efi
|
||||
|
||||
Reference in New Issue
Block a user