mirror of
https://github.com/kairos-io/packages.git
synced 2025-09-17 07:50:16 +00:00
Add missing files to static configs (#474)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
packages:
|
||||
- name: "kairos-overlay-files"
|
||||
category: "static"
|
||||
version: "1.0.14"
|
||||
version: "1.1.0"
|
||||
|
10
packages/static/kairos-overlay-files/files/boot/config.txt
Normal file
10
packages/static/kairos-overlay-files/files/boot/config.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
# https://www.raspberrypi.com/documentation/computers/config_txt.html
|
||||
# https://emteria.com/kb/connect-uart-rpi
|
||||
# https://www.raspberrypi.com/documentation/computers/config_txt.html
|
||||
enable_uart=1
|
||||
uart_2ndstage=1
|
||||
|
||||
# Disabling bluetooth might change the serial device:
|
||||
# https://raspberrypi.stackexchange.com/a/69721
|
||||
# On rpi4, if bluetooth is not disabled (like here), the device is /dev/ttyS0
|
||||
#dtoverlay=disable-bt
|
@@ -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
|
Reference in New Issue
Block a user