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-liberation
|
||||||
- fonts-dejavu
|
- fonts-dejavu
|
||||||
- fontconfig
|
- fontconfig
|
||||||
|
- systemd-zram-generator
|
||||||
action: install
|
action: install
|
||||||
|
|
||||||
files:
|
files:
|
||||||
@@ -131,6 +132,9 @@ actions:
|
|||||||
sed -i 's/^#*PasswordAuthentication.*/PasswordAuthentication yes/' /etc/ssh/sshd_config
|
sed -i 's/^#*PasswordAuthentication.*/PasswordAuthentication yes/' /etc/ssh/sshd_config
|
||||||
systemctl enable ssh
|
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
|
- trigger: post-files
|
||||||
action: |-
|
action: |-
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ packages:
|
|||||||
- fonts-liberation
|
- fonts-liberation
|
||||||
- fonts-dejavu
|
- fonts-dejavu
|
||||||
- fontconfig
|
- fontconfig
|
||||||
|
- systemd-zram-generator
|
||||||
action: install
|
action: install
|
||||||
|
|
||||||
files:
|
files:
|
||||||
@@ -112,6 +113,9 @@ actions:
|
|||||||
sed -i 's/^#*PasswordAuthentication.*/PasswordAuthentication yes/' /etc/ssh/sshd_config
|
sed -i 's/^#*PasswordAuthentication.*/PasswordAuthentication yes/' /etc/ssh/sshd_config
|
||||||
systemctl enable ssh
|
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
|
- trigger: post-files
|
||||||
action: |-
|
action: |-
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|||||||
@@ -158,6 +158,7 @@ echo "=== Assembling boot partition ==="
|
|||||||
mv /tmp/usb_root/boot/efi/* /tmp/usb_efi/ 2>/dev/null || true
|
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
|
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/vram.txt /tmp/usb_efi/
|
||||||
|
cp /repo/boot/kexec.sh /tmp/usb_efi/
|
||||||
sync
|
sync
|
||||||
|
|
||||||
umount /tmp/usb_root /tmp/usb_efi
|
umount /tmp/usb_root /tmp/usb_efi
|
||||||
|
|||||||
Reference in New Issue
Block a user