mirror of
https://github.com/systemd/systemd.git
synced 2024-11-24 02:33:36 +08:00
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.
This commit is contained in:
parent
f6484e8503
commit
37b56a79dc
36
mkosi.build
36
mkosi.build
@ -284,38 +284,10 @@ if [ -d mkosi.kernel/ ]; then
|
||||
export KBUILD_BUILD_TIMESTAMP="Fri Jun 5 15:58:00 CEST 2015"
|
||||
export KBUILD_BUILD_HOST="mkosi"
|
||||
|
||||
make O="$BUILDDIR/mkosi.kernel" defconfig
|
||||
|
||||
scripts/config \
|
||||
--file "$BUILDDIR/mkosi.kernel/.config" \
|
||||
--enable BPF_SYSCALL \
|
||||
--enable BPF_JIT \
|
||||
--enable BPF_JIT_ALWAYS_ON \
|
||||
--enable BPF_JIT_DEFAULT_ON \
|
||||
--enable BPF_UNPRIV_DEFAULT_OFF \
|
||||
--enable USERMODE_DRIVER \
|
||||
--enable BPF_PRELOAD \
|
||||
--enable BPF_PRELOAD_UMD \
|
||||
--enable BPF_LSM \
|
||||
--enable DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT \
|
||||
--enable DEBUG_INFO_BTF \
|
||||
--enable BTRFS_FS \
|
||||
--enable BTRFS_FS_POSIX_ACL \
|
||||
--enable PSI \
|
||||
--enable CGROUPS \
|
||||
--enable CGROUP_BPF \
|
||||
--enable MEMCG \
|
||||
--enable MEMCG_SWAP \
|
||||
--enable MEMCG_KMEM \
|
||||
--enable IMA_ARCH_POLICY \
|
||||
--enable DM_VERITY_VERIFY_ROOTHASH_SIG \
|
||||
--enable DM_VERITY_VERIFY_ROOTHASH_SIG_SECONDARY_KEYRING \
|
||||
--enable INTEGRITY_MACHINE_KEYRING \
|
||||
--enable NETFILTER_ADVANCED \
|
||||
--enable NF_CONNTRACK_MARK
|
||||
|
||||
# Make sure all unset options are set to their default value.
|
||||
make O="$BUILDDIR/mkosi.kernel" olddefconfig
|
||||
scripts/kconfig/merge_config.sh -O "$BUILDDIR/mkosi.kernel" \
|
||||
../mkosi.kernel.config \
|
||||
tools/testing/selftests/bpf/config.x86_64 \
|
||||
tools/testing/selftests/bpf/config
|
||||
|
||||
make O="$BUILDDIR/mkosi.kernel" -j "$(nproc)"
|
||||
|
||||
|
200
mkosi.kernel.config
Normal file
200
mkosi.kernel.config
Normal file
@ -0,0 +1,200 @@
|
||||
# CONFIG_COMPAT_BRK is not set
|
||||
# CONFIG_LEGACY_PTYS is not set
|
||||
CONFIG_ATA=y
|
||||
CONFIG_AUTOFS4_FS=y
|
||||
CONFIG_BINFMT_MISC=y
|
||||
CONFIG_BLK_CGROUP_IOCOST=y
|
||||
CONFIG_BLK_CGROUP_IOLATENCY=y
|
||||
CONFIG_BLK_CGROUP_IOPRIO=y
|
||||
CONFIG_BLK_CGROUP=y
|
||||
CONFIG_BLK_DEV_DM=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
CONFIG_BLK_DEV_MD=y
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_BLK_DEV_SR=y
|
||||
CONFIG_BPF_EVENTS=y
|
||||
CONFIG_BPF_JIT=y
|
||||
CONFIG_BPF_LSM=y
|
||||
CONFIG_BPF_SYSCALL=y
|
||||
CONFIG_BPF=y
|
||||
CONFIG_BSD_PROCESS_ACCT=y
|
||||
CONFIG_BTRFS_FS_POSIX_ACL=y
|
||||
CONFIG_BTRFS_FS=y
|
||||
CONFIG_CFG80211=y
|
||||
CONFIG_CFS_BANDWIDTH=y
|
||||
CONFIG_CGROUP_BPF=y
|
||||
CONFIG_CGROUP_CPUACCT=y
|
||||
CONFIG_CGROUP_DEVICE=y
|
||||
CONFIG_CGROUP_FREEZER=y
|
||||
CONFIG_CGROUP_HUGETLB=y
|
||||
CONFIG_CGROUP_MISC=y
|
||||
CONFIG_CGROUP_NET_PRIO=y
|
||||
CONFIG_CGROUP_PERF=y
|
||||
CONFIG_CGROUP_PIDS=y
|
||||
CONFIG_CGROUP_RDMA=y
|
||||
CONFIG_CGROUP_SCHED=y
|
||||
CONFIG_CGROUPS=y
|
||||
CONFIG_CONNECTOR=y
|
||||
CONFIG_CPUSETS=y
|
||||
CONFIG_CRASH_DUMP=y
|
||||
CONFIG_DEBUG_INFO_BTF=y
|
||||
CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
|
||||
CONFIG_DEVTMPFS_MOUNT=y
|
||||
CONFIG_DEVTMPFS=y
|
||||
CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG_SECONDARY_KEYRING=y
|
||||
CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG=y
|
||||
CONFIG_DM_VERITY=y
|
||||
CONFIG_EFI_MIXED=y
|
||||
CONFIG_EFI_STUB=y
|
||||
CONFIG_EFI=y
|
||||
CONFIG_EXPERT=y
|
||||
CONFIG_EXT4_FS_POSIX_ACL=y
|
||||
CONFIG_EXT4_FS_SECURITY=y
|
||||
CONFIG_EXT4_FS=y
|
||||
CONFIG_HIBERNATION=y
|
||||
CONFIG_HIDRAW=y
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
CONFIG_HOTPLUG_PCI=y
|
||||
CONFIG_HPET=y
|
||||
CONFIG_HUGETLBFS=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HYPERVISOR_GUEST=y
|
||||
CONFIG_IMA_APPRAISE=y
|
||||
CONFIG_IMA_ARCH_POLICY=y
|
||||
CONFIG_IMA=y
|
||||
CONFIG_INET=y
|
||||
CONFIG_INET6_AH=y
|
||||
CONFIG_INET6_ESP=y
|
||||
CONFIG_INPUT_EVDEV=y
|
||||
CONFIG_INPUT_MISC=y
|
||||
CONFIG_INTEGRITY_ASYMMETRIC_KEYS=y
|
||||
CONFIG_INTEGRITY_MACHINE_KEYRING=y
|
||||
CONFIG_INTEGRITY_PLATFORM_KEYRING=y
|
||||
CONFIG_INTEGRITY_SIGNATURE=y
|
||||
CONFIG_IP_ADVANCED_ROUTER=y
|
||||
CONFIG_IP_MULTICAST=y
|
||||
CONFIG_IP_MULTIPLE_TABLES=y
|
||||
CONFIG_IP_NF_FILTER=y
|
||||
CONFIG_IP_NF_IPTABLES=y
|
||||
CONFIG_IP_NF_MANGLE=y
|
||||
CONFIG_IP_NF_TARGET_REJECT=y
|
||||
CONFIG_IP_PNP_BOOTP=y
|
||||
CONFIG_IP_PNP_DHCP=y
|
||||
CONFIG_IP_PNP=y
|
||||
CONFIG_IP_ROUTE_MULTIPATH=y
|
||||
CONFIG_IP_ROUTE_VERBOSE=y
|
||||
CONFIG_IP6_NF_FILTER=y
|
||||
CONFIG_IP6_NF_IPTABLES=y
|
||||
CONFIG_IP6_NF_MANGLE=y
|
||||
CONFIG_IP6_NF_TARGET_REJECT=y
|
||||
CONFIG_ISO9660_FS=y
|
||||
CONFIG_KEXEC=y
|
||||
CONFIG_KPROBES=y
|
||||
CONFIG_LOAD_UEFI_KEYS=y
|
||||
CONFIG_MAC80211=y
|
||||
CONFIG_MAGIC_SYSRQ=y
|
||||
CONFIG_MD=y
|
||||
CONFIG_MEMCG_KMEM=y
|
||||
CONFIG_MEMCG=y
|
||||
CONFIG_MICROCODE_AMD=y
|
||||
CONFIG_MODULE_FORCE_UNLOAD=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_MSDOS_FS=y
|
||||
CONFIG_NAMESPACES=y
|
||||
CONFIG_NET_9P_VIRTIO=y
|
||||
CONFIG_NET_9P=y
|
||||
CONFIG_NET_CLS_ACT=y
|
||||
CONFIG_NET_CLS_CGROUP=y
|
||||
CONFIG_NET_EMATCH=y
|
||||
CONFIG_NET_SCHED=y
|
||||
CONFIG_NET=y
|
||||
CONFIG_NETCONSOLE=y
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_NETFILTER_ADVANCED=y
|
||||
CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y
|
||||
CONFIG_NETFILTER_XT_MATCH_POLICY=y
|
||||
CONFIG_NETFILTER_XT_MATCH_STATE=y
|
||||
CONFIG_NETFILTER_XT_TARGET_MASQUERADE=y
|
||||
CONFIG_NETFILTER_XT_TARGET_NFLOG=y
|
||||
CONFIG_NETFILTER_XT_TARGET_TCPMSS=y
|
||||
CONFIG_NETFILTER=y
|
||||
CONFIG_NETLABEL=y
|
||||
CONFIG_NF_CONNTRACK_FTP=y
|
||||
CONFIG_NF_CONNTRACK_IRC=y
|
||||
CONFIG_NF_CONNTRACK_SIP=y
|
||||
CONFIG_NF_CONNTRACK=y
|
||||
CONFIG_NF_CT_NETLINK=y
|
||||
CONFIG_NF_NAT=y
|
||||
CONFIG_NLS_ASCII=y
|
||||
CONFIG_NLS_CODEPAGE_437=y
|
||||
CONFIG_NLS_DEFAULT="utf8"
|
||||
CONFIG_NLS_ISO8859_1=y
|
||||
CONFIG_NLS_UTF8=y
|
||||
CONFIG_NO_HZ_FULL=y
|
||||
CONFIG_NUMA=y
|
||||
CONFIG_NVRAM=y
|
||||
CONFIG_PACKET=y
|
||||
CONFIG_PARAVIRT=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCIEPORTBUS=y
|
||||
CONFIG_PERF_EVENTS=y
|
||||
CONFIG_PM_DEBUG=y
|
||||
CONFIG_PM_TRACE_RTC=y
|
||||
CONFIG_POSIX_MQUEUE=y
|
||||
CONFIG_PRINTK_TIME=y
|
||||
CONFIG_PROC_KCORE=y
|
||||
CONFIG_PROFILING=y
|
||||
CONFIG_PSI=y
|
||||
CONFIG_QUOTA_NETLINK_INTERFACE=y
|
||||
CONFIG_QUOTA=y
|
||||
CONFIG_RFKILL=y
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_SATA_AHCI=y
|
||||
CONFIG_SCSI_CONSTANTS=y
|
||||
CONFIG_SCSI_SPI_ATTRS=y
|
||||
CONFIG_SCSI_VIRTIO=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_SECONDARY_TRUSTED_KEYRING=y
|
||||
CONFIG_SECURITY_NETWORK=y
|
||||
CONFIG_SECURITY=y
|
||||
CONFIG_SERIAL_8250_CONSOLE=y
|
||||
CONFIG_SERIAL_8250_DETECT_IRQ=y
|
||||
CONFIG_SERIAL_8250_EXTENDED=y
|
||||
CONFIG_SERIAL_8250_MANY_PORTS=y
|
||||
CONFIG_SERIAL_8250_NR_UARTS=32
|
||||
CONFIG_SERIAL_8250_RSA=y
|
||||
CONFIG_SERIAL_8250_SHARE_IRQ=y
|
||||
CONFIG_SERIAL_8250=y
|
||||
CONFIG_SERIAL_NONSTANDARD=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_SWAP=y
|
||||
CONFIG_SYSTEM_BLACKLIST_KEYRING=y
|
||||
CONFIG_SYSVIPC=y
|
||||
CONFIG_TMPFS_POSIX_ACL=y
|
||||
CONFIG_TMPFS_XATTR=y
|
||||
CONFIG_TMPFS=y
|
||||
CONFIG_UNIX=y
|
||||
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_MON=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_UHCI_HCD=y
|
||||
CONFIG_USB_XHCI_HCD=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USER_NS=y
|
||||
CONFIG_VFAT_FS=y
|
||||
CONFIG_VIRTIO_BLK=y
|
||||
CONFIG_VIRTIO_CONSOLE=y
|
||||
CONFIG_VIRTIO_INPUT=y
|
||||
CONFIG_VIRTIO_NET=y
|
||||
CONFIG_VIRTIO_PCI=y
|
||||
CONFIG_WATCHDOG=y
|
||||
CONFIG_X86_ACPI_CPUFREQ=y
|
||||
CONFIG_X86_CPUID=y
|
||||
CONFIG_X86_MSR=y
|
||||
CONFIG_XFRM_USER=y
|
||||
CONFIG_XFS_FS=y
|
||||
CONFIG_XFS_POSIX_ACL=y
|
Loading…
Reference in New Issue
Block a user