LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 05-04-2015, 11:54 AM   #1
aut432
LQ Newbie
 
Registered: May 2015
Posts: 4

Rep: Reputation: Disabled
Unable to install driver


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$
The make file for this driver is as follows:

Code:
TARGET_MODULE := rts_pstor

EXTRA_CFLAGS := -Idrivers/scsi 

obj-m += $(TARGET_MODULE).o

$(TARGET_MODULE)-objs := rtsx.o rtsx_chip.o rtsx_transport.o rtsx_scsi.o rtsx_card.o \
			 general.o sd.o xd.o ms.o spi.o

default:
	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/$(shell uname -r)/build SUBDIRS=$(shell pwd) modules
debug:
	sed "s/RTSX_MK_TIME/`date +%y.%m.%d.%H.%M`/" timestamp.in > timestamp.h
	cp -f ./define.debug ./define.h
	make -C /lib/modules/$(shell uname -r)/build SUBDIRS=$(shell pwd) modules
install:
	cp $(TARGET_MODULE).ko /lib/modules/$(shell uname -r)/kernel/drivers/scsi -f
clean:
	rm -f *.o *.ko
	rm -f $(TARGET_MODULE).mod.c
Please let me know any of your comments.

Thanks,
Amit
 
Old 05-04-2015, 12:15 PM   #2
Soadyheid
Senior Member
 
Registered: Aug 2010
Location: Near Edinburgh, Scotland
Distribution: Cinnamon Mint 17.0 at present.
Posts: 1,167

Rep: Reputation: 201Reputation: 201Reputation: 201
I've no expertise in running make files but Googling rts_pstor I got these hits which may help:

https://vidyut.net/realtek-sd-card-r...orking-ubuntu/

http://www.omgubuntu.co.uk/2011/02/c...hp-mini-ubuntu

Good luck!

Play Bonny!

 
Old 05-04-2015, 12:15 PM   #3
translator1111
Member
 
Registered: Jun 2010
Location: Slovakia
Distribution: Debian 8, Ubuntu 10.04 and 12.04; SLAX 6.0; ConnochaetOS 0.9.; LFS; Natty chip: VT1708S
Posts: 93
Blog Entries: 2

Rep: Reputation: 7
Dear Amit,
have you noticed these 3 lines?:
Quote:
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

Faithfully,
M.
 
Old 05-04-2015, 12:18 PM   #4
aut432
LQ Newbie
 
Registered: May 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
@Soadyheid

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

Thanks!
 
Old 05-04-2015, 12:25 PM   #5
aut432
LQ Newbie
 
Registered: May 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by translator1111 View Post
Dear Amit,
have you noticed these 3 lines?:

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.

Thanks,
Amit
 
Old 05-04-2015, 01:51 PM   #6
ondoho
Senior Member
 
Registered: Dec 2013
Posts: 4,176

Rep: Reputation: 834Reputation: 834Reputation: 834Reputation: 834Reputation: 834Reputation: 834Reputation: 834
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.
 
1 members found this post helpful.
Old 05-04-2015, 02:51 PM   #7
aut432
LQ Newbie
 
Registered: May 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
@ondoho

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.

Thanks though!

Amit
 
Old 05-04-2015, 04:38 PM   #8
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,600

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
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.
 
Old 05-04-2015, 10:48 PM   #9
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,818

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
i would start by fixing this VERY BIG PROBLEM
Quote:
/Downloads/Linux Driver/rts_pstor
see that " blank space " in the folder NAME !!!!

remove the blank space and retry

that error even tells you that that blank space IS causing a problem
Code:
make[1]: *** No rule to make target `Driver/rts_pstor'.  Stop.

Last edited by John VV; 05-04-2015 at 10:49 PM.
 
2 members found this post helpful.
  


Reply


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
Unable to install Cmedia Soundcard driver decentandsimple Linux - Hardware 2 07-31-2011 07:11 AM
unable to install wi-fi driver vikas_choudharyy Linux - Software 1 07-24-2011 03:52 AM
Unable to install HP qlogic driver ...errors linuxuser2010 Linux - Software 1 09-29-2010 10:51 AM
Unable to install the grafic driver lela Linux - Newbie 6 12-04-2004 01:06 PM
I am still unable to install my sound driver... SGFHK321 Linux - Newbie 7 07-11-2004 11:41 PM


All times are GMT -5. The time now is 04: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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration