diff mbox series

[1/3,v2] package/kmod: explicitly disable compression when not enabled

Message ID 7067f36377f52c1a5022a9988be2ee7e70ce48ac.1588511382.git.yann.morin.1998@free.fr
State New
Headers show
Series [1/3,v2] package/kmod: explicitly disable compression when not enabled | expand

Commit Message

Yann E. MORIN May 3, 2020, 1:09 p.m. UTC
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Yegor Yefremov <yegorslists@googlemail.com>
---
 package/kmod/kmod.mk | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Matthew Weber May 15, 2020, 12:29 a.m. UTC | #1
Yann,

On Sun, May 3, 2020 at 8:12 AM Yann E. MORIN <yann.morin.1998@free.fr> wrote:
>
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> Cc: Yegor Yefremov <yegorslists@googlemail.com>

Tested support for a compressed and signed modules (found [1] was
needed to allow modinfo to display signed module details)

BR2_aarch64=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.16.7"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-virt/linux.config"
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
BR2_PACKAGE_XZ=y
BR2_PACKAGE_LIBZIP=y
BR2_PACKAGE_OPENSSL=y      # modinfo requires so it can display signature info
BR2_PACKAGE_KMOD=y
BR2_PACKAGE_KMOD_TOOLS=y
BR2_TARGET_ROOTFS_EXT2=y
# BR2_TARGET_ROOTFS_TAR is not set
BR2_PACKAGE_HOST_KMOD_GZ=y
BR2_PACKAGE_HOST_KMOD_XZ=y

Linux Kernel options enabled
       CONFIG_MODULES=y
       CONFIG_MODULE_UNLOAD=y
       CONFIG_MODVERSIONS=y
       CONFIG_MODULE_SRCVERSION_ALL=y
       CONFIG_MODULE_SIG=y
       CONFIG_MODULE_SIG_FORCE=y
       CONFIG_MODULE_SIG_SHA256=y
       CONFIG_MODULE_COMPRESS=y
       CONFIG_MODULE_COMPRESS_XZ=y

Tested-by: Matt Weber <matthew.weber@rockwellcollins.com>

[1] http://patchwork.ozlabs.org/project/buildroot/patch/20200514182806.56592-1-matthew.weber@rockwellcollins.com/
Matthew Weber July 7, 2020, 3:51 p.m. UTC | #2
Kris,


On Sun, May 3, 2020 at 8:12 AM Yann E. MORIN <yann.morin.1998@free.fr> wrote:
>
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> Cc: Yegor Yefremov <yegorslists@googlemail.com>
> ---
>  package/kmod/kmod.mk | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/package/kmod/kmod.mk b/package/kmod/kmod.mk
> index e2dfea5c7b..cdbfc5a469 100644
> --- a/package/kmod/kmod.mk
> +++ b/package/kmod/kmod.mk
> @@ -35,11 +35,15 @@ endif
>  ifeq ($(BR2_PACKAGE_ZLIB),y)
>  KMOD_DEPENDENCIES += zlib
>  KMOD_CONF_OPTS += --with-zlib
> +else
> +KMOD_CONF_OPTS += --without-zlib
>  endif
>
>  ifeq ($(BR2_PACKAGE_XZ),y)
>  KMOD_DEPENDENCIES += xz
>  KMOD_CONF_OPTS += --with-xz
> +else
> +KMOD_CONF_OPTS += --without-xz
>  endif
>
>  ifeq ($(BR2_PACKAGE_PYTHON)$(BR2_PACKAGE_PYTHON3),y)
> --
> 2.20.1
>
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

Reflecting this for your review
Kris Bahnsen July 21, 2020, 9:45 p.m. UTC | #3
Yann,


> On Sun, May 3, 2020 at 8:12 AM Yann E. MORIN <yann.morin.1998@free.fr> wrote:
>> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
>> Cc: Yegor Yefremov <yegorslists@googlemail.com>


Tested support for compressed kernel modules. Did not test signed modules.

BR2_arm=y
BR2_cortex_a9=y
BR2_ARM_ENABLE_NEON=y
BR2_ARM_ENABLE_VFP=y
BR2_ARM_FPU_VFPV3=y
BR2_CCACHE=y
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
BR2_KERNEL_HEADERS_4_14=y
BR2_GCC_VERSION_8_X=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_GCC_ENABLE_LTO=y
BR2_GCC_ENABLE_OPENMP=y
BR2_TARGET_GENERIC_HOSTNAME="tsa38x"
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y
BR2_TARGET_TZ_INFO=y
BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_TECHNOLOGIC_PATH)/board/tsa38x/rootfs_overlay"
BR2_ROOTFS_POST_BUILD_SCRIPT="$(BR2_EXTERNAL_TECHNOLOGIC_PATH)/board/tsa38x/post-build.sh"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call 
github,embeddedarm,linux-a38x,9007c40f288d3eb01689c66ac0fad166d63c1958)/linux-9007c40f288d3eb01689c66ac0fad166d63c1958.tar.gz"
BR2_LINUX_KERNEL_DEFCONFIG="tsa38x"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="armada-385-ts7840"
BR2_LINUX_KERNEL_INSTALL_TARGET=y
BR2_PACKAGE_LINUX_TOOLS_GPIO=y
BR2_PACKAGE_LINUX_TOOLS_IIO=y
BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
BR2_PACKAGE_BUSYBOX_WATCHDOG=y
BR2_PACKAGE_BUSYBOX_WATCHDOG_PERIOD="30"
BR2_PACKAGE_BZIP2=y
BR2_PACKAGE_XZ=y
BR2_PACKAGE_LINUX_FIRMWARE=y
BR2_PACKAGE_LINUX_FIRMWARE_IMX_SDMA=y
BR2_PACKAGE_LIBZIP=y
BR2_PACKAGE_OPENSSL=y
BR2_PACKAGE_LIBOPENSSL_BIN=y
BR2_PACKAGE_EXPAT=y
BR2_PACKAGE_LIBEVENT=y
BR2_PACKAGE_LIBGLIB2=y
# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
BR2_PACKAGE_KMOD=y
BR2_PACKAGE_KMOD_TOOLS=y
BR2_TARGET_ROOTFS_TAR_XZ=y
BR2_PACKAGE_HOST_KMOD_XZ=y
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
BR2_PACKAGE_HOST_UTIL_LINUX=y


Relevant Linux Kernel options

CONFIG_MODULES_USE_ELF_REL=y
CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y
CONFIG_STRICT_KERNEL_RWX=y
CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y
CONFIG_STRICT_MODULE_RWX=y
CONFIG_MODULES=y
CONFIG_MODULE_FORCE_LOAD=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
CONFIG_MODVERSIONS=y
# CONFIG_MODULE_SIG is not set
CONFIG_MODULE_COMPRESS=y
CONFIG_MODULE_COMPRESS_XZ=y

Tested-by: Kris Bahnsen <kris@embeddedarm.com>
diff mbox series

Patch

diff --git a/package/kmod/kmod.mk b/package/kmod/kmod.mk
index e2dfea5c7b..cdbfc5a469 100644
--- a/package/kmod/kmod.mk
+++ b/package/kmod/kmod.mk
@@ -35,11 +35,15 @@  endif
 ifeq ($(BR2_PACKAGE_ZLIB),y)
 KMOD_DEPENDENCIES += zlib
 KMOD_CONF_OPTS += --with-zlib
+else
+KMOD_CONF_OPTS += --without-zlib
 endif
 
 ifeq ($(BR2_PACKAGE_XZ),y)
 KMOD_DEPENDENCIES += xz
 KMOD_CONF_OPTS += --with-xz
+else
+KMOD_CONF_OPTS += --without-xz
 endif
 
 ifeq ($(BR2_PACKAGE_PYTHON)$(BR2_PACKAGE_PYTHON3),y)