LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM
User Name
Password
Slackware - ARM This forum is for the discussion of Slackware ARM.

Notices


Reply
  Search this Thread
Old 04-11-2019, 07:14 AM   #1
justwantin
Member
 
Registered: Aug 2003
Location: Melbourne, Australia
Distribution: Slackware, Slackwarearm
Posts: 743

Rep: Reputation: 78
compiling an in tree module


I thought I'd ask here as I suspect people running Slackwarearm on a SBC would be more likely to want to compile a single module in tree. Perhaps someone can give me a heads up.

I have spent several hours today trying to compile a ms5635 module using various methods found on the net none of which have worked. I have not found any method specific to slackware.

My most recent attempt involved creating a new Makefile for just that module in /usr/src/linux/drivers/iio/pressure as is below and running make in that iio/pressure directory. It obviously isn't the correct way to compile that module or else my makefile is wrong.
Code:
SRCS = ms5637.c
OBJS = $(SRCS:.c=.o)

obj-m += $(OBJS)

all:
        make -C /lib/modules/$(shell uname -r)/build/ M=$(PWD) modules
clean:
        make -C /lib/modules/$(shell uname -r)/build/ M=$(PWD) clean
While a ms5637.ko module was created nothing compiled.
Code:
make -C /lib/modules/4.19.32-armv7/build/ M=/usr/src/linux/drivers/iio/pressure modules
make[1]: Entering directory '/usr/src/linux-4.19.32'
  CC [M]  /usr/src/linux/drivers/iio/pressure/ms5637.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /usr/src/linux/drivers/iio/pressure/ms5637.mod.o
  LD [M]  /usr/src/linux/drivers/iio/pressure/ms5637.ko
make[1]: Leaving directory '/usr/src/linux-4.19.32'
root@bpro10# ls | grep ms5637
ms5637.c
ms5637.ko
ms5637.mod.c
ms5637.mod.o
ms5637.o
root@bpro10# insmod ./ms5637.ko
insmod: ERROR: could not insert module ./ms5637.ko: Unknown symbol in module
.... and heres's the output from dmesg after running trying to load the module with insmod.
Code:
[34044.458468] ms5637: Unknown symbol ms_sensors_reset (err -2)
[34044.458699] ms5637: Unknown symbol __devm_iio_device_register (err -2)
[34044.458814] ms5637: Unknown symbol devm_iio_device_alloc (err -2)
[34044.458897] ms5637: Unknown symbol ms_sensors_tp_read_prom (err -2)
[34044.458972] ms5637: Unknown symbol ms_sensors_read_temp_and_pressure (err -2)
[34044.459062] ms5637: Unknown symbol iio_read_const_attr (err -2)

Last edited by justwantin; 04-11-2019 at 07:16 AM.
 
Old 04-12-2019, 08:21 AM   #2
Penthux
Member
 
Registered: Dec 2008
Location: Middlesbrough, UK
Distribution: Slackware
Posts: 253

Rep: Reputation: 74
Did you try...?

Code:
modprobe mac80211
insmod ./ms5637.ko
 
Old 04-12-2019, 11:35 AM   #3
justwantin
Member
 
Registered: Aug 2003
Location: Melbourne, Australia
Distribution: Slackware, Slackwarearm
Posts: 743

Original Poster
Rep: Reputation: 78
No I had no idea that was required, isn't that to do with SoftMAC wireless devices? I was just using
Code:
insmod ./ms5637.ko
I had tried a couple different iterations of Makefile. Today I built the module using makemenuconfig to edit .config then
Code:
make M=/usr/src/linux/drivers/iio/pressure modules
to compile the module. Copied the module to where it belongs but results were the same. I'll give that a go tomorrow as I couldn.t get distcc working right after deciding to just compile a whole new set of modules with the 4 additional ones I want.

Last edited by justwantin; 04-12-2019 at 11:47 AM. Reason: tyop
 
Old 04-14-2019, 03:26 AM   #4
Dunc.
LQ Newbie
 
Registered: Jul 2012
Location: Cumbria UK
Distribution: Slackware
Posts: 16

Rep: Reputation: Disabled
Hi
You did a depmod -a right?

Kind regards

Dunc.
 
Old 04-14-2019, 03:58 PM   #5
justwantin
Member
 
Registered: Aug 2003
Location: Melbourne, Australia
Distribution: Slackware, Slackwarearm
Posts: 743

Original Poster
Rep: Reputation: 78
Yes .... I did a couple of times maybe not every time, I plan to revisit this but I have distcc working ok now and the modules I wanted compiled in a complete make modules so I'll get on with the other fish I wanted to fry.
 
  


Reply

Tags
compile, in tree, module


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Look for duplicates in folder tree A and folder tree B, then delete the duplicates only from A. grumpyskeptic Linux - Software 7 10-27-2018 10:23 PM
how can I know whether a module is a loadable module or compiled-in module? hahacc Linux - Kernel 3 11-21-2014 01:43 AM
what is the difference strict binary tree nad extended binary tree . tushar_pandey Programming 1 07-18-2012 11:30 AM
the bible = the tree of the knowledge of good and evil () Jesus = the tree of life Michael111 General 2 04-14-2004 04:28 PM
need a P-Tree (Patricia Tree) library manaskb Programming 1 11-02-2002 06:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM

All times are GMT -5. The time now is 12:08 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration