[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian on cobalt cube



[Cc'ing debian-mips to publish the kernel-build recipe below]

Martin Michlmayr wrote:
> Hi Jürgen,
> 
> I'm CCing Thiemo Seufer who is the kernel maintainer for Cobalt.
> 
> * Jürgen Bormuth <juergen@tyrant-eyes.de> [2005-03-15 00:25]:
> > I got a Cobalt Cube 2700 last month and wondered what to do with that thing.
> ...
> > I notice that the onboard network interface is very slow (10MBit) and i 
> > want to add a additional network interface at 100MBit (realtek)
> > Because there is no kernel suport for that I want to kompile a new 
> > kernel....
> 
> We added sound/usb/firewire modules a few months ago, but I think
> adding some network modules would be a good idea.  Thiemo?

Is there a list (or better: a .config snippet) which ones to include?

> > make[3]: Entering directory `/usr/src/kernel-source-2.4.27/drivers/char'
> > gcc -D__KERNEL__ -I/usr/src/kernel-source-2.4.27/include -Wall 
> > -Wstrict-prototypes -Wno-t
> > rigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -I 
> > /usr/src/kernel-sou
> > rce-2.4.27/include/asm/gcc -G 0 -mno-abicalls -fno-pic -pipe  
> > -finline-limit=100000 -mabi
> > =32 -march=r5000 -mips4 -Wa,-32 -Wa,-march=r5000 -Wa,-mips4 -Wa,--trap   
> > -nostdinc -iwith
> > prefix include -DKBUILD_BASENAME=lcd  -c -o lcd.o lcd.c
> > lcd.c:554: warning: initialization from incompatible pointer type
> > lcd.c:561: error: `LCD_MINOR' undeclared here (not in a function)
> > lcd.c:561: error: initializer element is not constant
> > lcd.c:561: error: (near initialization for `lcd_dev.minor')

You are trying to build from the generic debian kernel source tree,
without the mips-specific patches. You can build a mips/mipsel kernel
(in an easier way, in your $HOME) with:

  - apt-get source kernel-patch-2.4.27-mips
  - sudo apt-get build-dep kernel-patch-2.4.27-mips
  - cd kernel-patch-2.4.27-mips*

  optional: comment out unwanted subarch flavours in debian/rules

  change the kernel configuration (in config/mips{,el}/$subarch), this
  is best done by
    - debian/rules patch
    - cp config/mipsel/r5k-cobalt build-tmp/ker*/.config
    - cd build-tmp/ker*
    - make menuconfig
    - cd -
    - cp build-tmp/ker*/.config config/mipsel/r5k-cobalt

  - dpkg-buildpackage -us -uc -rsudo -b

If the build fails due to the changed config, you can add -nc to the
dpkg-buildpackage options for the next build. This still cleans the
build-tmp tree but it won't rebuild it from the tarball (the latter
kills all source changes). You could as well invoke make-kpkg directly,
but that's somewhat tricky.

> I have never seen this myself, but someone else mentioned this to me.
> He fixed it by adding
> 
> #define LCD_MINOR 140
> 
> to drivers/char/lcd.h

Out of curiosity, did he report other kernel bugs? The result is
unlikely to work stable without the mips patches.


Thiemo



Reply to: