Commit Graph

34 Commits

Author SHA1 Message Date
Fabian Grünbichler
a32d7b9646 d/rules: build perf with python3
python2 is gone with bullseye

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-06-15 14:31:10 +02:00
Fabian Grünbichler
bec104985e build: keep unstripped kernel and module files
and put them into a new -dbgsym package for usage with
crash/kdump-tools/...

fixes #3465, and now allows to do the following (after installing
and configuring kdump-tools to collect kernel crash dumps) when the
system crashes:

  $ apt install pve-kernel-5.11.21-1-dbgsym
  $ crash /usr/lib/debug/boot/vmlinux-5.11.21-1-pve /var/crash/202106151236/dump.202106151236

  crash 7.2.9
  Copyright (C) 2002-2020  Red Hat, Inc.
  Copyright (C) 2004, 2005, 2006, 2010  IBM Corporation
  Copyright (C) 1999-2006  Hewlett-Packard Co
  Copyright (C) 2005, 2006, 2011, 2012  Fujitsu Limited
  Copyright (C) 2006, 2007  VA Linux Systems Japan K.K.
  Copyright (C) 2005, 2011  NEC Corporation
  Copyright (C) 1999, 2002, 2007  Silicon Graphics, Inc.
  Copyright (C) 1999, 2000, 2001, 2002  Mission Critical Linux, Inc.
  This program is free software, covered by the GNU General Public License,
  and you are welcome to change it and/or distribute copies of it under
  certain conditions.  Enter "help copying" to see the conditions.
  This program has absolutely no warranty.  Enter "help warranty" for details.

  GNU gdb (GDB) 7.6
  Copyright (C) 2013 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
  and "show warranty" for details.
  This GDB was configured as "x86_64-unknown-linux-gnu"...

  WARNING: kernel relocated [812MB]: patching 136336 gdb minimal_symbol values

        KERNEL: /usr/lib/debug/boot/vmlinux-5.11.21-1-pve
      DUMPFILE: /var/crash/202106151236/dump.202106151236  [PARTIAL DUMP]
          CPUS: 4
          DATE: Tue Jun 15 12:36:38 CEST 2021
        UPTIME: 00:06:21
  LOAD AVERAGE: 0.04, 0.11, 0.08
         TASKS: 272
      NODENAME: test
       RELEASE: 5.11.21-1-pve
       VERSION: #1 SMP PVE 5.11.21-1 (Tue, 01 Jun 2021 16:38:57 +0200)
       MACHINE: x86_64  (3696 Mhz)
        MEMORY: 8 GB
         PANIC: "Kernel panic - not syncing: sysrq triggered crash"
           PID: 3167
       COMMAND: "bash"
          TASK: ffff9220c8f5be00  [THREAD_INFO: ffff9220c8f5be00]
           CPU: 3
         STATE: TASK_RUNNING (PANIC)

  crash> bt
  PID: 3167   TASK: ffff9220c8f5be00  CPU: 3   COMMAND: "bash"
   #0 [ffffa24ec0bfbc80] machine_kexec at ffffffffb3c751f3
   #1 [ffffa24ec0bfbce0] __crash_kexec at ffffffffb3d61092
   #2 [ffffa24ec0bfbdb0] panic at ffffffffb47b769d
   #3 [ffffa24ec0bfbe30] sysrq_handle_crash at ffffffffb434da4a
   #4 [ffffa24ec0bfbe40] __handle_sysrq.cold at ffffffffb47e2cdc
   #5 [ffffa24ec0bfbe78] write_sysrq_trigger at ffffffffb434e3f8
   #6 [ffffa24ec0bfbe90] proc_reg_write at ffffffffb3fc09ea
   #7 [ffffa24ec0bfbeb0] vfs_write at ffffffffb3f143b6
   #8 [ffffa24ec0bfbee8] ksys_write at ffffffffb3f16b97
   #9 [ffffa24ec0bfbf28] __x64_sys_write at ffffffffb3f16c2a
  #10 [ffffa24ec0bfbf38] do_syscall_64 at ffffffffb480e868
  #11 [ffffa24ec0bfbf50] entry_SYSCALL_64_after_hwframe at ffffffffb4a0008c
      RIP: 00007f367f7baf33  RSP: 00007ffe6175dc98  RFLAGS: 00000246
      RAX: ffffffffffffffda  RBX: 0000000000000002  RCX: 00007f367f7baf33
      RDX: 0000000000000002  RSI: 0000560510e640b0  RDI: 0000000000000001
      RBP: 0000560510e640b0   R8: 000000000000000a   R9: 0000000000000001
      R10: 0000560510e5f800  R11: 0000000000000246  R12: 0000000000000002
      R13: 00007f367f88b6a0  R14: 0000000000000002  R15: 00007f367f88b8a0
      ORIG_RAX: 0000000000000001  CS: 0033  SS: 002b

as well as lots of other fun things (see 'help' after opening a crash dump).

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-06-15 14:31:10 +02:00
Thomas Lamprecht
ad95515783 d/rules: headers compile: run modules_prepare copy scripts & includes after
The prepare/compile/install targets feel a bit mixed, so it's not
100% clear where this should happen.

But as the `.headers_compile_mark` already triggers various kernel
build targets with a correct kconfig setup, it is a good fit to add
the modules_prepare step (which is recommended to use when preparing
a out-of-three (OOT) module build environment like dkms expects)
there. As we can only copy (= install) the `scripts` directory
afterwards it follows that it needs to be moved afterwards. Moving
installing the `include` directory there is not really necessary but
it feels like a better place than the _prepare_ target and safes a
extra line, so move that over too.

In terms of actual changes to the built header package we get
additionally the, now generated, module.lds file.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-12 16:39:37 +02:00
Thomas Lamprecht
56ae0a75e1 d/rules: headers: remove any .cmd files from the kbuild system
Those files are generated by the `if_changed` macro from
scripts/Kbuild.include and are not really useful or interesting for
being shipped in the header packages and other distros (checked
Debian and Ubuntu) do not seem to ship those at all..

So, lets prune them to reduce shipped files dramatically, without
losing, well, anything.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-12 16:39:37 +02:00
Thomas Lamprecht
68996764bb d/rules: disable CONFIG_SYSTEM_TRUSTED_KEYS config
we do not use module signing currently.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
(cherry picked from commit 77470417db)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-03-02 13:44:02 +01:00
Stoiko Ivanov
dd717c04b0 add zzstd.ko to zfs install
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2021-01-13 14:16:31 +01:00
Fabian Grünbichler
f6d3198e5d fix #2814: config: disable lockdown
since it prevents boot with our current way of building ZFS modules in
case a system is booted with secureboot enabled.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-06-22 14:36:45 +02:00
Thomas Lamprecht
924ae54c14 add pve-kernel-libc-dev headers package
This was long overdue, allows to access the full feature set of our
kernel for some tools using the Linux API directly.

Packaging mostly taken from Debian[0]

[0]: https://salsa.debian.org/kernel-team/linux/-/blob/debian/4.19.118-2/debian/rules.real#L367

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-By: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-05-28 14:07:11 +02:00
Thomas Lamprecht
ee4a13eac3 d/rules: enable CIFS_SMB_DIRECT
requested by
https://forum.proxmox.com/threads/any-reason-why-cifs_smb_direct-is-disabled-in-pve-kernels-cifs-module.69925/
and as it's now marked as stable I'd say we can enable it

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-19 15:46:27 +02:00
Thomas Lamprecht
bdeaa74c3a config: make vfio-pci and {x,e,o,u}hci modules
Since 5.4 Ubuntu makes vfio-pci builtin to allow vfio-pci to be bound
to certain devices during boot, preventing other drivers from binding
them. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1770845

Part of why this was done was because it mirrored Arch Linux choice
in the past, but there where some issues and Arch Linux went back to
modules again but this time making xhci_hcd and similar ?hci systems
modules too. Tries to mirror the values used in the current Arch
Linux config [0].

[0]: https://git.archlinux.org/svntogit/packages.git/tree/trunk/config?h=packages/linux&id=96121a8d6468c7067eb3759f6ca5e82f5f914f38

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-13 16:28:05 +02:00
Thomas Lamprecht
b481f89770 disable alsa snd pcspkr module
The PC speaker (beeper) can only be managed by one module, and there
are two which could do so. The very basic INPUT_PCSPKR, and the more
advanced SND_PCSP which allows it to be used as primitive ALSA
soundcard, which for Proxmox Server projects, and all modern
workstations is not much of use.

As they both were aliased to the "pcspkr" module name, and used the
same internal driver name (being a replacment of the other), one
would get the following error message when both are loaded:
"Error: Driver 'pcspkr' is already registered, aborting..."
in the kernel log. This happens as by default both are tried to get
loaded. We do not want the more complex ALSA one, so disable that.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-12 15:31:10 +01:00
Thomas Lamprecht
eb6667c98c fix #2448: compile ISO8859-1 NLS as built-in
Allows to mount VFAT devices even if the currently running kernel was
removed before any VFAT, or other FS using the default Native
Language Support module was mounted during the current uptime.

This then could break updating the ESP partitions, which are mounted
with VFAT in a postrm triggered step - so at a time where the current
/lib/modules/... was already removed, and so the NLS could not get
loaded.

While there are a lot of different NLS, our kernel config has:
> CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"

So compile that module as built-in.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-05 12:08:29 +01:00
Thomas Lamprecht
ef257cb1b2 config: enable CONFIG_HYPERV
mostly for the PMG as it could run in a HyperV based hypervisor

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-20 11:04:37 +02:00
Stoiko Ivanov
1de1353133 adapt debian/rules to ZFS 0.8 structure
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2019-05-24 14:59:47 +02:00
Thomas Lamprecht
d6d2efea0c replace obsoleted 'silentoldconfig' kernel make target with 'syncconfig'
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-22 15:42:57 +02:00
Thomas Lamprecht
1e51973430 use in tree igb and e1000 module for now
the current OOT are not compatible with 5.0 and we want to obsolete
them anyway sooner or later

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-22 15:42:57 +02:00
Thomas Lamprecht
b5e86998ea use intree NIC driver for 10G IXGBE drivers
no problems had been reported with it, in contrary to igb and e1000e
so use the newer and better supported in tree driver.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-07-04 15:42:14 +02:00
Thomas Lamprecht
515973635b renenable out-of-tree intel ethernet driver (e1000e, igb, ixgbe)
There where just to much issues with the 4.15 in tree drivers for our
users [1]. The updated igb and ixgbe drivers are compatible with
4.15, the e1000e driver needed to be ported to the new internal
kernel timer API, which is pretty straight forward.

[1]: https://forum.proxmox.com/threads/4-15-based-test-kernel-for-pve-5-x-available.42097/page-5

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-06-08 11:58:18 +02:00
Thomas Lamprecht
73cf4c7faf d/control: automatically replace linux tools maj.min version
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-05-30 08:25:19 +02:00
Stoiko Ivanov
875f9e81f4 d/rules: don't remove perf.1 manpage
the one in linux-base refers to the versioned one

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2018-05-30 08:24:21 +02:00
Stoiko Ivanov
86c0946a20 d/rules: add version to perf man pages
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2018-05-30 08:24:16 +02:00
Stoiko Ivanov
5fd5ec0e77 refactor variable names and remove hardcoded major.minor version
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2018-05-30 08:24:13 +02:00
Fabian Grünbichler
d72363003b build: refactor header build
to also include tools and scripts like objtool, which are now needed for
external module building

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2018-05-09 13:12:07 +02:00
Fabian Grünbichler
7cbdd0b90d d/rules: check for accidental perf linkage
with libraries that are not GPL-2-only compatible, fix previously typoed
variable, and add build-dep on libiberty-dev for CPLUS demangling.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2018-04-25 13:27:39 +02:00
Fabian Grünbichler
29917645ac d/rules: install perf man pages
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2018-04-25 07:20:24 +02:00
Fabian Grünbichler
7f6fc591c9 d/rules: don't strip headers package
we don't want to debug the contained helper binaries ;)

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2018-04-25 07:20:24 +02:00
Fabian Grünbichler
7a315510b5 d/rules: reformat header collection
for better readability and to reduce future churn

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2018-04-25 07:20:24 +02:00
Fabian Grünbichler
4062c10346 scripts/abi-check: don't fail after ABI bump
this allows automatically running abi-check in non-fatal mode if an ABI
bump has just been done.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2018-03-22 11:12:48 +01:00
Fabian Grünbichler
40af2e3b0f d/scripts/abi-generate: add new helper script
and use it in d/rules to generate the checked ABI file.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2018-03-22 11:12:48 +01:00
Fabian Grünbichler
2454b79d7a switch to in-tree intel drivers
as the out-of-tree ones are not compatible with 4.15
2018-03-09 15:28:03 +01:00
Fabian Grünbichler
1e99f45be0 build: replace 4.13 with 4.15
as well as artful with bionic, and reset KREL/PKGREL accordingly
2018-03-09 14:47:21 +01:00
Fabian Grünbichler
66aed5b89f build: remove exported variables
in favor of generated rules.d snippet. this allows calling
dpkg-buildpackage in the build directory manually without setting up the
environment to match.
2018-03-09 11:56:22 +01:00
Fabian Grünbichler
e96d2ab3a1 build: move build and packaging to debian/
the top-level Makefile now only prepares the build directory by copying
and patching sources and generating the real files from debian/*.in

the actual build and packaging happens in debian/rules
2018-03-09 09:19:58 +01:00
Fabian Grünbichler
2d62d8a400 build: move/merge files
the control files were merged as appropriate, the rest are plain
renames.
2018-03-09 09:19:58 +01:00