feat(image): fix osrel in uki

This commit is contained in:
Lars Sjöström 2025-02-25 18:01:44 +01:00
parent e4ebf7ea7f
commit b3ad9f9962
No known key found for this signature in database
2 changed files with 8 additions and 9 deletions

View file

@ -128,15 +128,13 @@ ln -sf ../demo.service rootfs/usr/lib/systemd/system/basic.target.wants/demo.ser
$systemd/usr/bin/ukify build \
--linux $kernel/bzImage \
--initrd $initrd/initrd.xz \
--os-release rootfs/etc/os-release \
--stub $systemd/usr/lib/systemd/boot/efi/linuxx64.efi.stub \
--os-release @rootfs/etc/os-release \
--cmdline "$kernelCmdLine" \
-o boot/patos.efi
cp ${systemd}/usr/lib/systemd/boot/efi/systemd-bootx64.efi boot/
echo "timeout 1" > boot/loader.conf
echo -e "title PatOS Platform\nefi /EFI/Linux/patos.efi" > boot/patos.conf
cat <<EOF > repart.d/10-esp.conf
[Partition]
@ -147,7 +145,6 @@ SizeMaxBytes=96M
CopyFiles=/boot/systemd-bootx64.efi:/EFI/BOOT/BOOTX64.EFI
CopyFiles=/boot/patos.efi:/EFI/Linux/patos.efi
CopyFiles=/boot/loader.conf:/loader/loader.conf
CopyFiles=/boot/patos.conf:/loader/entries/patos.conf
EOF
cat <<EOF > repart.d/10-root.conf

View file

@ -19,12 +19,14 @@ rm -f $out/usr/lib/systemd/system/sysinit.target.wants/systemd-firstboot.service
rm -f $out/usr/lib/udev/rules.d/90-vconsole.rules
cat <<EOF > $out/etc/os-release
NAME="PatOS"
PRETTY_NAME="PatOS 0.0.1 (pre-alpha)"
NAME=PatOS
PRETTY_NAME=PatOS 0.0.1 (pre-alpha)
IMAGE_ID=patos
ID=patos
VERSION="0.0.1 (pre-alpha)"
VERSION_CODENAME=pre-alpha
VERSION_ID="0.0.1"
IMAGE_VERSION=0.0.1
VERSION=0.0.1
VERSION_ID=0.0.1
BUILD_ID=0.0.1
EOF
sed -i 's#After=\(.*\)#After=sysroot.mount \1#' $out/usr/lib/systemd/system/systemd-repart.service