1
0
mirror of https://github.com/systemd/systemd synced 2024-07-08 20:15:55 +00:00
Commit Graph

11 Commits

Author SHA1 Message Date
Daan De Meyer
cbe7778f4c mkosi: Don't disable CONFIG_USB
Having USB enabled seems useful enough, this wasn't doing anything
regardless because we already enable CONFIG_USB earlier in the kconfig
file so this just gets rid of warning.
2023-09-06 12:58:30 +02:00
Daan De Meyer
ac82e7acbc mkosi: Enable two more kernel configs
Required for some bpf selftests so let's enable these in our config.
2023-09-06 11:39:39 +01:00
Sven Joachim
b4e8c6d972 mkosi: set CONFIG_AUTOFS_FS rather than CONFIG_AUTOFS4_FS
Since Linux 4.18 CONFIG_AUTOFS4_FS just enables CONFIG_AUTOFS_FS, its
description in fs/autofs/Kconfig reads:

	   This name exists for people to just automatically pick up the
	   new name of the autofs Kconfig option. All it does is select
	   the new option name.

	   It will go away in a release or two as people have
	   transitioned to just plain AUTOFS_FS.
2023-07-29 11:18:25 +01:00
Daan De Meyer
33d960cbed mkosi: Make sure we build custom kernels with EROFS support 2023-06-13 15:42:17 +02:00
Stefan Roesch
85614c6e2f add support for KSM
This adds support for KSM (kernel samepage merging). It adds a new
boolean parameter called MemoryKSM to enable the feature. The feature
can only be enabled with newer kernels.
2023-06-05 11:22:43 +02:00
Daan De Meyer
5ebf0b321f mkosi: Disable a bunch of useless configs when building a kernel
Let's speed up the kernel build a bit by disabling some stuff we
don't use.
2023-05-04 19:05:12 +02:00
Daan De Meyer
bfb7635544 mkosi: Look for mkosi.kernel/ in the top level directory
Let's make this slightly easier to use by looking for mkosi.kernel/
in the top level directory instead of in mkosi.presets/20-final/.
2023-05-04 15:45:42 +02:00
Daan De Meyer
d052cc8893 mkosi: Switch to use mkosi presets with prebuilt initrds
Instead of building the initrds for the mkosi images with dracut,
let's switch to using mkosi presets to build the initrd with mkosi
as well.

This commit splits up our single image build into three separate
mkosi presets:

1. The "base" preset. This image contains systemd and all its runtime
dependencies. The sole purpose of this image is to serve as a base image
for the initrd and the final image. It's also responsible for building
systemd from source with the build script. The results are installed into
the base image. Note that we install the systemd and udev packages into this
image as well to prevent package managers from overriding the systemd we built
from source with the distro packaged systemd if it's pulled in as a dependency
by another package from the initrd or final profiles.
2. The "initrd" preset. This image provides the initrd. It's trivial and does
nothing more than packaging the base image up as a zstd compressed initramfs and
adds /init and /etc/initrd-release symlinks to the image.
3. The "final" preset. This image builds on top of the base image and adds
a kernel and extra packages that are useful for testing and debugging.

We also split out the optional kernel build into a separate set of config files
that are only included if a kernel to build is actually provided.

Note that this commit doesn't really change anything about how mkosi is used.
The commands remain the same, except that mkosi will now build all the presets
in order. "mkosi summary" will show the summary of all the presets. "mkosi qemu,
boot, shell" will always boot the final preset. With "-f", all presets will be
built and the final one is booted. "-i" makes a cache of each preset.

The only thing to keep in mind is that specifying config via the mkosi CLI will
apply to each of the presets. e.g. any extra packages added with "-p" will be
installed in both the initrd and the final image. To apply local configuration
to a single preset, create a file 00-local.conf in
mkosi.presets/<profile>/mkosi.conf.d and put all the preset specific configuration
in there.
2023-05-01 15:39:50 +02:00
Daan De Meyer
85a319b65c mkosi: Update bundled kconfig
- Remove useless serial console configs
- Add CONFIG_SERIAL_8250_PCI so that qemu's virtconsole works properly
- Add CONFIG_DMI and CONFIG_DMI_SYSFS so that SMBIOS credentials work
- Add CONFIG_IKCONFIG and CONFIG_IKCONFIG_PROC so we can read the
  current kernel config from /proc/config.gz
- Add CONFIG_IOSCHED_BFQ to get rid of a udev error on boot on Fedora
- Add CONFIG_HW_RANDOM_VIRTIO to get hw rng in qemu
- Add CONFIG_SECURITY_YAMA to get rid of warning from sysctl on boot
- Add CONFIG_VSOCKETS and CONFIG_VIRTIO_VSOCKETS to enable vsock support
2023-04-05 17:19:24 +02:00
Daan De Meyer
57db3399c3 mkosi: Enable CONFIG_ZBOOT
Required to boot mkosi images with systemd-boot on aarch64.
2022-12-13 21:27:15 +01:00
Daan De Meyer
37b56a79dc mkosi: Rework kconfig handling
Instead of relying on the arch specific kconfigs that enable all
kinds of options that are irrelevant for our use case, let's beef
up our own config a little so that we don't need to rely on the
arch specific configs anymore.

Also, instead of using scripts/config to enable options in the
mkosi build script, let's add a new kernel.config file that includes
all the configs we want enabled/disabled.

Finally, let's make sure we can properly run the bpf selftests by
making sure we enable all the right configs required to run the bpf
selftests successfully. We use the scripts/kconfig/merge_config.sh
script to merge the three different config files together.
2022-12-05 10:51:22 +01:00