diff options
Diffstat (limited to 'scripts')
6 files changed, 180 insertions, 7 deletions
diff --git a/scripts/package-build/linux-kernel/config/arm64/vyos_defconfig b/scripts/package-build/linux-kernel/config/arm64/vyos_defconfig index 738c0057..a4b03f3b 100644 --- a/scripts/package-build/linux-kernel/config/arm64/vyos_defconfig +++ b/scripts/package-build/linux-kernel/config/arm64/vyos_defconfig @@ -1833,8 +1833,7 @@ CONFIG_IGBVF=m # CONFIG_IXGBE is not set # CONFIG_IXGBEVF is not set # CONFIG_I40E is not set -CONFIG_IAVF=m -CONFIG_I40EVF=m +# CONFIG_I40EVF is not set # CONFIG_ICE is not set # CONFIG_FM10K is not set CONFIG_IGC=m @@ -5672,7 +5671,6 @@ CONFIG_OBJAGG=m CONFIG_GENERIC_IOREMAP=y CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y -CONFIG_PLDMFW=y CONFIG_DEBUG_MISC=y diff --git a/scripts/package-build/linux-kernel/config/x86/vyos_defconfig b/scripts/package-build/linux-kernel/config/x86/vyos_defconfig index e86c3fe4..22eb3271 100644 --- a/scripts/package-build/linux-kernel/config/x86/vyos_defconfig +++ b/scripts/package-build/linux-kernel/config/x86/vyos_defconfig @@ -1718,8 +1718,7 @@ CONFIG_IGBVF=m # CONFIG_IXGBE is not set # CONFIG_IXGBEVF is not set # CONFIG_I40E is not set -CONFIG_IAVF=m -CONFIG_I40EVF=m +# CONFIG_I40EVF is not set # CONFIG_ICE is not set # CONFIG_FM10K is not set CONFIG_IGC=m @@ -4628,8 +4627,6 @@ CONFIG_PARMAN=m CONFIG_OBJAGG=m # end of Library routines -CONFIG_PLDMFW=y - # CONFIG_DEBUG_MISC is not set # diff --git a/scripts/package-build/linux-kernel/package.toml b/scripts/package-build/linux-kernel/package.toml index 41389d10..085c4074 100644 --- a/scripts/package-build/linux-kernel/package.toml +++ b/scripts/package-build/linux-kernel/package.toml @@ -65,6 +65,12 @@ scm_url = "http://github.com/intel/ethernet-linux-ice" build_cmd = "build_intel_nic" [[packages]] +name = "iavf" +commit_id = "v4.13.20" +scm_url = "http://github.com/intel/ethernet-linux-iavf" +build_cmd = "build_intel_nic" + +[[packages]] name = "jool" commit_id = "" scm_url = "" diff --git a/scripts/package-build/linux-kernel/patches/iavf/0001-kcompat-have-auxiliary-device-id-when-mod-devicetable-has-it.patch b/scripts/package-build/linux-kernel/patches/iavf/0001-kcompat-have-auxiliary-device-id-when-mod-devicetable-has-it.patch new file mode 100644 index 00000000..3326dd79 --- /dev/null +++ b/scripts/package-build/linux-kernel/patches/iavf/0001-kcompat-have-auxiliary-device-id-when-mod-devicetable-has-it.patch @@ -0,0 +1,23 @@ +From: Christian Breunig <christian@breunig.cc> +Date: Sun, 3 May 2026 20:18:00 +0000 +Subject: [PATCH 1/3] kcompat: HAVE_AUXILIARY_DEVICE_ID when mod_devicetable has it + +--- + src/kcompat-generator.sh | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/src/kcompat-generator.sh ++++ b/src/kcompat-generator.sh +@@ -58,9 +58,10 @@ function gen-aux() { + fi + gen HAVE_AUXILIARY_DRIVER_INT_REMOVE if string "$HAVE_AUX_INT_REMOVE" equals 1 + +- # generate HAVE_AUXILIARY_DEVICE_ID only for cases when it's disabled in .config ++ # Whenever mod_devicetable.h defines struct auxiliary_device_id, vendor ++ # auxiliary_bus.h must not redefine it (true for CONFIG_AUXILIARY_BUS=y as well). + HAVE_AUX_DEV_ID=0 +- if ! config_has CONFIG_AUXILIARY_BUS && check struct auxiliary_device_id in "$mh" ; then ++ if check struct auxiliary_device_id in "$mh" ; then + HAVE_AUX_DEV_ID=1 + fi + gen HAVE_AUXILIARY_DEVICE_ID if string "$HAVE_AUX_DEV_ID" equals 1 diff --git a/scripts/package-build/linux-kernel/patches/iavf/0002-auxiliary-bus-type-callback-prototypes.patch b/scripts/package-build/linux-kernel/patches/iavf/0002-auxiliary-bus-type-callback-prototypes.patch new file mode 100644 index 00000000..76a92576 --- /dev/null +++ b/scripts/package-build/linux-kernel/patches/iavf/0002-auxiliary-bus-type-callback-prototypes.patch @@ -0,0 +1,73 @@ +From: Christian Breunig <christian@breunig.cc> +Date: Sun, 3 May 2026 19:44:00 +0000 +Subject: [PATCH 3/3] auxiliary: align bus callbacks with kernel prototypes + +--- + src/auxiliary.c | 25 ++++++++++++++++++++++++- + 1 file changed, 24 insertions(+), 1 deletion(-) + +--- a/src/auxiliary.c ++++ b/src/auxiliary.c +@@ -7,6 +7,7 @@ + #include <linux/init.h> + #include <linux/slab.h> + #include <linux/module.h> ++#include <linux/version.h> + #include <linux/pm_domain.h> + #include <linux/pm_runtime.h> + #include <linux/string.h> +@@ -31,7 +32,7 @@ static const struct auxiliary_device_id *auxiliary_match_id(const struct auxilia + return NULL; + } + +-static int auxiliary_match(struct device *dev, struct device_driver *drv) ++static int auxiliary_match_common(struct device *dev, struct device_driver *drv) + { + struct auxiliary_device *auxdev = to_auxiliary_dev(dev); + struct auxiliary_driver *auxdrv = to_auxiliary_drv(drv); +@@ -39,7 +40,23 @@ static int auxiliary_match(struct device *dev, struct device_driver *drv) + return !!auxiliary_match_id(auxdrv->id_table, auxdev); + } + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0) ++static int auxiliary_match(struct device *dev, const struct device_driver *drv) ++{ ++ return auxiliary_match_common(dev, (struct device_driver *)drv); ++} ++#else ++static int auxiliary_match(struct device *dev, struct device_driver *drv) ++{ ++ return auxiliary_match_common(dev, drv); ++} ++#endif ++ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0) ++static int auxiliary_uevent(const struct device *dev, struct kobj_uevent_env *env) ++#else + static int auxiliary_uevent(struct device *dev, struct kobj_uevent_env *env) ++#endif + { + const char *name, *p; + +@@ -78,7 +95,11 @@ static int auxiliary_bus_probe(struct device *dev) + return ret; + } + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0) ++static void auxiliary_bus_remove(struct device *dev) ++#else + static int auxiliary_bus_remove(struct device *dev) ++#endif + { + struct auxiliary_driver *auxdrv = to_auxiliary_drv(dev->driver); + struct auxiliary_device *auxdev = to_auxiliary_dev(dev); +@@ -87,7 +108,9 @@ static int auxiliary_bus_remove(struct device *dev) + auxdrv->remove(auxdev); + dev_pm_domain_detach(dev, true); + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0) + return 0; ++#endif + } + + static void auxiliary_bus_shutdown(struct device *dev) diff --git a/scripts/package-build/linux-kernel/patches/iavf/0003-check_aux_bus-full-ksrc-and-canonical-auxiliary-header.patch b/scripts/package-build/linux-kernel/patches/iavf/0003-check_aux_bus-full-ksrc-and-canonical-auxiliary-header.patch new file mode 100644 index 00000000..01ef8efb --- /dev/null +++ b/scripts/package-build/linux-kernel/patches/iavf/0003-check_aux_bus-full-ksrc-and-canonical-auxiliary-header.patch @@ -0,0 +1,76 @@ +--- a/scripts/check_aux_bus ++++ b/scripts/check_aux_bus +@@ -58,7 +58,14 @@ exit_not_found_failure() { exit 3; } + + find_aux_bus_inc() + { +- aux_bus_inc=$(find -L ${ksrc} -name "auxiliary_bus.h") ++ # Prefer the main tree include (VyOS/kernel build trees may also contain ++ # packaged headers under debian/; an unbounded `find` then returns multiple ++ # paths and `[ -f "$aux_bus_inc" ]` fails, forcing needless OOT auxiliary). ++ if [ -f "${ksrc}/${LINUX_INCLUDE_DIR}/auxiliary_bus.h" ]; then ++ aux_bus_inc="${ksrc}/${LINUX_INCLUDE_DIR}/auxiliary_bus.h" ++ else ++ aux_bus_inc=$(find -L "${ksrc}" -name "auxiliary_bus.h" -print -quit) ++ fi + msg "auxiliary_bus.h location: ${aux_bus_inc}" + } + +@@ -101,28 +108,36 @@ find_kernel_source() + + find_config_file() + { +- # only search for kernel .config file if build_kernel is pointing +- # in the same tree as ksrc (see not about ksrc and build_kernel +- # both set in the scripts header comment) +- if [[ "$ksrc" != *"/lib/modules/${build_kernel}"* ]]; then +- msg "ksrc=$ksrc not the same as location generated from build_kernel=\"/lib/modules/${build_kernel}\", not searching for kernel .config file" +- else +- kbuild_dir="/lib/modules/${build_kernel}/build" ++ kconfig="" + ++ # Installed-modules layout: autoconf under /lib/modules/${build_kernel}/build ++ if [ -n "${build_kernel}" ] && [[ "$ksrc" == *"/lib/modules/${build_kernel}"* ]]; then ++ kbuild_dir="/lib/modules/${build_kernel}/build" + file_locations=(${kbuild_dir}/include/generated/autoconf.h \ + ${kbuild_dir}/include/linux/autoconf.h \ + /boot/bmlinux.autoconf.h) +- + for file in "${file_locations[@]}"; do +- if [ -f ${file} ]; then ++ if [ -f "${file}" ]; then + kconfig=${file} + break + fi + done +- +- if [ -z ${kconfig} ]; then ++ if [ -z "${kconfig}" ]; then + msg "Kernel config file not found at any of the expected locations." + fi ++ return ++ fi ++ ++ # Full source tree as --ksrc (e.g. VyOS KERNEL_DIR): read generated autoconf ++ for file in "${ksrc}/include/generated/autoconf.h" "${ksrc}/include/linux/autoconf.h"; do ++ if [ -f "${file}" ]; then ++ kconfig=${file} ++ msg "Using kernel config from ${kconfig}" ++ break ++ fi ++ done ++ if [ -z "${kconfig}" ]; then ++ msg "Kernel config file not found under ${ksrc}; will probe auxiliary_bus.h only." + fi + } + +@@ -131,7 +146,8 @@ get_config_auxiliary_bus() + # CONFIG_AUXILIARY_BUS=0 corresponds to CONFIG_AUXILIARY_BUS=n + # CONFIG_AUXILIARY_BUS=1 corresponds to CONFIG_AUXILIARY_BUS=y + # CONFIG_AUXILIARY_BUS= corresponds to CONFIG_AUXILIARY_BUS not available in the kernel +- CONFIG_AUXILIARY_BUS=$(grep CONFIG_AUXILIARY_BUS ${kconfig} | awk -F" " '{print $3}') ++ # Match the core symbol only (avoid CONFIG_AUXILIARY_BUS_MODULE, etc.) ++ CONFIG_AUXILIARY_BUS=$(grep -E '^#define CONFIG_AUXILIARY_BUS[[:space:]]' "${kconfig}" | awk '{print $3}') + msg "CONFIG_AUXILIARY_BUS=${CONFIG_AUXILIARY_BUS}" + } + |
