voiceboys / sbcOS

Barebone Opensource Powered SBC
GNU General Public License v3.0
106 stars 39 forks source link

cp: cannot stat 'modules/4.9.0-9-amd64/xt_RTPENGINE.ko': No such file or directory #5

Closed mbodbg closed 5 years ago

mbodbg commented 5 years ago

It seems xt_RTPENGINE.ko is missing when compiling on debian 9...

./build
Changing current directory to /usr/src/sbcOS
Building intramfs image...
cp: cannot stat 'modules/4.9.0-9-amd64/xt_RTPENGINE.ko': No such file or directory
-----------------------------
Finished. Find your result in /tmp/sbc-data-29957
To build ISO, run: /tmp/gen_sbc_iso.sh
To build ZIP, run: /tmp/gen_sbc_zip.sh
adubovikov commented 5 years ago

https://github.com/adubovikov/sbcOS/commit/2440993ceb9378a25191b8d20ac67de38c08492d

this should fix the issue. If the module doesnt exists (for future kernels) the script will compile and copy it.

can you please check?

adubovikov commented 5 years ago

in my case I had 4.9.0-8.amd64 :-) you are on the next level. thank you!

mbodbg commented 5 years ago

Now I get:

Changing current directory to /usr/src/sbcOS
Building intramfs image...
make[1]: *** /lib/modules/4.9.0-9-amd64/build: No such file or directory.  Stop.
make: *** [modules] Error 2
mkdir: cannot create directory ‘modules/4.9.0-9-amd64’: File exists
mv: cannot stat 'Module xt_RTPENGINE.ko doesnt exists try to compile first'$'\n''make -C /lib/modules/4.9.0-9-amd64/build M=/usr/src/sbcOS/initramfs/source/rtpengine-mr7.1.1.1/kernel-module O=/lib/modules/4.9.0-9-amd64/build modules'$'\n''Makefile:34: recipe for target '\''modules'\'' failed'$'\n''Module xt_RTPENGINE.ko has been not compiled. RTPEngine will work in userspace mode!. LOW PERFOMANCE!'$'\n''/tmp/sbc-initramfs-83546.img': No such file or directory
-----------------------------
Finished. Find your result in /tmp/sbc-data-83534
To build ISO, run: /tmp/gen_sbc_iso.sh
To build ZIP, run: /tmp/gen_sbc_zip.sh
adubovikov commented 5 years ago

RTPENGINE SAYS:

kernel-module

Required for in-kernel packet forwarding.

Compilation of the kernel module requires the kernel development headers to be installed in /lib/modules/$VERSION/build/, where $VERSION is the output of the command uname -r. For example, if the command uname -r produces the output 3.9-1-amd64, then the kernel headers must be present in /lib/modules/3.9-1-amd64/build/. The last component of this path (build) is usually a symlink somewhere into /usr/src/, which is fine.

adubovikov commented 5 years ago

sudo apt-get install linux-headers-$(uname -r)

adubovikov commented 5 years ago

so, works ?

adubovikov commented 5 years ago

can you please check the latest version. I have fixed also compiling output

mbodbg commented 5 years ago

No, there is still an issue:

./build 
Changing current directory to /usr/src/sbcOS
Building intramfs image...
mv: cannot stat 'Module xt_RTPENGINE.ko exists copying to netfilter'$'\n''/tmp/sbc-initramfs-38806.img': No such file or directory
-----------------------------
Finished. Find your result in /tmp/sbc-data-38794
To build ISO, run: /tmp/gen_sbc_iso.sh
To build ZIP, run: /tmp/gen_sbc_zip.sh
mbodbg commented 5 years ago

Problem is the content of INITRAMFS it contains output of all echos.

INITRAMFS: Module xt_RTPENGINE.ko exists copying to netfilter /tmp/sbc-initramfs-49842.img

adubovikov commented 5 years ago

look like you didnt pull the latest version. Can you please check it ?

adubovikov commented 5 years ago

git rev-parse HEAD 4122d7f140dc083d35e21a60b3d967b13e95d459

mbodbg commented 5 years ago

Sorry my fault, now it works:

Changing current directory to /usr/src/sbcOS
Building intramfs image...
Module xt_RTPENGINE.ko exists copying to netfilter
/tmp/sbc-initramfs-53605.img
-----------------------------
Finished. Find your result in /tmp/sbc-data-53593
To build ISO, run: /tmp/gen_sbc_iso.sh
To build ZIP, run: /tmp/gen_sbc_zip.sh
adubovikov commented 5 years ago

np. Should I close the ticket ?

mbodbg commented 5 years ago

yep