From 4b5148c9d49125ceb6a7eb115a2c2805de9a0d7b Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Thu, 22 Dec 2022 16:33:41 +0100 Subject: [PATCH 1/5] Don't remove a patch --- build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index 999c39c5..6ff9fbcc 100755 --- a/build.sh +++ b/build.sh @@ -564,9 +564,9 @@ if [ "$OMR_KERNEL" = "5.4" ]; then if [ -f package/kernel/mac80211/patches/build/firmware-replace-HOTPLUG-with-UEVENT-in-FW_ACTION-defines.patch ]; then rm -f package/kernel/mac80211/patches/build/firmware-replace-HOTPLUG-with-UEVENT-in-FW_ACTION-defines.patch fi - if [ -f package/kernel/rtl8812au-ct/patches/003-wireless-5.8.patch ]; then - rm -f package/kernel/rtl8812au-ct/patches/003-wireless-5.8.patch - fi + #if [ -f package/kernel/rtl8812au-ct/patches/003-wireless-5.8.patch ]; then + # rm -f package/kernel/rtl8812au-ct/patches/003-wireless-5.8.patch + #fi if [ -f target/linux/mvebu/patches-5.4/021-arm64-dts-marvell-armada-37xx-Move-PCIe-comphy-handl.patch ]; then rm -f target/linux/mvebu/patches-5.4/021-arm64-dts-marvell-armada-37xx-Move-PCIe-comphy-handl.patch fi From 3f65047e1327731640a3f6b88bce2b1f8f82f498 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Thu, 22 Dec 2022 19:49:54 +0100 Subject: [PATCH 2/5] Remove not more needed patch --- .../mwlwifi/patches/002-remove-fallthrough.patch | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 root/package/kernel/mwlwifi/patches/002-remove-fallthrough.patch diff --git a/root/package/kernel/mwlwifi/patches/002-remove-fallthrough.patch b/root/package/kernel/mwlwifi/patches/002-remove-fallthrough.patch deleted file mode 100644 index 051198a1..00000000 --- a/root/package/kernel/mwlwifi/patches/002-remove-fallthrough.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/mac80211.c 2021-10-20 15:48:58.682784216 +0200 -+++ b/mac80211.c 2021-10-20 15:50:38.921118149 +0200 -@@ -766,8 +766,8 @@ - buf_size, params->ssn, - params->amsdu); - spin_lock_bh(&priv->stream_lock); -- break; - } -+ break; - case IEEE80211_AMPDU_RX_STOP: - if (priv->chip_type == MWL8964) { - struct mwl_ampdu_stream tmp; From e549ccf6e5d30a7bcae40aa91a14a11470f532bf Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Fri, 23 Dec 2022 08:43:28 +0100 Subject: [PATCH 3/5] Update 6.1 config --- root/target/linux/generic/config-6.1 | 48 +++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/root/target/linux/generic/config-6.1 b/root/target/linux/generic/config-6.1 index 13f7c1e5..335b38f9 100644 --- a/root/target/linux/generic/config-6.1 +++ b/root/target/linux/generic/config-6.1 @@ -15,6 +15,7 @@ CONFIG_64BIT_TIME=y # CONFIG_ACENIC is not set # CONFIG_ACERHDF is not set # CONFIG_ACER_WIRELESS is not set +# CONFIG_ACER_WMI is not set # CONFIG_ACORN_PARTITION is not set # CONFIG_ACPI_ALS is not set # CONFIG_ACPI_APEI is not set @@ -27,6 +28,7 @@ CONFIG_64BIT_TIME=y # CONFIG_ACPI_NFIT is not set # CONFIG_ACPI_REDUCED_HARDWARE_ONLY is not set # CONFIG_ACPI_TABLE_UPGRADE is not set +# CONFIG_ACPI_TOSHIBA is not set # CONFIG_ACPI_VIDEO is not set # CONFIG_AD2S1200 is not set # CONFIG_AD2S1210 is not set @@ -176,6 +178,7 @@ CONFIG_ALLOW_DEV_COREDUMP=y # CONFIG_AMBA_PL08X is not set # CONFIG_AMD8111_ETH is not set # CONFIG_AMD_MEM_ENCRYPT is not set +# CONFIG_AMD_PMF is not set # CONFIG_AMD_PHY is not set # CONFIG_AMD_XGBE is not set # CONFIG_AMD_XGBE_HAVE_ECC is not set @@ -484,6 +487,7 @@ CONFIG_ARM_GIC_MAX_NR=1 # CONFIG_ASN1 is not set # CONFIG_ASUS_LAPTOP is not set # CONFIG_ASUS_WIRELESS is not set +# CONFIG_ASUS_WMI is not set # CONFIG_ASYMMETRIC_KEY_TYPE is not set # CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE is not set # CONFIG_ASYNC_RAID6_TEST is not set @@ -882,6 +886,8 @@ CONFIG_BUILDTIME_TABLE_SORT=y # CONFIG_BUILD_BIN2C is not set CONFIG_BUILD_SALT="" # CONFIG_C2PORT is not set +# CONFIG_CACHEFILES_ERROR_INJECTION is not set +# CONFIG_CACHEFILES_ONDEMAND is not set CONFIG_CACHE_L2X0_PMU=y # CONFIG_CADENCE_WATCHDOG is not set # CONFIG_CAIF is not set @@ -1100,6 +1106,8 @@ CONFIG_CONSTRUCTORS=y # CONFIG_CPU_FREQ_STAT_DETAILS is not set # CONFIG_CPU_FREQ_THERMAL is not set # CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set +# CONFIG_CPU_IBPB_ENTRY is not set +# CONFIG_CPU_IBRS_ENTRY is not set # CONFIG_CPU_ICACHE_DISABLE is not set # CONFIG_CPU_ICACHE_MISMATCH_WORKAROUND is not set # CONFIG_CPU_IDLE is not set @@ -1146,6 +1154,7 @@ CONFIG_CRYPTO_AEAD2=y # CONFIG_CRYPTO_AEGIS128_AESNI_SSE2 is not set # CONFIG_CRYPTO_AEGIS256 is not set # CONFIG_CRYPTO_AEGIS256_AESNI_SSE2 is not set +# CONFIG_CRYPTO_ARIA_AESNI_AVX_X86_64 is not set CONFIG_CRYPTO_AES=y # CONFIG_CRYPTO_AES_586 is not set # CONFIG_CRYPTO_AES_ARM is not set @@ -1308,6 +1317,7 @@ CONFIG_CRYPTO_PCRYPT=y # CONFIG_CRYPTO_POLY1305_NEON is not set # CONFIG_CRYPTO_POLY1305_X86_64 is not set # CONFIG_CRYPTO_POLYVAL_ARM64_CE is not set +# CONFIG_CRYPTO_POLYVAL_CLMUL_NI is not set # CONFIG_CRYPTO_RMD128 is not set # CONFIG_CRYPTO_RMD160 is not set # CONFIG_CRYPTO_RMD256 is not set @@ -1512,6 +1522,7 @@ CONFIG_DEVPORT=y # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set # CONFIG_DEVTMPFS is not set # CONFIG_DEVTMPFS_MOUNT is not set +# CONFIG_DEVTMPFS_SAFE is not set # CONFIG_DEV_DAX is not set # CONFIG_DGAP is not set # CONFIG_DGNC is not set @@ -1974,7 +1985,11 @@ CONFIG_DYNAMIC_DEBUG_CORE=y # CONFIG_EEPROM_LEGACY is not set # CONFIG_EEPROM_MAX6875 is not set # CONFIG_EFI is not set +# CONFIG_EFI_COCO_SECRET is not set +# CONFIG_EFI_DXE_MEM_ATTRIBUTES is not set +# CONFIG_EFI_DISABLE_RUNTIME is not set CONFIG_EFI_PARTITION=y +# CONFIG_EFI_SECRET is not set # CONFIG_EFI_VARS_PSTORE is not set # CONFIG_EFS_FS is not set CONFIG_ELFCORE=y @@ -2002,6 +2017,7 @@ CONFIG_ETHERNET=y # CONFIG_ETHOC is not set CONFIG_ETHTOOL_NETLINK=y CONFIG_EVENTFD=y +# CONFIG_EXAR_WDT is not set # CONFIG_EVM is not set # CONFIG_EXCLUSIVE_SYSTEM_RAM is not set # CONFIG_EXFAT_FS is not set @@ -2296,6 +2312,7 @@ CONFIG_GENERIC_VDSO_TIME_NS=y # CONFIG_GENEVE is not set # CONFIG_GENWQE is not set # CONFIG_GFS2_FS is not set +# CONFIG_GIGABYTE_WMI is not set # CONFIG_GIGASET_CAPI is not set # CONFIG_GIGASET_DEBUG is not set # CONFIG_GIGASET_DUMMYLL is not set @@ -2574,6 +2591,7 @@ CONFIG_HPET_MMAP_DEFAULT=y # CONFIG_HP_ILO is not set # CONFIG_HP_WATCHDOG is not set # CONFIG_HP_WIRELESS is not set +# CONFIG_HP_WMI is not set # CONFIG_HSA_AMD is not set # CONFIG_HSI is not set # CONFIG_HSR is not set @@ -2585,6 +2603,7 @@ CONFIG_HPET_MMAP_DEFAULT=y # CONFIG_HTU21 is not set # CONFIG_HUGETLBFS is not set # CONFIG_HUGETLB_PAGE is not set +# CONFIGHUAWEI_WMI is not set # CONFIG_HVC_DCC is not set # CONFIG_HVC_UDBG is not set # CONFIG_HWLAT_TRACER is not set @@ -2818,7 +2837,7 @@ CONFIG_INET=y # CONFIG_INET_ESPINTCP is not set # CONFIG_INET_IPCOMP is not set # CONFIG_INET_LRO is not set -# CONFIG_INET_TABLE_PERTURB_ORDER is not set +CONFIG_INET_TABLE_PERTURB_ORDER=16 # CONFIG_INET_TCP_DIAG is not set # CONFIG_INET_TUNNEL is not set # CONFIG_INET_UDP_DIAG is not set @@ -2940,8 +2959,11 @@ CONFIG_INPUT_MISC=y # CONFIG_INTEL_SOC_PMIC_CHTDC_TI is not set # CONFIG_INTEL_SOC_PMIC_CHTWC is not set # CONFIG_INTEL_TCC_COOLING is not set +# CONFIG_INTEL_TDX_GUEST is not set # CONFIG_INTEL_TH is not set # CONFIG_INTEL_VBTN is not set +# CONFIG_INTEL_WMI_SBL_FW_UPDATE is not set +# CONFIG_INTEL_WMI_THUNDERBOLT is not set # CONFIG_INTEL_XWAY_PHY is not set # CONFIG_INTERCONNECT is not set # CONFIG_INTERVAL_TREE_TEST is not set @@ -3335,6 +3357,7 @@ CONFIG_LEDS_TRIGGER_TIMER=y # CONFIG_LED_TRIGGER_PHY is not set # CONFIG_LEGACY_PTYS is not set # CONFIG_LGUEST is not set +# CONFIG_LG_LAPTOP is not set # CONFIG_LIB80211 is not set # CONFIG_LIB80211_CRYPT_CCMP is not set # CONFIG_LIB80211_CRYPT_TKIP is not set @@ -3768,6 +3791,7 @@ CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY=y # CONFIG_MLX5_CORE is not set # CONFIG_MLX5_EN_MACSEC is not set # CONFIG_MLX5_SF is not set +# CONFIG_MLX5_VFIO_PCI is not set # CONFIG_MLX90614 is not set # CONFIG_MLX90632 is not set # CONFIG_MLXFW is not set @@ -3881,6 +3905,7 @@ CONFIG_MSDOS_PARTITION=y # CONFIG_MSE102X is not set # CONFIG_MSI_BITMAP_SELFTEST is not set # CONFIG_MSI_LAPTOP is not set +# CONFIG_MSI_WMI is not set # CONFIG_MSM_GCC_8953 is not set # CONFIG_MSM_MMCC_8994 is not set # CONFIG_MST_IRQ is not set @@ -4081,6 +4106,7 @@ CONFIG_MULTIUSER=y # CONFIG_MWL8K is not set # CONFIG_MXC4005 is not set # CONFIG_MXC6255 is not set +# CONFIG_MXM_WMI is not set # CONFIG_MYRI10GE is not set # CONFIG_NAMESPACES is not set # CONFIG_NATIONAL_PHY is not set @@ -4193,6 +4219,7 @@ CONFIG_NETWORK_FILESYSTEMS=y # CONFIG_NETWORK_SECMARK is not set # CONFIG_NETXEN_NIC is not set # CONFIG_NET_9P is not set +# CONFIG_NET_9P_FD is not set # CONFIG_NET_ACT_BPF is not set # CONFIG_NET_ACT_CSUM is not set # CONFIG_NET_ACT_CT is not set @@ -4522,6 +4549,7 @@ CONFIG_NF_CONNTRACK_PROCFS=y # CONFIG_NF_LOG_ARP is not set # CONFIG_NF_LOG_BRIDGE is not set # CONFIG_NF_LOG_IPV4 is not set +# CONFIG_NF_LOG_IPV6 is not set # CONFIG_NF_LOG_NETDEV is not set # CONFIG_NF_LOG_SYSLOG is not set # CONFIG_NF_NAT is not set @@ -4640,6 +4668,7 @@ CONFIG_NR_LRU_GENS=7 # CONFIG_NULL_TTY is not set # CONFIG_NUMA is not set # CONFIG_NVIDIA_CARMEL_CNP_ERRATUM is not set +# CONFIG_NVIDIA_WMI_EC_BACKLIGHT is not set # CONFIG_NVM is not set # CONFIG_NVMEM is not set # CONFIG_NVMEM_BCM_OCOTP is not set @@ -4875,6 +4904,7 @@ CONFIG_PCI_SYSCALL=y # CONFIG_PD6729 is not set # CONFIG_PDA_POWER is not set # CONFIG_PDC_ADMA is not set +# CONFIG_PEAQ_WMI is not set # CONFIG_PECI is not set # CONFIG_PERCPU_STATS is not set # CONFIG_PERCPU_TEST is not set @@ -4934,6 +4964,7 @@ CONFIG_PINCONF=y # CONFIG_PINCTRL_LPASS_LPI is not set # CONFIG_PINCTRL_MCP23S08 is not set # CONFIG_PINCTRL_MDM9607 is not set +# CONFIG_PINCTRL_METEORLAKE is not set # CONFIG_PINCTRL_MICROCHIP_SGPIO is not set # CONFIG_PINCTRL_MSM8953 is not set # CONFIG_PINCTRL_MSM8X74 is not set @@ -5122,6 +5153,7 @@ CONFIG_PWRSEQ_SIMPLE=y # CONFIG_QCOM_HIDMA_MGMT is not set # CONFIG_QCOM_LMH is not set # CONFIG_QCOM_QDF2400_ERRATUM_0065 is not set +# CONFIG_QCOM_QMI_HELPERS is not set # CONFIG_QCOM_SCM is not set # CONFIG_QCOM_SPMI_ADC5 is not set # CONFIG_QCOM_SPMI_ADC_TM5 is not set @@ -5693,6 +5725,7 @@ CONFIG_SELECT_MEMORY_MODEL=y # CONFIG_SENSORS_ASB100 is not set # CONFIG_SENSORS_ASC7621 is not set # CONFIG_SENSORS_ASPEED is not set +# CONFIG_SENSORS_ASUS_WMI is not set # CONFIG_SENSORS_ATK0110 is not set # CONFIG_SENSORS_ATXP1 is not set # CONFIG_SENSORS_AXI_FAN_CONTROL is not set @@ -5944,6 +5977,7 @@ CONFIG_SERIAL_EARLYCON=y # CONFIG_SERIAL_JSM is not set # CONFIG_SERIAL_MAX3100 is not set # CONFIG_SERIAL_MAX310X is not set +# CONFIG_SERIAL_MULTI_INSTANTIATE is not set # CONFIG_SERIAL_NONSTANDARD is not set # CONFIG_SERIAL_OF_PLATFORM is not set # CONFIG_SERIAL_OF_PLATFORM_NWPSERIAL is not set @@ -6030,6 +6064,7 @@ CONFIG_SLAB_MERGE_DEFAULT=y # CONFIG_SLIMBUS is not set # CONFIG_SLIP is not set # CONFIG_SLOB is not set +# CONFIG_SLS is not set CONFIG_SLUB=y CONFIG_SLUB_CPU_PARTIAL=y # CONFIG_SLUB_DEBUG is not set @@ -6791,6 +6826,7 @@ CONFIG_TCP_CONG_CUBIC=y # CONFIG_TEST_LIST_SORT is not set # CONFIG_TEST_LKM is not set # CONFIG_TEST_LOCKUP is not set +# CONFIG_TEST_MAPLE_TREE is not set # CONFIG_TEST_MEMCAT_P is not set # CONFIG_TEST_MEMINIT is not set # CONFIG_TEST_MIN_HEAP is not set @@ -6832,6 +6868,7 @@ CONFIG_TEXTSEARCH=y # CONFIG_THERMAL_STATISTICS is not set # CONFIG_THERMAL_WRITABLE_TRIPS is not set # CONFIG_THINKPAD_ACPI is not set +# CONFIG_THINKPAD_LMI is not set CONFIG_THIN_ARCHIVES=y # CONFIG_THREAD_INFO_IN_TASK is not set # CONFIG_THRUSTMASTER_FF is not set @@ -7033,6 +7070,7 @@ CONFIG_TMPFS_XATTR=y # CONFIG_TOUCHSCREEN_ZET6223 is not set # CONFIG_TOUCHSCREEN_ZFORCE is not set # CONFIG_TOUCHSCREEN_ZINITIX is not set +# CONFIG_TOSHIBA_WMI is not set # CONFIG_TPL0102 is not set # CONFIG_TPS6105X is not set # CONFIG_TPS65010 is not set @@ -7843,6 +7881,7 @@ CONFIG_WLAN=y # CONFIG_WLAN_VENDOR_TI is not set # CONFIG_WLAN_VENDOR_ZYDAS is not set # CONFIG_WLCORE is not set +# CONFIG_WMI_BMOF is not set CONFIG_WQ_POWER_EFFICIENT_DEFAULT=y # CONFIG_WQ_WATCHDOG is not set # CONFIG_WWAN is not set @@ -7850,13 +7889,16 @@ CONFIG_WQ_POWER_EFFICIENT_DEFAULT=y # CONFIG_WW_MUTEX_SELFTEST is not set # CONFIG_X25 is not set # CONFIG_X509_CERTIFICATE_PARSER is not set +# CONFIG_X86_AMD_PSTATE_UT is not set # CONFIG_X86_PKG_TEMP_THERMAL is not set CONFIG_X86_SYSFB=y # CONFIG_XDP_SOCKETS is not set # CONFIG_XEN is not set # CONFIG_XEN_GRANT_DMA_ALLOC is not set # CONFIG_XEN_PVCALLS_FRONTEND is not set +# CONFIG_XEN_PV_MSR_SAFE is not set CONFIG_XEN_SCRUB_PAGES_DEFAULT=y +# CONFIG_XEN_VIRTIO is not set CONFIG_XFRM=y # CONFIG_XFRM_INTERFACE is not set # CONFIG_XFRM_IPCOMP is not set @@ -7864,6 +7906,7 @@ CONFIG_XFRM=y # CONFIG_XFRM_STATISTICS is not set # CONFIG_XFRM_SUB_POLICY is not set # CONFIG_XFRM_USER is not set +# CONFIG_XFRM_USER_COMPAT is not set # CONFIG_XFS_DEBUG is not set # CONFIG_XFS_FS is not set # CONFIG_XFS_ONLINE_SCRUB is not set @@ -7872,6 +7915,7 @@ CONFIG_XFRM=y # CONFIG_XFS_RT is not set # CONFIG_XFS_SUPPORT_V4 is not set # CONFIG_XFS_WARN is not set +# CONFIG_XIAOMI_WMI is not set # CONFIG_XILINX_AXI_EMAC is not set # CONFIG_XILINX_DMA is not set # CONFIG_XILINX_EMACLITE is not set @@ -7908,6 +7952,7 @@ CONFIG_XZ_DEC=y # CONFIG_YENTA_RICOH is not set # CONFIG_YENTA_TI is not set # CONFIG_YENTA_TOSHIBA is not set +# CONFIG_YOGABOOK_WMI is not set # CONFIG_ZBUD is not set # CONFIG_ZD1211RW is not set # CONFIG_ZD1211RW_DEBUG is not set @@ -7924,6 +7969,7 @@ CONFIG_ZONE_DMA=y # CONFIG_ZPOOL is not set # CONFIG_ZRAM is not set # CONFIG_ZRAM_DEF_COMP_LZ4 is not set +# CONFIG_ZRAM_DEF_COMP_LZ4HC is not set # CONFIG_ZRAM_DEF_COMP_LZO is not set # CONFIG_ZRAM_DEF_COMP_LZORLE is not set # CONFIG_ZRAM_DEF_COMP_ZSTD is not set From a6d047349a0f3218f6aadf44242cd094c1e92f67 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Fri, 23 Dec 2022 08:44:21 +0100 Subject: [PATCH 4/5] Modify kernel-defaults for 6.1 --- root/include/kernel-defaults.mk | 202 ++++++++++++++++++++++++++++++++ 1 file changed, 202 insertions(+) create mode 100644 root/include/kernel-defaults.mk diff --git a/root/include/kernel-defaults.mk b/root/include/kernel-defaults.mk new file mode 100644 index 00000000..307c7b5d --- /dev/null +++ b/root/include/kernel-defaults.mk @@ -0,0 +1,202 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# Copyright (C) 2006-2020 OpenWrt.org + +ifdef CONFIG_STRIP_KERNEL_EXPORTS + KERNEL_MAKEOPTS_IMAGE += \ + EXTRA_LDSFLAGS="-I$(KERNEL_BUILD_DIR) -include symtab.h" +endif + +INITRAMFS_EXTRA_FILES ?= $(GENERIC_PLATFORM_DIR)/image/initramfs-base-files.txt + +ifneq (,$(KERNEL_CC)) + KERNEL_MAKEOPTS += CC="$(KERNEL_CC)" +endif + +export HOST_EXTRACFLAGS=-I$(STAGING_DIR_HOST)/include + +# defined in quilt.mk +Kernel/Patch:=$(Kernel/Patch/Default) + +ifneq (,$(findstring .xz,$(LINUX_SOURCE))) + LINUX_CAT:=xzcat +else + LINUX_CAT:=gzip -dc +endif + +ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"") + ifeq ($(strip $(CONFIG_KERNEL_GIT_CLONE_URI)),"") + define Kernel/Prepare/Default + $(LINUX_CAT) $(DL_DIR)/$(LINUX_SOURCE) | $(TAR) -C $(KERNEL_BUILD_DIR) $(TAR_OPTIONS) + $(Kernel/Patch) + $(if $(QUILT),touch $(LINUX_DIR)/.quilt_used) + endef + else + define Kernel/Prepare/Default + $(LINUX_CAT) $(DL_DIR)/$(LINUX_SOURCE) | $(TAR) -C $(KERNEL_BUILD_DIR) $(TAR_OPTIONS) + endef + endif +else + define Kernel/Prepare/Default + mkdir -p $(KERNEL_BUILD_DIR) + if [ -d $(LINUX_DIR) ]; then \ + rmdir $(LINUX_DIR); \ + fi + ln -s $(CONFIG_EXTERNAL_KERNEL_TREE) $(LINUX_DIR) + if [ -d $(LINUX_DIR)/user_headers ]; then \ + rm -rf $(LINUX_DIR)/user_headers; \ + fi + endef +endif + +ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y) + ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS_SEPARATE),y) + define Kernel/SetInitramfs/PreConfigure + grep -v -e CONFIG_BLK_DEV_INITRD $(LINUX_DIR)/.config.old > $(LINUX_DIR)/.config + echo 'CONFIG_BLK_DEV_INITRD=y' >> $(LINUX_DIR)/.config + echo 'CONFIG_INITRAMFS_SOURCE=""' >> $(LINUX_DIR)/.config + endef + else + ifeq ($(strip $(CONFIG_EXTERNAL_CPIO)),"") + define Kernel/SetInitramfs/PreConfigure + grep -v -e INITRAMFS -e CONFIG_RD_ -e CONFIG_BLK_DEV_INITRD $(LINUX_DIR)/.config.old > $(LINUX_DIR)/.config + echo 'CONFIG_BLK_DEV_INITRD=y' >> $(LINUX_DIR)/.config + echo 'CONFIG_INITRAMFS_SOURCE="$(strip $(TARGET_DIR) $(INITRAMFS_EXTRA_FILES))"' >> $(LINUX_DIR)/.config + endef + else + define Kernel/SetInitramfs/PreConfigure + grep -v INITRAMFS $(LINUX_DIR)/.config.old > $(LINUX_DIR)/.config + echo 'CONFIG_INITRAMFS_SOURCE="$(call qstrip,$(CONFIG_EXTERNAL_CPIO))"' >> $(LINUX_DIR)/.config + endef + endif +endif + + define Kernel/SetInitramfs + rm -f $(LINUX_DIR)/.config.prev + mv $(LINUX_DIR)/.config $(LINUX_DIR)/.config.old + $(call Kernel/SetInitramfs/PreConfigure) + echo "# CONFIG_INITRAMFS_PRESERVE_MTIME is not set" >> $(LINUX_DIR)/.config + ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS_SEPARATE),y) + echo 'CONFIG_INITRAMFS_ROOT_UID=$(shell id -u)' >> $(LINUX_DIR)/.config + echo 'CONFIG_INITRAMFS_ROOT_GID=$(shell id -g)' >> $(LINUX_DIR)/.config + echo "$(if $(CONFIG_TARGET_INITRAMFS_FORCE),CONFIG_INITRAMFS_FORCE=y,# CONFIG_INITRAMFS_FORCE is not set)" >> $(LINUX_DIR)/.config + else + echo "# CONFIG_INITRAMFS_FORCE is not set" >> $(LINUX_DIR)/.config + endif + echo "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_NONE),CONFIG_INITRAMFS_COMPRESSION_NONE=y,# CONFIG_INITRAMFS_COMPRESSION_NONE is not set)" >> $(LINUX_DIR)/.config + echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_GZIP),CONFIG_INITRAMFS_COMPRESSION_GZIP=y\nCONFIG_RD_GZIP=y,# CONFIG_INITRAMFS_COMPRESSION_GZIP is not set\n# CONFIG_RD_GZIP is not set)" >> $(LINUX_DIR)/.config + echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_BZIP2),CONFIG_INITRAMFS_COMPRESSION_BZIP2=y\nCONFIG_RD_BZIP2=y,# CONFIG_INITRAMFS_COMPRESSION_BZIP2 is not set\n# CONFIG_RD_BZIP2 is not set)" >> $(LINUX_DIR)/.config + echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZMA),CONFIG_INITRAMFS_COMPRESSION_LZMA=y\nCONFIG_RD_LZMA=y,# CONFIG_INITRAMFS_COMPRESSION_LZMA is not set\n# CONFIG_RD_LZMA is not set)" >> $(LINUX_DIR)/.config + echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZO),CONFIG_INITRAMFS_COMPRESSION_LZO=y\nCONFIG_RD_LZO=y,# CONFIG_INITRAMFS_COMPRESSION_LZO is not set\n# CONFIG_RD_LZO is not set)" >> $(LINUX_DIR)/.config + echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_XZ),CONFIG_INITRAMFS_COMPRESSION_XZ=y\nCONFIG_RD_XZ=y,# CONFIG_INITRAMFS_COMPRESSION_XZ is not set\n# CONFIG_RD_XZ is not set)" >> $(LINUX_DIR)/.config + echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZ4),CONFIG_INITRAMFS_COMPRESSION_LZ4=y\nCONFIG_RD_LZ4=y,# CONFIG_INITRAMFS_COMPRESSION_LZ4 is not set\n# CONFIG_RD_LZ4 is not set)" >> $(LINUX_DIR)/.config + echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_ZSTD),CONFIG_INITRAMFS_COMPRESSION_ZSTD=y\nCONFIG_RD_ZSTD=y,# CONFIG_INITRAMFS_COMPRESSION_ZSTD is not set\n# CONFIG_RD_ZSTD is not set)" >> $(LINUX_DIR)/.config + endef +else +endif + +define Kernel/SetNoInitramfs + mv $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config.old + grep -v INITRAMFS $(LINUX_DIR)/.config.old > $(LINUX_DIR)/.config.set + echo 'CONFIG_INITRAMFS_SOURCE=""' >> $(LINUX_DIR)/.config.set + echo '# CONFIG_INITRAMFS_FORCE is not set' >> $(LINUX_DIR)/.config.set + echo "# CONFIG_INITRAMFS_PRESERVE_MTIME is not set" >> $(LINUX_DIR)/.config.set +endef + +define Kernel/Configure/Default + rm -f $(LINUX_DIR)/localversion + $(LINUX_CONF_CMD) > $(LINUX_DIR)/.config.target +# copy CONFIG_KERNEL_* settings over to .config.target + awk '/^(#[[:space:]]+)?CONFIG_KERNEL/{sub("CONFIG_KERNEL_","CONFIG_");print}' $(TOPDIR)/.config >> $(LINUX_DIR)/.config.target + echo "# CONFIG_KALLSYMS_EXTRA_PASS is not set" >> $(LINUX_DIR)/.config.target + echo "# CONFIG_KALLSYMS_ALL is not set" >> $(LINUX_DIR)/.config.target + echo "CONFIG_KALLSYMS_UNCOMPRESSED=y" >> $(LINUX_DIR)/.config.target + $(SCRIPT_DIR)/package-metadata.pl kconfig $(TMP_DIR)/.packageinfo $(TOPDIR)/.config $(KERNEL_PATCHVER) > $(LINUX_DIR)/.config.override + $(SCRIPT_DIR)/kconfig.pl 'm+' '+' $(LINUX_DIR)/.config.target /dev/null $(LINUX_DIR)/.config.override > $(LINUX_DIR)/.config.set + $(call Kernel/SetNoInitramfs) + rm -rf $(KERNEL_BUILD_DIR)/modules + cmp -s $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config.prev || { \ + cp $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config; \ + cp $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config.prev; \ + } + $(_SINGLE) [ -d $(LINUX_DIR)/user_headers ] || $(KERNEL_MAKE) $(if $(findstring uml,$(BOARD)),ARCH=$(ARCH)) INSTALL_HDR_PATH=$(LINUX_DIR)/user_headers headers_install + grep '=[ym]' $(LINUX_DIR)/.config.set | LC_ALL=C sort | $(MKHASH) md5 > $(LINUX_DIR)/.vermagic +endef + +define Kernel/Configure/Initramfs + $(call Kernel/SetInitramfs) +endef + +define Kernel/CompileModules/Default + rm -f $(LINUX_DIR)/vmlinux $(LINUX_DIR)/System.map + +$(KERNEL_MAKE) $(if $(KERNELNAME),$(KERNELNAME),all) modules + # If .config did not change, use the previous timestamp to avoid package rebuilds + cmp -s $(LINUX_DIR)/.config $(LINUX_DIR)/.config.modules.save && \ + mv $(LINUX_DIR)/.config.modules.save $(LINUX_DIR)/.config; \ + $(CP) $(LINUX_DIR)/.config $(LINUX_DIR)/.config.modules.save +endef + +OBJCOPY_STRIP = -R .reginfo -R .notes -R .note -R .comment -R .mdebug -R .note.gnu.build-id + +# AMD64 shares the location with x86 +ifeq ($(LINUX_KARCH),x86_64) +IMAGES_DIR:=../../x86/boot +endif + +define Kernel/CopyImage + cmp -s $(LINUX_DIR)/vmlinux $(KERNEL_BUILD_DIR)/vmlinux$(1).debug || { \ + $(KERNEL_CROSS)objcopy -O binary $(OBJCOPY_STRIP) -S $(LINUX_DIR)/vmlinux $(LINUX_KERNEL)$(1); \ + $(KERNEL_CROSS)objcopy $(OBJCOPY_STRIP) -S $(LINUX_DIR)/vmlinux $(KERNEL_BUILD_DIR)/vmlinux$(1).elf; \ + $(CP) $(LINUX_DIR)/vmlinux $(KERNEL_BUILD_DIR)/vmlinux$(1).debug; \ + $(foreach k, \ + $(if $(KERNEL_IMAGES),$(KERNEL_IMAGES),$(filter-out vmlinux dtbs,$(KERNELNAME))), \ + $(CP) $(LINUX_DIR)/arch/$(LINUX_KARCH)/boot/$(IMAGES_DIR)/$(k) $(KERNEL_BUILD_DIR)/$(k)$(1); \ + ) \ + } +endef + +# Always add "modules" so a proper Module.symvers file is written that +# also contains symbols from the kernel modules. Without these symbols +# external packages that depend on exported symbols from kernel modules +# will fail to build. +define Kernel/CompileImage/Default + rm -f $(TARGET_DIR)/init + +$(KERNEL_MAKE) $(KERNEL_MAKEOPTS_IMAGE) $(if $(KERNELNAME),$(KERNELNAME),all) modules + $(call Kernel/CopyImage) +endef + +# Here as well, always add "modules", see comment above. +ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) +define Kernel/CompileImage/Initramfs + $(call Kernel/Configure/Initramfs) + $(CP) $(GENERIC_PLATFORM_DIR)/other-files/init $(TARGET_DIR)/init + $(if $(SOURCE_DATE_EPOCH),touch -hcd "@$(SOURCE_DATE_EPOCH)" $(TARGET_DIR) $(TARGET_DIR)/init) + rm -rf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/usr/initramfs_data.cpio* +ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS_SEPARATE),y) +ifneq ($(qstrip $(CONFIG_EXTERNAL_CPIO)),) + $(CP) $(CONFIG_EXTERNAL_CPIO) $(KERNEL_BUILD_DIR)/initrd.cpio +else + ( cd $(TARGET_DIR); find . | LC_ALL=C sort | $(STAGING_DIR_HOST)/bin/cpio --reproducible -o -H newc -R 0:0 > $(KERNEL_BUILD_DIR)/initrd.cpio ) +endif + $(if $(SOURCE_DATE_EPOCH),touch -hcd "@$(SOURCE_DATE_EPOCH)" $(KERNEL_BUILD_DIR)/initrd.cpio) + $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_BZIP2),bzip2 -9 -c < $(KERNEL_BUILD_DIR)/initrd.cpio > $(KERNEL_BUILD_DIR)/initrd.cpio.bzip2) + $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_GZIP),gzip -n -f -S .gzip -9n $(KERNEL_BUILD_DIR)/initrd.cpio) + $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZMA),$(STAGING_DIR_HOST)/bin/lzma e -lc1 -lp2 -pb2 $(KERNEL_BUILD_DIR)/initrd.cpio $(KERNEL_BUILD_DIR)/initrd.cpio.lzma) +# ? $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZO),) + $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_XZ),$(STAGING_DIR_HOST)/bin/xz -T$(if $(filter 1,$(NPROC)),2,0) -9 -fz --check=crc32 $(KERNEL_BUILD_DIR)/initrd.cpio) +# ? $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZ4),) + $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_ZSTD),$(STAGING_DIR_HOST)/bin/zstd -T0 -f -o $(KERNEL_BUILD_DIR)/initrd.cpio.zstd $(KERNEL_BUILD_DIR)/initrd.cpio) +endif + +$(KERNEL_MAKE) $(KERNEL_MAKEOPTS_IMAGE) $(if $(KERNELNAME),$(KERNELNAME),all) modules + $(call Kernel/CopyImage,-initramfs) +endef +else +define Kernel/CompileImage/Initramfs +endef +endif + +define Kernel/Clean/Default + rm -f $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/.configured + rm -f $(LINUX_KERNEL) + $(_SINGLE)$(MAKE) -C $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) clean +endef From 8a614502e4b304d51225b7229111e93c3ce2b880 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Fri, 23 Dec 2022 17:05:27 +0100 Subject: [PATCH 5/5] Fix 6.1 config --- root/target/linux/generic/config-6.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/root/target/linux/generic/config-6.1 b/root/target/linux/generic/config-6.1 index 335b38f9..77f4e2a6 100644 --- a/root/target/linux/generic/config-6.1 +++ b/root/target/linux/generic/config-6.1 @@ -2603,7 +2603,7 @@ CONFIG_HPET_MMAP_DEFAULT=y # CONFIG_HTU21 is not set # CONFIG_HUGETLBFS is not set # CONFIG_HUGETLB_PAGE is not set -# CONFIGHUAWEI_WMI is not set +# CONFIG_HUAWEI_WMI is not set # CONFIG_HVC_DCC is not set # CONFIG_HVC_UDBG is not set # CONFIG_HWLAT_TRACER is not set