3
votes

I am using in embedded environment a 3.4.31+ Linux kernel that has built-in support for SquashFs with zlib compression method. Now I would like to add support for xz method compression without replacing kernel but just adding it as a module. Is it possible?

After I

  1. Select SquashFs support as module in kernel menuconfig
  2. Recompile kernel
  3. Leave original kernel on my target device but update all contents of /lib/modules/3.4.31+
  4. invoke modprobe squashfs

I get

# modprobe squashfs
modprobe: failed to load module squashfs (kernel/fs/squashfs/squashfs.ko): Cannot allocate memorycode

dmesg shows:

kmem_cache_create: duplicate cache squashfs_inode_cache
[<c000e5e4>] (unwind_backtrace+0x0/0xf0) from [<c0077264>] (kmem_cache_create+0x4a4/0x514)
[<c0077264>] (kmem_cache_create+0x4a4/0x514) from [<bf011024>] (init_module+0x24/0x7c [squashfs])
[<bf011024>] (init_module+0x24/0x7c [squashfs]) from [<c0008840>] (do_one_initcall+0x11c/0x190)
[<c0008840>] (do_one_initcall+0x11c/0x190) from [<c0048c40>] (sys_init_module+0x36c/0x1874)
[<c0048c40>] (sys_init_module+0x36c/0x1874) from [<c00092e0>] (ret_fast_syscall+0x0/0x2c)

Is there a workaround for this to forcefully remove the built-in SquashFs support?

1
Probably not, if the builtin SquashFs is not a module. You might recompile a kernel to suite your needs. - Basile Starynkevitch
Definitely not if it is not a module as he indicates above. - cbz

1 Answers

-1
votes

It doesn't work like this, the original kernel binary already contains the squashfs code as a non-modular component. If you want to get rid of the code from inside the kernel then you need to use the new kernel you have just compiled (along with the modules that have just been created).