2017-03-31 15:18:46 +00:00
|
|
|
modules-y += linux
|
2016-08-03 01:23:18 +00:00
|
|
|
|
2021-07-18 17:34:20 +00:00
|
|
|
ifeq "$(CONFIG_TARGET_ARCH)" "x86"
|
|
|
|
LINUX_ARCH := x86
|
|
|
|
LINUX_IMAGE_FILE := bzImage
|
|
|
|
else ifeq "$(CONFIG_TARGET_ARCH)" "ppc64"
|
|
|
|
LINUX_ARCH := powerpc
|
|
|
|
LINUX_IMAGE_FILE := zImage
|
|
|
|
else
|
|
|
|
$(error "$(CONFIG_TARGET_ARCH) target isn't supported by this module")
|
|
|
|
endif
|
|
|
|
|
2020-08-20 23:26:48 +00:00
|
|
|
ifeq "$(CONFIG_LINUX_VERSION)" "4.14.62"
|
2018-08-09 14:20:22 +00:00
|
|
|
linux_version := 4.14.62
|
2020-08-20 23:26:48 +00:00
|
|
|
linux_hash := 51ca4d7e8ee156dc0f19bc7768915cfae41dbb0b4f251e4fa8b178c5674c22ab
|
|
|
|
else ifeq "$(CONFIG_LINUX_VERSION)" "4.19.139"
|
|
|
|
linux_version := 4.19.139
|
|
|
|
linux_hash := 9c4ebf21fe949f80fbcfbbd6e7fe181040d325e89475e230ab53ef01f9d55605
|
2020-10-25 05:26:08 +00:00
|
|
|
else ifeq "$(CONFIG_LINUX_VERSION)" "5.4.69"
|
|
|
|
linux_version := 5.4.69
|
|
|
|
linux_hash := a8b31d716b397303a183e42ad525ff2871024a43e3ea530d0fdf73b7f9d27da7
|
2024-10-02 14:44:39 +00:00
|
|
|
else ifeq "$(CONFIG_LINUX_VERSION)" "6.6.16-openpower"
|
|
|
|
linux_version := 6.6.16
|
|
|
|
linux_patch_version := 6.6.16-openpower
|
|
|
|
linux_hash := b21d5795a3bead4f112916423222faa8a0f519e4201df343e3eb88dc9e4aaa30
|
2021-01-07 19:07:57 +00:00
|
|
|
#
|
|
|
|
# linuxboot systems should *NOT* use 5.10.5 until a proper review has
|
|
|
|
# been done. This is because `0000-efi_bds.patch` did not cleanly port
|
|
|
|
# from 5.4.69 to 5.10.5 which directly affects linuxboot systems.
|
|
|
|
#
|
2024-08-16 19:08:45 +00:00
|
|
|
else ifeq "$(CONFIG_LINUX_VERSION)" "5.10.214"
|
|
|
|
linux_version := 5.10.214
|
|
|
|
linux_hash := 40f014d53e81f204f6d2a364aae4201ae07970dd1b70dc602d7c66c1a140f558
|
2023-04-07 20:22:22 +00:00
|
|
|
else ifeq "$(CONFIG_LINUX_VERSION)" "6.1.8"
|
|
|
|
linux_version := 6.1.8
|
|
|
|
linux_hash := b60bb53ab8ba370a270454b11e93d41af29126fc72bd6ede517673e2e57b816d
|
2024-11-22 16:36:08 +00:00
|
|
|
else ifeq "$(CONFIG_LINUX_VERSION)" "6.11.9"
|
|
|
|
linux_version := 6.11.9
|
|
|
|
linux_hash := 75658a7aa3bd9598c96ee1e5862c5e1d34fced75c28d825c727a1510a6f384b4
|
2020-08-20 23:26:48 +00:00
|
|
|
else
|
|
|
|
$(error "$(BOARD): does not specify linux kernel version under CONFIG_LINUX_VERSION")
|
|
|
|
endif
|
|
|
|
|
2018-05-02 15:38:39 +00:00
|
|
|
linux_base_dir := linux-$(linux_version)
|
2016-08-03 01:23:18 +00:00
|
|
|
|
2018-05-02 15:38:39 +00:00
|
|
|
# TODO: fixup the patch process
|
2018-02-05 20:28:33 +00:00
|
|
|
# input file in the heads config/ dir
|
|
|
|
# Allow board config to specialize Linux configuration if necessary
|
2018-02-05 22:27:12 +00:00
|
|
|
linux_kconfig := $(or $(CONFIG_LINUX_CONFIG),config/linux.config)
|
2018-02-05 20:28:33 +00:00
|
|
|
|
2018-02-06 20:03:47 +00:00
|
|
|
# Output directory for the Linux kernel build is based on the
|
|
|
|
# configuration file name, not the board name
|
2018-05-02 15:38:39 +00:00
|
|
|
linux_dir := $(linux_base_dir)/$(notdir $(basename $(linux_kconfig)))
|
|
|
|
|
|
|
|
linux_tar := linux-$(linux_version).tar.xz
|
2020-10-25 05:26:08 +00:00
|
|
|
linux_major_ver := $(basename $(basename $(CONFIG_LINUX_VERSION)))
|
|
|
|
linux_url := https://cdn.kernel.org/pub/linux/kernel/v$(linux_major_ver).x/$(linux_tar)
|
2018-05-02 15:38:39 +00:00
|
|
|
|
2018-05-03 20:47:09 +00:00
|
|
|
# Ensure that touching the config file will force a reconfig/rebuild
|
|
|
|
$(build)/$(linux_dir)/.configured: $(linux_kconfig)
|
2018-02-05 20:28:33 +00:00
|
|
|
|
2017-01-27 22:55:44 +00:00
|
|
|
linux_configure := \
|
2018-08-09 16:45:53 +00:00
|
|
|
mkdir -p "$(build)/$(linux_dir)" \
|
2022-08-16 16:39:33 +00:00
|
|
|
&& $(call install_config,$(pwd)/$(linux_kconfig),$(build)/$(linux_dir)/.config) \
|
2018-08-09 16:45:53 +00:00
|
|
|
&& $(MAKE) -C .. \
|
2021-07-18 17:34:20 +00:00
|
|
|
ARCH="$(LINUX_ARCH)" \
|
2017-04-16 18:18:46 +00:00
|
|
|
CROSS_COMPILE="$(CROSS)" \
|
2018-05-02 15:38:39 +00:00
|
|
|
O="$(build)/$(linux_dir)" \
|
2018-08-09 16:45:53 +00:00
|
|
|
olddefconfig \
|
2017-01-27 22:55:44 +00:00
|
|
|
|
2021-07-18 17:34:20 +00:00
|
|
|
linux_output += arch/$(LINUX_ARCH)/boot/$(LINUX_IMAGE_FILE)
|
2018-02-05 16:27:45 +00:00
|
|
|
|
2018-09-18 11:24:19 +00:00
|
|
|
# Once we have extracted the kernel tar file, install the headers
|
|
|
|
# so that other submodules can make use of them.
|
|
|
|
$(INSTALL)/include/linux/limits.h: $(build)/$(linux_base_dir)/.canary
|
|
|
|
$(MAKE) \
|
|
|
|
-C "$(build)/$(linux_base_dir)" \
|
2021-07-18 17:34:20 +00:00
|
|
|
ARCH="$(LINUX_ARCH)" \
|
2018-09-18 11:24:19 +00:00
|
|
|
INSTALL_HDR_PATH="$(INSTALL)" \
|
2023-04-19 14:04:53 +00:00
|
|
|
CROSS_COMPILE="$(CROSS)" \
|
2018-09-18 11:24:19 +00:00
|
|
|
O="$(linux_dir)" \
|
|
|
|
KCONFIG_CONFIG="$(pwd)/$(linux_kconfig)" \
|
|
|
|
headers_install
|
|
|
|
|
2024-11-05 20:24:11 +00:00
|
|
|
# Inconditional: add USB keyboard support to all boards (linux_modules-y)
|
|
|
|
linux_modules-y += drivers/hid/usbhid/usbhid.ko
|
2017-01-27 22:55:44 +00:00
|
|
|
|
2017-04-05 23:20:53 +00:00
|
|
|
# qemu
|
2017-03-31 15:18:46 +00:00
|
|
|
linux_modules-$(CONFIG_LINUX_E1000) += drivers/net/ethernet/intel/e1000/e1000.ko
|
2017-04-05 23:20:53 +00:00
|
|
|
|
2018-02-08 00:07:53 +00:00
|
|
|
# x230 and winterfell
|
2017-03-31 15:18:46 +00:00
|
|
|
linux_modules-$(CONFIG_LINUX_E1000E) += drivers/net/ethernet/intel/e1000e/e1000e.ko
|
2017-04-05 23:20:53 +00:00
|
|
|
|
2017-09-21 20:54:48 +00:00
|
|
|
# Dell R630 ethernet and RAID controller
|
2017-09-20 14:29:14 +00:00
|
|
|
linux_modules-$(CONFIG_LINUX_IGB) += drivers/net/ethernet/intel/igb/igb.ko
|
2017-09-21 20:54:48 +00:00
|
|
|
linux_modules-$(CONFIG_LINUX_MEGARAID) += drivers/scsi/megaraid/megaraid_mm.ko
|
|
|
|
linux_modules-$(CONFIG_LINUX_MEGARAID) += drivers/scsi/megaraid/megaraid_sas.ko
|
|
|
|
linux_modules-$(CONFIG_LINUX_MEGARAID) += drivers/scsi/megaraid/megaraid_mbox.ko
|
2017-09-20 14:29:14 +00:00
|
|
|
|
2017-12-04 21:00:35 +00:00
|
|
|
# Intel s2600wf scsi controller
|
|
|
|
linux_modules-$(CONFIG_LINUX_SCSI_GDTH) += drivers/scsi/gdth.ko
|
|
|
|
linux_modules-$(CONFIG_LINUX_ATA) += drivers/ata/libata.ko
|
|
|
|
linux_modules-$(CONFIG_LINUX_AHCI) += drivers/ata/ahci.ko
|
2018-02-13 22:46:38 +00:00
|
|
|
#linux_modules-$(CONFIG_LINUX_AHCI) += drivers/ata/ahci_platform.ko
|
2017-12-04 21:00:35 +00:00
|
|
|
linux_modules-$(CONFIG_LINUX_AHCI) += drivers/ata/libahci.ko
|
2018-02-13 22:46:38 +00:00
|
|
|
#linux_modules-$(CONFIG_LINUX_AHCI) += drivers/ata/libahci_platform.ko
|
2017-12-04 21:00:35 +00:00
|
|
|
|
2018-02-02 20:57:11 +00:00
|
|
|
# Solarflare network card
|
|
|
|
linux_modules-$(CONFIG_LINUX_SFC) += drivers/net/ethernet/sfc/sfc.ko
|
|
|
|
linux_modules-$(CONFIG_LINUX_SFC) += drivers/net/mdio.ko
|
|
|
|
|
2018-02-05 16:27:45 +00:00
|
|
|
# Mellanox ConnectX-3 (winterfell)
|
|
|
|
linux_modules-$(CONFIG_LINUX_MLX4) += drivers/net/ethernet/mellanox/mlx4/mlx4_core.ko
|
|
|
|
linux_modules-$(CONFIG_LINUX_MLX4) += drivers/net/ethernet/mellanox/mlx4/mlx4_en.ko
|
|
|
|
|
2018-03-24 01:13:09 +00:00
|
|
|
# Broadcom 57302 (25g) for Tioga Pass
|
|
|
|
linux_modules-$(CONFIG_LINUX_BCM) += drivers/net/ethernet/broadcom/bnxt/bnxt_en.ko
|
|
|
|
|
2017-09-21 20:54:48 +00:00
|
|
|
# USB modules for both types of controllers
|
2017-12-06 08:04:27 +00:00
|
|
|
# older boards also need ohci and uhci
|
|
|
|
linux_modules-$(CONFIG_LINUX_USB_COMPANION_CONTROLLER) += drivers/usb/host/uhci-hcd.ko
|
|
|
|
linux_modules-$(CONFIG_LINUX_USB_COMPANION_CONTROLLER) += drivers/usb/host/ohci-hcd.ko
|
|
|
|
linux_modules-$(CONFIG_LINUX_USB_COMPANION_CONTROLLER) += drivers/usb/host/ohci-pci.ko
|
2017-03-31 15:18:46 +00:00
|
|
|
linux_modules-$(CONFIG_LINUX_USB) += drivers/usb/host/ehci-hcd.ko
|
|
|
|
linux_modules-$(CONFIG_LINUX_USB) += drivers/usb/host/ehci-pci.ko
|
|
|
|
linux_modules-$(CONFIG_LINUX_USB) += drivers/usb/host/xhci-hcd.ko
|
|
|
|
linux_modules-$(CONFIG_LINUX_USB) += drivers/usb/host/xhci-pci.ko
|
2017-04-05 23:20:53 +00:00
|
|
|
linux_modules-$(CONFIG_LINUX_USB) += drivers/usb/storage/usb-storage.ko
|
2017-03-28 20:32:58 +00:00
|
|
|
|
2023-11-25 19:50:32 +00:00
|
|
|
#USB modules for Mobile USB Tethering (Most Android phones, Librem phone, etc)
|
|
|
|
linux_modules-$(CONFIG_MOBILE_TETHERING) += drivers/net/mii.ko
|
|
|
|
linux_modules-$(CONFIG_MOBILE_TETHERING) += drivers/net/usb/usbnet.ko
|
|
|
|
linux_modules-$(CONFIG_MOBILE_TETHERING) += drivers/net/usb/cdc_ether.ko
|
|
|
|
linux_modules-$(CONFIG_MOBILE_TETHERING) += drivers/net/usb/cdc_ncm.ko
|
|
|
|
linux_modules-$(CONFIG_MOBILE_TETHERING) += drivers/net/usb/cdc_eem.ko
|
|
|
|
|
2018-02-28 19:06:53 +00:00
|
|
|
# NVMe driver for winterfell and other servers
|
|
|
|
linux_modules-$(CONFIG_LINUX_NVME) += drivers/nvme/host/nvme.ko
|
|
|
|
linux_modules-$(CONFIG_LINUX_NVME) += drivers/nvme/host/nvme-core.ko
|
|
|
|
|
2018-04-10 19:28:24 +00:00
|
|
|
# ME drivers for talking the the management engine
|
|
|
|
linux_modules-$(CONFIG_LINUX_MEI) += drivers/misc/mei/mei.ko
|
|
|
|
linux_modules-$(CONFIG_LINUX_MEI) += drivers/misc/mei/mei-me.ko
|
|
|
|
|
2017-01-28 23:38:29 +00:00
|
|
|
EXTRA_FLAGS := -fdebug-prefix-map=$(pwd)=heads -gno-record-gcc-switches
|
|
|
|
|
2022-08-25 18:43:31 +00:00
|
|
|
ifeq "$(CONFIG_LINUX_VERSION)" "4.14.62"
|
|
|
|
EXTRA_FLAGS += -Wno-cast-function-type
|
|
|
|
endif
|
|
|
|
|
2017-01-27 22:55:44 +00:00
|
|
|
linux_target := \
|
2018-05-02 15:38:39 +00:00
|
|
|
O="$(build)/$(linux_dir)" \
|
2021-07-18 17:34:20 +00:00
|
|
|
ARCH="$(LINUX_ARCH)" \
|
2017-04-16 18:18:46 +00:00
|
|
|
CROSS_COMPILE="$(CROSS)" \
|
2017-01-28 23:38:29 +00:00
|
|
|
AFLAGS_KERNEL="$(EXTRA_FLAGS)" \
|
|
|
|
CFLAGS_KERNEL="$(EXTRA_FLAGS)" \
|
|
|
|
CFLAGS_MODULE="$(EXTRA_FLAGS)" \
|
2018-05-04 18:36:56 +00:00
|
|
|
KBUILD_BUILD_USER=$(notdir $(linux_kconfig)) \
|
2018-02-02 20:57:11 +00:00
|
|
|
KBUILD_BUILD_HOST=linuxboot \
|
2017-01-28 23:38:29 +00:00
|
|
|
KBUILD_BUILD_TIMESTAMP="1970-00-00" \
|
|
|
|
KBUILD_BUILD_VERSION=0 \
|
2017-04-16 18:18:46 +00:00
|
|
|
$(MAKE_JOBS) \
|
2017-03-20 18:52:03 +00:00
|
|
|
|
|
|
|
# We cross compile linux now
|
2024-11-06 13:03:42 +00:00
|
|
|
linux_depends := musl-cross-make
|
2018-02-05 16:27:45 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Linux kernel module installation
|
|
|
|
#
|
|
|
|
# This is special cases since we have to do a special strip operation on
|
|
|
|
# the kernel modules to make them fit into the ROM image.
|
|
|
|
#
|
|
|
|
module_initrd_dir := $(shell mktemp -d)
|
|
|
|
module_initrd_lib_dir := $(module_initrd_dir)/lib/modules
|
|
|
|
FOO := $(shell mkdir -p "$(module_initrd_lib_dir)")
|
|
|
|
|
|
|
|
define linux_module =
|
|
|
|
|
|
|
|
# Each module depends on building the Linux kernel
|
2018-05-03 22:03:24 +00:00
|
|
|
$(build)/$(linux_dir)/$1: $(build)/$(linux_dir)/$(linux_output)
|
2018-02-05 16:27:45 +00:00
|
|
|
|
|
|
|
# The cpio file will depend on every module
|
|
|
|
$(build)/$(BOARD)/modules.cpio: $(module_initrd_lib_dir)/$(notdir $1)
|
|
|
|
|
|
|
|
# Strip the modules when we install them so that they will be extra small
|
2018-05-02 15:38:39 +00:00
|
|
|
$(module_initrd_lib_dir)/$(notdir $1): $(build)/$(linux_dir)/$1
|
2018-02-05 16:27:45 +00:00
|
|
|
$(call do,INSTALL-MODULE,$1, \
|
|
|
|
$(CROSS)strip \
|
|
|
|
--preserve-dates \
|
|
|
|
--strip-debug \
|
|
|
|
-o "$$@" \
|
|
|
|
"$$<" \
|
|
|
|
)
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(call map,linux_module,$(linux_modules-y))
|
|
|
|
|
|
|
|
# We can't rebuild the module initrd until the kernel has been rebuilt
|
2018-05-02 15:38:39 +00:00
|
|
|
$(build)/$(BOARD)/modules.cpio: $(build)/$(linux_dir)/.build
|
2018-02-05 16:27:45 +00:00
|
|
|
$(call do-cpio,$@,$(module_initrd_dir))
|
|
|
|
@$(RM) -rf "$(module_initrd_dir)"
|
|
|
|
|
|
|
|
|
2021-07-18 17:34:20 +00:00
|
|
|
# The output of the linux.intermediate is usually the bzImage in the
|
|
|
|
# linux build directory. We need to copy it into our board
|
2018-02-26 16:40:04 +00:00
|
|
|
# specific directory for ease of locating it later.
|
2021-07-18 17:34:20 +00:00
|
|
|
$(build)/$(BOARD)/$(LINUX_IMAGE_FILE): $(build)/$(linux_dir)/.build
|
2018-05-03 22:03:24 +00:00
|
|
|
$(call do-copy,$(dir $<)/$(linux_output),$@)
|
|
|
|
@touch $@ # force a timestamp update
|
2018-09-18 17:07:40 +00:00
|
|
|
@sha256sum "$@" | tee -a "$(HASHES)"
|
2023-06-27 14:01:01 +00:00
|
|
|
@stat -c "%8s:%n" "$@" | tee -a "$(SIZES)"
|
2018-02-08 21:02:54 +00:00
|
|
|
|
2021-07-18 17:35:59 +00:00
|
|
|
# Build kernel second time, now that initrd is built.
|
|
|
|
$(build)/$(BOARD)/$(LINUX_IMAGE_FILE).bundled: \
|
|
|
|
$(build)/$(initrd_dir)/initrd.cpio.xz \
|
|
|
|
$(build)/$(BOARD)/$(LINUX_IMAGE_FILE)
|
|
|
|
xz --decompress --stdout --force "$<" > $(build)/$(initrd_dir)/initrd.cpio
|
|
|
|
$(MAKE) -C "$(build)/$(linux_dir)" $(linux_target)
|
|
|
|
$(call do-copy,$(build)/$(linux_dir)/$(linux_output),$@)
|
|
|
|
@touch $@ # force a timestamp update
|
|
|
|
@sha256sum "$@" | tee -a "$(HASHES)"
|
2018-02-08 21:02:54 +00:00
|
|
|
|
2023-04-19 14:04:53 +00:00
|
|
|
# modify_and_save_defconfig_in_place target allows us edit current in tree config
|
2023-04-19 14:04:53 +00:00
|
|
|
# under linux decompressed+patched directory through menuconfig
|
|
|
|
# and put it back in git tree to check changes with git difftool iteratively
|
|
|
|
linux.modify_and_save_defconfig_in_place:
|
2022-10-24 15:33:55 +00:00
|
|
|
cp "$(pwd)/$(linux_kconfig)" "$(build)/$(linux_dir)/.config" && \
|
|
|
|
$(MAKE) \
|
|
|
|
-C "$(build)/$(linux_base_dir)" \
|
|
|
|
O="$(build)/$(linux_dir)" \
|
2023-03-24 14:19:28 +00:00
|
|
|
ARCH="$(LINUX_ARCH)" \
|
2023-04-19 14:04:53 +00:00
|
|
|
CROSS_COMPILE="$(CROSS)" \
|
2022-10-24 15:33:55 +00:00
|
|
|
menuconfig && \
|
|
|
|
$(MAKE) \
|
|
|
|
-C "$(build)/$(linux_base_dir)" \
|
|
|
|
O="$(build)/$(linux_dir)" \
|
2023-03-24 14:19:28 +00:00
|
|
|
ARCH="$(LINUX_ARCH)" \
|
2023-04-19 14:04:53 +00:00
|
|
|
CROSS_COMPILE="$(CROSS)" \
|
|
|
|
savedefconfig \
|
|
|
|
&& mv "$(build)/$(linux_dir)/defconfig" "$(pwd)/$(linux_kconfig)"
|
|
|
|
|
2023-04-19 14:04:53 +00:00
|
|
|
# modify_and_save_oldconfig_in_place target allows us edit current in tree config
|
2023-04-19 14:04:53 +00:00
|
|
|
# under linux decompressed+patched directory through menuconfig
|
|
|
|
# and put it back in git tree to check changes with git difftool iteratively
|
|
|
|
linux.modify_and_save_oldconfig_in_place:
|
|
|
|
mkdir -p "$(build)/$(linux_dir)" \
|
|
|
|
&& cp "$(pwd)/$(linux_kconfig)" "$(build)/$(linux_dir)/.config" \
|
|
|
|
&& $(MAKE) -C "$(build)/$(linux_base_dir)" \
|
|
|
|
O="$(build)/$(linux_dir)" \
|
|
|
|
ARCH="$(LINUX_ARCH)" \
|
|
|
|
CROSS_COMPILE="$(CROSS)" \
|
|
|
|
menuconfig \
|
|
|
|
&& $(MAKE) -C "$(build)/$(linux_base_dir)" \
|
|
|
|
O="$(build)/$(linux_dir)" \
|
|
|
|
ARCH="$(LINUX_ARCH)" \
|
|
|
|
CROSS_COMPILE="$(CROSS)" \
|
|
|
|
olddefconfig \
|
|
|
|
&& mv "$(build)/$(linux_dir)/.config" "$(pwd)/$(linux_kconfig)"
|
2022-10-24 15:33:55 +00:00
|
|
|
|
2023-04-19 14:04:53 +00:00
|
|
|
#Add some tooling to permit us to keep track of what we currently use.
|
|
|
|
# save_in_defconfig_format_in_place: regenerate a defconfig from current board linux config and overwrites it
|
|
|
|
# save_in_versioned_defconfig_format: same as avove but doesn't overwrite: writes it in seperate versioned file
|
|
|
|
# same for oldconfig
|
|
|
|
linux.save_in_defconfig_format_in_place:
|
2022-10-24 15:33:55 +00:00
|
|
|
mkdir -p "$(build)/$(linux_dir)" \
|
|
|
|
&& cp "$(pwd)/$(linux_kconfig)" "$(build)/$(linux_dir)/.config" \
|
|
|
|
&& $(MAKE) -C "$(build)/$(linux_base_dir)" \
|
|
|
|
O="$(build)/$(linux_dir)" \
|
2023-03-24 14:19:28 +00:00
|
|
|
ARCH="$(LINUX_ARCH)" \
|
2023-04-19 14:04:53 +00:00
|
|
|
CROSS_COMPILE="$(CROSS)" \
|
2023-04-19 14:04:53 +00:00
|
|
|
savedefconfig \
|
|
|
|
&& mv "$(build)/$(linux_dir)/defconfig" "$(pwd)/$(linux_kconfig)"
|
|
|
|
|
|
|
|
linux.save_in_versioned_defconfig_format:
|
2023-04-19 14:04:53 +00:00
|
|
|
mkdir -p "$(build)/$(linux_dir)" \
|
|
|
|
&& cp "$(pwd)/$(linux_kconfig)" "$(build)/$(linux_dir)/.config" \
|
|
|
|
&& $(MAKE) -C "$(build)/$(linux_base_dir)" \
|
|
|
|
O="$(build)/$(linux_dir)" \
|
|
|
|
ARCH="$(LINUX_ARCH)" \
|
|
|
|
CROSS_COMPILE="$(CROSS)" \
|
2023-04-19 14:04:53 +00:00
|
|
|
savedefconfig \
|
|
|
|
&& mv "$(build)/$(linux_dir)/defconfig" "$(pwd)/$(linux_kconfig)_defconfig_$(CONFIG_LINUX_VERSION)"
|
2022-10-24 15:33:55 +00:00
|
|
|
|
2024-10-02 12:16:11 +00:00
|
|
|
# This one can be used in kernel version bump, which will accept all new defconfig options for the new version.
|
|
|
|
# PLEASE VERIFY CHANGES AND KEEP THINGS MINIMAL IN PRs.
|
2024-11-22 16:36:08 +00:00
|
|
|
linux.save_in_olddefconfig_format_in_place:
|
2023-04-19 14:04:53 +00:00
|
|
|
mkdir -p "$(build)/$(linux_dir)" \
|
|
|
|
&& cp "$(pwd)/$(linux_kconfig)" "$(build)/$(linux_dir)/.config" \
|
|
|
|
&& $(MAKE) -C "$(build)/$(linux_base_dir)" \
|
2018-05-02 15:38:39 +00:00
|
|
|
O="$(build)/$(linux_dir)" \
|
2023-03-24 14:19:28 +00:00
|
|
|
ARCH="$(LINUX_ARCH)" \
|
2023-04-19 14:04:53 +00:00
|
|
|
CROSS_COMPILE="$(CROSS)" \
|
2024-10-02 12:16:11 +00:00
|
|
|
olddefconfig \
|
2023-04-19 14:04:53 +00:00
|
|
|
&& mv "$(build)/$(linux_dir)/.config" "$(pwd)/$(linux_kconfig)"
|
2018-08-09 16:45:53 +00:00
|
|
|
|
2023-04-19 14:04:53 +00:00
|
|
|
linux.save_in_versioned_oldconfig:
|
2023-04-19 14:04:53 +00:00
|
|
|
mkdir -p "$(build)/$(linux_dir)" \
|
|
|
|
&& cp "$(pwd)/$(linux_kconfig)" "$(build)/$(linux_dir)/.config" \
|
|
|
|
&& $(MAKE) -C "$(build)/$(linux_base_dir)" \
|
|
|
|
O="$(build)/$(linux_dir)" \
|
|
|
|
ARCH="$(LINUX_ARCH)" \
|
|
|
|
CROSS_COMPILE="$(CROSS)" \
|
2024-10-02 12:16:11 +00:00
|
|
|
oldconfig \
|
2023-04-19 14:04:53 +00:00
|
|
|
&& mv "$(build)/$(linux_dir)/.config" "$(pwd)/$(linux_kconfig)_oldconfig_$(CONFIG_LINUX_VERSION)"
|
|
|
|
|
|
|
|
# Prior of attempting to bump kernel version, call make BOARD=xyz linux.save_in_oldconfig_format_in_place
|
|
|
|
# Then bump board config's CONFIG_LINUX_VERSION. build as usual to extract new linux tarball.
|
|
|
|
# Then call make BOARD=xyz linux.prompt_for_new_config_options_for_kernel_version_bump
|
|
|
|
#The following ask new config choice for all new symbols that should be evaluated prior of creating PR
|
|
|
|
# Tip: Open a browser at https://www.kernelconfig.io/index.html
|
|
|
|
linux.prompt_for_new_config_options_for_kernel_version_bump:
|
2023-04-19 14:04:53 +00:00
|
|
|
mkdir -p "$(build)/$(linux_dir)" \
|
|
|
|
&& cp "$(pwd)/$(linux_kconfig)" "$(build)/$(linux_dir)/.config" \
|
|
|
|
&& $(MAKE) -C "$(build)/$(linux_base_dir)" \
|
|
|
|
O="$(build)/$(linux_dir)" \
|
|
|
|
ARCH="$(LINUX_ARCH)" \
|
2024-10-02 12:16:11 +00:00
|
|
|
CROSS_COMPILE="$(CROSS)" \
|
2023-04-19 14:04:53 +00:00
|
|
|
oldconfig \
|
|
|
|
&& mv "$(build)/$(linux_dir)/.config" "$(pwd)/$(linux_kconfig)"
|