Hi all !
For I couldn’t get any results with ndiswrapper for my Netgear WG111 v1 I browsed the web for updated drivers. I found compat-wireless on wireless.kernel.org, an awesome work has been done there for the WiFi Dongles on Linux. I got with the p54usb drivers everything fine on openSUSE 11.1.
Then the installation process has spent a long time on building the modules and since I recently have suscribed for a Build Service it’s been obviously a good reason to open a compat-wireless package.
Build such modules requires some knowledge, which I’ve been correctly guided through the openSUSE tutorials. here I list them :
Then my .spec file comes from the Code11 pdf sample.
It’s short but wise, indeed.
Now here’s what OBS log returns (with openSUSE Factory repo) from %build before to exit :
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.22550
+ umask 022
+ cd /usr/src/packages/BUILD
+ /bin/rm -rf /var/tmp/compat-wireless-2.6.30-build
++ dirname /var/tmp/compat-wireless-2.6.30-build
+ /bin/mkdir -p /var/tmp
+ /bin/mkdir /var/tmp/compat-wireless-2.6.30-build
+ cd compat-wireless-2.6.30
+ for flavor in default desktop pae xen
+ rm -rf obj/default
+ cp -r source obj/default
+ make -C /usr/src/linux-obj/i586/default modules M=/usr/src/packages/BUILD/compat-
wireless-2.6.30/obj/default
make: Entering directory `/usr/src/linux-2.6.31-rc6-3-obj/i386/default'
make -C ../../../linux-2.6.31-rc6-3 O=/usr/src/linux-2.6.31-rc6-3-obj/i386/default/.
modules
make[3]: *** /usr/src/packages/BUILD/compat-wireless-2.6.30/obj/default/: Is a directory.
Stop.
make[2]: *** [_module_/usr/src/packages/BUILD/compat-wireless-2.6.30/obj/default] Error 2
make[1]: *** [sub-make] Error 2
make: *** [all] Error 2
make: Leaving directory `/usr/src/linux-2.6.31-rc6-3-obj/i386/default'
error: Bad exit status from /var/tmp/rpm-tmp.22550 (%build)
RPM build errors:
cannot open Pubkeys index using db3 - No such file or directory (2)
Bad exit status from /var/tmp/rpm-tmp.22550 (%build)
System halted.
Someone ever used OBS for kernel modules here ?
It seems the kernel source is not linked at all.
If you grab an existing kmp src rpm to look at and see where your going
wrong. Not sure what desktop your using in Gnome you can right click
and extract to see all the files. Also things are a little different in
11.2, so when you searching for compat-wireless, have a search for
au0282 in Factory and grab the au0828-2-12.1.src.rpm one and look at
the spec file.
thank you malcolm, google did not found any rpm, or at least I was not able to catch it up.
So compat-wireless is already available in openSUSE Update…
Kent I might try again if the error could be found.
# # norootforbuild
# Name: compat-wireless
# BuildRequires: %kernel_module_package_buildreqs
# License: GPL
# Group: System/Kernel
# Summary: Linux Wireless compatibility package
# Version: 2.6.30
# Release: 0
# Source0: %name-%version.tar.bz2
# BuildRoot: %{_tmppath}/%{name}-%{version}-build
# %kernel_module_package -x debug -x trace
# %description
# Compat-wireless was designed to allow you to install the latest
# bleeding edge Linux wireless drivers on older kernels. Sometimes you
# don't want to run bleeding edge wireless and but compat-wireless gives
# you no other option, that's where the compat-wireless stable snapshots
# come in.
#
# This package allows you install the 2.6.30 Linux wireless
# drivers on kernels >= 2.6.27.
#
# For more information please see:
#
# http://wireless.kernel.org/en/users/Download
# http://wireless.kernel.org/en/users/Download/stable
# %prep
# %setup
# set -- *
# mkdir source
# mv "$@" source/
# mkdir obj
# %build
# for flavor in %flavors_to_build; do
# rm -rf obj/$flavor
# cp -r source obj/$flavor
# make -C %{kernel_source $flavor} modules M=$PWD/obj/$flavor
# done
# %install
# export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
# export INSTALL_MOD_DIR=updates
# for flavor in %flavors_to_build; do
# make -C %{kernel_source $flavor} modules_install M=$PWD/obj/$flavor
# done
# %changelog
Well I’m also looking forward to build a .deb modules pkg.
Today I did manage to build my own java project for .deb within the OBS, how an amazing thing to dig… but really a terrific service from SUSE !! Thks
EDIT : compat-wireless build was “expansion error - nothing provides %kernel_module_package_buildreqs” from opensuse 11.1 oss and failed for the mentioned reason with Factory.
from the drivers:wireless area I found the spec.
Added this to the line # BuildRequires:
kernel-source kernel-syms module-init-tools %kernel_module_package_buildreqs
# norootforbuild
Name: compat-wireless
BuildRequires: %kernel_module_package_buildreqs
# kernel-source kernel-syms module-init-tools
License: GPL
Group: System/Kernel
Summary: Linux Wireless compatibility package
Version: 2.6.30
Release: 1
Source0: %name-%version.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%kernel_module_package -x debug -x trace
%description
Compat-wireless was designed to allow you to install the latest
bleeding edge Linux wireless drivers on older kernels. Sometimes you
don't want to run bleeding edge wireless and but compat-wireless gives
you no other option, that's where the compat-wireless stable snapshots
come in.
This package allows you install the 2.6.30 Linux wireless
drivers on kernels >= 2.6.27.
For more information please see:
http://wireless.kernel.org/en/users/Download
http://wireless.kernel.org/en/users/Download/stable
%prep
%setup
set -- *
mkdir source
mv "$@" source/
mkdir obj
%build
# Set build to default kernel
%if 0%{?suse_version} == 1120
export flavors to build=desktop pae default
%else
export flavors to build=default pae
%endif
export EXTRA_CFLAGS='-DVERSION=\"%version\"'
for flavor in %flavors_to_build; do
rm -rf obj/$flavor
cp -r source obj/$flavor
make -C %{kernel_source $flavor} modules M=$PWD/obj/$flavor
done
%install
%if 0%{?suse_version} == 1120
export flavor=desktop pae default
%else
export flavor=default pae
%endif
export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
export INSTALL_MOD_DIR=updates
for flavor in %flavors_to_build; do
make -C %{kernel_source $flavor} modules_install M=$PWD/obj/$flavor
done
%changelog
Im no C or shell script programmer, I know about PHP and Java much better.
BTW Im wondering how to do the same with debian package, how to define and find the uname -r in the debian/control and debian/dsc file.
make[3]:
*** /usr/src/packages/BUILD/compat-wireless-2.6.30/obj/default/: Is a
directory. Stop.
Help please, What does this paragraph do?
%setup
set -- *
mkdir source
mv "$@" source/ # <-- this mv what?
Then this might not work with the source dir :
for flavor in %flavors_to_build; do
rm -rf obj/$flavor
cp -r source obj/$flavor
make -C %{kernel_source $flavor} modules M=$PWD/obj/$flavor
done
and hence I changed it to :
for flavor in %flavors_to_build; do
rm -rf obj/$flavor
cp -r . obj/$flavor <-- here we should cp all compat-wireless dir files, don't we?
make -C %{kernel_source $flavor} modules M=$PWD/obj/$flavor
done
hi again!
Well I managed to make the build occur, compilation goes well (and fast!!) . What I did realize, is to stick on the readme.file from compat-wireless
make
make install
make unload
:
# norootforbuild
Name: compat-wireless
BuildRequires: kernel-source kernel-syms module-init-tools
# %kernel_module_package_buildreqs
License: GPL
Group: System/Kernel
Summary: Linux Wireless compatibility package
Version: 2.6.30
Release: 1
Source0: %name-%version.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} == 1120
%suse_kernel_module_package -x desktop pae default
%else
%suse_kernel_module_package -x default pae
%endif
%description
Compat-wireless was designed to allow you to install the latest
bleeding edge Linux wireless drivers on older kernels. Sometimes you
don't want to run bleeding edge wireless and but compat-wireless gives
you no other option, that's where the compat-wireless stable snapshots
come in.
This package allows you install the 2.6.30 Linux wireless
drivers on kernels >= 2.6.27.
For more information please see:
http://wireless.kernel.org/en/users/Download
http://wireless.kernel.org/en/users/Download/stable
%prep
%setup
set -- *
mkdir source
mv "$@" source/
mkdir obj
/sbin/depmod -a
%build
# Set build to default kernel
%if 0%{?suse_version} == 1120
export flavors to build=desktop pae default
%elsea
export flavors to build=default pae
%endif
export EXTRA_CFLAGS='-DVERSION=\"%version\"'
for flavor in %flavors_to_build; do
rm -rf obj/$flavor
cp -r source obj/$flavor
cd obj/$flavor
make KLIB=%{kernel_source $flavor} \
KLIB_BUILD=%{kernel_source $flavor}
# make -C %{kernel_source $flavor} modules M=$PWD/obj/$flavor
cd ../../.
done
%install
%if 0%{?suse_version} == 1120
export flavor=desktop pae default
%else
export flavor=default pae
%endif
export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
export INSTALL_MOD_DIR=updates
for flavor in %flavors_to_build; do
cd obj/$flavor
make KLIB=%{kernel_source $flavor} \
KLIB_BUILD=%{kernel_source $flavor} install
# make -C %{kernel_source $flavor} modules_install M=$PWD/obj/$flavor
cd ../../.
done
%changelog
see that make -C %{kersrc} modules … was not correct.anyway compile is done but then installing faild because modules.dep wasn’t found; then I added a call to depmod which fails :
+ /sbin/depmod -a
WARNING: Couldn't open directory /lib/modules/2.6.27.29-0.1-xen: No such file or directory
FATAL: Could not open /lib/modules/2.6.27.29-0.1-xen/modules.dep.temp for writing: No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.31341 (%prep)