ยง2023-10-04
- Emerging the new kernel sources
root #emerge --ask --update --deep --with-bdeps=y --newuse @world
# replace gentoo-sources with whatever version of the kernel that is in-use??
root #emerge --ask --update --deep --with-bdeps=y --newuse sys-kernel/gentoo-sources
# ls /usr/src
linux-6.1.53-gentoo-r1
- Set symlink to new kernel sources
The kernel configuration is saved in a file named .config in the directory that holds the kernel sources, a symlink is used to point to that directory.
The symlink /usr/src/linux should always point to the directory that holds the sources of the kernel which currently runs. This can be done in one of three ways:
-
Default: Setting the link with eselect.
-
Alternative 1: Manually updating the symbolic link.
ln sf linux-6.1.53-gentoo-r1 linux
in /usr/src -
Alternative 2: Installing the kernel sources with USE="symlink". ??? How ???
-
eselect kernel list
# eselect kernel list <-- list available
Available kernel symlink targets:
[1] linux-6.1.53-gentoo-r1
# eselect kernel set 1
# eselect kernel list
Available kernel symlink targets:
[1] linux-6.1.53-gentoo-r1 * <-- * indicate the the chosen sources.
(chroot) hc4Gentoo /usr/src # ls -l
total 4
lrwxrwxrwx 1 root root 22 Oct 4 00:11 linux -> linux-6.1.53-gentoo-r1 <-- `eselect kernel set 1` will create this link
drwxr-xr-x 27 root root 4096 Oct 3 23:59 linux-6.1.53-gentoo-r1
- Moving to the new kernel folder
Now that the symbolic link has been modified, change the working directory to the new kernel folder.
$cd /usr/src/linux
.
Copy the previous kernel configuration
(chroot) hc4Gentoo /usr/src/linux # ls -a
. .clang-format .get_maintainer.ignore .gitignore .rustfmt.toml CREDITS Kbuild LICENSES Makefile arch certs distro fs init ipc lib net samples security tools virt
.. .cocciconfig .gitattributes .mailmap COPYING Documentation Kconfig MAINTAINERS README block crypto drivers include io_uring kernel mm rust scripts sound usr
(chroot) hc4Gentoo /usr/src/linux # zcat /proc/config.gz > .config
The .config from the old kernel can be converted to be used with the new kernel. The conversion can be done several ways including running either make oldconfig or make olddefconfig.
make oldconfig
, will prompt you for the new selectionmake olddefconfig
, will keep all of the options from the old .config and set the new options to their recommended (i.e. default) values:
- Observing the difference
- A diff tool can be used to compare the old and new .config files to see what options have been added:
(chroot) hc4Gentoo /usr/src/linux # comm -2 -3 <(sort .config
> sort) <(sort .config.old
> sort)
# Active energy metering IC
# CONFIG_ADE7854 is not set
# CONFIG_AHCI_QORIQ is not set
# CONFIG_DRM_RCAR_DW_HDMI is not set
# CONFIG_DRM_RCAR_USE_LVDS is not set
# CONFIG_DRM_RCAR_USE_MIPI_DSI is not set
# CONFIG_EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER is not set
# CONFIG_GENTOO_KERNEL_SELF_PROTECTION is not set
# CONFIG_GENTOO_LINUX_INIT_SYSTEMD is not set
# CONFIG_HABANA_AI is not set
# CONFIG_HTC_I2CPLD is not set
# CONFIG_HTC_PASIC3 is not set
# CONFIG_IP_NF_TARGET_CLUSTERIP is not set
# CONFIG_IXGB is not set
# CONFIG_LEDS_TRIGGER_GPIO is not set
# CONFIG_MFD_INTEL_M10_BMC is not set
# CONFIG_MICROCHIP_PIT64B is not set
# CONFIG_NET_CLS_RSVP is not set
# CONFIG_NET_CLS_RSVP6 is not set
# CONFIG_NET_SCH_ATM is not set
# CONFIG_NET_SCH_CBQ is not set
# CONFIG_NET_SCH_DSMARK is not set
# CONFIG_NFT_OBJREF is not set
# CONFIG_PARPORT_AX88796 is not set
# CONFIG_PDA_POWER is not set
# CONFIG_PHY_XGENE is not set
# CONFIG_R8188EU is not set
# CONFIG_RTC_DRV_V3020 is not set
# CONFIG_SECURITY_SELINUX_DISABLE is not set
# CONFIG_SERIAL_EARLYCON_ARM_SEMIHOST is not set
# CONFIG_SLOB is not set
# CONFIG_SPI_NXP_FLEXSPI is not set
# CONFIG_SPI_ROCKCHIP is not set
# CONFIG_SQUASHFS_DECOMP_MULTI is not set
# CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU is not set
# CONFIG_SUNRPC_DISABLE_INSECURE_ENCTYPES is not set
# CONFIG_SYSFS_DEPRECATED is not set
# CONFIG_TEST_SIPHASH is not set
# CONFIG_TEST_STRSCPY is not set
# CONFIG_UCB1400_CORE is not set
# CONFIG_USB_FOTG210_HCD is not set
# CONFIG_USB_FOTG210_UDC is not set
# CONFIG_USB_FTDI_ELAN is not set
# CONFIG_VFIO_MDEV is not set
# CONFIG_VIDEO_AD9389B is not set
# CONFIG_VIDEO_ASPEED is not set
# CONFIG_VIDEO_M5MOLS is not set
# CONFIG_VIDEO_MT9M032 is not set
# CONFIG_VIDEO_MT9T001 is not set
# CONFIG_VIDEO_NOON010PC30 is not set
# CONFIG_VIDEO_S5K4ECGX is not set
# CONFIG_VIDEO_S5K6AA is not set
# CONFIG_VIDEO_SR030PC30 is not set
# CONFIG_VIDEO_VS6624 is not set
# Cadence PCIe controllers support
# DesignWare PCI Core Support
# Gentoo Linux
# HID support
# I2C HID support
# Linux/arm64 6.1.53-gentoo-r1 Kernel Configuration
# Mobiveil PCIe Core Support
# Support for init systems, system and service managers
# end of Active energy metering IC
# end of Cadence PCIe controllers support
# end of DesignWare PCI Core Support
# end of Gentoo Linux
# end of HID support
# end of I2C HID support
# end of Mobiveil PCIe Core Support
# end of Support for init systems, system and service managers
CONFIG_AMPERE_ERRATUM_AC03_CPU_38=y
CONFIG_ARCH_FORCE_MAX_ORDER=11
CONFIG_ARCH_NR_GPIO=0
CONFIG_AS_HAS_PAC=y
CONFIG_AS_VERSION=24000
CONFIG_BLOCK_COMPAT=y
CONFIG_CC_VERSION_TEXT="gcc (Gentoo 13.2.1_p20230826 p7) 13.2.1 20230826"
CONFIG_CRYPTO_GF128MUL=y
CONFIG_DRM_NOMODESET=y
CONFIG_FB_CMDLINE=y
CONFIG_GCC_SUPPORTS_DYNAMIC_FTRACE_WITH_REGS=y
CONFIG_GCC_VERSION=130201
CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
CONFIG_GENTOO_LINUX=y
CONFIG_GENTOO_LINUX_INIT_SCRIPT=y
CONFIG_GENTOO_LINUX_PORTAGE=y
CONFIG_GENTOO_LINUX_UDEV=y
CONFIG_GENTOO_PRINT_FIRMWARE_INFO=y
CONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y
CONFIG_I2C_ALGOBIT=y
CONFIG_LD_VERSION=24000
CONFIG_NFSD_V2_ACL=y
CONFIG_PCI_MSI_IRQ_DOMAIN=y
CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13
CONFIG_PRINT_QUOTA_WARNING=y
CONFIG_RANDOM_TRUST_BOOTLOADER=y
CONFIG_RANDOM_TRUST_CPU=y
CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=0
CONFIG_SRCU=y
CONFIG_VIDEO_CAMERA_SENSOR=y
CONFIG_WILINK_PLATFORM_DATA=y
- And which have been removed:
(chroot) hc4Gentoo /usr/src/linux # comm -1 -3 <(sort .config
> sort) <(sort .config.old
> sort)
# CONFIG_ACPI_FFH is not set
# CONFIG_ACPI_FPDT is not set
# CONFIG_AD4130 is not set
# CONFIG_AD74115 is not set
# CONFIG_ADF4377 is not set
# CONFIG_AIRO is not set
# CONFIG_ARM_CORESIGHT_PMU_ARCH_SYSTEM_PMU is not set
# CONFIG_ATH12K is not set
# CONFIG_BACKLIGHT_KTZ8866 is not set
# CONFIG_BT_HCIBCM4377 is not set
# CONFIG_BT_NXPUART is not set
# CONFIG_CDX_BUS is not set
# CONFIG_CHARGER_RT9467 is not set
# CONFIG_CHARGER_RT9471 is not set
# CONFIG_COMMON_CLK_SI521XX is not set
# CONFIG_CROS_EC_UART is not set
# CONFIG_CROS_HPS_I2C is not set
# CONFIG_CRYPTO_SM4_ARM64_CE_CCM is not set
# CONFIG_CRYPTO_SM4_ARM64_CE_GCM is not set
# CONFIG_DMAPOOL_TEST is not set
# CONFIG_DRM_ACCEL is not set
# CONFIG_DRM_PANEL_AUO_A030JTN01 is not set
# CONFIG_DRM_PANEL_HIMAX_HX8394 is not set
# CONFIG_DRM_PANEL_JADARD_JD9365DA_H3 is not set
# CONFIG_DRM_PANEL_MAGNACHIP_D53E6EA8966 is not set
# CONFIG_DRM_PANEL_NEWVISION_NV3051D is not set
# CONFIG_DRM_PANEL_NOVATEK_NT36523 is not set
# CONFIG_DRM_PANEL_ORISETECH_OTA5601A is not set
# CONFIG_DRM_PANEL_SONY_TD4353_JDI is not set
# CONFIG_DRM_PANEL_VISIONOX_VTDR6130 is not set
# CONFIG_DRM_SAMSUNG_DSIM is not set
# CONFIG_DVB_AV7110 is not set
# CONFIG_DVB_BUDGET_CORE is not set
# CONFIG_FPGA_MGR_LATTICE_SYSCONFIG_SPI is not set
# CONFIG_FW_DEVLINK_SYNC_STATE_TIMEOUT is not set
# CONFIG_GPIO_FXL6408 is not set
# CONFIG_GPIO_LATCH is not set
# CONFIG_HID_EVISION is not set
# CONFIG_IIO_KX022A_I2C is not set
# CONFIG_IIO_KX022A_SPI is not set
# CONFIG_IOMMUFD is not set
# CONFIG_KALLSYMS_SELFTEST is not set
# CONFIG_LEDS_BD2606MVV is not set
# CONFIG_MAX11410 is not set
# CONFIG_MAX30208 is not set
# CONFIG_MAX5522 is not set
# CONFIG_MESON_DDR_PMU is not set
# CONFIG_MFD_INTEL_M10_BMC_SPI is not set
# CONFIG_MFD_MAX597X is not set
# CONFIG_MFD_SMPRO is not set
# CONFIG_MFD_TPS65219 is not set
# CONFIG_MICROCHIP_T1S_PHY is not set
# CONFIG_MODULE_DEBUG is not set
# CONFIG_MT7996E is not set
# CONFIG_NCN26000_PHY is not set
# CONFIG_NET_DSA_MSCC_OCELOT_EXT is not set
# CONFIG_NET_DSA_TAG_NONE is not set
# CONFIG_NFSD_V2 is not set
# CONFIG_NVMEM_LAYOUT_ONIE_TLV is not set
# CONFIG_NVMEM_LAYOUT_SL28_VPD is not set
# CONFIG_NXP_CBTX_PHY is not set
# CONFIG_OPTEE_INSECURE_LOAD_IMAGE is not set
# CONFIG_PDS_CORE is not set
# CONFIG_PER_VMA_LOCK_STATS is not set
# CONFIG_POWER_RESET_ODROID is not set
# CONFIG_POWER_RESET_ODROID_GO_ULTRA_POWEROFF is not set
# CONFIG_PWM_GPIO is not set
# CONFIG_QCOM_PMIC_GLINK is not set
# CONFIG_RCU_CPU_STALL_CPUTIME is not set
# CONFIG_REGULATOR_MAX20411 is not set
# CONFIG_REGULATOR_RT4803 is not set
# CONFIG_REGULATOR_RT5739 is not set
# CONFIG_REGULATOR_RT6190 is not set
# CONFIG_REMOTE_TARGET is not set
# CONFIG_ROHM_BU27034 is not set
# CONFIG_RPCSEC_GSS_KRB5_ENCTYPES_AES_SHA2 is not set
# CONFIG_RPCSEC_GSS_KRB5_ENCTYPES_CAMELLIA is not set
# CONFIG_RPCSEC_GSS_KRB5_ENCTYPES_DES is not set
# CONFIG_RTW88_8723DU is not set
# CONFIG_RTW88_8821CS is not set
# CONFIG_RTW88_8821CU is not set
# CONFIG_RTW88_8822BS is not set
# CONFIG_RTW88_8822BU is not set
# CONFIG_RTW88_8822CS is not set
# CONFIG_RTW88_8822CU is not set
# CONFIG_SENSORS_MC34VR500 is not set
# CONFIG_SERIAL_8250_PCI1XXXX is not set
# CONFIG_SERIAL_EARLYCON_SEMIHOST is not set
# CONFIG_SLUB_TINY is not set
# CONFIG_SND_SOC_AW88395 is not set
# CONFIG_SND_SOC_CS35L56_I2C is not set
# CONFIG_SND_SOC_CS35L56_SPI is not set
# CONFIG_SND_SOC_IDT821034 is not set
# CONFIG_SND_SOC_MAX98090 is not set
# CONFIG_SND_SOC_PEB2466 is not set
# CONFIG_SND_SOC_SMA1303 is not set
# CONFIG_SND_SOC_WM8961 is not set
# CONFIG_SPI_PCI1XXXX is not set
# CONFIG_SPI_SN_F_OSPI is not set
# CONFIG_SQUASHFS_CHOICE_DECOMP_BY_MOUNT is not set
# CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI is not set
# CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI_PERCPU is not set
# CONFIG_SSIF_IPMI_BMC is not set
# CONFIG_STEAM_FF is not set
# CONFIG_TEST_DHRY is not set
# CONFIG_TI_ADS1100 is not set
# CONFIG_TI_ADS7924 is not set
# CONFIG_TI_LMP92064 is not set
# CONFIG_TI_TMAG5273 is not set
# CONFIG_TOUCHSCREEN_CYTTSP5 is not set
# CONFIG_TOUCHSCREEN_DWAV_USB_MT is not set
# CONFIG_TOUCHSCREEN_HIMAX_HX83112B is not set
# CONFIG_TOUCHSCREEN_HYNITRON_CSTXXX is not set
# CONFIG_TOUCHSCREEN_NOVATEK_NVT_TS is not set
# CONFIG_TYPEC_MUX_GPIO_SBU is not set
# CONFIG_VCAP is not set
# CONFIG_VIDEO_HEXIUM_GEMINI is not set
# CONFIG_VIDEO_HEXIUM_ORION is not set
# CONFIG_VIDEO_IMX296 is not set
# CONFIG_VIDEO_IMX415 is not set
# CONFIG_VIDEO_MXB is not set
# CONFIG_VIDEO_OV08X40 is not set
# CONFIG_VIDEO_OV4689 is not set
# CONFIG_VIDEO_OV8858 is not set
# CONFIG_VIDEO_ST_VGXY61 is not set
# CONFIG_VIDEO_TC358746 is not set
# CONFIG_VIDEO_VISL is not set
# CONFIG_WPCM450_SOC is not set
# CONFIG_XILINX_XDMA is not set
# CONFIG_ZRAM_MULTI_COMP is not set
# Cadence-based PCIe controllers
# Camera sensor devices
# DesignWare-based PCIe controllers
# HID-BPF support
# Layout Types
# Linux/arm64 6.4.3-1 Kernel Configuration
# Microchip Technology, Inc. media platform drivers
# Mobiveil-based PCIe controllers
# USB dual-mode controller drivers
# end of Cadence-based PCIe controllers
# end of Camera sensor devices
# end of DesignWare-based PCIe controllers
# end of HID-BPF support
# end of Layout Types
# end of Mobiveil-based PCIe controllers
CONFIG_ACPI_APMT=y
CONFIG_ARCH_FORCE_MAX_ORDER=10
CONFIG_ARCH_HAS_NMI_SAFE_THIS_CPU_OPS=y
CONFIG_ARCH_SUPPORTS_PER_VMA_LOCK=y
CONFIG_ARCH_USES_PG_ARCH_X=y
CONFIG_ARM64_ERRATUM_2645198=y
CONFIG_ARM_PMUV3=y
CONFIG_AS_HAS_ARMV8_3=y
CONFIG_AS_VERSION=23800
CONFIG_BLK_CGROUP_PUNT_BIO=y
CONFIG_BT_HCIBTUSB_POLL_SYNC=y
CONFIG_BT_LE_L2CAP_ECRED=y
CONFIG_BUILTIN_RETURN_ADDRESS_STRIPS_PAC=y
CONFIG_CC_VERSION_TEXT="gcc (GCC) 12.1.0"
CONFIG_CRYPTO_LIB_GF128MUL=y
CONFIG_FUNCTION_ALIGNMENT=4
CONFIG_FUNCTION_ALIGNMENT_4B=y
CONFIG_FW_LOADER_DEBUG=y
CONFIG_GCC_SUPPORTS_DYNAMIC_FTRACE_WITH_ARGS=y
CONFIG_GCC_VERSION=120100
CONFIG_HAS_IOPORT=y
CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS=y
CONFIG_HAVE_KVM_DIRTY_RING=y
CONFIG_HAVE_KVM_DIRTY_RING_ACQ_REL=y
CONFIG_HID_SUPPORT=y
CONFIG_I2C_ALGOBIT=m
CONFIG_I2C_HID=y
CONFIG_KVM_GENERIC_HARDWARE_ENABLING=y
CONFIG_LD_ORPHAN_WARN_LEVEL="warn"
CONFIG_LD_VERSION=23800
CONFIG_LEGACY_DIRECT_IO=y
CONFIG_LEGACY_TIOCSTI=y
CONFIG_MAX_SKB_FRAGS=17
CONFIG_MDIO_BUS_MUX_MESON_GXL=m
CONFIG_MMU_LAZY_TLB_REFCOUNT=y
CONFIG_NEED_KVM_DIRTY_RING_WITH_BITMAP=y
CONFIG_NETFILTER_BPF_LINK=y
CONFIG_NET_HANDSHAKE=y
CONFIG_NET_SCH_MQPRIO_LIB=m
CONFIG_NF_CONNTRACK_OVS=y
CONFIG_NF_NAT_OVS=y
CONFIG_PER_VMA_LOCK=y
CONFIG_PHYLIB_LEDS=y
CONFIG_ROCKCHIP_ERRATUM_3588001=y
CONFIG_RPCSEC_GSS_KRB5_CRYPTOSYSTEM=y
CONFIG_RPCSEC_GSS_KRB5_ENCTYPES_AES_SHA1=y
CONFIG_SCHED_MM_CID=y
CONFIG_SERIAL_8250_PCILIB=y
CONFIG_SPI_AMLOGIC_SPIFC_A1=m
CONFIG_SQUASHFS_COMPILE_DECOMP_SINGLE=y
CONFIG_UVC_COMMON=m
CONFIG_VFIO_CONTAINER=y
CONFIG_VHOST_TASK=y
CONFIG_VIDEO_CMDLINE=y
CONFIG_VIDEO_NOMODESET=y
CONFIG_XFS_SUPPORT_ASCII_CI=y
CONFIG_ZSMALLOC_CHAIN_SIZE=8
make menuconfig
- The options can then be researched and changed if necessary by running:
root #make menuconfig
- The options can then be researched and changed if necessary by running:
-
/etc/genkernel.conf ???
-
/etc/fstab
#LABEL=boot /boot ext4 defaults 1 2
UUID=07B5-3DD7 /boot vfat defaults 1 2
#root
UUID=f1097058-a312-48f4-95cb-7b55f453e709 / xfs defaults 0 1
#LABEL=swap none swap sw 0 0
#/dev/cdrom /mnt/cdrom auto noauto,ro 0 0
# /dev/sda1: UUID="07B5-3DD7" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="9e37390d-01"
# /dev/sda2: PARTUUID="9e37390d-02"
# /dev/sda3: UUID="f1097058-a312-48f4-95cb-7b55f453e709" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="9e37390d-03"
# /dev/sda4: PARTUUID="9e37390d-04"
emerge sys-kernel/genkernel
(chroot) hc4Gentoo / # emerge sys-kernel/genkernel
Calculating dependencies... done!
Dependency resolution took 9.19 s.
!!! All ebuilds that could satisfy "sys-kernel/linux-firmware" have been masked.
!!! One of the following masked packages is required to complete your request:
- sys-kernel/linux-firmware-99999999::gentoo (masked by: || ( ) linux-fw-redistributable license(s), missing keyword)
A copy of the 'linux-fw-redistributable' license is located at '/var/db/repos/gentoo/licenses/linux-fw-redistributable'.
- sys-kernel/linux-firmware-20230919::gentoo (masked by: || ( ) linux-fw-redistributable license(s))
- sys-kernel/linux-firmware-20230804::gentoo (masked by: || ( ) linux-fw-redistributable license(s))
- sys-kernel/linux-firmware-20230625_p20230724::gentoo (masked by: || ( ) linux-fw-redistributable license(s))
(dependency required by "sys-kernel/genkernel-4.3.6::gentoo[firmware]" [ebuild])
(dependency required by "sys-kernel/genkernel" [argument])
For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.
(chroot) hc4Gentoo / # touch /etc/portage/package.accept_keywords/zzz_autounmask
(chroot) hc4Gentoo / # emerge sys-kernel/genkernel --autounmask-write --autounmask
Calculating dependencies... done!
Dependency resolution took 6.18 s.
[ebuild N ] sys-kernel/linux-firmware-20230919 USE="redistributable -compress-xz -compress-zstd (-initramfs) -savedconfig (-unknown-license)"
[ebuild N ] sys-kernel/genkernel-4.3.6 USE="firmware (-ibm)" PYTHON_SINGLE_TARGET="python3_11 -python3_10"
The following license changes are necessary to proceed:
(see "package.license" in the portage(5) man page for more details)
# required by sys-kernel/genkernel-4.3.6::gentoo[firmware]
# required by sys-kernel/genkernel (argument)
=sys-kernel/linux-firmware-20230919 linux-fw-redistributable
Autounmask changes successfully written.
* IMPORTANT: config file '/etc/portage/package.license' needs updating.
* See the CONFIGURATION FILES and CONFIGURATION FILES UPDATE TOOLS
* sections of the emerge man page to learn how to update config files.
(chroot) hc4Gentoo / # dispatch-conf
--- /tmp/tmpj08ihjm3/0 2023-10-04 02:32:10.158088133 -0000
+++ /etc/portage/._cfg0000_package.license 2023-10-04 02:31:22.796330290 -0000
@@ -1 +1,3 @@
-/dev/null
+# required by sys-kernel/genkernel-4.3.6::gentoo[firmware]
+# required by sys-kernel/genkernel (argument)
+=sys-kernel/linux-firmware-20230919 linux-fw-redistributable
>> (1 of 1) -- /etc/portage/package.license
>> q quit, h help, n next, e edit-new, z zap-new, u use-new
m merge, t toggle-merge, l look-merge:
- /etc/portage/make.conf, add these lines
# for odroid-hc4
MAKEOPTS="-j4"