Faxserver with MXLinux

For issues with MX that has been modified from the initial install. Example: adding packages that then cause issues.
Message
Author
raw2020
Posts: 33
Joined: Sun Dec 29, 2019 1:22 pm

Faxserver with MXLinux

#1 Post by raw2020 »

I've been using Linux as an amateur-administrator for a few years now. I haven't had the time to fully learn everything about Linux yet.

I've had the ambition to compile a driver from AVM for an old ISDN PCI fritz!card to be able to fax from the Dtop to the Arbeitsamt.

One could make the argument to buy a Faxer all in one and be done with it, but I have no spare space at home for it, aand it would cost money and collect dust and break and so forth.

A fcpci is a stealth aternative.

I hoped It would compile on the upgraded distribution:

Code: Select all

System:    Host: mx19 Kernel: 5.6.0-2-amd64 x86_64 bits: 64 Desktop: Xfce 4.14.2 
           Distro: MX-19.2_x64 patito feo October 21  2019 
Here's one of the couple of 64-bit Linux drivers I've tried, if you want to give it a try.

Code: Select all

wget https://belug.de/~lutz/pub/fcpci/fritz-fcpci-latest.tar.bz2
readme says:
# aptitude install linux-headers-amd64

I installed the correct linux-headers-5.6.0-2-*.

cd ./src
make clean
make all
make install

modprobe -r fcpci
modprobe -v fcpci
It tries to compile:

Code: Select all

root@mx19:/home/USER/Desktop/fcpci-4.4.0/src# make clean
rm -f main.o driver.o tools.o tables.o queue.o lib.o
rm -f fcpci.o fcpci.ko 
root@mx19:/home/USER/Desktop/fcpci-4.4.0/src# make all
make -C /lib/modules/5.6.0-2-amd64/build SUBDIRS=/home/USER/Desktop/fcpci-4.4.0/src modules
make[1]: Entering directory '/usr/src/linux-headers-5.6.0-2-amd64'
sh: 0: Can't open /usr/src/linux-headers-5.6.0-2-common/scripts/mkmakefile
make[3]: *** [/usr/src/linux-headers-5.6.0-2-common/Makefile:514: outputmakefile] Error 127
/usr/src/linux-headers-5.6.0-2-common/Makefile:659: include/config/auto.conf.cmd: No such file or directory
make[2]: *** [/usr/src/linux-headers-5.6.0-2-common/Makefile:677: include/config/auto.conf.cmd] Error 2
make[1]: *** [/usr/src/linux-headers-5.6.0-2-common/Makefile:180: sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.6.0-2-amd64'
make: *** [Makefile:48: fcpci.ko] Error 2
I'm still quite a noob when it comes to compiling or building.
All help is appreciated, since I have to be able to fax my documents to the federal bureaus if the postoffice or public transportation etc. is on a strike for higher wages.

User avatar
timkb4cq
Developer
Posts: 3633
Joined: Wed Jul 12, 2006 4:05 pm

Re: Faxserver with MXLinux

#2 Post by timkb4cq »

It looks like Debian's packaged kernel headers don't include the mkmakefile script which is included in the Linux tree as shown here:
https://github.com/torvalds/linux/blob/ ... mkmakefile
Paste this script into featherpad, save it as mkmakefile , copy it to /usr/src/linux-headers-5.6.0-2-common/scripts/ where your error message says it should be.
Then

Code: Select all

sudo chown root:root /usr/src/linux-headers-5.6.0-2-common/scripts/mkmakefile
sudo chmod 744 /usr/src/linux-headers-5.6.0-2-common/scripts/mkmakefile
so it will have the same permissions as the other scripts there. Not certain that's absolutely necessary but it is often enough in these situations to just do it to start with.

Then try your build again.
HP Pavillion TP01, AMD Ryzen 3 5300G (quad core), Crucial 500GB SSD, Toshiba 6TB 7200rpm
Dell Inspiron 15, AMD Ryzen 7 2700u (quad core). Sabrent 500GB nvme, Seagate 1TB

raw2020
Posts: 33
Joined: Sun Dec 29, 2019 1:22 pm

Re: Faxserver with MXLinux

#3 Post by raw2020 »

Now it can open your script and it doesn't complain about it missing anymore.
That's an advancement.

Code: Select all

root@mx19:/usr/src/linux-headers-5.6.0-2-common/fcpci-4.4.0/src# make clean
rm -f main.o driver.o tools.o tables.o queue.o lib.o
rm -f fcpci.o fcpci.ko 
root@mx19:/usr/src/linux-headers-5.6.0-2-common/fcpci-4.4.0/src# make all
mkdir -p /var/lib/fritz
make -C /lib/modules/5.6.0-2-amd64/build SUBDIRS=/usr/src/linux-headers-5.6.0-2-common/fcpci-4.4.0/src modules
make[1]: Entering directory '/usr/src/linux-headers-5.6.0-2-amd64'
  GEN     Makefile
/usr/src/linux-headers-5.6.0-2-common/scripts/Makefile.build:44: /usr/src/linux-headers-5.6.0-2-common/scripts/basic/Makefile: No such file or directory
make[4]: *** No rule to make target '/usr/src/linux-headers-5.6.0-2-common/scripts/basic/Makefile'.  Stop.
make[3]: *** [/usr/src/linux-headers-5.6.0-2-common/Makefile:500: scripts_basic] Error 2
/usr/src/linux-headers-5.6.0-2-common/Makefile:659: include/config/auto.conf.cmd: No such file or directory
make[2]: *** [/usr/src/linux-headers-5.6.0-2-common/Makefile:677: include/config/auto.conf.cmd] Error 2
make[1]: *** [/usr/src/linux-headers-5.6.0-2-common/Makefile:180: sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.6.0-2-amd64'
make: *** [Makefile:48: fcpci.ko] Error 2
Last edited by raw2020 on Tue Oct 20, 2020 11:42 am, edited 3 times in total.

raw2020
Posts: 33
Joined: Sun Dec 29, 2019 1:22 pm

Re: Faxserver with MXLinux

#4 Post by raw2020 »

I have basic Questions:

Is this the right way to build this external module AVM fcpci?

1.) In the MX Package installer only the source tree linux-source-5.6 Version 5.6.14-2~mx19+1 is available. But I have Kernel 5.6.0-2-amd64. Should I attempt to build a module with headers of 5.6.0-2 and source tree of 5.6.14-2~mx19+1? or should I search for source tree of 5.6.0-2 on github and download it from there?


2.) Can you make the extracted error lines in /usr/src/linux-headers-5.6.0-2-common/Makefile more clear? (Numbered on the right i.e. #500,#514,#677,#659 and #180)

Code: Select all

# ===========================================================================
# Rules shared between *config targets and build targets

# Basic helpers built in scripts/basic/
PHONY += scripts_basic
scripts_basic:
	$(Q)$(MAKE) $(build)=scripts/basic						#500
	$(Q)rm -f .tmp_quiet_recordmcount


outputmakefile:
ifdef building_out_of_srctree
	$(Q)if [ -f $(srctree)/.config -o \
		 -d $(srctree)/include/config -o \
		 -d $(srctree)/arch/$(SRCARCH)/include/generated ]; then \      #514
		echo >&2 "***"; \
		echo >&2 "*** The source tree is not clean, please run 'make$(if $(findstring command line, $(origin ARCH)), ARCH=$(ARCH)) mrproper'"; \
		echo >&2 "*** in $(abs_srctree)";\
		echo >&2 "***"; \
		false; \
		
		
		# The actual configuration files used during the build are stored in
# include/generated/ and include/config/. Update them if .config is newer than
# include/config/auto.conf (which mirrors .config).
#
# This exploits the 'multi-target pattern rule' trick.
# The syncconfig should be executed only once to make all the targets.
%/auto.conf %/auto.conf.cmd: $(KCONFIG_CONFIG)
$(Q)$(MAKE) -f $(srctree)/Makefile syncconfig                                   #677
else # !may-sync-config
# External modules and some install targets need include/generated/autoconf.h
# and include/config/auto.conf but do not care if they are up-to-date.
# Use auto.conf to trigger the test
PHONY += include/config/auto.conf

# Read in dependencies to all Kconfig* files, make sure to run syncconfig if
# changes are detected. This should be included after arch/$(SRCARCH)/Makefile
# because some architectures define CROSS_COMPILE there.
include include/config/auto.conf.cmd                                            #659

$(KCONFIG_CONFIG):
	@echo >&2 '***'
	@echo >&2 '*** Configuration file "$@" not found!'
	@echo >&2 '***'
	@echo >&2 '*** Please run some configurator (e.g. "make oldconfig" or'
	@echo >&2 '*** "make menuconfig" or "make xconfig").'
	@echo >&2 '***'
	@/bin/false


# Invoke a second make in the output directory, passing relevant variables
sub-make:
	$(Q)$(MAKE) -C $(abs_objtree) -f $(abs_srctree)/Makefile $(MAKECMDGOALS)   #180

endif # need-sub-make
endif # sub_make_done

boldstripe
Posts: 9
Joined: Mon Aug 10, 2020 9:55 am

Re: Faxserver with MXLinux

#5 Post by boldstripe »

I am not sure if I understand what you are looking for, but I recently installed efax-gtk and used it to send faxes with a US Robotics USB modem off eBay. The software is also known to work with USB modems with Connexant chips and these are inexpensive to buy new.

efax-gtk Installation on Samsung netbook

This is more of a backup plan than a major use, so I'd like to use the version in the Debian repository, and see if it works with this 32-bit machine running 32-bit Debian Buster and our USB fax modem (US Robotics). It does. A newer version is to build yourself from the progam's SourceForge page, where there are some useful notes in the user forum.

Version in Debian repository: efax-gtk 3.2.8 (2001-2011)

It is a front end to efax command line program copyrighted 1999.

Installation

To install efax-gtk v 3.2.8 on Debian:
sudo apt-get install efax-gtk

add my user to 'dialout' group
sudo adduser boldstripe dialout

get information about modem port/connection (gives me value of ttyACM0)
sudo dmesg | more

and to run program and set other parameters from within program:
efax-gtk

Enter settings panel in GUI, type in

identity, boldstripe
tel number (if any), +XX XXXX XXXXX
modem, Serial Device: ttyACM0 (for Samsung netbook, Thinkpad)
modem, other: use defaults
Params, Initialization: Z (delete others)
Print: default (use GTK+ Print System)
View: postscript viewer: gv (may also work with 'evince') for gnome; qpdfview for MX Linux.
Socket: defaults
Receive: all unchecked (default)
Send: Fine, include destination number
Page: A4 (may want Letter for US faxes)
Mac Pro 2008, 52 GB RAM
MX Linux boot drive: SSD on PCIE adapter card,
MacOS High Sierra (DosDude1 patch): SSD connected to SATA port on the motherboard,
four SATA bays each w 2TB Hitachi 3.5" drive, in a ZFS Raid.

User avatar
timkb4cq
Developer
Posts: 3633
Joined: Wed Jul 12, 2006 4:05 pm

Re: Faxserver with MXLinux

#6 Post by timkb4cq »

raw2020 wrote: Tue Oct 20, 2020 10:32 am 1.) In the MX Package installer only the source tree linux-source-5.6 Version 5.6.14-2~mx19+1 is available. But I have Kernel 5.6.0-2-amd64. Should I attempt to build a module with headers of 5.6.0-2 and source tree of 5.6.14-2~mx19+1? or should I search for source tree of 5.6.0-2 on github and download it from there?
If you open Synaptic and check the version of linux-image-5.6.0-2-amd64 you'll see that it is 5.6.14-2~mx19+1 , matching the linux-source-5.6 version 5.6.14-2~mx19+1
raw2020 wrote: Tue Oct 20, 2020 10:32 am 2.) Can you make the extracted error lines in /usr/src/linux-headers-5.6.0-2-common/Makefile more clear?
Well, I could somewhat but it would be pointless now that I've realized your driver needs to built in the Linux Source folder instead of the headers folder.

Once you have installed the linux-source package, you will need to open a root terminal in /usr/src/ and extract the source

Code: Select all

tar -xf linux-source-5.6.tar.xz
You will now have a /usr/src/linux-5.6 folder that has the missing scripts/basic/Makefile and scripts/mkmakefile and likely others you have been missing.
HP Pavillion TP01, AMD Ryzen 3 5300G (quad core), Crucial 500GB SSD, Toshiba 6TB 7200rpm
Dell Inspiron 15, AMD Ryzen 7 2700u (quad core). Sabrent 500GB nvme, Seagate 1TB

raw2020
Posts: 33
Joined: Sun Dec 29, 2019 1:22 pm

Re: Faxserver with MXLinux

#7 Post by raw2020 »

If you open Synaptic and check the version of linux-image-5.6.0-2-amd64 you'll see that it is 5.6.14-2~mx19+1 , matching the linux-source-5.6 version 5.6.14-2~mx19+1
You're correct, I looked it up in Synaptic. Thanks timkb4cq.
Well, I could somewhat but it would be pointless now that I've realized your driver needs to built in the Linux Source folder instead of the headers folder.

Once you have installed the linux-source package, you will need to open a root terminal in /usr/src/ and extract the source

Code: Select all

tar -xf linux-source-5.6.tar.xz

You will now have a /usr/src/linux-5.6 folder that has the missing scripts/basic/Makefile and scripts/mkmakefile and likely others you have been missing.
Did what you said but the expected missing script you gave me earlier in /scripts/mkmakefile still wasn't to be found inside the new uncrompressed /usr/src/linux-source-5.6/.
proof:

Code: Select all

root@mx19:/usr/src/linux-source-5.6/fcpci-4.4.0/src# find / -name mkmakefile
find: ‘/proc/61079/task/61079/net’: Invalid argument
find: ‘/proc/61079/net’: Invalid argument
find: ‘/proc/103030/task/103030/net’: Invalid argument
find: ‘/proc/103030/net’: Invalid argument
find: ‘/run/user/1000/gvfs’: Permission denied
/usr/lib/linux-kbuild-5.6/scripts/mkmakefile
find: File system loop detected; ‘/live/aufs’ is part of the same file system loop as ‘/’.
/live/aufs-ram/upper/usr/lib/linux-kbuild-5.6/scripts/mkmakefile
I put it there manually again.
Is it because it's in testing phase? Or just new different Kernel layout?
So I took a look at /usr/lib/linux-kbuild-5.6/scripts/mkmakefile content. It's identical with yours from github.

So I know from readme the intendet module fcpci-4.4.0 was build for Kernel 4.4 and above, yet untested.

I still don't understand the output of /usr/src/linux-headers-5.6.0-2-common/Makefile.
Nonetheless I tried to find the missing auto.conf.cmd file in /usr/src/linux-source-5.6/.

Code: Select all

root@mx19:/usr/src/linux-source-5.6/fcpci-4.4.0/src# find / -name auto.conf.cmd
find: ‘/proc/61079/task/61079/net’: Invalid argument
find: ‘/proc/61079/net’: Invalid argument
find: ‘/proc/103030/task/103030/net’: Invalid argument
find: ‘/proc/103030/net’: Invalid argument
find: ‘/run/user/1000/gvfs’: Permission denied
find: File system loop detected; ‘/live/aufs’ is part of the same file system loop as ‘/’.
root@mx19:/usr/src/linux-source-5.6/fcpci-4.4.0/src# 
No file auto.conf.cmd. :confused: 
Just logically it doesn't make sense to me tim...

Code: Select all

/usr/src/linux-headers-5.6.0-2-common/scripts/Makefile.build:44: /usr/src/linux-headers-5.6.0-2-common/scripts/basic/Makefile: No such file or directory
Why is it looking for a Makefile, possibly the exact same :confused: , in /linux-headers-5.6.0-2-common/scripts/basic/Makefile when it's spawned from the exact file it 's looking for to begin with?, in a different place in /usr/src/linux-headers-5.6.0-2-common/scripts/basic/Makefile
Should I just make a clone and copy it there where it needs them?

Should I look at earlier kernel versions linux-image-5X or 4X and reproduce this file auto.conf.cmd on my running Kernel?

Here are the contents of the fcpci-4.4.0 external module source and it feels like as though I'm illiterate (in C)

Code: Select all

root@mx19:/usr/src/linux-source-5.6/fcpci-4.4.0# ls -l
total 12
-rw-r--r-- 1 root root  195 Jan 23  2016 dkms.conf
-rw-r--r-- 1 root root  119 Feb 27  2014 INSTALL
-rw-r--r-- 1 root root 3948 Jan 23  2016 liesmich.txt
drwxr-xr-x 2 root root  500 Oct 21 20:57 src
root@mx19:/usr/src/linux-source-5.6/fcpci-4.4.0# cd src
root@mx19:/usr/src/linux-source-5.6/fcpci-4.4.0/src# ls -l
total 1008
-rwxr--r-- 1 root root 823752 May 20  2008 64_fcpci-lib.o
-rwxr--r-- 1 root root   1549 Apr 28  2008 attr.h
-rwxr--r-- 1 root root   2895 Apr 28  2008 defs.h
-rwxr--r-- 1 root root  27133 Jan 19  2016 driver.c
-rwxr--r-- 1 root root   3663 Nov  3  2010 driver.h
-rwxr--r-- 1 root root  16500 Apr 28  2008 fcpcmcia_cs.c
-rwxr--r-- 1 root root   2698 Apr 28  2008 io.c
-rwxr--r-- 1 root root  21450 Apr 28  2008 lib.c
-rwxr--r-- 1 root root   7179 Apr 28  2008 libdefs.h
-rwxr--r-- 1 root root   2744 Apr 28  2008 lib.h
-rwxr--r-- 1 root root   1304 Apr 28  2008 libstub.h
-rwxr--r-- 1 root root   1516 Apr 28  2008 lock.h
-rwxr--r-- 1 root root  12176 Jan 19  2016 main.c
-rwxr--r-- 1 root root   1689 Apr 28  2008 main.h
-rwxr--r-- 1 root root   1323 Nov  7  2010 Makefile
-rwxr--r-- 1 root root     35 Nov  7  2010 modules.order
-rwxr--r-- 1 root root      0 Apr 28  2008 Module.symvers
-rwxr--r-- 1 root root   7081 Apr 28  2008 queue.c
-rwxr--r-- 1 root root   2869 Apr 28  2008 queue.h
-rwxr--r-- 1 root root  18085 Apr 28  2008 tables.c
-rwxr--r-- 1 root root   3715 Apr 28  2008 tables.h
-rwxr--r-- 1 root root  21752 Dec 12  2011 tools.c
-rwxr--r-- 1 root root   6600 Jul 21  2010 tools.h
If the /usr/src/linux-headers-5.6.0-2-common/Makefile:677 errors aren't resolved yet, does it make any sense to start building this module again?
Where to start bulding the module?
Can this Makefile error situation be consired a "prepared" environment for building?
Thank you for your Linux instructions, it's totally fine if you take your time to answer, I gladly wait for your response to learn Linux.
I keep reading in the meantime, I consider going back to older driver and Kernel and to attempt it there. Maybe the other 4.19 Kernel HAS all those missing files?

raw2020
Posts: 33
Joined: Sun Dec 29, 2019 1:22 pm

Re: Faxserver with MXLinux

#8 Post by raw2020 »

boldstripe wrote: Tue Oct 20, 2020 3:12 pm I am not sure if I understand what you are looking for, but I recently installed efax-gtk and used it to send faxes with a US Robotics USB modem off eBay. The software is also known to work with USB modems with Connexant chips and these are inexpensive to buy new.

efax-gtk Installation on Samsung netbook
This is definitely a viable solution if all else fails, since US Robotics is available to buy here in Germany. But I didn't plan to add one more dongle on my donkey.....I mean Donkeytop.....I mean Desktop...pfew! I am a builder that builds upon the foundation which God laid in the past, but nut on sand, and which no other man can lay, but rather upon the stone of the ages, which is Jesus Christ. I kinda think I need to become a tiny weak builder in Linux programming too, even if it's just basic stuff.

raw2020
Posts: 33
Joined: Sun Dec 29, 2019 1:22 pm

Re: Faxserver with MXLinux

#9 Post by raw2020 »

Could somebody be so kind and help me, several binutils* packages are installed, yet make complains: "enabled but no binutils support". :confused:
build from source:

Code: Select all

root@mx19:/usr/src/linux-source-5.6/fcpci-4.4.0/src# make -C /usr/src/linux-source-5.6/ M=PWD
make: Entering directory '/usr/src/linux-source-5.6'
arch/x86/Makefile:147: CONFIG_X86_X32 enabled but no binutils support
scripts/Makefile.build:44: PWD/Makefile: No such file or directory
make[1]: *** No rule to make target 'PWD/Makefile'.  Stop.
make: *** [Makefile:1704: PWD] Error 2
make: Leaving directory '/usr/src/linux-source-5.6'
Also the Makefiles missing are beyond my skills.
packages installed:

Code: Select all

$ apt list --installed | grep -i binutils

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

binutils-common/stable,now 2.31.1-16 amd64 [installed,automatic]
binutils-dev/stable,now 2.31.1-16 amd64 [installed]
binutils-for-build/stable,stable,now 2.31.1-16 all [installed]
binutils-x86-64-linux-gnu/stable,now 2.31.1-16 amd64 [installed,automatic]
binutils/stable,now 2.31.1-16 amd64 [installed]
libbinutils/stable,now 2.31.1-16 amd64 [installed,automatic]

raw2020
Posts: 33
Joined: Sun Dec 29, 2019 1:22 pm

Re: Faxserver with MXLinux

#10 Post by raw2020 »

I just wanna be thankful to all of the commentators so far!
I have checked path of my building directory not containing any spaces

Code: Select all

/usr/src/linux-source-5.6/fcpci-4.4.0/src/
So it can't be that as issue.
It's ok if I answer to myself here, because others might learn from it later on.
arch/x86/Makefile:147: CONFIG_X86_X32 enabled but no binutils support
Here are the lines form /arch/x86/Makefile
ifdef CONFIG_X86_X32
x32_ld_ok := $(call try-run,\
/bin/echo -e '1: .quad 1b' | \
$(CC) $(KBUILD_AFLAGS) -c -x assembler -o "$$TMP" - && \
$(OBJCOPY) -O elf32-x86-64 "$$TMP" "$$TMPO" && \
$(LD) -m elf32_x86_64 "$$TMPO" -o "$$TMP",y,n)
ifeq ($(x32_ld_ok),y)
CONFIG_X86_X32_ABI := Y
KBUILD_AFLAGS += -DCONFIG_X86_X32_ABI
KBUILD_CFLAGS += -DCONFIG_X86_X32_ABI
else
$(warning CONFIG_X86_X32 enabled but no binutils support)
endif
endif
export CONFIG_X86_X32_ABI
What do I have to change here? Hmmmmm... My best guess is some flag must have been set during the build by the developers of the Kernel, that is now hindering me building my Module, what exactly has to be changed here, if at all? I'm on 64 bit System.

Code: Select all

$ inxi -S
System:    Host: mx19 Kernel: 5.6.0-2-amd64 x86_64 bits: 64 Desktop: Xfce 4.14.2 
           Distro: MX-19.2_x64 patito feo October 21  2019 
I don't think MXLinux has much Manual help about building Kernel Modules, doesn't it? I searched a bit, but didn't find much help for me, so there you, you're kind of on your own when you try out difficult things like building drivers.
But I could easily be totally wrong here.

Post Reply

Return to “MX Modified”