Re: How to build only linux-image-2.6.18-6-686

2008-06-12 Thread Hamish Moffatt
On Sat, Jun 07, 2008 at 11:31:14AM -0400, Lennart Sorensen wrote:
 You should be installing the linux-source-x.x.x package instead and
 using make-kpkg to build custom kernels.  The source package (rather
 than the linux-source-x.x.x binary package) is not meant to make custom
 kernels.

Ideally the .config files used to build the standard Debian kernels
would be available in a light-weight package. I think the only solution
currently is to install that package and get the configuration from
/boot/config-version.


Hamish
-- 
Hamish Moffatt VK3SB [EMAIL PROTECTED] [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: How to build only linux-image-2.6.18-6-686

2008-06-12 Thread Don Armstrong
On Fri, 13 Jun 2008, Hamish Moffatt wrote:
 I think the only solution currently is to install that package and
 get the configuration from /boot/config-version.

Or just go to http://merkel.debian.org/~jurij/ and download them.
 

Don Armstrong

-- 
One day I put instant coffee in my microwave oven and almost went back
in time.
 -- Steven Wright

http://www.donarmstrong.com  http://rzlab.ucr.edu


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: How to build only linux-image-2.6.18-6-686

2008-06-12 Thread Cyril Brulebois
Hamish Moffatt [EMAIL PROTECTED] (13/06/2008):
 Ideally the .config files used to build the standard Debian kernels
 would be available in a light-weight package. I think the only
 solution currently is to install that package and get the
 configuration from /boot/config-version.

You may play around with linux-support-$version, which contains global,
per-arch, per-flavour configuration files, as well as the tools to
combine them. From the notes I took a tiny while ago, you could try e.g.
“kconfig.py /tmp/combined-config config i386/config i386/config.686”

I might have missed some bits, but that's basically what's done during
the kernel build.

Mraw,
KiBi.


signature.asc
Description: Digital signature


Re: How to build only linux-image-2.6.18-6-686

2008-06-12 Thread Cyril Brulebois
Cyril Brulebois [EMAIL PROTECTED] (13/06/2008):
 Hamish Moffatt [EMAIL PROTECTED] (13/06/2008):
  Ideally the .config files used to build the standard Debian kernels
  would be available in a light-weight package. I think the only
  solution currently is to install that package and get the
  configuration from /boot/config-version.

 [hackish stuff]

More trivially, the .config are available in linux-headers-*. I guess
they also qualify for the “light-weight” bits, since:
$ for i in headers image ; do \
  apt-cache show linux-$i-2.6.25-2-amd64 ; done | grep Installed-Size
Installed-Size: 8844
Installed-Size: 79736

Mraw,
KiBi.


signature.asc
Description: Digital signature


Re: How to build only linux-image-2.6.18-6-686

2008-06-09 Thread Tzafrir Cohen
On Sat, Jun 07, 2008 at 09:35:28PM +, Tzafrir Cohen wrote:
 On Sat, Jun 07, 2008 at 05:23:19PM -0400, Lennart Sorensen wrote:
  On Sat, Jun 07, 2008 at 08:31:47PM +, Tzafrir Cohen wrote:
   My problem with make-kpkg has always been that I could never rely on its
   generated -headers packages to actually work.
  
  Odd, the headers it generated allways worked for me.
 
 Taken to another system?
 
 The problems I remember:
 
 1. the source and build links pointed to an incorrect place. An
 invalid build link is a problem.
 
 2. If I actually changed the source to make the base supplied
 linux-headers package not good enough, I found no way to generate a
 complete one (linux-headers-2.6.18-6 vs linux-headers-2.6.18-6-686).

I haven't tested this in quite a while, so I decided to test the
suggested procedure with current Lenny kernel. I diecided to at first
play dumb and mostly follow the path of least resistance. Documentation
is rather scarse (in /usr/share/doc of the relevant packages) or even in
the wiki. There are plenty of HOWTOs, but when there are plenty of
HOWTOs, I can't really tell which one is obsolete.

The man pages may be useful as references there, but each time I tried
to use them they confused me. Hence they are of no use for the beginner
sysadmin (the one who should not mess with packages).


1. aptitude install linux-source-2.6.24
2. tar xf /usr/src/linux-source-2.6.24.tar.bz2

One small pitfalle here: I forgot I should do all of this in a new
directory. As packages will be created in a directory above the kernel
source directory.

3. aptitude install kernel-package

One possible pitfall: All the documentation and references mention the
name of the command make-kpkg. It confused me a number of times that
there is no such package called make-kpkg. But at least an apt-cache
search finds it.

4. Apply changes to source tree

In my case: 'make menuconfig' .
Possible pitfall: this means that version change will require a clean
in the next stage? I was dumb enough so it didn't hurt me.

5. what do I do next?

At this point the doucmentation is slightly confusing. The keyword to
find in the documentation is target, which is easy to spot is you're
used to the cencept of a makefile.

  make-kpkg --targets

Again, playing dumb and not really sure what each target means, I then
simply ran:

  make-kpkg buildpackage

Which built everything fine. But failed when it tried to sign the
package. I could have been aufully confused by this failure.

But at this stage I have:

5.3M linux-doc-2.6.24_2.6.24-10.00.Custom_all.deb
8.7M linux-headers-2.6.24_2.6.24-10.00.Custom_amd64.deb
 17M linux-image-2.6.24_2.6.24-10.00.Custom_amd64.deb
1.5M linux-manual-2.6.24_2.6.24-10.00.Custom_all.deb
4.0K linux-source-2.6.24
 45M linux-source-2.6.24_2.6.24-10.00.Custom_all.deb
4.0K linux-source-2.6.24_2.6.24-10.00.Custom_amd64.changes


As you can see, the version number has nothing to do with the Debian
ones. In fact, the --add-to-version switch managed to confuse me each
time I tried to use it. 


So let's try to use those. Installed a new Lenny chroot.

In order to get the build/ symlink in the kernel directory I needed to
install the headers package before the source one, or in the same
command.

Building a module with it almost worked: the include/asm symlink points
to asm-x86_64 rather than to asm-x86 (http://bugs.debian.org/475029 ).

-- 
Tzafrir Cohen | [EMAIL PROTECTED] | VIM is
http://tzafrir.org.il || a Mutt's
[EMAIL PROTECTED] ||  best
ICQ# 16849754 || friend


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: How to build only linux-image-2.6.18-6-686

2008-06-09 Thread Agustin Martin
On Sat, Jun 07, 2008 at 09:35:28PM +, Tzafrir Cohen wrote:
 On Sat, Jun 07, 2008 at 05:23:19PM -0400, Lennart Sorensen wrote:
  On Sat, Jun 07, 2008 at 08:31:47PM +, Tzafrir Cohen wrote:
   My problem with make-kpkg has always been that I could never rely on its
   generated -headers packages to actually work.
  
  Odd, the headers it generated allways worked for me.
 
 Taken to another system?
 
 The problems I remember:
 
 1. the source and build links pointed to an incorrect place. An
 invalid build link is a problem.

How are you trying to build the modules? If you build everything in the same
place,

kernel-source-dir$ fakeroot make-kpkg kernel-image modules-image

should also (along with the desired kernel image) build modules unpacked in
dirs under /usr/src/modules. Note that this and procedures below *will only
work* for Debian packaged modules source packages.

If you just have the headers package available, you can try (adapted from an
ancient README.ftape I found  here, replace ftape with the relevant module,
some things may not be up to date)

--
* If you are not using make-kpkg and have kernel headers package installed:

 You really do not need to have full kernel sources installed to build 
 the modules, having the kernel headers package that was used to build 
 the kernel is enough. In this case, 

 1)   Go to the ftape root directory (/usr/src/modules/ftape in
  the ftape-source package).

 2)   Run as root something like

 debian/rules KVERS=2.4.22-1 KSRC=/usr/src/kernel-headers-2.4.22-1 \
KDREV=2.4.22-1 kdist_image

  adapted to your kernel version (KVERS), location (KSRC), and 
  revision (KDREV)
---

As Lennart pointed out, make-kpkg and linux-source*.deb is the preferred way
to go for end users. However, the second way should also work. If the
modules source package is ready for module-assistant a third possibility is
open, but I never used it.

I insist that nothing of the above will be useful if you try to build
modules directly from upstream sources.

Hope this helps

-- 
Agustin


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: How to build only linux-image-2.6.18-6-686

2008-06-09 Thread Tzafrir Cohen
On Mon, Jun 09, 2008 at 11:52:47AM +0200, Agustin Martin wrote:
 On Sat, Jun 07, 2008 at 09:35:28PM +, Tzafrir Cohen wrote:
  On Sat, Jun 07, 2008 at 05:23:19PM -0400, Lennart Sorensen wrote:
   On Sat, Jun 07, 2008 at 08:31:47PM +, Tzafrir Cohen wrote:
My problem with make-kpkg has always been that I could never rely on its
generated -headers packages to actually work.
   
   Odd, the headers it generated allways worked for me.
  
  Taken to another system?
  
  The problems I remember:
  
  1. the source and build links pointed to an incorrect place. An
  invalid build link is a problem.
 
 How are you trying to build the modules? If you build everything in the same
 place,

I'm trying to reproduce a kernel-headers package. See my above post.

 
 kernel-source-dir$ fakeroot make-kpkg kernel-image modules-image
 
 should also (along with the desired kernel image) build modules unpacked in
 dirs under /usr/src/modules. Note that this and procedures below *will only
 work* for Debian packaged modules source packages.

Unlike what some of us believe, not everything in the world is packaged
in deb packages. I am occasionally known to build modules from other
sources.

I tend to prefer to build packages as non-root. e.g: 'm-a -u . build' .
Yet I never figured out how to make it use an extracted source tree of
my own. It also requires a magical symlink in /usr/share/modass for
something that is probably historical reasons. And this means you can
just build from a tarball (if setting TARBALL) without installing the
-source package first as root. m-a is very handy when you build as root. 
A bit less so when you don't.

 
 I insist that nothing of the above will be useful if you try to build
 modules directly from upstream sources.

kernel-headers should be. At least if the build link is properly set.

Cheers,

-- 
Tzafrir Cohen | [EMAIL PROTECTED] | VIM is
http://tzafrir.org.il || a Mutt's
[EMAIL PROTECTED] ||  best
ICQ# 16849754 || friend


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: How to build only linux-image-2.6.18-6-686

2008-06-07 Thread Marc Haber
On Fri, 6 Jun 2008 22:31:09 -0400, [EMAIL PROTECTED]
(Lennart Sorensen) wrote:
On Fri, Jun 06, 2008 at 10:14:09PM +0200, Mauro Ziliani wrote:
 Hi all.
 I need to rebuild only the linux-image-2.6.18-6-686 deb package from 
 source code.
 How can I do that without rebuild all packages in linux-2.6.18 sources 
 (xen, k7,vserver)?

Remove the other ones from debian/arch/i386/defines, and then run
debian/rules setupm which should regenerate the control file and exit,
then you should be able to run the normal package build.

Shouldn't that be easier to do, and - most of all - documented?

Greetings
Marc

-- 
-- !! No courtesy copies, please !! -
Marc Haber |Questions are the | Mailadresse im Header
Mannheim, Germany  | Beginning of Wisdom  | http://www.zugschlus.de/
Nordisch by Nature | Lt. Worf, TNG Rightful Heir | Fon: *49 621 72739834


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: How to build only linux-image-2.6.18-6-686

2008-06-07 Thread Holger Levsen
Hi Marc,

On Saturday 07 June 2008 11:51, Marc Haber wrote:
 Shouldn't that be easier to do,

Send patches?! ;)

 and - most of all - documented? 

http://wiki.debian.org/HowToRebuildAnOfficialDebianKernelPackage


regards,
Holger


pgprFz3NRVvRf.pgp
Description: PGP signature


Re: How to build only linux-image-2.6.18-6-686

2008-06-07 Thread Lennart Sorensen
On Sat, Jun 07, 2008 at 11:51:04AM +0200, Marc Haber wrote:
 Shouldn't that be easier to do, and - most of all - documented?

Playing with source packages isn't normal.  It used to be much worse
(2.6.8 in sarge involved building multiple packages, one which depended
on the other).  The package is designed to make the life of the kernel
image developers easy, not to make the life of people doing weird things
for themselves easier.

You should be installing the linux-source-x.x.x package instead and
using make-kpkg to build custom kernels.  The source package (rather
than the linux-source-x.x.x binary package) is not meant to make custom
kernels.

-- 
Len Sorensen


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: How to build only linux-image-2.6.18-6-686

2008-06-07 Thread Tzafrir Cohen
On Sat, Jun 07, 2008 at 11:31:14AM -0400, Lennart Sorensen wrote:
 On Sat, Jun 07, 2008 at 11:51:04AM +0200, Marc Haber wrote:
  Shouldn't that be easier to do, and - most of all - documented?
 
 Playing with source packages isn't normal.  It used to be much worse
 (2.6.8 in sarge involved building multiple packages, one which depended
 on the other).  The package is designed to make the life of the kernel
 image developers easy, not to make the life of people doing weird things
 for themselves easier.
 
 You should be installing the linux-source-x.x.x package instead and
 using make-kpkg to build custom kernels.  The source package (rather
 than the linux-source-x.x.x binary package) is not meant to make custom
 kernels.

My problem with make-kpkg has always been that I could never rely on its
generated -headers packages to actually work.

So it was fine to build a kernel. But if I wanted to build some modules
for that kernel, I still have a problem.

My ugly workaround is to keep the source directory and hope for the
best.

-- 
Tzafrir Cohen | [EMAIL PROTECTED] | VIM is
http://tzafrir.org.il || a Mutt's
[EMAIL PROTECTED] ||  best
ICQ# 16849754 || friend


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: How to build only linux-image-2.6.18-6-686

2008-06-07 Thread Lennart Sorensen
On Sat, Jun 07, 2008 at 08:31:47PM +, Tzafrir Cohen wrote:
 My problem with make-kpkg has always been that I could never rely on its
 generated -headers packages to actually work.

Odd, the headers it generated allways worked for me.

 So it was fine to build a kernel. But if I wanted to build some modules
 for that kernel, I still have a problem.
 
 My ugly workaround is to keep the source directory and hope for the
 best.

Nothing wrong with doing that if you are compiling the kernel anyhow.

-- 
Len Sorensen


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: How to build only linux-image-2.6.18-6-686

2008-06-07 Thread Tzafrir Cohen
On Sat, Jun 07, 2008 at 05:23:19PM -0400, Lennart Sorensen wrote:
 On Sat, Jun 07, 2008 at 08:31:47PM +, Tzafrir Cohen wrote:
  My problem with make-kpkg has always been that I could never rely on its
  generated -headers packages to actually work.
 
 Odd, the headers it generated allways worked for me.

Taken to another system?

The problems I remember:

1. the source and build links pointed to an incorrect place. An
invalid build link is a problem.

2. If I actually changed the source to make the base supplied
linux-headers package not good enough, I found no way to generate a
complete one (linux-headers-2.6.18-6 vs linux-headers-2.6.18-6-686).

 
  So it was fine to build a kernel. But if I wanted to build some modules
  for that kernel, I still have a problem.
  
  My ugly workaround is to keep the source directory and hope for the
  best.
 
 Nothing wrong with doing that if you are compiling the kernel anyhow.

Doesn't work well if you want to allow building stuff on other
computers :-(

This is to say that I got spolit by how well 'm-a a-i' works.

-- 
Tzafrir Cohen | [EMAIL PROTECTED] | VIM is
http://tzafrir.org.il || a Mutt's
[EMAIL PROTECTED] ||  best
ICQ# 16849754 || friend


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: How to build only linux-image-2.6.18-6-686

2008-06-07 Thread Lennart Sorensen
On Sat, Jun 07, 2008 at 09:35:28PM +, Tzafrir Cohen wrote:
 Taken to another system?

I don't remember if I did or not.

 The problems I remember:
 
 1. the source and build links pointed to an incorrect place. An
 invalid build link is a problem.

Where do they point?

 2. If I actually changed the source to make the base supplied
 linux-headers package not good enough, I found no way to generate a
 complete one (linux-headers-2.6.18-6 vs linux-headers-2.6.18-6-686).

So running make-kpkg binary-arch, doesn't build a useful kernel and
header package set?

 Doesn't work well if you want to allow building stuff on other
 computers :-(
 
 This is to say that I got spolit by how well 'm-a a-i' works.

Well I must admit I don't build custom kernels for my main computers.  I
only do so far a router I work with at work, and that one I do by
patching and changing the source package since I run it through a mini
build server.

You should not need the linux-headers-2.6.18-6 when using make-kpkg as
far as I can tell, although perhaps make-kpkg isn't always doing the
right thing when building from source.  Not sure about that.

-- 
Len Sorensen


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: How to build only linux-image-2.6.18-6-686

2008-06-07 Thread Marc Haber
On Sat, 7 Jun 2008 14:53:03 +0200, Holger Levsen
[EMAIL PROTECTED] wrote:
On Saturday 07 June 2008 11:51, Marc Haber wrote:
 Shouldn't that be easier to do,

Send patches?! ;)

Since I pay more attention to my personal and mental health, I tend to
minimize my contact to the Debian Kernel Team.

Greetings
Marc

-- 
-- !! No courtesy copies, please !! -
Marc Haber |Questions are the | Mailadresse im Header
Mannheim, Germany  | Beginning of Wisdom  | http://www.zugschlus.de/
Nordisch by Nature | Lt. Worf, TNG Rightful Heir | Fon: *49 621 72739834


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: How to build only linux-image-2.6.18-6-686

2008-06-07 Thread Marc Haber
On Sat, 7 Jun 2008 11:31:14 -0400, [EMAIL PROTECTED]
(Lennart Sorensen) wrote:
On Sat, Jun 07, 2008 at 11:51:04AM +0200, Marc Haber wrote:
 Shouldn't that be easier to do, and - most of all - documented?

Playing with source packages isn't normal.

The package is designed to make the life of the kernel
image developers easy, not to make the life of people doing weird things
for themselves easier.

I find that attitute totally unacceptable.

Greetings
Marc

-- 
-- !! No courtesy copies, please !! -
Marc Haber |Questions are the | Mailadresse im Header
Mannheim, Germany  | Beginning of Wisdom  | http://www.zugschlus.de/
Nordisch by Nature | Lt. Worf, TNG Rightful Heir | Fon: *49 621 72739834


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: How to build only linux-image-2.6.18-6-686

2008-06-07 Thread Lennart Sorensen
On Sun, Jun 08, 2008 at 12:41:01AM +0200, Marc Haber wrote:
 I find that attitute totally unacceptable.

Well it looks that way to me.  In fact I would say that is true of ever
source package.  The goal is to make the maintainers job easy, since
they are the ones that deal with the source package.  Most people only
ever deal with the binary packages and as long as the maintainer does a
good job, it works fine.

For building custom kernels I think the real issue is to find out what
is wrong with make-kpkg if it isn't doing what it is supposed to be
doing.

I am not a kernel team person (or a debian developer at all for that
matter, although I do now assist with the nvidia driver package), but to
me the current kernel package works great and I do deal with the source
package.  It is way better than what we used to have before Etch.  It is
one of the most complex packages to deal with since it has to work on
every architecture while at the same time dealing with completely
different configurations for each architecture as well as multiple
flavours per architecture.  I can't think of any other package that
comes close.

-- 
Len Sorensen


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: How to build only linux-image-2.6.18-6-686

2008-06-06 Thread Lennart Sorensen
On Fri, Jun 06, 2008 at 10:14:09PM +0200, Mauro Ziliani wrote:
 Hi all.
 I need to rebuild only the linux-image-2.6.18-6-686 deb package from 
 source code.
 How can I do that without rebuild all packages in linux-2.6.18 sources 
 (xen, k7,vserver)?

Remove the other ones from debian/arch/i386/defines, and then run
debian/rules setupm which should regenerate the control file and exit,
then you should be able to run the normal package build.

-- 
Len Sorensen


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]