Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Libreboot build system
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Libreboot project
Libreboot build system
Commits
abaefca1
Commit
abaefca1
authored
1 year ago
by
livio
Committed by
Libreboot project
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Added ISOLINUX/SYSLINUX menulist from media detection
parent
7a5b443f
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
config/grub/config/grub.cfg
+49
-1
49 additions, 1 deletion
config/grub/config/grub.cfg
with
49 additions
and
1 deletion
config/grub/config/grub.cfg
+
49
−
1
View file @
abaefca1
...
@@ -123,6 +123,7 @@ function make_boot_menus {
...
@@ -123,6 +123,7 @@ function make_boot_menus {
test
-e
${i}
test
-e
${i}
if
[ $? == 0 ]
; then # Media exists so we search there
if
[ $? == 0 ]
; then # Media exists so we search there
grub_create_menu
${i}
# Look for grub entries in known directories
grub_create_menu
${i}
# Look for grub entries in known directories
isolinux_create_menu
${i}
fi
fi
echo
-n
"."
echo
-n
"."
done
done
...
@@ -224,7 +225,54 @@ function search_grub {
...
@@ -224,7 +225,54 @@ function search_grub {
}
}
# Default list of ISOLINUX possible directories. The @/... entries are for cases where the BTRFS filesystem is being used
# Default list of ISOLINUX possible directories. The @/... entries are for cases where the BTRFS filesystem is being used
set
isolinux_dirs
=
"'' /boot /EFI /boot/EFI /@ /@/boot /@/boot/EFI /@/EFI"
set
isolinux_dirs
=
""
# Complete list of every possible isolinux directory, automatically filled later
set isolinux_dir_super="@" # Possible list of superdirectories (BTRFS can have those)
set
isolinux_dir
=
"boot EFI"
# First level directories list
set isolinux_dir_sub="boot EFI" # Second level directories list
for
i
in
''
${isolinux_dir_super}
; do
isolinux_dirs
=
"${isolinux_dirs} ${i}"
for
j
in
${isolinux_dir}
; do
isolinux_dirs
=
"${isolinux_dirs} ${i}/${j}"
for
k
in
${isolinux_dir_sub}
; do
isolinux_dirs
=
"${isolinux_dirs} ${i}/${j}/${k}"
done
done
done
# Creates a menuentry for ISOLINUX. First argument is menu text without spaces then root and configfile
function
isolinux_menuentry
{
menuentry
"Boot
ISOLINUX
from
$1"
${1}
${2}
${3}
{
set
root
=
"${2}"
syslinux_configfile
-i
${3}
}
}
# Pretty same as above function
function
syslinux_menuentry
{
menuentry
"Boot
SYSLINUX
from
$1"
${1}
${2}
${3}
{
set
root
=
"${2}"
syslinux_configfile
-s
${3}
}
}
function
isolinux_create_menu
{
set
root
=
"${1}"
for
dir
in
${isolinux_dirs}
; do
# In order to save time, we do not attempt anything on non existing directory.
if
[ -d /"${dir}"/ ]
; then
if
[ -f "${dir}"/isolinux/isolinux.cfg ]
; then
isolinux_menuentry
${1}
"${dir}"/isolinux/isolinux.cfg
elif
[ -f "${dir}"/syslinux/syslinux.cfg ]
; then
syslinux_menuentry
${1}
"${dir}"/syslinux/syslinux.cfg
elif
[ -f "${dir}"/syslinux/extlinux.conf ]
; then
syslinux_menuentry
${1}
"${dir}"/syslinux/extlinux.conf
elif
[ -f "${dir}"/extlinux/extlinux.conf ]
; then
syslinux_menuentry
${1}
"${dir}"/extlinux/extlinux.conf
fi
fi
done
}
function
try_isolinux_config
{
function
try_isolinux_config
{
set
root
=
"${1}"
set
root
=
"${1}"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment