Skip to content

Commit cc6672a

Browse files
committed
Add support for BIOS/extlinux setups
1 parent 333bc24 commit cc6672a

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

ecleankernel/__main__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from ecleankernel.bootloader.grub import GRUB
2323
from ecleankernel.bootloader.grub2 import GRUB2
2424
from ecleankernel.bootloader.lilo import LILO
25+
from ecleankernel.bootloader.extlinux import EXTLINUX
2526
from ecleankernel.bootloader.yaboot import Yaboot
2627
from ecleankernel.bootloader.symlinks import Symlinks
2728
from ecleankernel.layout.blspec import BlSpecLayout
@@ -63,7 +64,7 @@ def friendly_desc(self) -> str:
6364
def main(argv: typing.List[str]) -> int:
6465
kernel_parts = [x.value for x in KernelFileType.__members__.values()]
6566
bootloaders: typing.List[typing.Type[Bootloader]] = [
66-
LILO, GRUB2, GRUB, Yaboot, Symlinks]
67+
LILO, GRUB2, GRUB, EXTLINUX, Yaboot, Symlinks]
6768
layouts: typing.List[typing.Type[Layout]] = [
6869
BlSpecLayout, StdLayout]
6970
sorts = [MTimeSort, VersionSort]

ecleankernel/bootloader/extlinux.py

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# (c) 2024 Boris Staletic <boris.staletic@protonmail.com>
2+
# SPDX-License-Identifier: GPL-2.0-or-later
3+
4+
import re
5+
import typing
6+
7+
from ecleankernel.bootloader.lilo import LILO
8+
9+
10+
class EXTLINUX(LILO):
11+
name = 'extlinux'
12+
kernel_re = r'^\s*(:?LINUX|KERNEL)\s+(?P<path>.+)\s*$'
13+
def_path: typing.Tuple[typing.Optional[str], ...] = (
14+
'/boot/extlinux/extlinux.conf',
15+
'/boot/syslinux/syslinux.cfg')

0 commit comments

Comments
 (0)