我想将 Linux 内核源代码制作成 RPM 文件

我想将 Linux 内核源代码制作成 RPM 文件

我目前使用的是 Rocky Linux 8.7。当前内核版本是“4.18.0-425.13.1.el8_7.x86_64”。我想通过 RPM 升级内核,而不是源代码编译。在内核编译步骤中,使用命令“make rpm-pkg-j8”我听说你可以创建一个 RPM 文件。我想将内核升级到“5.4.180”。我这样做的方法如下。

sudo dnf -y groupinstall 'Development Tools'
sudo dnf -y install ncurses-devel openssl-devel elfutils-libelf-devel python3
sudo dnf config-manager --set-enabled powertools
sudo  dnf -y install dwarves
wget https://mirrors.edge.kernel.org/pub/linux/kernel/v5.x/linux-5.4.180.tar.gz
tar xvfz linux-5.4.180.tar.gz
cd linux-5.4.180
sudo cp -v /boot/config-$(uname -r) .config
make menuconfig
make rpm-pkg -j8

但是,出现以下错误。

make clean
sh ./scripts/package/mkspec >./kernel.spec
  TAR     kernel-5.4.180.tar.gz
rpmbuild  --target x86_64 -ta kernel-5.4.180.tar.gz \
--define='_smp_mflags %{nil}'
Building target platforms: x86_64
Building for target x86_64
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.bsgdJf
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd /root/rpmbuild/BUILD
+ rm -rf kernel-5.4.180
+ /usr/bin/gzip -dc /home/jpsysadmin/linux-5.4.180/kernel-5.4.180.tar.gz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd kernel-5.4.180
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.OiSlab
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd kernel-5.4.180
+ make KBUILD_BUILD_VERSION=1
...
  CC      certs/system_keyring.o
make[3]: *** No rule to make target 'certs/rocky.pem', needed by 'certs/x509_certificate_list'.  Stop.
make[3]: *** Waiting for unfinished jobs....
  CC      mm/filemap.o
  CC      arch/x86/entry/vdso/vdso32-setup.o
 ...
  CC      kernel/bpf/syscall.o
  VDSO    arch/x86/entry/vdso/vdso32.so.dbg
  OBJCOPY arch/x86/entry/vdso/vdso64.so
  OBJCOPY arch/x86/entry/vdso/vdso32.so
  VDSO2C  arch/x86/entry/vdso/vdso-image-64.c
  VDSO2C  arch/x86/entry/vdso/vdso-image-32.c
  CC      arch/x86/entry/vdso/vdso-image-64.o
  CC      arch/x86/entry/vdso/vdso-image-32.o
  AS      arch/x86/crypto/sha1_avx2_x86_64_asm.o
  CC      kernel/bpf/verifier.o
  AS      arch/x86/crypto/sha1_ni_asm.o
  AR      arch/x86/entry/vdso/built-in.a
  AS      arch/x86/crypto/sha256-ssse3-asm.o
  AS      arch/x86/crypto/sha256-avx-asm.o
  AS      arch/x86/crypto/sha256-avx2-asm.o
  CC      arch/x86/crypto/sha256_ssse3_glue.o
  AS      arch/x86/crypto/sha256_ni_asm.o
  CC      kernel/bpf/inode.o
  AR      init/built-in.a
  AS      arch/x86/crypto/sha512-ssse3-asm.o
  AS      arch/x86/crypto/sha512-avx-asm.o
  AS      arch/x86/crypto/sha512-avx2-asm.o
  AS      arch/x86/entry/entry_64_compat.o
  CC      arch/x86/crypto/sha512_ssse3_glue.o
  AS [M]  arch/x86/crypto/des3_ede-asm_64.o
  CC      arch/x86/entry/syscall_32.o
  CC      mm/mempool.o
  CC [M]  arch/x86/crypto/des3_ede_glue.o
  AR      arch/x86/entry/built-in.a
  CC      arch/x86/events/amd/core.o
  CC      kernel/bpf/helpers.o
  CC      mm/oom_kill.o
  CC      kernel/bpf/tnum.o
  AS [M]  arch/x86/crypto/camellia-x86_64-asm_64.o
  CC [M]  arch/x86/crypto/camellia_glue.o
  CC      kernel/bpf/hashtab.o
  CC      kernel/bpf/arraymap.o
  CC      mm/fadvise.o
  CC      kernel/bpf/percpu_freelist.o
  CC      arch/x86/events/amd/uncore.o
  AS [M]  arch/x86/crypto/blowfish-x86_64-asm_64.o
  CC      kernel/bpf/bpf_lru_list.o
  CC [M]  arch/x86/crypto/blowfish_glue.o
  CC      arch/x86/events/amd/ibs.o
  CC      kernel/bpf/lpm_trie.o
  CC      arch/x86/events/amd/iommu.o
  CC      kernel/bpf/map_in_map.o
  CC      kernel/bpf/local_storage.o
  CC      mm/maccess.o
  AS [M]  arch/x86/crypto/twofish-x86_64-asm_64.o
  CC [M]  arch/x86/crypto/twofish_glue.o
  CC      mm/page-writeback.o
  CC      kernel/bpf/queue_stack_maps.o
  AS [M]  arch/x86/crypto/twofish-x86_64-asm_64-3way.o
  CC [M]  arch/x86/crypto/twofish_glue_3way.o
  CC [M]  arch/x86/events/amd/power.o
  CC      mm/readahead.o
  CC      mm/swap.o
  AS [M]  arch/x86/crypto/chacha-ssse3-x86_64.o
  CC [M]  arch/x86/crypto/chacha_glue.o
  CC      kernel/bpf/disasm.o
  AS [M]  arch/x86/crypto/chacha-avx2-x86_64.o
  AS [M]  arch/x86/crypto/chacha-avx512vl-x86_64.o
  AS [M]  arch/x86/crypto/serpent-sse2-x86_64-asm_64.o
  CC [M]  arch/x86/crypto/serpent_sse2_glue.o
  AS [M]  arch/x86/crypto/ghash-clmulni-intel_asm.o
  CC      kernel/bpf/btf.o
  AR      arch/x86/events/amd/built-in.a
  CC      arch/x86/events/intel/core.o
  CC [M]  arch/x86/crypto/ghash-clmulni-intel_glue.o
  CC      kernel/bpf/devmap.o
  CC      mm/truncate.o
  CC [M]  arch/x86/crypto/crc32c-intel_glue.o
  AS [M]  arch/x86/crypto/crc32c-pcl-intel-asm_64.o
  AS [M]  arch/x86/crypto/crc32-pclmul_asm.o
  CC [M]  arch/x86/crypto/crc32-pclmul_glue.o
  AS [M]  arch/x86/crypto/crct10dif-pcl-asm_64.o
  CC      arch/x86/events/intel/bts.o
  CC      kernel/bpf/cpumap.o
  CC      kernel/bpf/xskmap.o
  CC      mm/vmscan.o
  CC [M]  arch/x86/crypto/crct10dif-pclmul_glue.o
  CC      kernel/bpf/offload.o
  CC      kernel/bpf/stackmap.o
  AS [M]  arch/x86/crypto/poly1305-sse2-x86_64.o
  CC      arch/x86/events/intel/ds.o
  CC [M]  arch/x86/crypto/poly1305_glue.o
  AS [M]  arch/x86/crypto/poly1305-avx2-x86_64.o
  CC      arch/x86/events/intel/knc.o
  CC      arch/x86/events/intel/lbr.o
  CC      kernel/bpf/cgroup.o
  CC      kernel/bpf/reuseport_array.o
  AS [M]  arch/x86/crypto/camellia-aesni-avx-asm_64.o
  CC [M]  arch/x86/crypto/camellia_aesni_avx_glue.o
  CC      arch/x86/events/intel/p4.o
  CC      arch/x86/events/intel/p6.o
  CC      arch/x86/events/intel/pt.o
  CC      kernel/bpf/sysfs_btf.o
  AS [M]  arch/x86/crypto/cast5-avx-x86_64-asm_64.o
  CC [M]  arch/x86/crypto/cast5_avx_glue.o
  AS [M]  arch/x86/crypto/cast6-avx-x86_64-asm_64.o
  CC      arch/x86/events/core.o
  CC [M]  arch/x86/events/intel/uncore.o
  CC [M]  arch/x86/events/intel/uncore_nhmex.o
  CC [M]  arch/x86/crypto/cast6_avx_glue.o
  CC [M]  arch/x86/events/intel/uncore_snb.o
  AR      kernel/bpf/built-in.a
  CC      kernel/cgroup/cgroup.o
  AS [M]  arch/x86/crypto/twofish-avx-x86_64-asm_64.o
  CC [M]  arch/x86/crypto/twofish_avx_glue.o
  CC      kernel/cgroup/rstat.o
  CC      kernel/cgroup/namespace.o
  CC [M]  arch/x86/events/intel/uncore_snbep.o
  CC      mm/shmem.o
  CC [M]  arch/x86/events/intel/cstate.o
  AS [M]  arch/x86/crypto/serpent-avx-x86_64-asm_64.o
  CC [M]  arch/x86/crypto/serpent_avx_glue.o
  CC      arch/x86/events/probe.o
  CC      kernel/cgroup/cgroup-v1.o
  CC      kernel/cgroup/freezer.o
  AR      arch/x86/events/intel/built-in.a
  LD [M]  arch/x86/events/intel/intel-cstate.o
  CC      kernel/cgroup/legacy_freezer.o
  CC      arch/x86/events/msr.o
  LD [M]  arch/x86/events/intel/intel-uncore.o
  CC [M]  arch/x86/events/rapl.o
  AS [M]  arch/x86/crypto/camellia-aesni-avx2-asm_64.o
  CC      kernel/cgroup/pids.o
  CC [M]  arch/x86/crypto/camellia_aesni_avx2_glue.o
  AS [M]  arch/x86/crypto/serpent-avx2-asm_64.o
  CC [M]  arch/x86/crypto/serpent_avx2_glue.o
  AR      arch/x86/events/built-in.a
  CC      kernel/cgroup/rdma.o
  CC      kernel/cgroup/cpuset.o
  LD [M]  arch/x86/crypto/des3_ede-x86_64.o
  CC      mm/util.o
  LD [M]  arch/x86/crypto/camellia-x86_64.o
  LD [M]  arch/x86/crypto/blowfish-x86_64.o
  LD [M]  arch/x86/crypto/twofish-x86_64.o
  LD [M]  arch/x86/crypto/twofish-x86_64-3way.o
  CC      mm/mmzone.o
  LD [M]  arch/x86/crypto/chacha-x86_64.o
  LD [M]  arch/x86/crypto/serpent-sse2-x86_64.o
  CC      arch/x86/hyperv/hv_init.o
  LD [M]  arch/x86/crypto/ghash-clmulni-intel.o
  LD [M]  arch/x86/crypto/crc32c-intel.o
  LD [M]  arch/x86/crypto/crc32-pclmul.o
  LD [M]  arch/x86/crypto/crct10dif-pclmul.o
  LD [M]  arch/x86/crypto/poly1305-x86_64.o
  LD [M]  arch/x86/crypto/camellia-aesni-avx-x86_64.o
  LD [M]  arch/x86/crypto/cast5-avx-x86_64.o
  LD [M]  arch/x86/crypto/cast6-avx-x86_64.o
  LD [M]  arch/x86/crypto/twofish-avx-x86_64.o
  LD [M]  arch/x86/crypto/serpent-avx-x86_64.o
  LD [M]  arch/x86/crypto/camellia-aesni-avx2.o
  LD [M]  arch/x86/crypto/serpent-avx2.o
  AR      arch/x86/crypto/built-in.a
  CC      arch/x86/ia32/sys_ia32.o
  CC      mm/vmstat.o
  CC [M]  arch/x86/kvm/../../../virt/kvm/kvm_main.o
  CC      arch/x86/kernel/acpi/boot.o
  CC      arch/x86/hyperv/mmu.o
  CC      arch/x86/ia32/ia32_signal.o
  CC      arch/x86/kernel/acpi/sleep.o
  CC      mm/backing-dev.o
  AS      arch/x86/kernel/acpi/wakeup_64.o
  CC      arch/x86/kernel/acpi/apei.o
  CC      arch/x86/kernel/acpi/cppc_msr.o
  AR      kernel/cgroup/built-in.a
  CC      kernel/debug/kdb/kdb_io.o
  CC      arch/x86/hyperv/nested.o
  CC      arch/x86/ia32/audit.o
  CC      mm/mm_init.o
  AR      arch/x86/ia32/built-in.a
  CC      arch/x86/mm/init.o
  CC      arch/x86/kernel/acpi/cstate.o
  CC      mm/mmu_context.o
  CC      mm/percpu.o
  CC      mm/slab_common.o
  CC      kernel/debug/kdb/kdb_main.o
  CC      arch/x86/hyperv/hv_apic.o
  AR      arch/x86/kernel/acpi/built-in.a
  CC      arch/x86/kernel/apic/apic.o
  CC      arch/x86/kernel/apic/apic_common.o
  CC      arch/x86/mm/init_64.o
  CC      arch/x86/kernel/apic/apic_noop.o
  CC      arch/x86/hyperv/hv_spinlock.o
  CC      arch/x86/kernel/apic/ipi.o
  CC [M]  arch/x86/kvm/../../../virt/kvm/coalesced_mmio.o
  AR      arch/x86/hyperv/built-in.a
  CC      kernel/debug/kdb/kdb_support.o
  CC [M]  arch/x86/kvm/../../../virt/kvm/eventfd.o
  CC      arch/x86/kernel/apic/vector.o
  CC      arch/x86/net/bpf_jit_comp.o
  CC      mm/compaction.o
  AR      arch/x86/platform/atom/built-in.a
  AR      arch/x86/platform/ce4100/built-in.a
  CC      arch/x86/platform/efi/quirks.o
  CC [M]  arch/x86/kvm/../../../virt/kvm/irqchip.o
  CC      arch/x86/mm/fault.o
  CC      kernel/debug/kdb/kdb_bt.o
  CC      arch/x86/kernel/apic/hw_nmi.o
  CC      arch/x86/kernel/apic/io_apic.o
  AR      arch/x86/net/built-in.a
  CC      arch/x86/platform/efi/efi.o
  CC      arch/x86/purgatory/purgatory.o
  CC      arch/x86/kernel/apic/msi.o
  GENKDB  kernel/debug/kdb/gen-kdb_cmds.c
  CC [M]  arch/x86/kvm/../../../virt/kvm/vfio.o
  CC      kernel/debug/kdb/kdb_bp.o
  AS      arch/x86/purgatory/stack.o
  AS      arch/x86/purgatory/setup-x86_64.o
  CC      arch/x86/purgatory/sha256.o
  CC      arch/x86/mm/ioremap.o
  CC      kernel/debug/kdb/kdb_debugger.o
  CC      arch/x86/platform/efi/efi_64.o
  CC [M]  arch/x86/kvm/../../../virt/kvm/async_pf.o
  CC      mm/vmacache.o
  AS      arch/x86/purgatory/entry64.o
  CC      arch/x86/purgatory/string.o
  CC      arch/x86/realmode/init.o
  LD      arch/x86/purgatory/purgatory.ro
  BIN2C   arch/x86/purgatory/kexec-purgatory.c
  CC      arch/x86/purgatory/kexec-purgatory.o
  AR      arch/x86/purgatory/built-in.a
  AS      arch/x86/realmode/rm/header.o
  AS      arch/x86/realmode/rm/trampoline_64.o
  AS      arch/x86/realmode/rm/stack.o
  AS      arch/x86/realmode/rm/reboot.o
  CC [M]  arch/x86/kvm/x86.o
  CC      mm/interval_tree.o
  AS      arch/x86/realmode/rm/wakeup_asm.o
  CC      arch/x86/realmode/rm/wakemain.o
...
  CC      arch/x86/xen/mmu_hvm.o
  CC      arch/x86/platform/uv/uv_sysfs.o
  CC      arch/x86/platform/uv/uv_time.o
  CC      arch/x86/mm/setup_nx.o
  CC      arch/x86/mm/tlb.o
  CC      arch/x86/xen/suspend_hvm.o
  CC      arch/x86/mm/cpu_entry_area.o
  CC      arch/x86/platform/uv/uv_nmi.o
arch/x86/kernel/cpu/mce/core.o: warning: objtool: mce_timed_out()+0x63: unreachable instruction
  AR      kernel/dma/built-in.a
  CC [M]  arch/x86/kvm/mmu.o
  CC      arch/x86/xen/platform-pci-unplug.o
  CC      arch/x86/kernel/cpu/mce/severity.o
  CC      kernel/events/core.o
  CC      arch/x86/mm/pat_rbtree.o
  CC      arch/x86/kernel/cpu/mce/genpool.o
  AR      arch/x86/platform/uv/built-in.a
  CC      arch/x86/xen/trace.o
  CC      arch/x86/mm/hugetlbpage.o
  CC      mm/mincore.o
  AR      arch/x86/platform/built-in.a
  CC      arch/x86/kernel/cpu/mce/intel.o
  CC      arch/x86/mm/numa.o
  CC      arch/x86/mm/numa_64.o
  CC      arch/x86/mm/amdtopology.o
  CC      mm/mlock.o
  CC      arch/x86/mm/srat.o
  CC      arch/x86/kernel/cpu/mce/amd.o
  CC      arch/x86/mm/numa_emulation.o
  CC      arch/x86/kernel/cpu/mce/threshold.o
  CC      arch/x86/xen/smp.o
  CC      arch/x86/mm/pkeys.o
  CC      arch/x86/mm/kaslr.o
  CC      arch/x86/kernel/cpu/mce/therm_throt.o
  CC      mm/mmap.o
  CC      arch/x86/mm/pti.o
  CC      arch/x86/mm/mem_encrypt.o
  CC      arch/x86/mm/mem_encrypt_identity.o
  CC      arch/x86/xen/smp_hvm.o
  CC      arch/x86/xen/spinlock.o
  CC [M]  arch/x86/kvm/emulate.o
  CC      arch/x86/xen/pci-swiotlb-xen.o
  AS      arch/x86/mm/mem_encrypt_boot.o
  CC      arch/x86/kernel/cpu/mce/apei.o
  CC      kernel/events/ring_buffer.o
  CC      arch/x86/xen/efi.o
  CC      mm/mmu_gather.o
  AR      arch/x86/mm/built-in.a
  CC      arch/x86/kernel/cpu/mce/dev-mcelog.o
  AR      arch/x86/xen/built-in.a
  CC      mm/mprotect.o
  CC      kernel/events/callchain.o
  CC      kernel/events/hw_breakpoint.o
  CC      kernel/events/uprobes.o
  CC      mm/mremap.o
  CC      mm/msync.o
  CC      kernel/irq/irqdesc.o
  CC [M]  arch/x86/kernel/cpu/mce/inject.o
  CC      kernel/irq/handle.o
  CC      mm/page_vma_mapped.o
  CC      mm/pagewalk.o
  CC [M]  arch/x86/kvm/i8259.o
  AR      kernel/events/built-in.a
  CC      kernel/irq/manage.o
  AR      arch/x86/kernel/cpu/mce/built-in.a
  CC      mm/pgtable-generic.o
  CC      kernel/irq/spurious.o
  CC      kernel/livepatch/core.o
  LD [M]  arch/x86/kernel/cpu/mce/mce-inject.o
  CC      kernel/livepatch/patch.o
  CC      mm/rmap.o
  CC      arch/x86/kernel/cpu/microcode/core.o
  CC [M]  arch/x86/kvm/irq.o
  CC      arch/x86/kernel/cpu/microcode/intel.o
  CC      mm/vmalloc.o
  CC      kernel/livepatch/shadow.o
  CC      kernel/irq/resend.o
  CC      kernel/irq/chip.o
  CC      kernel/livepatch/transition.o
  CC      mm/process_vm_access.o
  CC [M]  arch/x86/kvm/lapic.o
  CC      kernel/irq/dummychip.o
  CC      arch/x86/kernel/cpu/microcode/amd.o
  CC      mm/page_alloc.o
  AR      kernel/livepatch/built-in.a
  CC      mm/shuffle.o
  CC      kernel/irq/devres.o
  CC      kernel/irq/autoprobe.o
  CC      kernel/locking/mutex.o
  AR      arch/x86/kernel/cpu/microcode/built-in.a
  CC      kernel/power/qos.o
  CC      mm/init-mm.o
  CC      kernel/irq/irqdomain.o
  CC      arch/x86/kernel/cpu/mtrr/mtrr.o
  CC      mm/memblock.o
  CC      mm/madvise.o
  CC      kernel/locking/semaphore.o
  CC [M]  arch/x86/kvm/i8254.o
  CC      arch/x86/kernel/cpu/mtrr/if.o
  CC      kernel/irq/proc.o
  CC      kernel/power/main.o
  CC      kernel/locking/rwsem.o
  CC      mm/page_io.o
  CC [M]  arch/x86/kvm/ioapic.o
  CC      arch/x86/kernel/cpu/mtrr/generic.o
  CC      kernel/irq/migration.o
  CC      mm/swap_state.o
  CC      kernel/locking/percpu-rwsem.o
  CC      kernel/irq/cpuhotplug.o
  CC      kernel/irq/pm.o
  CC [M]  arch/x86/kvm/irq_comm.o
  CC      kernel/power/console.o
  CC      kernel/locking/spinlock.o
  CC      mm/swapfile.o
  CC      kernel/irq/msi.o
  CC      arch/x86/kernel/cpu/mtrr/cleanup.o
  CC [M]  arch/x86/kvm/cpuid.o
  CC      kernel/power/process.o
  CC      kernel/locking/osq_lock.o
  CC      kernel/locking/qspinlock.o
  AR      arch/x86/kernel/cpu/mtrr/built-in.a
  CC      arch/x86/kernel/cpu/resctrl/core.o
  CC      kernel/locking/rtmutex.o
  CC      kernel/power/suspend.o
  CC      kernel/irq/affinity.o
  CC [M]  arch/x86/kvm/pmu.o
  CC [M]  arch/x86/kvm/mtrr.o
  CC      kernel/irq/matrix.o
  CC      arch/x86/kernel/cpu/resctrl/rdtgroup.o
  CC      kernel/locking/qrwlock.o
  CC [M]  kernel/locking/locktorture.o
  AR      kernel/locking/built-in.a
  CC [M]  arch/x86/kvm/hyperv.o
  CC      mm/swap_slots.o
  CC      kernel/power/hibernate.o
  CC [M]  arch/x86/kvm/page_track.o
  CC      kernel/printk/printk.o
  AR      kernel/irq/built-in.a
  CC [M]  arch/x86/kvm/debugfs.o
  CC      kernel/rcu/update.o
  CC      mm/frontswap.o
  CC      arch/x86/kernel/cpu/resctrl/monitor.o
  CC      kernel/rcu/sync.o
  CC [M]  arch/x86/kvm/vmx/vmx.o
  CC      kernel/rcu/srcutree.o
  CC      kernel/rcu/tree.o
  CC      kernel/power/snapshot.o
  CC      arch/x86/kernel/cpu/resctrl/ctrlmondata.o
  CC      mm/zswap.o
  AS [M]  arch/x86/kvm/vmx/vmenter.o
  CC      kernel/rcu/rcu_segcblist.o
  CC      arch/x86/kernel/cpu/resctrl/pseudo_lock.o
  CC      kernel/printk/printk_safe.o
  CC [M]  arch/x86/kvm/vmx/pmu_intel.o
  CC [M]  arch/x86/kvm/vmx/vmcs12.o
  AR      kernel/printk/built-in.a
  CC      kernel/sched/core.o
  CC      kernel/power/swap.o
  CC      mm/dmapool.o
  CC      kernel/sched/loadavg.o
  AR      arch/x86/kernel/cpu/resctrl/built-in.a
  CC      kernel/power/user.o
  CC      arch/x86/kernel/cpu/cacheinfo.o
  CC      kernel/power/poweroff.o
  CC      mm/hugetlb.o
  CC      kernel/power/energy_model.o
  CC      arch/x86/kernel/cpu/scattered.o
  CC      arch/x86/kernel/cpu/topology.o
  CC      kernel/sched/clock.o
  AR      kernel/rcu/built-in.a
  CC      kernel/time/time.o
  CC      arch/x86/kernel/cpu/common.o
  AR      kernel/power/built-in.a
  CC      kernel/trace/trace_clock.o
  CC      arch/x86/kernel/cpu/rdrand.o
  CC      arch/x86/kernel/cpu/match.o
  CC      kernel/trace/ftrace.o
  CC      arch/x86/kernel/cpu/bugs.o
  CC      kernel/sched/cputime.o
  CC      kernel/time/timer.o
  CC      arch/x86/kernel/cpu/aperfmperf.o
  CC [M]  arch/x86/kvm/vmx/evmcs.o
  CC [M]  arch/x86/kvm/vmx/nested.o
  CC      mm/mempolicy.o
  CC      arch/x86/kernel/cpu/cpuid-deps.o
  CC      kernel/sched/idle.o
  CC      arch/x86/kernel/cpu/umwait.o
  CC      kernel/sched/fair.o
  CC      arch/x86/kernel/cpu/proc.o
  MKCAP   arch/x86/kernel/cpu/capflags.c
  CC      kernel/time/hrtimer.o
  CC      arch/x86/kernel/cpu/powerflags.o
  CC      arch/x86/kernel/cpu/intel.o
  CC      kernel/trace/ring_buffer.o
  CC      arch/x86/kernel/cpu/intel_pconfig.o
  CC      kernel/sched/rt.o
  CC      mm/sparse.o
  CC      arch/x86/kernel/cpu/tsx.o
  CC      arch/x86/kernel/cpu/intel_epb.o
  CC      kernel/time/timekeeping.o
  CC      arch/x86/kernel/cpu/amd.o
  CC      mm/sparse-vmemmap.o
  CC [M]  arch/x86/kvm/svm.o
  CC      arch/x86/kernel/cpu/hygon.o
  CC      kernel/sched/deadline.o
  CC      mm/mmu_notifier.o
  CC      kernel/trace/trace.o
  CC      kernel/time/ntp.o
  CC      kernel/sched/wait.o
  CC      mm/ksm.o
  CC      kernel/time/clocksource.o
  CC      kernel/sched/wait_bit.o
  CC      kernel/time/jiffies.o
  CC      kernel/sched/swait.o
  CC      kernel/time/timer_list.o
  CC      kernel/time/timeconv.o
  CC      kernel/time/timecounter.o
  CC      kernel/time/alarmtimer.o
  CC      mm/page_poison.o
  CC      kernel/sched/completion.o
  CC [M]  arch/x86/kvm/pmu_amd.o
  LD [M]  arch/x86/kvm/kvm.o
  CC      kernel/sched/cpupri.o
  LD [M]  arch/x86/kvm/kvm-intel.o
  CC      mm/slub.o
  CC      mm/memory_hotplug.o
  CC      kernel/trace/trace_output.o
  CC      kernel/time/posix-timers.o
  LD [M]  arch/x86/kvm/kvm-amd.o
  CC      kernel/time/posix-cpu-timers.o
  CC      kernel/sched/cpudeadline.o
  CC      kernel/sched/topology.o
  CC      kernel/trace/trace_seq.o
  CC      kernel/time/posix-clock.o
  CC      kernel/time/itimer.o
  CC      kernel/time/clockevents.o
  CC      arch/x86/kernel/cpu/centaur.o
  CC      mm/migrate.o
  CC      kernel/time/tick-common.o
  CC      kernel/sched/stop_task.o
  CC      kernel/time/tick-broadcast.o
  CC      kernel/trace/trace_stat.o
  CC      mm/huge_memory.o
  CC      kernel/time/tick-broadcast-hrtimer.o
  CC      arch/x86/kernel/cpu/zhaoxin.o
  CC      kernel/time/tick-oneshot.o
  CC      arch/x86/kernel/cpu/perfctr-watchdog.o
  CC      kernel/trace/trace_printk.o
  CC      kernel/time/tick-sched.o
  CC      kernel/sched/pelt.o
  CC      kernel/time/vsyscall.o
  CC      kernel/time/timekeeping_debug.o
  CC      arch/x86/kernel/cpu/vmware.o
  CC      arch/x86/kernel/fpu/init.o
  CC      arch/x86/kernel/fpu/bugs.o
  CC      kernel/trace/tracing_map.o
  CC      arch/x86/kernel/cpu/hypervisor.o
  CC      kernel/sched/autogroup.o
  AR      kernel/time/built-in.a
  CC      arch/x86/kernel/cpu/mshyperv.o
  CC      kernel/fork.o
  CC      arch/x86/kernel/fpu/core.o
  CC      arch/x86/kernel/fpu/regset.o
  CC      arch/x86/kernel/fpu/signal.o
  CC      kernel/trace/trace_sched_switch.o
  CC      mm/khugepaged.o
  CC      arch/x86/kernel/cpu/capflags.o
  CC      arch/x86/kernel/fpu/xstate.o
  AR      arch/x86/kernel/cpu/built-in.a
  CC      arch/x86/kernel/kprobes/core.o
  CC      kernel/trace/trace_functions.o
  CC      kernel/sched/stats.o
  CC      kernel/sched/debug.o
  CC      kernel/sched/cpuacct.o
  CC      arch/x86/kernel/kprobes/opt.o
  CC      kernel/trace/trace_sched_wakeup.o
  CC      arch/x86/kernel/kprobes/ftrace.o
  CC      kernel/trace/trace_hwlat.o
  AR      arch/x86/kernel/fpu/built-in.a
  CC      kernel/trace/trace_nop.o
  CC      kernel/exec_domain.o
  CC      kernel/panic.o
  CC      mm/page_counter.o
  AR      arch/x86/kernel/kprobes/built-in.a
  CC      arch/x86/kernel/process_64.o
  CC      kernel/trace/trace_stack.o
  CC      kernel/trace/trace_functions_graph.o
  CC      kernel/sched/cpufreq.o
  CC      mm/memcontrol.o
  CC      kernel/cpu.o
  CC      kernel/exit.o
  CC      kernel/softirq.o
  CC      kernel/trace/blktrace.o
  CC      kernel/trace/fgraph.o
  CC      arch/x86/kernel/signal.o
  CC      kernel/sched/cpufreq_schedutil.o
kernel/exit.o: warning: objtool: __x64_sys_exit_group()+0x14: unreachable instruction
  CC      kernel/trace/trace_events.o
  CC      kernel/resource.o
  CC      kernel/sysctl.o
  CC      arch/x86/kernel/signal_compat.o
  CC      kernel/sysctl_binary.o
  CC      kernel/trace/trace_export.o
  CC      kernel/sched/membarrier.o
  CC      arch/x86/kernel/traps.o
  CC      kernel/capability.o
  CC      arch/x86/kernel/idt.o
  CC      kernel/trace/trace_syscalls.o
  CC      arch/x86/kernel/irq.o
  CC      kernel/sched/isolation.o
  CC      arch/x86/kernel/irq_64.o
  CC      arch/x86/kernel/dumpstack_64.o
  CC      kernel/ptrace.o
  CC      kernel/trace/trace_event_perf.o
  CC      kernel/user.o
  CC      kernel/signal.o
  CC      mm/vmpressure.o
  CC      arch/x86/kernel/time.o
  CC      kernel/sys.o
  CC      arch/x86/kernel/ioport.o
  CC      mm/swap_cgroup.o
  CC      kernel/sched/psi.o
  CC      arch/x86/kernel/dumpstack.o
  CC      kernel/trace/trace_events_filter.o
  CC      kernel/umh.o
  CC      arch/x86/kernel/nmi.o
  CC      mm/hugetlb_cgroup.o
  CC      arch/x86/kernel/ldt.o
  AR      kernel/sched/built-in.a
  CC      kernel/workqueue.o
  CC      mm/memory-failure.o
  CC      kernel/pid.o
  CC      arch/x86/kernel/setup.o
  CC      arch/x86/kernel/x86_init.o
  CC      kernel/trace/trace_events_trigger.o
  CC      kernel/task_work.o
  CC      kernel/extable.o
  CC      arch/x86/kernel/i8259.o
  CC      kernel/params.o
  CC      kernel/kthread.o
  CC      arch/x86/kernel/irqinit.o
  CC      kernel/trace/trace_events_hist.o
  CC      kernel/sys_ni.o
  CC      mm/page_owner.o
  CC      arch/x86/kernel/jump_label.o
  CC      arch/x86/kernel/irq_work.o
  CC      kernel/nsproxy.o
  CC      kernel/notifier.o
  CC      arch/x86/kernel/probe_roms.o
  CC      arch/x86/kernel/sys_x86_64.o
  CC      arch/x86/kernel/espfix_64.o
  CC      mm/cleancache.o
  CC      kernel/ksysfs.o
  CC      kernel/cred.o
  CC      mm/page_isolation.o
  CC      arch/x86/kernel/ksysfs.o
  CC      arch/x86/kernel/bootflag.o
  CC      kernel/reboot.o
  CC      mm/zpool.o
  CC      kernel/async.o
  CC      arch/x86/kernel/e820.o
  CC      arch/x86/kernel/pci-dma.o
  CC      kernel/range.o
  CC      mm/zbud.o
  CC      kernel/smpboot.o
  CC      mm/zsmalloc.o
  CC      kernel/ucount.o
  CC      kernel/trace/bpf_trace.o
  CC      kernel/kmod.o
  CC      arch/x86/kernel/quirks.o
  CC      mm/early_ioremap.o
  CC      mm/balloon_compaction.o
  CC      arch/x86/kernel/topology.o
  CC      kernel/groups.o
  CC      mm/page_ext.o
  CC      kernel/trace/trace_kprobe.o
  CC      kernel/trace/power-traces.o
  CC      arch/x86/kernel/kdebugfs.o
  CC      mm/userfaultfd.o
  CC      mm/page_idle.o
  CC      kernel/kcmp.o
  CC      kernel/freezer.o
  CC      kernel/trace/rpm-traces.o
  CC      arch/x86/kernel/alternative.o
  CC      mm/frame_vector.o
  CC      arch/x86/kernel/i8253.o
  CC      kernel/profile.o
  CC      mm/usercopy.o
  CC      kernel/trace/trace_kdb.o
  CC      arch/x86/kernel/hw_breakpoint.o
  CC      kernel/trace/trace_dynevent.o
  CC      kernel/trace/trace_probe.o
  CC      kernel/stacktrace.o
  CC      kernel/trace/trace_uprobe.o
  CC      arch/x86/kernel/tsc.o
  CC      mm/memremap.o
  CC      mm/hmm.o
  CC [M]  kernel/trace/ring_buffer_benchmark.o
  CC      mm/memfd.o
  CC      arch/x86/kernel/tsc_msr.o
  AR      kernel/trace/built-in.a
  CC      kernel/futex.o
  CC      kernel/dma.o
  CC      arch/x86/kernel/io_delay.o
  CC      arch/x86/kernel/rtc.o
  CC      kernel/smp.o
  CC      arch/x86/kernel/pci-iommu_table.o
  CC      arch/x86/kernel/resource.o
  AS      arch/x86/kernel/irqflags.o
  CC      arch/x86/kernel/process.o
  CC      arch/x86/kernel/ptrace.o
  CC [M]  mm/hwpoison-inject.o
  CC      kernel/uid16.o
  CC      kernel/module.o
  CC      arch/x86/kernel/tls.o
  CC      kernel/module_signing.o
  AR      mm/built-in.a
  CC      kernel/module_signature.o
  CC      arch/x86/kernel/step.o
  CC      kernel/kallsyms.o
  CC      kernel/acct.o
  CC      kernel/crash_core.o
  CC      arch/x86/kernel/tboot.o
  CC      kernel/kexec_core.o
  CC      arch/x86/kernel/i8237.o
  CC      arch/x86/kernel/stacktrace.o
  CC      arch/x86/kernel/reboot.o
  CC      kernel/kexec.o
  CC      kernel/kexec_file.o
  CC      kernel/compat.o
  CC      kernel/utsname.o
  CC      arch/x86/kernel/msr.o
  CC      kernel/user_namespace.o
  CC      kernel/pid_namespace.o
  CC      kernel/stop_machine.o
  CC      arch/x86/kernel/cpuid.o
  CC      arch/x86/kernel/early-quirks.o
  CC      arch/x86/kernel/smp.o
  CC      arch/x86/kernel/smpboot.o
  CC      arch/x86/kernel/tsc_sync.o
  CC      kernel/audit.o
  CC      kernel/auditfilter.o
  CC      kernel/auditsc.o
  CC      kernel/audit_watch.o
  CC      arch/x86/kernel/setup_percpu.o
  CC      arch/x86/kernel/mpparse.o
  CC      arch/x86/kernel/ftrace.o
  CC      arch/x86/kernel/livepatch.o
  CC      kernel/audit_fsnotify.o
  AS      arch/x86/kernel/ftrace_64.o
  CC      kernel/audit_tree.o
  CC      arch/x86/kernel/trace_clock.o
  CC      arch/x86/kernel/machine_kexec_64.o
  AS      arch/x86/kernel/relocate_kernel_64.o
  CC      arch/x86/kernel/crash.o
  CC      kernel/kprobes.o
  CC      kernel/hung_task.o
  CC      kernel/watchdog.o
  CC      kernel/watchdog_hld.o
  CC      kernel/seccomp.o
  CC      kernel/relay.o
  CC      arch/x86/kernel/kexec-bzimage64.o
  CC      arch/x86/kernel/crash_dump_64.o
  CC      arch/x86/kernel/module.o
  CC      kernel/utsname_sysctl.o
  CC      kernel/delayacct.o
  CC      arch/x86/kernel/doublefault.o
  CC      kernel/taskstats.o
  CC      arch/x86/kernel/kgdb.o
  CC      arch/x86/kernel/early_printk.o
  CC      arch/x86/kernel/hpet.o
  CC      kernel/tsacct.o
  CC      kernel/tracepoint.o
  CC      arch/x86/kernel/amd_nb.o
  CC      arch/x86/kernel/kvm.o
  CC      kernel/irq_work.o
  CC      kernel/user-return-notifier.o
  CC      arch/x86/kernel/kvmclock.o
  CC      arch/x86/kernel/paravirt.o
  CC      kernel/padata.o
  CC      arch/x86/kernel/paravirt_patch.o
  CC      kernel/crash_dump.o
  CC      arch/x86/kernel/paravirt-spinlocks.o
  CC      kernel/jump_label.o
  CC      arch/x86/kernel/pvclock.o
  CC      arch/x86/kernel/pmem.o
  CC      arch/x86/kernel/pcspeaker.o
  CC      arch/x86/kernel/check.o
  CC      arch/x86/kernel/pci-swiotlb.o
  CC      arch/x86/kernel/uprobes.o
  CC      kernel/context_tracking.o
  CC      arch/x86/kernel/sysfb.o
  CC      arch/x86/kernel/sysfb_efi.o
  CC      arch/x86/kernel/perf_regs.o
  CC      kernel/iomem.o
  CC      arch/x86/kernel/tracepoint.o
  CC      arch/x86/kernel/itmt.o
  CC      arch/x86/kernel/umip.o
  CC      arch/x86/kernel/unwind_orc.o
  CC      arch/x86/kernel/audit_64.o
  CC      arch/x86/kernel/mmconf-fam10h_64.o
  CC      arch/x86/kernel/vsmp_64.o
  CC      arch/x86/kernel/ima_arch.o
  CC      kernel/rseq.o
  CHK     kernel/kheaders_data.tar.xz
  AS      arch/x86/kernel/head_64.o
  CC      arch/x86/kernel/head64.o
  CC      arch/x86/kernel/ebda.o
  GEN     kernel/kheaders_data.tar.xz
  CC [M]  kernel/torture.o
  CC      arch/x86/kernel/platform-quirks.o
  LDS     arch/x86/kernel/vmlinux.lds
  AR      kernel/built-in.a
  AR      arch/x86/kernel/built-in.a
  AR      arch/x86/built-in.a
  CC [M]  kernel/kheaders.o
error: Bad exit status from /var/tmp/rpm-tmp.OiSlab (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.OiSlab (%build)
make[1]: *** [scripts/Makefile.package:59: rpm-pkg] Error 1
make: *** [Makefile:1469: rpm-pkg] Error 2

帮我

答案1

我找到了答案。以下内容已被省略。

sed -ri '/CONFIG_SYSTEM_TRUSTED_KEYS/s/=.+/=""/g' .config

在 rockylinuxs 文档中找到。

https://docs.rockylinux.org/guides/custom-linux-kernel/#compiling-the-kernel

相关内容