Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi, I am trying to install a smartcard reader driver onto my ubuntu machine. I am not able run the make file.
The output of makefile is as follows:
Code:
amit@ubuntu:~/Downloads/Linux Driver/rts_pstor$ sudo make
sed "s/RTSX_MK_TIME/`date +%y.%m.%d.%H.%M`/" timestamp.in > timestamp.h
cp -f ./define.release ./define.h
make -C /lib/modules/3.16.0-36-generic/build SUBDIRS=/home/amit/Downloads/Linux Driver/rts_pstor modules
make[1]: Entering directory `/usr/src/linux-headers-3.16.0-36-generic'
arch/x86/Makefile:136: CONFIG_X86_X32 enabled but no binutils support
Makefile:652: Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR: -fstack-protector not supported by compiler
make[1]: *** No rule to make target `Driver/rts_pstor'. Stop.
make[1]: Leaving directory `/usr/src/linux-headers-3.16.0-36-generic'
make: *** [default] Error 2
amit@ubuntu:~/Downloads/Linux Driver/rts_pstor$
arch/x86/Makefile:136: CONFIG_X86_X32 enabled but no binutils support
Makefile:652: Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR: -fstack-protector not supported by compiler
make[1]: *** No rule to make target `Driver/rts_pstor'. Stop
did you already run /.config ?
do you have installed binutils?
you can check it if you write: binutils -v or binutils -version
Thanks, I tried those posts. But they have errors in their source files. Here I am not able to set the compiler/environment right to be able to compile the code.
I do not know how to get rid of this error:
Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR: -fstack-protector not supported by compiler
did you already run /.config ?
do you have installed binutils?
you can check it if you write: binutils -v or binutils -version
Faithfully,
M.
Hello,
There is no config file in the folder. It contains the following files:
Code:
amit@ubuntu:~/Downloads/Linux Driver/rts_pstor$ ls -al
total 700
drwxr-xr-x 2 amit amit 4096 May 4 08:32 .
drwxrwxrwx 3 amit amit 4096 May 3 12:16 ..
-rw-r--r-- 1 amit amit 1371 Dec 13 2010 debug.h
-rw-r--r-- 1 amit amit 1004 Dec 13 2010 define.debug
-rw-r--r-- 1 amit amit 1004 May 4 08:46 define.h
-rw-r--r-- 1 amit amit 1004 Dec 13 2010 define.release
-rw-r--r-- 1 amit amit 1049 Dec 13 2010 general.c
-rw-r--r-- 1 amit amit 1015 Dec 13 2010 general.h
-rw-r--r-- 1 amit amit 1640 May 4 08:32 Makefile
-rw-r--r-- 1 amit amit 1628 May 4 08:31 Makefile~
-rw-r--r-- 1 amit amit 106764 Dec 13 2010 ms.c
-rw-r--r-- 1 amit amit 6140 Dec 13 2010 ms.h
-rw-r--r-- 1 amit amit 230 Dec 13 2010 README.txt
-rw-r--r-- 1 amit amit 26554 Dec 13 2010 rtsx.c
-rw-r--r-- 1 amit amit 30481 Dec 13 2010 rtsx_card.c
-rw-r--r-- 1 amit amit 28905 Dec 13 2010 rtsx_card.h
-rw-r--r-- 1 amit amit 54331 Dec 13 2010 rtsx_chip.c
-rw-r--r-- 1 amit amit 24140 Dec 13 2010 rtsx_chip.h
-rw-r--r-- 1 amit amit 5405 Dec 13 2010 rtsx.h
-rw-r--r-- 1 amit amit 76296 Dec 13 2010 rtsx_scsi.c
-rw-r--r-- 1 amit amit 3923 Dec 13 2010 rtsx_scsi.h
-rw-r--r-- 1 amit amit 1485 Dec 13 2010 rtsx_sys.h
-rw-r--r-- 1 amit amit 25970 Dec 13 2010 rtsx_transport.c
-rw-r--r-- 1 amit amit 2227 Dec 13 2010 rtsx_transport.h
-rw-r--r-- 1 amit amit 121535 Dec 13 2010 sd.c
-rw-r--r-- 1 amit amit 8303 Dec 13 2010 sd.h
-rw-r--r-- 1 amit amit 23664 Dec 13 2010 spi.c
-rw-r--r-- 1 amit amit 2117 Dec 13 2010 spi.h
-rw-rw-r-- 1 amit amit 998 May 4 08:46 timestamp.h
-rw-r--r-- 1 amit amit 996 Dec 13 2010 timestamp.in
-rw-r--r-- 1 amit amit 4302 Dec 13 2010 trace.h
-rw-r--r-- 1 amit amit 58704 Dec 13 2010 xd.c
-rw-r--r-- 1 amit amit 5225 Dec 13 2010 xd.h
I tried binutils -v It says binutils: command not found. Although when I did sudo apt-get install binutils, It says binutils is installed and is newest version.
are you sure compiling from source is the right way to go about this? on ubuntu???
are you absolutely sure that support for this device cannot be obtained otherwise? e.g. by loading an already existing module, or installing something from the repos?
you don't give us info about the device, or what the actual problem is and what you want to achieve, so all i can see right now is an xy-problem.
Well, My X is that - Its a new device, and I want to load a driver for it. To do so, the Readme says to do as follows:
Code:
General Information
===================
Linux driver for Realtek PCI-Express card reader chip.
Build Steps
===========
1) make
2) make install
3) depmod
4) reboot your computer
Note: Root privilege is required in step 2 and 3
I am not aware if I can use any existing hardware driver or not. All I want to do is compile this to get a .ko file and load it.
Although I figured out that the problem was there was a whitespace in the driver source path. I removed that, along with some other help from links above, it is solved now.
First, I'm willing to bet you are running on a 64 bit system; and that means that a 32 bit driver is useless. It would also explain why there is no 32 bit support in binutils (which is a package name, not an application - it includes 64 bit libraries and utilities, and if the compiling environment is included, it also means 64 bit assembler, 64 bit compilers... so no, it won't work).
And if CONFIG_X86_X32 is in a configuration file somewhere (likely), you have to recreate the configuration file AT A MINIMUM. Now, if the driver has never been built for 64 bit support you may also have to port the driver... But I'm assuming it tried to stay at least close to the Linux form, so it may only need that reconfiguration.
My initial guess is that the file define.h (copied from debug.h) has configuration options you will have to check.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.