Skip to content

Commit

Permalink
adapt for limine 8.x
Browse files Browse the repository at this point in the history
  • Loading branch information
YukariChiba committed Sep 2, 2024
1 parent 0eaeb03 commit 0c7e8aa
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 19 deletions.
2 changes: 1 addition & 1 deletion config/liveimage/gen_boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fi
mkdir -p /boot/EFI/BOOT
cp /usr/share/limine/*.EFI /boot/EFI/BOOT/
limine-mkconfig -b "rolling (LiveCD)" -o /boot/limine.cfg
limine-mkconfig -b "rolling (LiveCD)" -o /boot/limine.conf
# for hybrid iso
if [ -f /usr/share/limine/limine-bios-cd.bin ]; then
cp /usr/share/limine/{limine-bios-cd.bin,limine-bios.sys} /boot/
Expand Down
33 changes: 15 additions & 18 deletions utils/limine_menu.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

count=`ls profiles/$PROFILE/subprofiles | wc -l`
CFGOUT=./tmpdir/isofs/limine.cfg
CFGOUT=./tmpdir/isofs/limine.conf
sudo rm $CFGOUT || true
# TODO: multiple kernel
kernel_file=`ls ./tmpdir/isofs/ | grep vmlinuz- | head -n 1`
Expand All @@ -11,11 +11,11 @@ function limine_menu_render_subprofile() {
title="$1"
subprofile_id="$2"
cat <<EOF | $RUNAS tee -a $CFGOUT
:eweOS $TARGET_ARCH ($title)
PROTOCOL=linux
KERNEL_PATH=boot:///${kernel_file}
KERNEL_CMDLINE=live=${subprofile_id} quiet splash
MODULE_PATH=boot:///${initrd_file}
/eweOS $TARGET_ARCH ($title)
protocol: linux
kernel_path: boot():/${kernel_file}
cmdline: live=${subprofile_id} quiet splash
module_path: boot():/${initrd_file}
EOF
}

Expand All @@ -25,22 +25,20 @@ function limine_menu_render_subprofile_adv() {
subprofile_id="$3"
cmdline="$4"
cat <<EOF | $RUNAS tee -a $CFGOUT
::eweOS $TARGET_ARCH ($title, $subtitle)
PROTOCOL=linux
KERNEL_PATH=boot:///${kernel_file}
KERNEL_CMDLINE=live=${subprofile_id} $cmdline
MODULE_PATH=boot:///${initrd_file}
//eweOS $TARGET_ARCH ($title, $subtitle)
protocol: linux
kernel_path: boot():/${kernel_file}
cmdline: live=${subprofile_id} $cmdline
module_path: boot():/${initrd_file}
EOF
}

# only process if more than 1 subprofiles
if [ "$count" -gt "1" ]; then

cat <<EOF | $RUNAS tee -a $CFGOUT
TERM_WALLPAPER=boot:///bg.jpg
TERM_MARGIN=0
wallpaper: boot():/bg.jpg
term_margin: 0
EOF

if [ -f "profiles/$PROFILE/subprofiles/$DEFAULT_SUBPROFILE/title.txt" ]; then
Expand Down Expand Up @@ -77,9 +75,8 @@ for subprofile in $(ls profiles/$PROFILE/subprofiles); do
done

cat <<EOF | $RUNAS tee -a $CFGOUT
:Resume Default Boot Sequence
PROTOCOL=chainload_next
/Resume Default Boot Sequence
protocol: chainload_next
EOF

fi

0 comments on commit 0c7e8aa

Please sign in to comment.