DangerIsGo
2[H]4U
- Joined
- Apr 16, 2005
- Messages
- 3,000
I've been running smoothwall 3.0 for the past 7-8 years and I love it. Recently, I upgraded my Verizon FiOS account to ditch TV and just have internet which would finally let me get rid of the coax/Verizon router and use the ONT's ethernet jack directly to my firewall. Well, long story short, I believe the ethernet's drivers to be the issue so I wanted to update them. I have two Realtek 8110SC ports in my mini ITX MB. I went to Realtek's site and got the latest. When I went to do a 'make clean modules', I was presented with:
Now comes the part where I am unsure of. I googled that and I was missing the linux kernel headers necessary. I downloaded the entire kernel package from:
https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.4.104.tar.xz
and put that in </usr/src/linux-headers-3.4.104> and made a symbolic link to </lib/modules/3.4.104/build>. Trying the 'make clean modules' again, I got:
Another google search told me that this is probably a make file issue. The drivers have 3 make files. A main one, one for kernel 2.x and one for kernel 3.x. Here is the main one:
And here is the 3.x:
So now I'm stuck. What do I do? Did I do anything wrong? Did I get the wrong headers? Is there something wrong with the make files? I don't have apt-get or yum or any package manager since its a stripped down linux version. Thanks!
/lib/modules/3.4.104/build: No such file or directory
Now comes the part where I am unsure of. I googled that and I was missing the linux kernel headers necessary. I downloaded the entire kernel package from:
https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.4.104.tar.xz
and put that in </usr/src/linux-headers-3.4.104> and made a symbolic link to </lib/modules/3.4.104/build>. Trying the 'make clean modules' again, I got:
make -C /lib/modules/3.4.104/build SUBDIRS=/tmp/r8169/src/ clean
make[1]: Entering directory `/lib/modules/3.4.104/build`
make[1]: *** No rule to make target 'clean'. Stop.
make[1]: Leaving directory `/lib/modules/3.4.104/build`
make: *** [clean] Error 2
Another google search told me that this is probably a make file issue. The drivers have 3 make files. A main one, one for kernel 2.x and one for kernel 3.x. Here is the main one:
KFLAG := 2$(shell uname -r | sed -ne 's/^2\.[4]\..*/4/p')x
all: clean modules install
modules:
ifeq ($(KFLAG),24x)
$(MAKE) -C src/ -f Makefile_linux24x modules
else
$(MAKE) -C src/ modules
endif
clean:
ifeq ($(KFLAG),24x)
$(MAKE) -C src/ -f Makefile_linux24x clean
else
$(MAKE) -C src/ clean
endif
install:
ifeq ($(KFLAG),24x)
$(MAKE) -C src/ -f Makefile_linux24x install
else
$(MAKE) -C src/ install
endif
And here is the 3.x:
ifneq ($(KERNELRELEASE),)
obj-m := r8169.o
r8169-objs := r8169_n.o
EXTRA_CFLAGS += -DCONFIG_R8169_NAPI
EXTRA_CFLAGS += -DCONFIG_R8169_VLAN
else
BASEDIR := /lib/modules/$(shell uname -r)
KERNELDIR ?= $(BASEDIR)/build
PWD :=$(shell pwd)
DRIVERDIR := $(shell find $(BASEDIR)/kernel/drivers/net -name realtek -type d)
ifeq ($(DRIVERDIR),)
DRIVERDIR := $(BASEDIR)/kernel/drivers/net
endif
RTKDIR := $(subst $(BASEDIR)/,,$(DRIVERDIR))
.PHONY: all
all: clean modules install
.PHONY:modules
modules:
$(MAKE) -C $(KERNELDIR) SUBDIRS=$(PWD) modules
.PHONY:clean
clean:
$(MAKE) -C $(KERNELDIR) SUBDIRS=$(PWD) clean
.PHONY:install
install:
$(MAKE) -C $(KERNELDIR) SUBDIRS=$(PWD) INSTALL_MOD_DIR=$(RTKDIR) modules_install
endif
So now I'm stuck. What do I do? Did I do anything wrong? Did I get the wrong headers? Is there something wrong with the make files? I don't have apt-get or yum or any package manager since its a stripped down linux version. Thanks!