Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adapt for limine 8.x #7

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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