Skip to Content.
Sympa Menu

sm-commit - [[SM-Commit] ] GIT changes to master grimoire by Treeve Jelbert (bea70bbac3f093fa6171053c7f5eca70338a3db2)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Treeve Jelbert <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org, sm-commit AT lists.sourcemage.org
  • Subject: [[SM-Commit] ] GIT changes to master grimoire by Treeve Jelbert (bea70bbac3f093fa6171053c7f5eca70338a3db2)
  • Date: Sun, 16 Feb 2025 11:48:22 +0000

GIT changes to master grimoire by Treeve Jelbert <treeve AT sourcemage.org>:

disk/limine/DEPENDS | 3 +-
disk/limine/HISTORY | 5 +++
disk/limine/INSTALL | 10 ++++++
disk/limine/mk-limine-cfg.sh | 64
++++++++++++++++++++++++++++++++++++-------
disk/limine/smgl-splash.png |binary
5 files changed, 72 insertions(+), 10 deletions(-)

New commits:
commit bea70bbac3f093fa6171053c7f5eca70338a3db2
Author: Treeve Jelbert <treeve AT sourcemage.org>
Commit: Treeve Jelbert <treeve AT sourcemage.org>

limine - improve mk-limine-cfg.sh script

diff --git a/disk/limine/DEPENDS b/disk/limine/DEPENDS
index a297423..8d86ef1 100755
--- a/disk/limine/DEPENDS
+++ b/disk/limine/DEPENDS
@@ -1,4 +1,5 @@
depends -sub CLANG llvm &&
depends nasm &&
depends gzip &&
-suggest_depends INITRAMFS '' '' 'for making initramfs images'
+suggest_depends INITRAMFS '' '' 'for making initramfs images' &&
+suggest_depends efibootmgr '' '' 'to update EFI data'
diff --git a/disk/limine/HISTORY b/disk/limine/HISTORY
index 0248122..36eb680 100644
--- a/disk/limine/HISTORY
+++ b/disk/limine/HISTORY
@@ -1,3 +1,8 @@
+2025-02-15 Treeve Jelbert <treeve AT sourcemage.org>
+ * mk-limine-cfg.sh: improve script
+ * DEPENDS: add efibootmgr
+ * INSTALL: added, actually install script
+
2025-02-14 Treeve Jelbert <treeve AT sourcemage.org>
* DETAILS: add missing hash

diff --git a/disk/limine/INSTALL b/disk/limine/INSTALL
new file mode 100755
index 0000000..adf986a
--- /dev/null
+++ b/disk/limine/INSTALL
@@ -0,0 +1,10 @@
+default_install &&
+DEST=$INSTALL_ROOT/usr/bin &&
+mkdir -p $DEST &&
+cp $SPELL_DIRECTORY/mk-limine-cfg.sh $DEST &&
+DEST=$INSTALL_ROOT/boot/limine &&
+SPLASH=smgl-splash.png &&
+mkdir -p $DEST &&
+cp $SPELL_DIRECTORY/$SPLASH $DEST/$SPLASH &&
+message "A SMGL splash screen is available in $DEST" &&
+message "use mk-limine-cfg to update the Limine configuration"
diff --git a/disk/limine/mk-limine-cfg.sh b/disk/limine/mk-limine-cfg.sh
index aaf43a4..69cacd2 100755
--- a/disk/limine/mk-limine-cfg.sh
+++ b/disk/limine/mk-limine-cfg.sh
@@ -8,7 +8,9 @@

# Whenever you update the kernel, mount the ESP over an empty /boot on your
root file system.

-ROOT=`dracut --print-cmdline`
+
+cd /boot
+ROOT=`dracut --print-cmdline|cut -d\ -f1,2`
#ROOT='root=LABEL=root64'

DEST=limine.conf
@@ -20,19 +22,18 @@ limine:config:
verbose:yes
cmdline: $ROOT
interface_branding:SourceMage GNU/Linux (Limine boot)
-wallpaper:boot():/smgl-splash.png
+wallpaper:boot():/limine/smgl-splash.png

-/SourceMage GNU/Linux
EOF

-for VX in `ls /boot/vmlinuz-* | cut -d- -f2|sort -r`;do
+for VX in `ls vmlinuz-* | cut -d- -f2|sort -r`;do
cat >> $DEST << EOF
-//Linux $VX
+/Linux $VX
protocol:linux
-path:boot():/boot/vmlinuz-$VX
+path:boot():/vmlinuz-$VX
EOF

- MOD='/boot/initramfs-$VX.img'
+ MOD='initramfs-$VX.img'
if [[ -f $MOD ]];then
cat >> $DEST << EOF
module_path:boot():$MOD
@@ -41,12 +42,57 @@ EOF
done # linux kernels

# extra systems
-if [[ -f /boot/memtest+ ]];then
+if [[ -f memtest+ ]];then
cat >> $DEST << EOF
/Memtest+
protocol:linux
-path:boot():/boot/memtest+
+path:boot():/memtest+
+
+EOF
+fi
+
+if [[ -d sys/firmware/efi ]];then
+ echo This is a UEFI system
+
+# check for Windows
+ if WIN=`blkid | grep SYSTEM_DRV`; then
+ WB=${WIN%:*}
+ echo Windows installation found at $WB
+ cat >> $DEST << EOF
+/Windows
+ protocol: efi_chainload
+ image_path: hd(0,1):/bootmgfw.efi
+EOF
+ fi
+
+
+cat << EOF
+Finally, to create an entry in the UEFI Firmware,
+ use the following command,
+ changing /dev/... as appropriate:
+
+efibootmgr --create\
+ --disk /dev/sda...\
+ --disk /dev/nvme...\
+ --part 1\
+ --label "SMGL Linux with Limine"\
+ --loader '/limine/BOOTX64.EFI'

EOF
+else # non UEFI
+ echo this is not a UEFI system
+# check for Windows
+ if WIN=`blkid | grep SYSTEM_DRV`; then
+ WB=${WIN%:*}
+ echo Windows installation found at $WB
+ cat >> $DEST << EOF
+/Windows
+ protocol: bios_chainload
+ image_path: hd(0,1):/bootmgfw
+EOF
+ fi
fi

+cat << EOF
+Check the generated $DEST carefully, especially for Windows
+EOF
diff --git a/disk/limine/smgl-splash.png b/disk/limine/smgl-splash.png
new file mode 100755
index 0000000..3cf508b
Binary files /dev/null and b/disk/limine/smgl-splash.png differ


  • [[SM-Commit] ] GIT changes to master grimoire by Treeve Jelbert (bea70bbac3f093fa6171053c7f5eca70338a3db2), Treeve Jelbert, 02/16/2025

Archive powered by MHonArc 2.6.24.

Top of Page