[SOLVED] how to build driver?

Post here if you are a new Porteus member and you're looking for some help.
Post Reply
feng
Black ninja
Black ninja
Posts: 62
Joined: 18 Jan 2011, 15:51
Location: internet

[SOLVED] how to build driver?

Post#1 by feng » 15 Feb 2012, 07:31

Hi!

this is a long story...

my netbook (hp 2133) freezes once that the wicd tried to connect to access point.

i guess it's the driver problem and i found this page http://goo.gl/JO7Dl

i download BCM4312 driver http://goo.gl/ioRxV
it need to have the kernel headers...

i have read this post [HOWTO] - Compile and use custom Porteus kernel http://goo.gl/jfUUg
and i have 000-kernel.xzm and 007-devel.xzm activated already.
there's nothing in /usr/src/linux, so i download linux kernel 3.1.8 http://goo.gl/87gGS

Code: Select all

make -C /lib/modules/`uname -r`/build M=`pwd`
make: Entering directory `/mnt/sda2/linux-3.1.8'

  ERROR: Kernel configuration is invalid.
         include/generated/autoconf.h or include/config/auto.conf are missing.
         Run 'make oldconfig && make prepare' on kernel src to fix it.


  WARNING: Symbol version dump /mnt/sda2/linux-3.1.8/Module.symvers
           is missing; modules will have no dependencies and modversions.

  LD      /mnt/sda2/bcm4312/built-in.o
  CC [M]  /mnt/sda2/bcm4312/src/shared/linux_osl.o
/mnt/sda2/bcm4312/src/shared/linux_osl.c:1:0: error: code model ‘kernel’ not supported in the 32 bit mode
/mnt/sda2/bcm4312/src/shared/linux_osl.c:1:0: sorry, unimplemented: 64-bit mode not compiled in
make[1]: *** [/mnt/sda2/bcm4312/src/shared/linux_osl.o] Error 1
make: *** [_module_/mnt/sda2/bcm4312] Error 2
make: Leaving directory `/mnt/sda2/linux-3.1.8'
ps. /mnt/sda2/linux-3.1.8 symbol link to /usr/src/linux

now, i have a problem that i dont have old kernel config in /usr/src/linux/.config
this is difficult to answer the questions while run "make oldconfig"

can someone send me a copy of that .config?
Last edited by feng on 15 Feb 2012, 17:14, edited 1 time in total.

User avatar
fanthom
Site Admin
Site Admin
Posts: 4547
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: how to build driver?

Post#2 by fanthom » 15 Feb 2012, 10:03

@feng
1) please boot porteus in 'always fresh' mode with base modules only
2) activate 'crippled_sources' module from the repo:
http://ponce.cc/porteus/i486/current/pa ... l-sources/
3) start PPM -> go to SBO section -> choose express build -> search and build "broadcom-sta" package
4) convert to xzm

please also create /etc/modprobe.d/b43_blacklist.conf and add the following lines to it:
blacklist b43
blacklist b43legacy
blacklist bcma
blacklist ssb

inside your broadcom-sta module.
Please add [Solved] to your thread title if the solution was found.

feng
Black ninja
Black ninja
Posts: 62
Joined: 18 Jan 2011, 15:51
Location: internet

Re: how to build driver?

Post#3 by feng » 15 Feb 2012, 14:44

Hi fanthom,

I got the error message when i try to open porteus-package-manager (i login in as root):
Konsole is unable to open a PTY (pseudo teletype). It is likely that this is due to an incorrect
configuration of the PTY devices. Konsole needs to have read/write access to the PTY devices.
what should i do?

User avatar
fanthom
Site Admin
Site Admin
Posts: 4547
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: how to build driver?

Post#4 by fanthom » 15 Feb 2012, 15:15

@feng
did you try to reboot?
if it wont help then make sure that you are doing exactly what i wrote in the first point
1) please boot porteus in 'always fresh' mode with base modules only
Please add [Solved] to your thread title if the solution was found.

feng
Black ninja
Black ninja
Posts: 62
Joined: 18 Jan 2011, 15:51
Location: internet

Re: how to build driver?

Post#5 by feng » 15 Feb 2012, 17:13

fanthom wrote:@feng
did you try to reboot?
if it wont help then make sure that you are doing exactly what i wrote in the first point
1) please boot porteus in 'always fresh' mode with base modules only

Hi Famthom,

I load porteus from grub ...

Porteus 1.1 Always Fresh
root (hd0,1)
kernel (hd0,1)/porteus11/boot/vmlinuz initrd=/porteus11/boot/initrd.xz from_dev=/dev/sda2 from_dir=/porteus11/porteus nomagic
initrd (hd0,1)/porteus11/boot/initrd.xz
boot



anyway, i ran the command "/opt/porteus-scripts/porteus-package-manager" in the terminal to finish the rest things.

oh well, most important thing is that modules i made , it also makes the netbook freeze while booting...

at last, thanks for your help.

User avatar
Hamza
Warlord
Warlord
Posts: 1846
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: [SOLVED] how to build driver?

Post#6 by Hamza » 15 Feb 2012, 19:03

It would be nice to get a XZM module for other users :)
NjVFQzY2Rg==

feng
Black ninja
Black ninja
Posts: 62
Joined: 18 Jan 2011, 15:51
Location: internet

Re: [SOLVED] how to build driver?

Post#7 by feng » 17 Feb 2012, 09:23

file: bcm4312.xzm http://goo.gl/KGWZY
build from hybrid-portsrc_x86_32-v5_100_82_112.tar.gz with linux kernel 3.1.5


p.s. Slackbuild got problem to build this as there's no directory "i486" in linux kernel source.

User avatar
Hamza
Warlord
Warlord
Posts: 1846
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: [SOLVED] how to build driver?

Post#8 by Hamza » 17 Feb 2012, 10:07

@fanthom, does this module could be included on repo ?
NjVFQzY2Rg==

User avatar
fanthom
Site Admin
Site Admin
Posts: 4547
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: [SOLVED] how to build driver?

Post#9 by fanthom » 02 Apr 2012, 06:02

@fanthom, does this module could be included on repo ?
up to 32bit maintainer :wink:
Please add [Solved] to your thread title if the solution was found.

Post Reply