-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Itxaka <[email protected]>
- Loading branch information
Showing
17 changed files
with
66 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,8 +46,6 @@ RUN dnf install -y \ | |
which \ | ||
https://zfsonlinux.org/epel/zfs-release-2-2.el9.noarch.rpm && dnf clean all | ||
|
||
COPY redhat/bootargs.cfg /etc/cos/bootargs.cfg | ||
|
||
RUN mkdir -p /run/lock | ||
RUN touch /usr/libexec/.keep | ||
RUN systemctl enable [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,8 +47,6 @@ RUN dnf install -y \ | |
which \ | ||
zfs && dnf clean all | ||
|
||
COPY redhat/bootargs.cfg /etc/cos/bootargs.cfg | ||
|
||
RUN mkdir -p /run/lock && \ | ||
touch /usr/libexec/.keep && \ | ||
systemctl enable [email protected] && \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,8 +47,6 @@ RUN dnf install -y \ | |
https://zfsonlinux.org/epel/zfs-release-2-2.el9.noarch.rpm \ | ||
&& dnf clean all | ||
|
||
COPY redhat/bootargs.cfg /etc/cos/bootargs.cfg | ||
|
||
RUN mkdir -p /run/lock | ||
RUN touch /usr/libexec/.keep | ||
RUN systemctl enable [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
function setSelinux { | ||
source (loop0)/etc/os-release | ||
set baseSelinuxCmd="" | ||
if regexp "rockylinux|fedora|almalinux|redhat" $KAIROS_FLAVOR; then | ||
set baseSelinuxCmd="selinux=0" | ||
else | ||
# if not in recovery | ||
if [ -z "$recoverylabel" ];then | ||
set baseSelinuxCmd="security=selinux selinux=1" | ||
fi | ||
fi | ||
} | ||
|
||
function setExtraConsole { | ||
source (loop0)/etc/os-release | ||
set baseExtraConsole="console=ttyS0" | ||
# rpi | ||
if regexp "arm-rpi" $KAIROS_FLAVOR; then | ||
set baseExtraConsole="console=ttyS0,115200" | ||
fi | ||
# nvidia orin | ||
if regexp "arm-nvidia-jetson-agx-orin" $KAIROS_FLAVOR; then | ||
set baseExtraConsole="console=ttyTCU0,115200" | ||
fi | ||
} | ||
|
||
function setExtraArgs { | ||
source (loop0)/etc/os-release | ||
set baseExtraArgs="" | ||
# rpi | ||
if regexp "arm-rpi" $KAIROS_FLAVOR; then | ||
set baseExtraArgs="modprobe.blacklist=vc4 8250.nr_uarts=1" | ||
fi | ||
} | ||
|
||
function setKernelCmd { | ||
# At this point we have the system mounted under (loop0) | ||
# | ||
# baseCmd -> Shared between all entries | ||
# baseRootCmd -> specific bits that immucore uses to mount the boot devices and identify the image to mount | ||
# baseSelinuxCmd -> selinux enabled/disabled | ||
# baseExtraConsole -> extra console to set | ||
# baseExtraArgs -> extra needed args | ||
set baseCmd="console=tty1 net.ifnames=1 rd.cos.oemlabel=COS_OEM rd.cos.oemtimeout=10 panic=5 rd.emergency=reboot rd.shell=0 systemd.crash_reboot=yes" | ||
if [ -n "$recoverylabel" ]; then | ||
set baseRootCmd="root=live:LABEL=$recoverylabel rd.live.dir=/ rd.live.squashimg=$img" | ||
else | ||
set baseRootCmd="root=LABEL=$label cos-img/filename=$img" | ||
fi | ||
setSelinux | ||
setExtraConsole | ||
setExtraArgs | ||
# finally set the full cmdline | ||
set kernelcmd="$baseCmd $baseRootCmd $baseSelinuxCmd $baseExtraConsole $baseExtraArgs" | ||
} | ||
|
||
|
||
# grub.cfg now ships this but during upgrades we do not update the COS_GRUB partition, so no new grub.cfg is copied over there | ||
# We need to keep it for upgrades to work. | ||
# TODO: Deprecate in v2.8-v3.0 | ||
set kernel=/boot/vmlinuz | ||
set initramfs=/boot/initrd | ||
# set the kernelcmd dynamically | ||
setKernelCmd |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.