From 3646ff57cba3e60de522c19661891ed7b17e5329 Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Wed, 4 Feb 2015 19:53:26 +0100 Subject: [PATCH] linux3.18: add debugging package. --- srcpkgs/linux3.18-dbg | 1 + srcpkgs/linux3.18/files/i386-dotconfig | 101 +++++++++++++++++++++-- srcpkgs/linux3.18/files/mv-debug | 7 ++ srcpkgs/linux3.18/files/x86_64-dotconfig | 19 +++-- srcpkgs/linux3.18/template | 34 ++++++-- 5 files changed, 140 insertions(+), 22 deletions(-) create mode 120000 srcpkgs/linux3.18-dbg create mode 100755 srcpkgs/linux3.18/files/mv-debug diff --git a/srcpkgs/linux3.18-dbg b/srcpkgs/linux3.18-dbg new file mode 120000 index 00000000000..c45ad57a19b --- /dev/null +++ b/srcpkgs/linux3.18-dbg @@ -0,0 +1 @@ +linux3.18 \ No newline at end of file diff --git a/srcpkgs/linux3.18/files/i386-dotconfig b/srcpkgs/linux3.18/files/i386-dotconfig index 2072f7e1939..7f0787d1965 100644 --- a/srcpkgs/linux3.18/files/i386-dotconfig +++ b/srcpkgs/linux3.18/files/i386-dotconfig @@ -199,6 +199,7 @@ CONFIG_SGETMASK_SYSCALL=y CONFIG_SYSFS_SYSCALL=y # CONFIG_SYSCTL_SYSCALL is not set CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y @@ -221,6 +222,7 @@ CONFIG_HAVE_PERF_EVENTS=y # Kernel Performance Events And Counters # CONFIG_PERF_EVENTS=y +# CONFIG_DEBUG_PERF_USE_VMALLOC is not set CONFIG_VM_EVENT_COUNTERS=y CONFIG_SLUB_DEBUG=y # CONFIG_COMPAT_BRK is not set @@ -233,12 +235,13 @@ CONFIG_OPROFILE=m CONFIG_OPROFILE_EVENT_MULTIPLEX=y CONFIG_HAVE_OPROFILE=y CONFIG_OPROFILE_NMI_TIMER=y -# CONFIG_KPROBES is not set +CONFIG_KPROBES=y # CONFIG_JUMP_LABEL is not set # CONFIG_UPROBES is not set # CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y CONFIG_ARCH_USE_BUILTIN_BSWAP=y +CONFIG_KRETPROBES=y CONFIG_USER_RETURN_NOTIFIER=y CONFIG_HAVE_IOREMAP_PROT=y CONFIG_HAVE_KPROBES=y @@ -301,9 +304,7 @@ CONFIG_MODULE_SIG_ALL=y # CONFIG_MODULE_SIG_SHA384 is not set CONFIG_MODULE_SIG_SHA512=y CONFIG_MODULE_SIG_HASH="sha512" -CONFIG_MODULE_COMPRESS=y -CONFIG_MODULE_COMPRESS_GZIP=y -# CONFIG_MODULE_COMPRESS_XZ is not set +# CONFIG_MODULE_COMPRESS is not set CONFIG_STOP_MACHINE=y CONFIG_BLOCK=y CONFIG_LBDAF=y @@ -376,6 +377,7 @@ CONFIG_IOSF_MBI=m CONFIG_SCHED_OMIT_FRAME_POINTER=y CONFIG_HYPERVISOR_GUEST=y CONFIG_PARAVIRT=y +# CONFIG_PARAVIRT_DEBUG is not set # CONFIG_PARAVIRT_SPINLOCKS is not set CONFIG_XEN=y CONFIG_XEN_DOM0=y @@ -440,6 +442,7 @@ CONFIG_SCHED_MC=y # CONFIG_PREEMPT_VOLUNTARY is not set CONFIG_PREEMPT=y CONFIG_PREEMPT_COUNT=y +CONFIG_X86_UP_APIC_MSI=y CONFIG_X86_LOCAL_APIC=y CONFIG_X86_IO_APIC=y CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y @@ -511,6 +514,7 @@ CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y CONFIG_CLEANCACHE=y CONFIG_FRONTSWAP=y CONFIG_CMA=y +# CONFIG_CMA_DEBUG is not set CONFIG_CMA_AREAS=7 CONFIG_ZSWAP=y CONFIG_ZPOOL=y @@ -690,6 +694,7 @@ CONFIG_PCIEASPM=y CONFIG_PCIEASPM_PERFORMANCE=y CONFIG_PCIE_PME=y CONFIG_PCI_MSI=y +# CONFIG_PCI_DEBUG is not set CONFIG_PCI_REALLOC_ENABLE_AUTO=y CONFIG_PCI_STUB=m CONFIG_XEN_PCIDEV_FRONTEND=m @@ -1180,7 +1185,14 @@ CONFIG_INET_DCCP_DIAG=m CONFIG_IP_DCCP_CCID3=y # CONFIG_IP_DCCP_CCID3_DEBUG is not set CONFIG_IP_DCCP_TFRC_LIB=y + +# +# DCCP Kernel Hacking +# +# CONFIG_IP_DCCP_DEBUG is not set +CONFIG_NET_DCCPPROBE=m CONFIG_IP_SCTP=m +CONFIG_NET_SCTPPROBE=m # CONFIG_SCTP_DBG_OBJCNT is not set # CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5 is not set CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1=y @@ -1328,6 +1340,7 @@ CONFIG_NET_FLOW_LIMIT=y # Network testing # # CONFIG_NET_PKTGEN is not set +CONFIG_NET_TCPPROBE=y # CONFIG_HAMRADIO is not set # CONFIG_CAN is not set CONFIG_IRDA=m @@ -1510,6 +1523,8 @@ CONFIG_EXTRA_FIRMWARE="" CONFIG_FW_LOADER_USER_HELPER=y # CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set CONFIG_ALLOW_DEV_COREDUMP=y +# CONFIG_DEBUG_DRIVER is not set +# CONFIG_DEBUG_DEVRES is not set CONFIG_SYS_HYPERVISOR=y # CONFIG_GENERIC_CPU_DEVICES is not set CONFIG_GENERIC_CPU_AUTOPROBE=y @@ -1540,7 +1555,7 @@ CONFIG_MTD_AR7_PARTS=m # User Modules And Translation Layers # CONFIG_MTD_BLKDEVS=m -# CONFIG_MTD_BLOCK is not set +CONFIG_MTD_BLOCK=m # CONFIG_MTD_BLOCK_RO is not set # CONFIG_FTL is not set # CONFIG_NFTL is not set @@ -1584,7 +1599,7 @@ CONFIG_MTD_CFI_I2=y # CONFIG_MTD_DATAFLASH is not set # CONFIG_MTD_SST25L is not set # CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set +CONFIG_MTD_PHRAM=m # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLOCK2MTD is not set @@ -3125,6 +3140,7 @@ CONFIG_I2C_VIPERBOARD=m # CONFIG_I2C_DEBUG_ALGO is not set # CONFIG_I2C_DEBUG_BUS is not set CONFIG_SPI=y +# CONFIG_SPI_DEBUG is not set CONFIG_SPI_MASTER=y # @@ -3198,12 +3214,14 @@ CONFIG_PINCTRL=y # # Pin controllers # +# CONFIG_DEBUG_PINCTRL is not set CONFIG_PINCTRL_BAYTRAIL=y CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y CONFIG_GPIOLIB=y CONFIG_GPIO_DEVRES=y CONFIG_GPIO_ACPI=y CONFIG_GPIOLIB_IRQCHIP=y +# CONFIG_DEBUG_GPIO is not set CONFIG_GPIO_SYSFS=y CONFIG_GPIO_GENERIC=m CONFIG_GPIO_DA9052=m @@ -5187,6 +5205,7 @@ CONFIG_TAHVO_USB=m # CONFIG_TAHVO_USB_HOST_BY_DEFAULT is not set CONFIG_USB_ISP1301=m CONFIG_USB_GADGET=m +# CONFIG_USB_GADGET_DEBUG is not set # CONFIG_USB_GADGET_DEBUG_FILES is not set # CONFIG_USB_GADGET_DEBUG_FS is not set CONFIG_USB_GADGET_VBUS_DRAW=2 @@ -6436,6 +6455,7 @@ CONFIG_NFSD_V2_ACL=y CONFIG_NFSD_V3=y CONFIG_NFSD_V3_ACL=y CONFIG_NFSD_V4=y +# CONFIG_NFSD_FAULT_INJECTION is not set CONFIG_GRACE_PERIOD=m CONFIG_LOCKD=m CONFIG_LOCKD_V4=y @@ -6545,56 +6565,105 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y # CONFIG_PRINTK_TIME=y CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4 +# CONFIG_BOOT_PRINTK_DELAY is not set CONFIG_DYNAMIC_DEBUG=y # # Compile-time checks and compiler options # +CONFIG_DEBUG_INFO=y +# CONFIG_DEBUG_INFO_REDUCED is not set +# CONFIG_DEBUG_INFO_SPLIT is not set +# CONFIG_DEBUG_INFO_DWARF4 is not set # CONFIG_ENABLE_WARN_DEPRECATED is not set # CONFIG_ENABLE_MUST_CHECK is not set CONFIG_FRAME_WARN=1024 CONFIG_STRIP_ASM_SYMS=y +# CONFIG_READABLE_ASM is not set # CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_FS=y # CONFIG_HEADERS_CHECK is not set # CONFIG_DEBUG_SECTION_MISMATCH is not set CONFIG_ARCH_WANT_FRAME_POINTERS=y # CONFIG_FRAME_POINTER is not set +# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set CONFIG_MAGIC_SYSRQ=y CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1 -# CONFIG_DEBUG_KERNEL is not set +CONFIG_DEBUG_KERNEL=y # # Memory Debugging # +# CONFIG_DEBUG_PAGEALLOC is not set +# CONFIG_DEBUG_OBJECTS is not set # CONFIG_SLUB_DEBUG_ON is not set # CONFIG_SLUB_STATS is not set CONFIG_HAVE_DEBUG_KMEMLEAK=y +# CONFIG_DEBUG_KMEMLEAK is not set +# CONFIG_DEBUG_STACK_USAGE is not set +# CONFIG_DEBUG_VM is not set +# CONFIG_DEBUG_VIRTUAL is not set CONFIG_DEBUG_MEMORY_INIT=y +# CONFIG_DEBUG_PER_CPU_MAPS is not set +# CONFIG_DEBUG_HIGHMEM is not set CONFIG_HAVE_DEBUG_STACKOVERFLOW=y +# CONFIG_DEBUG_STACKOVERFLOW is not set CONFIG_HAVE_ARCH_KMEMCHECK=y +# CONFIG_KMEMCHECK is not set +# CONFIG_DEBUG_SHIRQ is not set # # Debug Lockups and Hangs # +# CONFIG_LOCKUP_DETECTOR is not set +# CONFIG_DETECT_HUNG_TASK is not set # CONFIG_PANIC_ON_OOPS is not set CONFIG_PANIC_ON_OOPS_VALUE=0 CONFIG_PANIC_TIMEOUT=0 +# CONFIG_SCHED_DEBUG is not set +# CONFIG_SCHEDSTATS is not set +# CONFIG_SCHED_STACK_END_CHECK is not set +# CONFIG_TIMER_STATS is not set +# CONFIG_DEBUG_PREEMPT is not set # # Lock Debugging (spinlocks, mutexes, etc...) # -# CONFIG_STACKTRACE is not set +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_MUTEXES is not set +# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_PROVE_LOCKING is not set +# CONFIG_LOCK_STAT is not set +# CONFIG_DEBUG_ATOMIC_SLEEP is not set +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +# CONFIG_LOCK_TORTURE_TEST is not set +CONFIG_STACKTRACE=y +# CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y +# CONFIG_DEBUG_LIST is not set +# CONFIG_DEBUG_PI_LIST is not set +# CONFIG_DEBUG_SG is not set +# CONFIG_DEBUG_NOTIFIERS is not set +# CONFIG_DEBUG_CREDENTIALS is not set # # RCU Debugging # # CONFIG_SPARSE_RCU_POINTER is not set # CONFIG_TORTURE_TEST is not set +# CONFIG_RCU_TORTURE_TEST is not set CONFIG_RCU_CPU_STALL_TIMEOUT=60 # CONFIG_RCU_CPU_STALL_VERBOSE is not set +# CONFIG_RCU_CPU_STALL_INFO is not set +# CONFIG_RCU_TRACE is not set +# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set +# CONFIG_NOTIFIER_ERROR_INJECTION is not set +# CONFIG_FAULT_INJECTION is not set +# CONFIG_LATENCYTOP is not set CONFIG_ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS=y +# CONFIG_DEBUG_STRICT_USER_COPY_CHECKS is not set CONFIG_USER_STACKTRACE_SUPPORT=y CONFIG_HAVE_FUNCTION_TRACER=y CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y @@ -6614,6 +6683,12 @@ CONFIG_TRACING_SUPPORT=y # Runtime Testing # CONFIG_LKDTM=m +# CONFIG_TEST_LIST_SORT is not set +# CONFIG_KPROBES_SANITY_TEST is not set +# CONFIG_BACKTRACE_SELF_TEST is not set +# CONFIG_RBTREE_TEST is not set +# CONFIG_INTERVAL_TREE_TEST is not set +# CONFIG_PERCPU_TEST is not set # CONFIG_ATOMIC64_SELFTEST is not set CONFIG_ASYNC_RAID6_TEST=m CONFIG_TEST_STRING_HELPERS=m @@ -6628,15 +6703,21 @@ CONFIG_TEST_KSTRTOX=m # CONFIG_TEST_UDELAY is not set # CONFIG_SAMPLES is not set CONFIG_HAVE_ARCH_KGDB=y +# CONFIG_KGDB is not set CONFIG_STRICT_DEVMEM=y CONFIG_X86_VERBOSE_BOOTUP=y CONFIG_EARLY_PRINTK=y # CONFIG_EARLY_PRINTK_DBGP is not set CONFIG_EARLY_PRINTK_EFI=y +# CONFIG_X86_PTDUMP is not set +# CONFIG_DEBUG_RODATA is not set CONFIG_DEBUG_SET_MODULE_RONX=y +# CONFIG_DEBUG_NX_TEST is not set CONFIG_DOUBLEFAULT=y +# CONFIG_DEBUG_TLBFLUSH is not set # CONFIG_IOMMU_STRESS is not set CONFIG_HAVE_MMIOTRACE_SUPPORT=y +# CONFIG_X86_DECODER_SELFTEST is not set CONFIG_IO_DELAY_TYPE_0X80=0 CONFIG_IO_DELAY_TYPE_0XED=1 CONFIG_IO_DELAY_TYPE_UDELAY=2 @@ -6646,7 +6727,11 @@ CONFIG_IO_DELAY_0X80=y # CONFIG_IO_DELAY_UDELAY is not set # CONFIG_IO_DELAY_NONE is not set CONFIG_DEFAULT_IO_DELAY_TYPE=0 +# CONFIG_DEBUG_BOOT_PARAMS is not set +# CONFIG_CPA_DEBUG is not set # CONFIG_OPTIMIZE_INLINING is not set +# CONFIG_DEBUG_NMI_SELFTEST is not set +# CONFIG_X86_DEBUG_STATIC_CPU_HAS is not set # # Security options diff --git a/srcpkgs/linux3.18/files/mv-debug b/srcpkgs/linux3.18/files/mv-debug new file mode 100755 index 00000000000..542bab5d889 --- /dev/null +++ b/srcpkgs/linux3.18/files/mv-debug @@ -0,0 +1,7 @@ +#!/bin/sh +mod=$1 +mkdir -p usr/lib/debug/${mod%/*} +$OBJCOPY --only-keep-debug --compress-debug-sections $mod usr/lib/debug/$mod +$OBJCOPY --add-gnu-debuglink=${DESTDIR}/usr/lib/debug/$mod $mod +$STRIP --strip-debug $mod +gzip -9 $mod diff --git a/srcpkgs/linux3.18/files/x86_64-dotconfig b/srcpkgs/linux3.18/files/x86_64-dotconfig index 64afccb3e6b..c30a574087f 100644 --- a/srcpkgs/linux3.18/files/x86_64-dotconfig +++ b/srcpkgs/linux3.18/files/x86_64-dotconfig @@ -320,9 +320,7 @@ CONFIG_MODULE_SIG_ALL=y # CONFIG_MODULE_SIG_SHA384 is not set CONFIG_MODULE_SIG_SHA512=y CONFIG_MODULE_SIG_HASH="sha512" -CONFIG_MODULE_COMPRESS=y -CONFIG_MODULE_COMPRESS_GZIP=y -# CONFIG_MODULE_COMPRESS_XZ is not set +# CONFIG_MODULE_COMPRESS is not set CONFIG_STOP_MACHINE=y CONFIG_BLOCK=y CONFIG_BLK_DEV_BSG=y @@ -1189,9 +1187,9 @@ CONFIG_IP_DCCP_TFRC_LIB=y # DCCP Kernel Hacking # # CONFIG_IP_DCCP_DEBUG is not set -# CONFIG_NET_DCCPPROBE is not set +CONFIG_NET_DCCPPROBE=m CONFIG_IP_SCTP=m -# CONFIG_NET_SCTPPROBE is not set +CONFIG_NET_SCTPPROBE=m # CONFIG_SCTP_DBG_OBJCNT is not set # CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5 is not set CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1=y @@ -1340,7 +1338,7 @@ CONFIG_NET_FLOW_LIMIT=y # Network testing # # CONFIG_NET_PKTGEN is not set -# CONFIG_NET_TCPPROBE is not set +CONFIG_NET_TCPPROBE=m # CONFIG_NET_DROP_MONITOR is not set # CONFIG_HAMRADIO is not set # CONFIG_CAN is not set @@ -1556,7 +1554,7 @@ CONFIG_MTD_AR7_PARTS=m # User Modules And Translation Layers # CONFIG_MTD_BLKDEVS=m -# CONFIG_MTD_BLOCK is not set +CONFIG_MTD_BLOCK=m # CONFIG_MTD_BLOCK_RO is not set # CONFIG_FTL is not set # CONFIG_NFTL is not set @@ -1600,7 +1598,7 @@ CONFIG_MTD_CFI_I2=y # CONFIG_MTD_DATAFLASH is not set # CONFIG_MTD_SST25L is not set # CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set +CONFIG_MTD_PHRAM=m # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLOCK2MTD is not set @@ -6540,7 +6538,10 @@ CONFIG_DYNAMIC_DEBUG=y # # Compile-time checks and compiler options # -# CONFIG_DEBUG_INFO is not set +CONFIG_DEBUG_INFO=y +# CONFIG_DEBUG_INFO_REDUCED is not set +# CONFIG_DEBUG_INFO_SPLIT is not set +# CONFIG_DEBUG_INFO_DWARF4 is not set # CONFIG_ENABLE_WARN_DEPRECATED is not set # CONFIG_ENABLE_MUST_CHECK is not set CONFIG_FRAME_WARN=1024 diff --git a/srcpkgs/linux3.18/template b/srcpkgs/linux3.18/template index 2ae788d4926..7c040d6a86f 100644 --- a/srcpkgs/linux3.18/template +++ b/srcpkgs/linux3.18/template @@ -2,7 +2,7 @@ # pkgname=linux3.18 version=3.18.5 -revision=1 +revision=2 wrksrc="linux-${version}" maintainer="Juan RP " homepage="http://www.kernel.org" @@ -15,6 +15,8 @@ _kernver="${version}_${revision}" nostrip=yes noverifyrdeps=yes +noshlibprovides=yes +nodebug=yes preserve=yes only_for_archs="i686 i686-musl x86_64 x86_64-musl" makedepends="bc perl kmod>=11_2 libressl-openssl" @@ -77,11 +79,8 @@ do_install() { x86_64*) arch=x86_64;; esac - # Run depmod after compressing modules. - sed -i '2iexit 0' scripts/depmod.sh - # Install kernel, firmware and modules - make ${makejobs} INSTALL_MOD_PATH=${DESTDIR} modules_install + make ${makejobs} INSTALL_MOD_PATH=${DESTDIR} DEPMOD=no modules_install hdrdest=${DESTDIR}/usr/src/kernel-headers-${_kernver} @@ -202,6 +201,16 @@ do_install() { rm -rf ${hdrdest}/arch/${arch} done + # Extract debugging symbols + msg_normal "$pkgver: extracting debug info, please wait...\n" + install -Dm644 vmlinux ${DESTDIR}/usr/lib/debug/boot/vmlinux-${_kernver} + ( + cd ${DESTDIR} + export DESTDIR + find ./ -name '*.ko' -print0 | \ + xargs -0r -n1 -P ${XBPS_MAKEJOBS} ${FILESDIR}/mv-debug + ) + # ... and run depmod again. depmod -b ${DESTDIR}/usr -F System.map ${_kernver} } @@ -210,9 +219,24 @@ linux3.18-headers_package() { preserve=yes nostrip=yes noverifyrdeps=yes + noshlibprovides=yes short_desc+=" - source headers for 3rd party modules" pkg_install() { vmove usr/src vmove usr/lib/modules/${_kernver}/build } } + +linux3.18-dbg_package() { + preserve=yes + nostrip=yes + noverifyrdeps=yes + noshlibprovides=yes + nodebug=yes + repository=debug + short_dest+=" - debugging symbols" + pkg_install() { + vmove usr/lib/debug + } +} +