Jump to content
funtoo forums
  • 0
Sign in to follow this  
uez

[SOLVED] modules_install fails in chroot

Question

Hello everyone,

I've been using Funtoo on my main desktop PC for quite some time. Now I'm expanding the family building a small (and "weak") NAS and I'd like to have the OS on a USB key, easy to move and clone.

I created a chroot environment on the desktop and installed Funtoo inside it; it all went well, except that when I tried to compile a new kernel ( gentoo-sources-4.15.4 ) the modules_install phase fails: more specifically, depmod.sh fails. As consequence, apparently, the kernel fails to boot.

I tried different methods: manual compilation, genkernel and genkernel-next, all with the same result.

It worth mentioning that the two CPU are different, but both x86_64 and I modified the *FLAGS accordingly.

The two errors are:

./scripts/depmod.sh: line 46:  6113 Illegal instruction     "$DEPMOD" -b "$tmp_dir" $KERNELRELEASE 2> /dev/null
*./scripts/depmod.sh: line 58:  6118 Illegal instruction     "$DEPMOD" "$@" "$KERNELRELEASE" $SYMBOL_PREFIX

I'm not too knowledgeable and couldn't find a hint from those.

Thanks

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Oleg put me in the right direction.

Though I used the generic_64 stage, I later recompiled @system using the more recent instruction set of the NAS, from cpuid2cpuflags.

This produced an executable that can not run on my older desktop, while still in chroot.

Recompiling sys-apps/kmod with "basic" CPUFLAGS solved my problem.

Share this post


Link to post
Share on other sites
  • 0

Hi Oleg, thanks for the answer.

I'm not sure 100%, but I think I played it safe and downloaded the generic one, mostly because it's the first time I cross-compile and I don't need to optimize that much for performance.

Furthermore, both the kernel and the modules compile and install  just fine, it's only depmod that goes wrong.

Now I'm looking in depmod tool itself: maybe I can run it "standalone" after make stops.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...