From 3ffed28eb50713e7896c82dec76dc3c534194ae6 Mon Sep 17 00:00:00 2001 From: Jianping Liu Date: Wed, 25 Sep 2024 11:41:07 +0800 Subject: [PATCH] dist,Makefile: generic-debug config only build kernel rpm We intend to archive kernle-debug rpm in yum. Release kernel will build perf/tools/bpf-tools rpm, to avoid kernle-debug build the same rpm, disable them. Signed-off-by: Jianping Liu --- dist/Makefile | 9 ++ dist/configs/50variant/debug/aarch64.config | 17 --- dist/configs/50variant/debug/default.config | 129 +------------------- dist/configs/50variant/debug/x86_64.config | 9 -- kernel/configs/debug.config | 64 ++++++++++ 5 files changed, 74 insertions(+), 154 deletions(-) delete mode 100644 dist/configs/50variant/debug/aarch64.config mode change 100644 => 120000 dist/configs/50variant/debug/default.config delete mode 100644 dist/configs/50variant/debug/x86_64.config create mode 100644 kernel/configs/debug.config diff --git a/dist/Makefile b/dist/Makefile index f2d2ac0ae0af..e46b14a17c35 100644 --- a/dist/Makefile +++ b/dist/Makefile @@ -95,6 +95,15 @@ RPM_BUILDROOTDIR := $(RPM_TOPDIR)/BUILDROOT DEFAULT_DISABLED= DEFAULT_ENABLED= +# Automatically disable non core package for non standard build, such as eks/cloudgame +ifneq ($(CONFIG),generic-release) +override DEFAULT_DISABLED := ofed $(DEFAULT_DISABLED) +endif +# generic-debug only build kernel rpm, disable other rpms +ifeq ($(CONFIG),generic-debug) +override DEFAULT_DISABLED:= bpftool perf tools headers keypkg doc $(DEFAULT_DISABLED) +endif + ## A few shortcut for commonly used params: # Disable KABI check by default KABI=0 diff --git a/dist/configs/50variant/debug/aarch64.config b/dist/configs/50variant/debug/aarch64.config deleted file mode 100644 index 88c8ed1ce096..000000000000 --- a/dist/configs/50variant/debug/aarch64.config +++ /dev/null @@ -1,17 +0,0 @@ -CONFIG_DEBUG_PERF_USE_VMALLOC=y -# CONFIG_DEBUG_VM is not set -CONFIG_DEVMEM=y -# CONFIG_IP_VS_DEBUG is not set -CONFIG_KASAN=y -CONFIG_KASAN_GENERIC=y -# CONFIG_KASAN_HW_TAGS is not set -CONFIG_KASAN_INLINE=y -CONFIG_KDB_DEFAULT_ENABLE=0x1 -# CONFIG_LOCK_STAT is not set -CONFIG_MAILBOX_TEST=m -CONFIG_PANIC_ON_OOPS=y -CONFIG_PANIC_ON_OOPS_VALUE=1 -CONFIG_PERCPU_TEST=m -# CONFIG_RANDOM32_SELFTEST is not set -CONFIG_SPI_DEBUG=y -CONFIG_WQ_WATCHDOG=y diff --git a/dist/configs/50variant/debug/default.config b/dist/configs/50variant/debug/default.config deleted file mode 100644 index 243704601619..000000000000 --- a/dist/configs/50variant/debug/default.config +++ /dev/null @@ -1,128 +0,0 @@ -CONFIG_ACPI_APEI_ERST_DEBUG=m -CONFIG_LOCALVERSION="+debug" -CONFIG_ACPI_CONFIGFS=m -CONFIG_ACPI_CUSTOM_METHOD=m -CONFIG_ACPI_DEBUG=y -CONFIG_ACPI_DEBUGGER=y -CONFIG_ACPI_DEBUGGER_USER=m -CONFIG_ACPI_EC_DEBUGFS=m -CONFIG_ATH10K_DEBUG=y -CONFIG_ATH10K_TRACING=y -CONFIG_ATH_DEBUG=y -# CONFIG_BLK_DEV_NULL_BLK_FAULT_INJECTION is not set -CONFIG_CAN_DEBUG_DEVICES=y -CONFIG_CEPH_LIB_PRETTYDEBUG=y -CONFIG_CFG80211_DEBUGFS=y -CONFIG_CGROUP_DEBUG=y -CONFIG_CPUMASK_OFFSTACK=y -CONFIG_CRYPTO_DEV_CCP_DEBUGFS=y -CONFIG_CSD_LOCK_WAIT_DEBUG=y -CONFIG_DEBUG_ATOMIC_SLEEP=y -CONFIG_DEBUG_CREDENTIALS=y -CONFIG_DEBUG_IRQFLAGS=y -CONFIG_DEBUG_KMEMLEAK=y -CONFIG_DEBUG_KMEMLEAK_AUTO_SCAN=y -CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y -CONFIG_DEBUG_KMEMLEAK_MEM_POOL_SIZE=40000 -CONFIG_DEBUG_LOCK_ALLOC=y -CONFIG_DEBUG_MUTEXES=y -CONFIG_DEBUG_NOTIFIERS=y -CONFIG_DEBUG_OBJECTS=y -CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1 -CONFIG_DEBUG_OBJECTS_FREE=y -CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y -CONFIG_DEBUG_OBJECTS_RCU_HEAD=y -CONFIG_DEBUG_OBJECTS_TIMERS=y -CONFIG_DEBUG_OBJECTS_WORK=y -CONFIG_DEBUG_PAGEALLOC=y -# CONFIG_DEBUG_PAGEALLOC_ENABLE_DEFAULT is not set -CONFIG_DEBUG_PAGE_REF=y -CONFIG_DEBUG_PER_CPU_MAPS=y -CONFIG_DEBUG_PREEMPT=y -CONFIG_DEBUG_RT_MUTEXES=y -CONFIG_DEBUG_RWSEMS=y -CONFIG_DEBUG_SG=y -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_STACK_USAGE=y -CONFIG_DEBUG_VM=y -CONFIG_DEBUG_VM_PGTABLE=y -CONFIG_DEBUG_WW_MUTEX_SLOWPATH=y -CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 -CONFIG_DMABUF_DEBUG=y -CONFIG_DMADEVICES_DEBUG=y -CONFIG_DMADEVICES_VDEBUG=y -CONFIG_DMA_API_DEBUG=y -CONFIG_DMA_API_DEBUG_SG=y -CONFIG_EDAC_DEBUG=y -CONFIG_EXT4_DEBUG=y -CONFIG_FAILSLAB=y -# CONFIG_FAIL_FUNCTION is not set -CONFIG_FAIL_IO_TIMEOUT=y -CONFIG_FAIL_MAKE_REQUEST=y -CONFIG_FAIL_MMC_REQUEST=y -CONFIG_FAIL_PAGE_ALLOC=y -CONFIG_FAIL_SUNRPC=y -CONFIG_FAULT_INJECTION=y -CONFIG_FAULT_INJECTION_DEBUG_FS=y -CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y -CONFIG_FSCACHE_OBJECT_LIST=y -CONFIG_GENERIC_IRQ_DEBUGFS=y -CONFIG_I2C_GPIO_FAULT_INJECTOR=y -CONFIG_IOMMU_DEBUGFS=y -CONFIG_IP_VS_DEBUG=y -CONFIG_IWLWIFI_DEBUG=y -CONFIG_IWLWIFI_DEVICE_TRACING=y -CONFIG_KASAN_KUNIT_TEST=m -# CONFIG_KASAN_OUTLINE is not set -CONFIG_KASAN_VMALLOC=y -CONFIG_KDB_CONTINUE_CATASTROPHIC=0 -CONFIG_KPROBE_EVENT_GEN_TEST=m -CONFIG_LATENCYTOP=y -CONFIG_LOCKDEP_BITS=16 -CONFIG_LOCKDEP_CHAINS_BITS=17 -CONFIG_LOCKDEP_CIRCULAR_QUEUE_BITS=12 -CONFIG_LOCKDEP_STACK_TRACE_BITS=19 -CONFIG_LOCKDEP_STACK_TRACE_HASH_BITS=14 -CONFIG_LOCK_EVENT_COUNTS=y -CONFIG_LOCK_STAT=y -CONFIG_MAC80211_DEBUGFS=y -CONFIG_MAC80211_MESSAGE_TRACING=y -CONFIG_MMIOTRACE=y -CONFIG_NET_DEV_REFCNT_TRACKER=y -CONFIG_NET_NS_REFCNT_TRACKER=y -CONFIG_NFP_DEBUG=y -CONFIG_NOUVEAU_DEBUG_MMU=y -CONFIG_NOUVEAU_DEBUG_PUSH=y -CONFIG_PAGE_TABLE_CHECK=y -CONFIG_PAGE_TABLE_CHECK_ENFORCED=y -# CONFIG_PANIC_ON_OOPS is not set -CONFIG_PERCPU_STATS=y -CONFIG_PM_ADVANCED_DEBUG=y -CONFIG_PM_TEST_SUSPEND=y -CONFIG_PM_TRACE_RTC=y -CONFIG_PROVE_LOCKING=y -CONFIG_PTDUMP_DEBUGFS=y -CONFIG_QUOTA_DEBUG=y -CONFIG_RANDOM32_SELFTEST=y -CONFIG_RC_LOOPBACK=m -CONFIG_RTLWIFI_DEBUG=y -CONFIG_RTW88_DEBUG=y -CONFIG_RTW88_DEBUGFS=y -CONFIG_RTW89_DEBUGFS=y -CONFIG_RTW89_DEBUGMSG=y -CONFIG_SCF_TORTURE_TEST=m -CONFIG_SND_CTL_VALIDATION=y -CONFIG_SND_DEBUG=y -CONFIG_SND_JACK_INJECTION_DEBUG=y -CONFIG_SND_PCM_XRUN_DEBUG=y -CONFIG_SND_SOC_SOF_DEBUG_PROBES=y -CONFIG_SND_SOC_SOF_HDA_PROBES=y -CONFIG_SND_VERBOSE_PRINTK=y -CONFIG_SYNTH_EVENT_GEN_TEST=m -CONFIG_TEST_FPU=m -CONFIG_TEST_LIST_SORT=m -CONFIG_TEST_MIN_HEAP=m -CONFIG_TEST_STRING_HELPERS=m -# CONFIG_USB_XHCI_DBGCAP is not set -CONFIG_XFS_WARN=y -CONFIG_ZRAM_MEMORY_TRACKING=y diff --git a/dist/configs/50variant/debug/default.config b/dist/configs/50variant/debug/default.config new file mode 120000 index 000000000000..6b25899bfaa0 --- /dev/null +++ b/dist/configs/50variant/debug/default.config @@ -0,0 +1 @@ +../../../../kernel/configs/debug.config \ No newline at end of file diff --git a/dist/configs/50variant/debug/x86_64.config b/dist/configs/50variant/debug/x86_64.config deleted file mode 100644 index f981bef2062c..000000000000 --- a/dist/configs/50variant/debug/x86_64.config +++ /dev/null @@ -1,9 +0,0 @@ -CONFIG_HYPERV_TESTING=y -CONFIG_KASAN=y -CONFIG_KASAN_GENERIC=y -CONFIG_KASAN_INLINE=y -CONFIG_PM_SLEEP_DEBUG=y -# CONFIG_PM_TEST_SUSPEND is not set -CONFIG_USB_XHCI_DBGCAP=y -CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y -CONFIG_X86_DEBUG_FPU=y diff --git a/kernel/configs/debug.config b/kernel/configs/debug.config new file mode 100644 index 000000000000..bdab7e53514c --- /dev/null +++ b/kernel/configs/debug.config @@ -0,0 +1,64 @@ +CONFIG_LOCALVERSION="+debug" + +# CONFIG_MODULE_SIG_FORCE is not set + +CONFIG_KASAN=y +CONFIG_KASAN_GENERIC=y +CONFIG_KASAN_INLINE=y +# CONFIG_KASAN_OUTLINE is not set +CONFIG_KASAN_STACK=1 + +CONFIG_DEBUG_BUGVERBOSE=y +CONFIG_DEBUG_VM=y +CONFIG_DEBUG_SLAB=y +CONFIG_SLUB_DEBUG=y +CONFIG_SLUB_DEBUG_ON=y +CONFIG_DEBUG_PREEMPT=y +CONFIG_DEBUG_SPINLOCK=y +CONFIG_DEBUG_MUTEXES=y +CONFIG_DEBUG_RWSEMS=y +CONFIG_DEBUG_RT_MUTEXES=y +CONFIG_DEBUG_ATOMIC_SLEEP=y +CONFIG_DEBUG_KMEMLEAK=y +CONFIG_DEBUG_KMEMLEAK_MEM_POOL_SIZE=16000 +# CONFIG_DEBUG_KMEMLEAK_TEST is not set +CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y +# CONFIG_DEBUG_KMEMLEAK_AUTO_SCAN is not set +CONFIG_SCHED_STACK_END_CHECK=y +CONFIG_SOFTLOCKUP_DETECTOR=y +CONFIG_HARDLOCKUP_DETECTOR=y +CONFIG_DETECT_HUNG_TASK=y +CONFIG_SCHED_DEBUG=y +CONFIG_DEBUG_LIST=y +CONFIG_BUG_ON_DATA_CORRUPTION=y +CONFIG_DEBUG_NET=y +CONFIG_KCOV=y +CONFIG_UBSAN=y +CONFIG_KFENCE=y +CONFIG_PROVE_RCU_LIST=y +CONFIG_DEBUG_ENTRY=y +CONFIG_X86_DEBUG_FPU=y +CONFIG_CONFIG_STACKPROTECTOR=y +CONFIG_PAGE_TABLE_CHECK=y + +CONFIG_PM_ADVANCED_DEBUG=y +CONFIG_X86_DEBUG_FPU=y + +# CONFIG_PROVE_LOCKING is not set +# CONFIG_DEBUG_SG is not set +CONFIG_DEBUG_NOTIFIERS=y +CONFIG_DEBUG_PAGEALLOC=y + +CONFIG_KCOV_INSTRUMENT_ALL=y +CONFIG_KCOV_ENABLE_COMPARISONS=y +CONFIG_FAULT_INJECTION=y +CONFIG_FAULT_INJECTION_DEBUG_FS=y +CONFIG_FAILSLAB=y +CONFIG_FAIL_PAGE_ALLOC=y +CONFIG_FAIL_MAKE_REQUEST=y +CONFIG_FAIL_IO_TIMEOUT=y +CONFIG_FAIL_FUTEX=y +CONFIG_HW_RANDOM=y +CONFIG_HW_RANDOM_VIRTIO=y + +CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=600