Initfs features are in profiles
This commit is contained in:
parent
b1da6a47d6
commit
83d07e4b9a
@ -87,6 +87,7 @@ provisioners = [
|
|||||||
"SVCS={{user `svcs`}}"
|
"SVCS={{user `svcs`}}"
|
||||||
"KERNEL_MODS={{user `kernel_modules`}}"
|
"KERNEL_MODS={{user `kernel_modules`}}"
|
||||||
"KERNEL_OPTS={{user `kernel_options`}}"
|
"KERNEL_OPTS={{user `kernel_options`}}"
|
||||||
|
"INITFS_FEATURES={{user `initfs_features`}}"
|
||||||
]
|
]
|
||||||
use_env_var_file = "true"
|
use_env_var_file = "true"
|
||||||
execute_command = "sudo sh -c '. {{.EnvVarFile}} && {{.Path}}'"
|
execute_command = "sudo sh -c '. {{.EnvVarFile}} && {{.Path}}'"
|
||||||
|
@ -91,3 +91,9 @@ kernel_options {
|
|||||||
"console=ttyS0" = true
|
"console=ttyS0" = true
|
||||||
"console=tty0" = true
|
"console=tty0" = true
|
||||||
}
|
}
|
||||||
|
# NOTE: nvme and ena are critical for i3, a1, m6g, and anything in the 5 series
|
||||||
|
# forward. Without them these instances will not boot.
|
||||||
|
initfs_features {
|
||||||
|
nvme = true
|
||||||
|
ena = true
|
||||||
|
}
|
||||||
|
@ -487,13 +487,14 @@ class ConfigBuilder:
|
|||||||
self.out_dir = out_dir
|
self.out_dir = out_dir
|
||||||
|
|
||||||
self._keys_to_transform = {
|
self._keys_to_transform = {
|
||||||
"kernel_modules" : self.fold_comma,
|
"kernel_modules" : self.fold_comma,
|
||||||
"kernel_options" : self.fold_space,
|
"kernel_options" : self.fold_space,
|
||||||
"repos" : self.fold_repos,
|
"initfs_features" : self.fold_space,
|
||||||
"pkgs" : self.fold_packages,
|
"repos" : self.fold_repos,
|
||||||
"svcs" : self.fold_services,
|
"pkgs" : self.fold_packages,
|
||||||
"revision" : self.resolve_now,
|
"svcs" : self.fold_services,
|
||||||
"end_of_life" : lambda x: \
|
"revision" : self.resolve_now,
|
||||||
|
"end_of_life" : lambda x: \
|
||||||
self.force_iso_date(self.resolve_tomorrow(x)),
|
self.force_iso_date(self.resolve_tomorrow(x)),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -158,10 +158,7 @@ setup_mdev() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
create_initfs() {
|
create_initfs() {
|
||||||
# Enable ENA and NVME features these don't hurt for any instance and are
|
sed -Ei "s/^features=\"([^\"]+)\"/features=\"\1 $INITFS_FEATURES\"/" \
|
||||||
# hard requirements of the 5 series and i3 series of instances
|
|
||||||
# TODO: profile-ize?
|
|
||||||
sed -Ei 's/^features="([^"]+)"/features="\1 nvme ena"/' \
|
|
||||||
"$TARGET/etc/mkinitfs/mkinitfs.conf"
|
"$TARGET/etc/mkinitfs/mkinitfs.conf"
|
||||||
|
|
||||||
chroot "$TARGET" /sbin/mkinitfs $(basename $(find "$TARGET/lib/modules/"* -maxdepth 0))
|
chroot "$TARGET" /sbin/mkinitfs $(basename $(find "$TARGET/lib/modules/"* -maxdepth 0))
|
||||||
|
Loading…
Reference in New Issue
Block a user