FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux User Repository

 
 
LinkBack Thread Tools
 
Old 04-30-2012, 09:27 AM
Bernhard D
 
Default PKGBUILD review request

Hi,

I wrote a PKGBUILD for the driver package from TBS (www.tbsdtv.com) for
their dvb cards. I split packaging for modules and firmware and patched
the sources to install the modules to /lib/modules/kernelversion/updates
and the firmware to /lib/firmware/updates to avoid overwriting existing
files. It's the first time I'm building kernel modules and there are
two things I'm not sure about:
- Are the files under /lib/firmware/updates found and do they have
precedence?
- Is "depmod -a" after install, upgrade and removal the right approach
to rebuild the module dependencies?

Regards,
Bernhard
 
Old 04-30-2012, 12:40 PM
Bernhard D
 
Default PKGBUILD review request

I attached the file I got from "makepkg --source" to my first message,
but it seems that it had been dropped. Are attachements allowed?

Regards,
Bernhard


Am Montag, den 30.04.2012, 11:27 +0200 schrieb Bernhard D:
> Hi,
>
> I wrote a PKGBUILD for the driver package from TBS (www.tbsdtv.com) for
> their dvb cards. I split packaging for modules and firmware and patched
> the sources to install the modules to /lib/modules/kernelversion/updates
> and the firmware to /lib/firmware/updates to avoid overwriting existing
> files. It's the first time I'm building kernel modules and there are
> two things I'm not sure about:
> - Are the files under /lib/firmware/updates found and do they have
> precedence?
> - Is "depmod -a" after install, upgrade and removal the right approach
> to rebuild the module dependencies?
>
> Regards,
> Bernhard
>
>
>
 
Old 04-30-2012, 01:00 PM
Jesse Juhani Jaara
 
Default PKGBUILD review request

ma, 2012-04-30 kello 14:40 +0200, Bernhard D kirjoitti:
> I attached the file I got from "makepkg --source" to my first message,
> but it seems that it had been dropped. Are attachments allowed?
No attachments are removed. Paste the PKGBUILD and .install file to some
pastebin service. (Don't use pastebin.com!) Also Please do not top post,
write your answer under the original message.

> I split packaging for modules and firmware and patched
> the sources to install the modules to /lib/modules/kernelversion/updates
That is a wring directory. Out-of-tree modules go to
/lib/modules/extramodules-$KERNEL_VERSION

> Are the files under /lib/firmware/updates found and do they have
> precedence?
I am not completely sure about this but, I am quite positive that it
doesn't matter in what directory the file is, as long it is in the
firmware directory. I myself would use /lib/firmware/tbs/ directory.

> > - Is "depmod -a" after install, upgrade and removal the right approach
> > to rebuild the module dependencies?
post_install()
post_upgrade()
and post_remove()
are needed as far as I understand
See the install file for vhba-module as reference
https://projects.archlinux.org/svntogit/community.git/tree/trunk/vhba-module.install?h=packages/vhba-module
 
Old 04-30-2012, 01:16 PM
Dave Reisner
 
Default PKGBUILD review request

On Mon, Apr 30, 2012 at 11:27:54AM +0200, Bernhard D wrote:
> Hi,
>
> I wrote a PKGBUILD for the driver package from TBS (www.tbsdtv.com) for
> their dvb cards. I split packaging for modules and firmware and patched

No, please don't make this a split package. You need them both at the
same time, there's no reason to make a split package with a single file
in each.

> the sources to install the modules to /lib/modules/kernelversion/updates

This is wrong. updates/ are for... updates. It's admin territory for
overriding existing (in tree) kernel modules with backports and whatnot.

> and the firmware to /lib/firmware/updates to avoid overwriting existing
> files. It's the first time I'm building kernel modules and there are
> two things I'm not sure about:
> - Are the files under /lib/firmware/updates found and do they have
> precedence?

Yes they have precedence, but for the same reason as above you should
not be installing things here. Additionally, you must adhere to the path
that the module dictates for its firmware. radeon, for example, expects
firmware under radeon/. You can see exactly what it expects with
modinfo, e.g.

$ modinfo -k 3.3.4-1-ARCH -F firmware radeon | sed 3q
radeon/R520_cp.bin
radeon/RS600_cp.bin
radeon/RS690_cp.bin

So in this case, firmware is looked for in each of these base paths (in
order):

/usr/lib/firmware/updates/$(uname -r)
/usr/lib/firmware/updates/
/lib/firmware/updates/$(uname -r)
/lib/firmware/updates
/usr/lib/firmware/$(uname -r)
/usr/lib/firmware
/lib/firmware/$(uname -r)
/lib/firmware

The search stops as soon as udev finds a match.

> - Is "depmod -a" after install, upgrade and removal the right approach
> to rebuild the module dependencies?

No, this is overkill. You should know exactly what kernel you're
building against so only run depmod for that one kernel.

d
 
Old 04-30-2012, 01:55 PM
Bernhard D
 
Default PKGBUILD review request

Am Montag, den 30.04.2012, 16:00 +0300 schrieb Jesse Juhani Jaara:
> ma, 2012-04-30 kello 14:40 +0200, Bernhard D kirjoitti:
> > I attached the file I got from "makepkg --source" to my first message,
> > but it seems that it had been dropped. Are attachments allowed?
> No attachments are removed. Paste the PKGBUILD and .install file to some
> pastebin service. (Don't use pastebin.com!) Also Please do not top post,
> write your answer under the original message.
>
> > I split packaging for modules and firmware and patched
> > the sources to install the modules to /lib/modules/kernelversion/updates
> That is a wring directory. Out-of-tree modules go to
> /lib/modules/extramodules-$KERNEL_VERSION
>
> > Are the files under /lib/firmware/updates found and do they have
> > precedence?
> I am not completely sure about this but, I am quite positive that it
> doesn't matter in what directory the file is, as long it is in the
> firmware directory. I myself would use /lib/firmware/tbs/ directory.
>
> > > - Is "depmod -a" after install, upgrade and removal the right approach
> > > to rebuild the module dependencies?
> post_install()
> post_upgrade()
> and post_remove()
> are needed as far as I understand
> See the install file for vhba-module as reference
> https://projects.archlinux.org/svntogit/community.git/tree/trunk/vhba-module.install?h=packages/vhba-module

Thanks for your help. I have corrected the build process according to
your suggestions. The files can be found at:
https://gist.github.com/2558499

Regards,
Bernhard
 
Old 04-30-2012, 02:30 PM
Jesse Juhani Jaara
 
Default PKGBUILD review request

ma, 2012-04-30 kello 15:55 +0200, Bernhard D kirjoitti:
> Tanks for your help. I have corrected the build process according to
> your suggestions. The files can be found at:
> https://gist.github.com/2558499
Looking the PKGBUILD I would propose changing that horrible to read case
clutter to few ifs like this. Out kernel's are all at version 3 so no
need for the 2.6 version eather:

if [ "$_dvbtype" = "c" ]; then
if [ "$CARCH" = "i686" ]; then
./v4l/tbs-dvbc-x86_r3.sh
else
./v4l/tbs-dvbc-x86_64.sh
fi

elif [ "$_dvbtype" = "s2" ]; then
if [ "$CARCH" = "i686" ];then
./v4l/tbs-x86_r3.sh
else
./v4l/tbs-x86_64.sh
fi
fi

Also lookin ath the make files and stuff reveal the horrifyingness and
idiotism of this drivers packager/writer. The whole linux v4l is
included in the tarball and build by default, not to mention that it is
installed too. Owerwriting our webcam and video capture card driver
stack from some random version of kernel it totally out of order. So
instead of doing make install, copy only the tbs drivers by hand from
there. Even better hack and slash the make files to not even build all
those 5 gazillion other drivers.
 

Thread Tools




All times are GMT. The time now is 05:07 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org