LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-04-2023, 10:18 AM   #1
StraightCypress
LQ Newbie
 
Registered: Apr 2016
Location: Tokyo
Distribution: Ubuntu, YOCTO
Posts: 7

Rep: Reputation: Disabled
Question How to "make modules_install" from cross-build environment to target? (ipset source package)


Hello,
I'm trying to install the "ipset" command to a target device from a cross-build environment on my PC (Ubuntu 18.0.4 on VirtualBox hosted by Windows 11).

According to the README file included in the extracted ipset-7.17.tar.bz2 package, I need to run

% ./autogen.sh
% ./configure
% make
% make modules
% make install
% make modules_install

Under my cross-build environment (after executing "source /opt/pxc/sdk/EPC1502/2022.0/environment-setup-corei7-64-pxc-linux", it was the toolchain directory provided by the target device vendor),

* "./autogen.sh" was completed,
* "./configure --host x86_64-pxc-linux" was completed (x86_64-pxc-linux was my target prefix),
* "make" was completed,
* "make modules" was completed,
* "sudo make install DESTDIR=/tmp/mydest/" was completed, I compressed /tmp/mydest/ into mydest.tgz, put mydest.tgz into the target device by sfpt, and extracted mydest.tgz over the root directory of the target machine.

I added options "--host ~~~" of "configure" and "DESTDIR=~~~" of "make install," as it was cross-build.

Finally, I wanted to "sudo make modules_install DESTDIR=/tmp/mydest", like "make install", but it didn't work well. "INSTALL_MOD_PATH=/tmp make modules_install" failed too.

The error messages are as follows, ( "x)" is the line number of the message)

1) make -C /lib/modules/`uname -r`/build M=$PWD/kernel/net \
2) KDIR=$PWD/kernel modules_install
3) make[1]: Entering directory '/usr/src/linux-headers-5.4.0-137-generic'
4) INSTALL /home/yumoto/ipset_exp/ipset-7.17/kernel/net/netfilter/ipset/ip_set.ko
5) At main.c:160:
6) - SSL error:02001002:system library:fopen:No such file or directory: ../crypto/bio/bss_file.c:72
7) - SSL error:2006D080:BIO routines:BIO_new_file:no such file: ../crypto/bio/bss_file.c:79
8) sign-file: certs/signing_key.pem: No such file or directory
(and similar messages repeated.)

Then, I have these questions,

Q1. As a result of `uname -r`, kernel version 5.4.0-137-generic was used in 3), but the target kernel was 5.4.47-rt28-pxc. Is it OK, or do I need to add something option to "make modules_install"?

Q2. From 6), 7), and 8), it seemed that I should have prepared additional files. Searching for these error messages on the Internet, I found articles about something called "sign make," but I have not understood yet.
Do I need to "apt install" additional something into my cross-build environment?

*Cross build environment is on Ubuntu 18.0.4 on VirtualBox hosted by Windows 11,
*Target device is EPC 1502 of Phoenix Contact, YOCTO Linux based system with customized and patched kernel "5.4.47-rt28-pxc",
*Toolchain is PLCnext_Toolchain_Linux_2022.0.sh provided by the vendor (Phoenix Contact),
*SDK is pxc-glibc-x86_64-epc1502-image-sdk-corei7-64-epc1500-64-toolchain-2022.0.sh provided by the vendor (Phoenix Contact).

Any advice would be greatly appreciated.
Thanks.

Last edited by StraightCypress; 02-07-2023 at 02:30 AM.
 
Old 02-06-2023, 01:24 AM   #2
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,832
Blog Entries: 17

Rep: Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638
Unless you add signing and verifications to the modules, they are just static files built into the default location directory. You can take those files(compress that folder) and use them.

Not sure how you build modules to another location though, but I'm fairly sure it is an option in the Kernel config itself. I vaguely remember having seen such a thing in there.
 
Old 02-07-2023, 02:30 AM   #3
StraightCypress
LQ Newbie
 
Registered: Apr 2016
Location: Tokyo
Distribution: Ubuntu, YOCTO
Posts: 7

Original Poster
Rep: Reputation: Disabled
Thanks for your advice. > zeebra

When I checked /proc/config.gz on the target device, I could not find any ipset-related items as follows,

root@epc1502:/proc# zcat /proc/config.gz | grep IPTABLE
CONFIG_IP_NF_IPTABLES=y
CONFIG_IP6_NF_IPTABLES=m
root@epc1502:/proc# zcat /proc/config.gz | grep -i IPSET
root@epc1502:/proc#

I guessed it meant the kernel did not support ipset; was it correct?
 
Old 02-07-2023, 12:09 PM   #4
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,832
Blog Entries: 17

Rep: Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638
Quote:
Originally Posted by StraightCypress View Post
I guessed it meant the kernel did not support ipset; was it correct?
I wouldn't bet on it. The names for all the tables section are a bit weird, and things might not be named what you think they are/should be named. There is actually a database online where you can search "common names" or assumed names of Kernel modules and get the actual module names. Too bad I can't remember the name of that page, it's quite good.

I would check it manually if I was you, or find that website to verify the names of the modules.
 
Old 02-09-2023, 04:56 AM   #5
StraightCypress
LQ Newbie
 
Registered: Apr 2016
Location: Tokyo
Distribution: Ubuntu, YOCTO
Posts: 7

Original Poster
Rep: Reputation: Disabled
I found this site, a kind of Linux Kernel Driver Database,

https://cateee.net/lkddb/format.html

According to the site, the items related to ipset are

CONFIG_NET_EMATCH_IPSET
CONFIG_IP_SET
CONFIG_IP_SET_BITMAP_IP
CONFIG_IP_SET_BITMAP_IPMAC
CONFIG_IP_SET_BITMAP_PORT
CONFIG_IP_SET_HASH_IP
CONFIG_IP_SET_HASH_IPMAC
CONFIG_IP_SET_HASH_IPMARK
CONFIG_IP_SET_HASH_IPPORT
CONFIG_IP_SET_HASH_IPPORTIP
CONFIG_IP_SET_HASH_IPPORTNET
CONFIG_IP_SET_HASH_MAC
CONFIG_IP_SET_HASH_NET
CONFIG_IP_SET_HASH_NETIFACE
CONFIG_IP_SET_HASH_NETNET
CONFIG_IP_SET_HASH_NETPORT
CONFIG_IP_SET_HASH_NETPORTNET
CONFIG_IP_SET_LIST_SET

So I should search for "IPSET" and "IP_SET" from /proc/config.gz.
Then, I found only a comment, "# CONFIG_IP_SET is not set" as below,

root@epc1502:~# zcat /proc/config.gz | grep -i IPSET
root@epc1502:~# zcat /proc/config.gz | grep -i IP_SET
# CONFIG_IP_SET is not set
root@epc1502:~#

It seems that I can't use ipset unless the kernel is rebuilt with any option to enable ipset.
But the vendor doesn't provide any kernel rebuilding way.
I believe this is because they tuned the product strictly for real-time factory automation control.
So, in this case, I should give up using ipset with this device.
 
Old 02-18-2023, 02:39 AM   #6
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,832
Blog Entries: 17

Rep: Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638
Quote:
Originally Posted by StraightCypress View Post
I found this site, a kind of Linux Kernel Driver Database,

https://cateee.net/lkddb/format.html
That's the one

Yup. IP_SET, not IPSET. Always a surprise in store. You have to rebuild it with IP_SET to use it yes, but if the situation doesn't allow that, then, well..
But never say never, but I don't know another way, but perhaps there is one.

Last edited by zeebra; 02-18-2023 at 02:43 AM.
 
  


Reply

Tags
cross-compile, ipset, makefile-module, modules



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
error """make:*** no rule to make target 'modules'.stop'"" SI1 Linux - Newbie 1 11-01-2017 11:57 PM
'make modules_install' after successful 'make' does nothing for kernel 2.6.27.36 vitaly_v_ch Linux - Kernel 2 02-04-2010 11:22 AM
Look the output of: make dep && make clean bzImage modules modules_install Hell-Shooter Linux - General 2 06-05-2004 05:05 AM
make modules_install don't make any modules in /lib/modules ganesh_maillist Linux - Newbie 1 09-15-2003 01:45 PM
Why do I always get errors in "make modules_install" ? JoeLinux Linux - General 6 04-12-2002 01:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration