[Buildroot] [PATCH] package/zfs: Fix cross-platform-compilations
Romain Naour
romain.naour at gmail.com
Sun Aug 22 20:27:09 UTC 2021
Hello José Luis,
Le 22/08/2021 à 22:05, José Luis Salvador Rufo a écrit :
> This patch fixes the `make` executed from the `kernel.m4` in
> cross-platform-compilations environments:
> https://github.com/openzfs/zfs/blob/zfs-2.0.5/config/kernel.m4#L588
>
> Signed-off-by: José Luis Salvador Rufo <salvador.joseluis at gmail.com>
> ---
> Hello all.
>
> @Romain Naour, this patch will fix the buildroot gitlab CI.
Indeed it fix the issue!
Tested-by: Romain Naour <romain.naour at gmail.com>
>
> @Philippe Serbruyns, this patch will fix your issue with your rpi4.
>
> package/zfs/zfs.mk | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/package/zfs/zfs.mk b/package/zfs/zfs.mk
> index 3b1afb419a..24064cba82 100644
> --- a/package/zfs/zfs.mk
> +++ b/package/zfs/zfs.mk
> @@ -13,6 +13,19 @@ ZFS_CPE_ID_PRODUCT = openzfs
>
> ZFS_AUTORECONF = YES
>
> +# cross compile environment for linux kernel module
> +ZFS_MAKE_ENV = \
> + HOSTCC="$(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS)" \
> + ARCH=$(KERNEL_ARCH) \
> + CROSS_COMPILE="$(TARGET_CROSS)" \
> + DEPMOD=$(HOST_DIR)/sbin/depmod
You can replace all 4 lines with $(LINUX_MAKE_FLAGS) here instead.
> +# `./configure` will execute a `make modules` test case
> +ZFS_CONF_ENV = \
> + HOSTCC="$(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS)" \
> + ARCH=$(KERNEL_ARCH) \
> + CROSS_COMPILE="$(TARGET_CROSS)" \
> + DEPMOD=$(HOST_DIR)/sbin/depmod
Same here.
> +
> ZFS_DEPENDENCIES = libaio openssl udev util-linux zlib
>
> # sysvinit installs only a commented-out modules-load.d/ config file
>
More information about the buildroot
mailing list