Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ [1] 2 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Help! new user installing stuff...< Next Oldest | Next Newest >
RobDollar Offline





Group: Members
Posts: 13
Joined: Nov. 2004
Posted: Mar. 12 2008,02:19 QUOTE

I'm trying to install a driver for my wireless card, it needs the "make" command. Unfortunately I cant connect to the internet any other way except for wireless (which I can't do currently), so I've used windows to download gnu-utils.dsl and gcc1-with-lib.dsl to my hdd, which I beleive are needed. Can I use these in DSL locally (instead of using apt-get or such) and if so how.

I'm a very new linux user, and have had only a little experience with it, please bear that in mind.

I'm intrigued by linux but have (obviously) a lot to learn about how it works. I am of course very used to windows, but I don't understand the need for the complexity of compiling programs when you install them?

Any info very welcome :)
Back to top
Profile PM 
andrewb Offline





Group: Members
Posts: 316
Joined: July 2005
Posted: Mar. 12 2008,03:11 QUOTE

You'll also need gcc-2.95 as that is the compiler version used to compile the kernel & you need to match the compiler when compiling modules. You will need to load up gcc1-with-libs as well as it has the make command.

To use them boot into DSL, mount the windows partition & then use the MyDSL system to load the files you downloaded (I'e assuming your using v4.2.5). MyDSL appears on the desktop as a folder. Open the folder & double click the MyDSL icon in the folder to run the MyDSL system.

Once you've done that you will be able to use make. I would check the makefile you intend to use to ensure it points to the gcc-2.95 compiler before compiling anything.
Back to top
Profile PM 
RobDollar Offline





Group: Members
Posts: 13
Joined: Nov. 2004
Posted: Mar. 12 2008,04:21 QUOTE

Thanks for the reply. Heres the makefile, I'm assuming that it just won't work anyway considering it's got kernel 2.6 at the beginning, or can I change that?

Code Sample
all: module
MODULE_NAME := rt2570

#PATCHLEVEL := 6
#KERNDIR=/usr/src/linux-2.6
#MODDIR=/lib/modules/2.6.12/extra

ifeq ($(PATCHLEVEL),)
PATCHLEVEL := $(shell uname -r | cut -d. -f2)
endif

RESMAN_CORE_OBJS := rtusb_main.o
RESMAN_GLUE_OBJS := mlme.o rtusb_bulk.o connect.o sync.o rtusb_init.o rtmp_tkip.o wpa.o rtmp_wep.o rtusb_info.o assoc.o auth.o auth_rsp.o md5.o rtusb_io.o sanity.o rtusb_data.o

$(MODULE_NAME)-objs := $(RESMAN_CORE_OBJS) $(RESMAN_GLUE_OBJS)

ifdef TOPDIR
obj-m += $(MODULE_NAME).o
endif

EXTRA_CFLAGS += -I$(src)

ifdef KERNDIR
KERNEL_SOURCES := $(KERNDIR)
else
KERNEL_SOURCES := /lib/modules/$(shell uname -r)/build
endif

ifdef MODDIR
MODULE_ROOT := $(MODDIR)
else
MODULE_ROOT := /lib/modules/$(shell uname -r)/extra
endif

ifdef KERNOUT
KERNEL_OUTPUT := KBUILD_OUTPUT=$(KERNOUT)
else
KERNEL_OUTPUT :=
endif

src ?= .
obj ?= .

ifeq ($(PATCHLEVEL), 4)
MODULE_OBJECT := $(MODULE_NAME).o
MODULE_CONF := /etc/modules.conf
else
MODULE_OBJECT := $(MODULE_NAME).ko
MODULE_CONF := /etc/modprobe.conf
endif

ifeq ($(PATCHLEVEL), 4)
$(obj)/$(MODULE_NAME).o: $($(MODULE_NAME)-objs)
$(LD) $(EXTRA_LDFLAGS) -r -o $@ $($(MODULE_NAME)-objs)
endif

KBUILD_PARAMS := -C $(KERNEL_SOURCES) SUBDIRS=$(CURDIR) $(KERNEL_OUTPUT)

module:
@$(MAKE) $(KBUILD_PARAMS) modules; \
if ! [ -f $(MODULE_OBJECT) ]; then \
echo "$(MODULE_OBJECT) failed to build!"; \
exit 1; \
fi

arm:
@$(MAKE) $(KBUILD_PARAMS) 'EXTRA_CFLAGS=-mstructure-size-boundary=8 -I$(src)' modules;
if ! [ -f $(MODULE_OBJECT) ]; then \
echo "$(MODULE_OBJECT) failed to build!"; \
exit 1; \
fi

armdebug:
@$(MAKE) $(KBUILD_PARAMS) 'EXTRA_CFLAGS=-mstructure-size-boundary=8 -I$(src) -DRT2500_DBG' modules;
if ! [ -f $(MODULE_OBJECT) ]; then \
echo "$(MODULE_OBJECT) failed to build!"; \
exit 1; \
fi

debug:
@$(MAKE) $(KBUILD_PARAMS) 'EXTRA_CFLAGS=-I$(src) -DRT2500_DBG' modules; \
if ! [ -f $(MODULE_OBJECT) ]; then \
echo "$(MODULE_OBJECT) failed to build!"; \
exit 1; \
fi

debugfs:
@$(MAKE) $(KBUILD_PARAMS) 'EXTRA_CFLAGS=-I$(src) -DRT2500_DBG -DRT2X00DEBUGFS' modules; \
if ! [ -f $(MODULE_OBJECT) ]; then \
echo "$(MODULE_OBJECT) failed to build!"; \
exit 1; \
fi

clean:
@rm -f $(RESMAN_GLUE_OBJS) $(RESMAN_CORE_OBJS) .*.{cmd,flags}
@rm -f $(MODULE_NAME).{o,ko,mod.{o,c}} built-in.o $(VERSION_HEADER) *~
@rm -fr .tmp_versions Module.symvers

modules_install:
@if ! [ -f $(MODULE_OBJECT) ]; then \
        $(MAKE) module; \
fi
ifeq ($(PATCHLEVEL),4)
@echo "install '$(MODULE_OBJECT)' to $(MODULE_ROOT)"
install -m 755 -o 0 -g 0 -d $(MODULE_ROOT)
install -m 644 -o 0 -g 0 $(MODULE_OBJECT) $(MODULE_ROOT)
/sbin/depmod -a
else
@echo "2.6 module install"
make $(KBUILD_PARAMS) modules_install
/sbin/depmod -a
endif


install: modules_install
@if ! grep -q 'rausb0' $(MODULE_CONF); then \
echo "append 'alias rausb0 rt2570' to $(MODULE_CONF)"; \
echo "alias rausb0 rt2570" >> $(MODULE_CONF); \
fi

install-fedora:
if ! [ -f $(MODULE_OBJECT) ]; then \
module; \
fi
@echo "install '$(MODULE_OBJECT)' to $(MODULE_ROOT)"
install -m 755 -o 0 -g 0 -d $(MODULE_ROOT)
install -m 644 -o 0 -g 0 $(MODULE_OBJECT) $(MODULE_ROOT)
/sbin/depmod -a

@if ! grep -q 'wlan0' /etc/modprobe.conf; then \
echo "append 'alias wlan0 rt2570' to /etc/modprobe.conf"; \
echo "alias wlan0 rt2570" >> /etc/modprobe.conf; \
echo "options rt2570 ifname=wlan%d" >> /etc/modprobe.conf; \
fi
ifeq ($(PATCHLEVEL), 4)
include $(KERNEL_SOURCES)/Rules.make
endif
Back to top
Profile PM 
^thehatsrule^ Offline





Group: Members
Posts: 3275
Joined: July 2006
Posted: Mar. 12 2008,04:47 QUOTE

No, it could work (see PATCHLEVEL 4). It would probably be easier to read the docs though.  Those lines at the start are commented out anyways.
Back to top
Profile PM 
RobDollar Offline





Group: Members
Posts: 13
Joined: Nov. 2004
Posted: Mar. 12 2008,15:20 QUOTE

I've loaded the .dsl's gcc-2.95, gcc-with-lib and gnu-utils, using the local extension tool in mydsl (I'm assuming it doesn't matter the order you load them in).

The make command now works, but when I run make install, it says /lib/modules/2.6.12/build folder not found. That build folder seems to exist but not as a folder or file, I'm unsure why it's being displayed in bash & file manager.

Also, I'm doing this in dsl-n as from what I can tell this driver need the 2.6 kernel.
Back to top
Profile PM 
7 replies since Mar. 12 2008,02:19 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ [1] 2 >/
reply to topic new topic new poll
Quick Reply: Help! new user installing stuff...

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code