Debian Bug report logs - #497738
kernel-package: include ways of generating images other than vmlinux

version graph

Package: kernel-package; Maintainer for kernel-package is Manoj Srivastava <srivasta@debian.org>; Source for kernel-package is src:kernel-package.

Reported by: Rogério Brito <rbrito@ime.usp.br>

Date: Wed, 3 Sep 2008 22:51:02 UTC

Severity: wishlist

Fixed in version kernel-package/12.006

Done: Manoj Srivastava <srivasta@acm.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, debian-embedded@lists.debian.org, debian-powerpc@lists.debian.org, Manoj Srivastava <srivasta@debian.org>:
Bug#497738; Package kernel-package. Full text and rfc822 format available.

Acknowledgement sent to Rogério Brito <rbrito@ime.usp.br>:
New Bug report received and forwarded. Copy sent to debian-embedded@lists.debian.org, debian-powerpc@lists.debian.org, Manoj Srivastava <srivasta@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Rogério Brito <rbrito@ime.usp.br>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: kernel-package: include ways of generating images other than vmlinux
Date: Wed, 3 Sep 2008 19:36:45 -0300
Package: kernel-package
Severity: wishlist

Dear Manoj,

I've been using kernel-package to cross-compile kernels for my (weak)
powerpc boxes.

Right now, I have one that needs to have its kernel compiled in the uBoot
format, which can be generated by the kernel sources with the help of
uboot-mkimage and having a blob generated by running the dtc command (from
the device-tree-compiler package) on a given file.

Is there any way to have such hooks into kernel-package, so that I can have
everything under control of dpkg? This would be a tremendous thing.


Thanks in advance, Rogério Brito.

-- 
Rogério Brito : rbrito@{mackenzie,ime.usp}.br : GPG key 1024D/7C2CAEB8
http://www.ime.usp.br/~rbrito : http://meusite.mackenzie.com.br/rbrito
Projects: algorithms.berlios.de : lame.sf.net : vrms.alioth.debian.org




Information forwarded to debian-bugs-dist@lists.debian.org, Manoj Srivastava <srivasta@debian.org>:
Bug#497738; Package kernel-package. (Sun, 19 Oct 2008 02:06:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to 497738@bugs.debian.org, Rogério Brito <rbrito@ime.usp.br>:
Extra info received and forwarded to list. Copy sent to Manoj Srivastava <srivasta@debian.org>. (Sun, 19 Oct 2008 02:06:02 GMT) Full text and rfc822 format available.

Message #10 received at 497738@bugs.debian.org (full text, mbox):

From: Rogério Brito <rbrito@ime.usp.br>
To: Manoj Srivastava <srivasta@debian.org>
Cc: 497738@bugs.debian.org
Subject: Re: Creating other types of images with kernel-package
Date: Sat, 18 Oct 2008 23:04:05 -0300
[Message part 1 (text/plain, inline)]
Hi, Manoj.

On Oct 18 2008, Manoj Srivastava wrote:
> On Sun, Aug 31 2008, Rogério Brito wrote:
> > I currently have an embedded powerpc box that needs its boot images
> > to be created via the "make uImage" target for the Linux kernel.
> >
> > Currently, when I create a package with kernel-package on powerpc, I
> > get an image that is bootable on powermacs (I have one iBook G3),
> > but it does seem to me (please, correct me if I am wrong) that
> > kernel-package doesn't include other types of images in the package
> > (which lie under arch/.../boot).
> >
> > Is there anything that I can do to make kernel-package generate the
> > uImage (for booting with uBoot) that I need?
> 
>         I have no experience in non-mainstream hardware, so I never had
>  to create such kernel images.

Ok, I'm just learning about embedded hardware and having them work with
Debian is a great thing to do.

>  What one essentially needs, then, is support for sub arches, in other
>  words, this is not a cross-compile,

Right, the cross-compilation is just an extra that I'm using right now
(the powerpc box is just unnaceptably slow for compiling its own
kernel).

I'm currently using the following attached script to make a "fake"
kernel-package.

>  but a valid subarch under the same architecture, right? --subarch might
>  be the way to go, but may need some fixes.

I really don't know which subarch we should be calling here.

>         This also seems to be a special case: there is a specific target
>  that can be invoked. Does running make all also invoke uImage?

I will have to test this. I will follow up in a sec.

>         If not, we need to tell kernel-package to not run bzImage, but
>  this instead. Does uImage still produce a vmlinuz?

I also don't know this bug I can answer this in a moment.


Regards, Rogério Brito.

-- 
Rogério Brito : rbrito@{mackenzie,ime.usp}.br : GPG key 1024D/7C2CAEB8
http://www.ime.usp.br/~rbrito : http://meusite.mackenzie.com.br/rbrito
Projects: algorithms.berlios.de : lame.sf.net : vrms.alioth.debian.org
[kernel-kuro.sh (application/x-sh, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Manoj Srivastava <srivasta@debian.org>:
Bug#497738; Package kernel-package. (Sun, 19 Oct 2008 02:42:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to 497738@bugs.debian.org, 497738-submitter@bugs.debian.org:
Extra info received and forwarded to list. Copy sent to Manoj Srivastava <srivasta@debian.org>. (Sun, 19 Oct 2008 02:42:02 GMT) Full text and rfc822 format available.

Message #15 received at 497738@bugs.debian.org (full text, mbox):

From: Rogério Brito <rbrito@ime.usp.br>
To: Manoj Srivastava <srivasta@debian.org>
Cc: 497738@bugs.debian.org, 497738-submitter@bugs.debian.org
Subject: Re: Creating other types of images with kernel-package
Date: Sat, 18 Oct 2008 23:37:58 -0300
Hi again, Manoj.

On Oct 18 2008, Rogério Brito wrote:
> On Oct 18 2008, Manoj Srivastava wrote:
> > On Sun, Aug 31 2008, Rogério Brito wrote:
> > > Is there anything that I can do to make kernel-package generate the
> > > uImage (for booting with uBoot) that I need?
> > 
> >  but a valid subarch under the same architecture, right? --subarch
> >  might be the way to go, but may need some fixes.
> 
> I really don't know which subarch we should be calling here.

It seems that the files needed are in arch/powerpc/platforms/embedded6xx/

> >         This also seems to be a special case: there is a specific target
> >  that can be invoked. Does running make all also invoke uImage?
> 
> I will have to test this. I will follow up in a sec.

Yes, it does.

> >         If not, we need to tell kernel-package to not run bzImage, but
> >  this instead. Does uImage still produce a vmlinuz?
> 
> I also don't know this bug I can answer this in a moment.

"make all" creates:

* a vmlinux in the root directory of the kernel tree
* a zImage in arch/powerpc/boot/
* a uImage in arch/powerpc/boot/ 


Regards, Rogério Brito.

-- 
Rogério Brito : rbrito@{mackenzie,ime.usp}.br : GPG key 1024D/7C2CAEB8
http://www.ime.usp.br/~rbrito : http://meusite.mackenzie.com.br/rbrito
Projects: algorithms.berlios.de : lame.sf.net : vrms.alioth.debian.org




Message sent on to Rogério Brito <rbrito@ime.usp.br>:
Bug#497738. (Sun, 19 Oct 2008 02:42:03 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#497738; Package kernel-package. (Sun, 19 Oct 2008 06:42:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Manoj Srivastava <srivasta@debian.org>:
Extra info received and forwarded to list. (Sun, 19 Oct 2008 06:42:04 GMT) Full text and rfc822 format available.

Message #23 received at 497738@bugs.debian.org (full text, mbox):

From: Manoj Srivastava <srivasta@debian.org>
To: 497738@bugs.debian.org
Cc: 497738-submitter@bugs.debian.org
Subject: Re: Creating other types of images with kernel-package
Date: Sun, 19 Oct 2008 01:25:16 -0500
On Sat, Oct 18 2008, Rogério Brito wrote:

> "make all" creates:
>
> * a vmlinux in the root directory of the kernel tree
> * a zImage in arch/powerpc/boot/
> * a uImage in arch/powerpc/boot/ 

        Hmm. I think kernel-package will migrate to running make
 all. And then all we really need to do is convey to make-kpkg that
 extra things might need to be installed.

        manoj
-- 
There is brutality and there is honesty.  There is no such thing as
brutal honesty.
Manoj Srivastava <srivasta@debian.org> <http://www.debian.org/~srivasta/>  
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C




Message sent on to Rogério Brito <rbrito@ime.usp.br>:
Bug#497738. (Sun, 19 Oct 2008 06:42:05 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Manoj Srivastava <srivasta@debian.org>:
Bug#497738; Package kernel-package. (Sun, 19 Oct 2008 07:57:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Rogério Brito <rbrito@ime.usp.br>:
Extra info received and forwarded to list. Copy sent to Manoj Srivastava <srivasta@debian.org>. (Sun, 19 Oct 2008 07:57:02 GMT) Full text and rfc822 format available.

Message #31 received at 497738@bugs.debian.org (full text, mbox):

From: Rogério Brito <rbrito@ime.usp.br>
To: Manoj Srivastava <srivasta@debian.org>
Cc: 497738@bugs.debian.org, 497738-submitter@bugs.debian.org
Subject: Re: Bug#497738: Creating other types of images with kernel-package
Date: Sun, 19 Oct 2008 05:54:36 -0200
Hi, Manoj.

On Oct 19 2008, Manoj Srivastava wrote:
> On Sat, Oct 18 2008, Rogério Brito wrote:
> 
> > "make all" creates:
> >
> > * a vmlinux in the root directory of the kernel tree
> > * a zImage in arch/powerpc/boot/
> > * a uImage in arch/powerpc/boot/ 
> 
>         Hmm. I think kernel-package will migrate to running make
>  all. And then all we really need to do is convey to make-kpkg that
>  extra things might need to be installed.

Here are the core files (besides the modules) that I'm copying into
boot (from a slightly updated version of the script that I sent):

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cp System.map				/tmp/kernel/boot/System.map-$VERSION
cp arch/powerpc/boot/uImage		/tmp/kernel/boot/uImage-$VERSION
cp .config				/tmp/kernel/boot/config-$VERSION
cp arch/powerpc/boot/dts/kuroboxHD.dtb	/tmp/kernel/boot/kuroboxHD.dtb-$VERSION
cp arch/powerpc/boot/dts/kuroboxHG.dtb	/tmp/kernel/boot/kuroboxHG.dtb-$VERSION
cd /tmp/kernel/boot
ln -sf uImage-$VERSION			uImage
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Of course, the symlink there should be installed by postinst, since dpkg
complains that we are trying to overwrite files from other packages.


Regards, Rogério Brito.

-- 
Rogério Brito : rbrito@{mackenzie,ime.usp}.br : GPG key 1024D/7C2CAEB8
http://www.ime.usp.br/~rbrito : http://meusite.mackenzie.com.br/rbrito
Projects: algorithms.berlios.de : lame.sf.net : vrms.alioth.debian.org




Message sent on to Rogério Brito <rbrito@ime.usp.br>:
Bug#497738. (Sun, 19 Oct 2008 07:57:03 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#497738; Package kernel-package. (Sun, 19 Oct 2008 15:12:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Manoj Srivastava <srivasta@debian.org>:
Extra info received and forwarded to list. (Sun, 19 Oct 2008 15:12:04 GMT) Full text and rfc822 format available.

Message #39 received at 497738@bugs.debian.org (full text, mbox):

From: Manoj Srivastava <srivasta@debian.org>
To: Rogério Brito <rbrito@ime.usp.br>
Cc: 497738@bugs.debian.org, 497738-submitter@bugs.debian.org
Subject: Re: Bug#497738: Creating other types of images with kernel-package
Date: Sun, 19 Oct 2008 09:56:03 -0500
On Sun, Oct 19 2008, Rogério Brito wrote:

> Hi, Manoj.
>
> On Oct 19 2008, Manoj Srivastava wrote:
>> On Sat, Oct 18 2008, Rogério Brito wrote:
>> 
>> > "make all" creates:
>> >
>> > * a vmlinux in the root directory of the kernel tree
>> > * a zImage in arch/powerpc/boot/
>> > * a uImage in arch/powerpc/boot/ 
>> 
> Here are the core files (besides the modules) that I'm copying into
> boot (from a slightly updated version of the script that I sent):
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> cp System.map				/tmp/kernel/boot/System.map-$VERSION
> cp .config				/tmp/kernel/boot/config-$VERSION

        This is already being done. Unless you mean that there should be
 yet another package that does not contain vmlinuz, this means more work
 in kernel-package -- especially since there is no analog in other
 arches; and thus make-kpkg would  need t special case powerpc, and
 create a different control file on that arch -- only in some cases.

> cp arch/powerpc/boot/uImage		/tmp/kernel/boot/uImage-$VERSION
> cp arch/powerpc/boot/dts/kuroboxHD.dtb	/tmp/kernel/boot/kuroboxHD.dtb-$VERSION
> cp arch/powerpc/boot/dts/kuroboxHG.dtb	/tmp/kernel/boot/kuroboxHG.dtb-$VERSION

        These are the three extra files that need to be copied over.  I
 can try creating a step in image package for all arches where
 INSTALL_EXTRA_IMAGE_FILES step is invoked, and this is usually null,
 but can be set to do the right thing for powerpc. This is the minimally
 disruptive way to accomplish this.

> cd /tmp/kernel/boot
> ln -sf uImage-$VERSION			uImage
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>
> Of course, the symlink there should be installed by postinst, since dpkg
> complains that we are trying to overwrite files from other packages.

        The symlink should be handled like grub is -- users drop in a
 script in /etc/kernel/postinst.d, if needed. 

        manoj
-- 
Ferguson's Precept: A crisis is when you can't say "let's forget the
whole thing."
Manoj Srivastava <srivasta@debian.org> <http://www.debian.org/~srivasta/>  
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C




Message sent on to Rogério Brito <rbrito@ime.usp.br>:
Bug#497738. (Sun, 19 Oct 2008 15:12:05 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Manoj Srivastava <srivasta@debian.org>:
Bug#497738; Package kernel-package. (Sun, 19 Oct 2008 15:30:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to 497738@bugs.debian.org, 497738-submitter@bugs.debian.org:
Extra info received and forwarded to list. Copy sent to Manoj Srivastava <srivasta@debian.org>. (Sun, 19 Oct 2008 15:30:04 GMT) Full text and rfc822 format available.

Message #47 received at 497738@bugs.debian.org (full text, mbox):

From: Rogério Brito <rbrito@ime.usp.br>
To: Manoj Srivastava <srivasta@debian.org>
Cc: 497738@bugs.debian.org, 497738-submitter@bugs.debian.org
Subject: Re: Bug#497738: Creating other types of images with kernel-package
Date: Sun, 19 Oct 2008 13:27:39 -0200
Hi, Manoj.

On Oct 19 2008, Manoj Srivastava wrote:
> On Sun, Oct 19 2008, Rogério Brito wrote:
> > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> > cp System.map				/tmp/kernel/boot/System.map-$VERSION
> > cp .config				/tmp/kernel/boot/config-$VERSION
> 
>         This is already being done.

Yes, I'm doing that with your practice as a model.

>  Unless you mean that there should be yet another package that does
>  not contain vmlinuz, this means more work in kernel-package --
>  especially since there is no analog in other arches;

Please, note that there is no vmlinu*z* when I compile this kernel (this
has a tree of an already compiled kernel):

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
rbrito@chagas:/usr/local/media/cross-compile/linux$ find . -iname "*vmlinuz*"
rbrito@chagas:/usr/local/media/cross-compile/linux$
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

There's only a vmlinu*x* on the top level directory of the tree.

>  and thus make-kpkg would need t special case powerpc, and create a
>  different control file on that arch -- only in some cases.

I don't recall what is the situation with a NewWorld powermac, but I
used to use make-kpkg fine there. With OldWorld powermacs, I seem to
remember that, for a miboot image, I had to grab one of the kernel
images, compress it with gzip and put it into a floppy.

But that's not the case here. I'm happy with both NewWorld and this
embedded machine working. We can see the OldWorld case latter, when I
get the dust off it latter.

> > cp arch/powerpc/boot/uImage		/tmp/kernel/boot/uImage-$VERSION
> > cp arch/powerpc/boot/dts/kuroboxHD.dtb	/tmp/kernel/boot/kuroboxHD.dtb-$VERSION
> > cp arch/powerpc/boot/dts/kuroboxHG.dtb	/tmp/kernel/boot/kuroboxHG.dtb-$VERSION
> 
>         These are the three extra files that need to be copied over.  I
>  can try creating a step in image package for all arches where
>  INSTALL_EXTRA_IMAGE_FILES step is invoked, and this is usually null,
>  but can be set to do the right thing for powerpc. This is the minimally
>  disruptive way to accomplish this.

Thanks. This would be quite nice.

> > cd /tmp/kernel/boot
> > ln -sf uImage-$VERSION			uImage
> > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> >
> > Of course, the symlink there should be installed by postinst, since dpkg
> > complains that we are trying to overwrite files from other packages.
> 
>         The symlink should be handled like grub is -- users drop in a
>  script in /etc/kernel/postinst.d, if needed.

Well, a postinst script on the package would take care of it. I just
couldn't get it done with a here-doc shell script due to quoting and I
didn't bother going further. I'm installing the packages with
--force-all passed to dpkg for the time being.


Thanks for your kindness, Rogério Brito.

-- 
Rogério Brito : rbrito@{mackenzie,ime.usp}.br : GPG key 1024D/7C2CAEB8
http://www.ime.usp.br/~rbrito : http://meusite.mackenzie.com.br/rbrito
Projects: algorithms.berlios.de : lame.sf.net : vrms.alioth.debian.org




Message sent on to Rogério Brito <rbrito@ime.usp.br>:
Bug#497738. (Sun, 19 Oct 2008 15:30:07 GMT) Full text and rfc822 format available.

Reply sent to Manoj Srivastava <srivasta@acm.org>:
You have taken responsibility. (Fri, 21 Aug 2009 16:45:06 GMT) Full text and rfc822 format available.

Notification sent to Rogério Brito <rbrito@ime.usp.br>:
Bug acknowledged by developer. (Fri, 21 Aug 2009 16:45:07 GMT) Full text and rfc822 format available.

Message #55 received at 497738-done@bugs.debian.org (full text, mbox):

From: Manoj Srivastava <srivasta@acm.org>
To: 497738-done@bugs.debian.org
Subject: Re: Bug#497738: Creating other types of images with kernel-package
Date: Fri, 21 Aug 2009 11:09:58 -0500
Package: kernel-package
Version: 12.006

Hi,

On Sun, Oct 19 2008, Rogério Brito wrote:

> Here are the core files (besides the modules) that I'm copying into
> boot (from a slightly updated version of the script that I sent):
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> cp System.map				/tmp/kernel/boot/System.map-$VERSION
> cp arch/powerpc/boot/uImage		/tmp/kernel/boot/uImage-$VERSION
> cp .config				/tmp/kernel/boot/config-$VERSION
> cp arch/powerpc/boot/dts/kuroboxHD.dtb	/tmp/kernel/boot/kuroboxHD.dtb-$VERSION
> cp arch/powerpc/boot/dts/kuroboxHG.dtb	/tmp/kernel/boot/kuroboxHG.dtb-$VERSION
> cd /tmp/kernel/boot
> ln -sf uImage-$VERSION			uImage
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

> Of course, the symlink there should be installed by postinst, since dpkg
> complains that we are trying to overwrite files from other packages.

        Well, this is a nice enough use case that building it into the
 mainline directly, complete with the user interface to select the
 alternate target, and the places it should be installed in, would be a
 lot of code, and testing it would also be an issue.

        However, version 12.006 introduced the overlay directory, where
 one may replace any file used in kernel-package, including
 rulesets/targets/image.mk. With this overlay in place, you can invoke
 any target you want, and not have to replace the rest of the
 infrastructure.

        If you implement your make nippet changes with a conditional
 like (ifneq (,$(KPKG_CALL_ALTERNATE_TARGET)) , it might make future
 inclusion into mainline easier, once you have it all tested.

        manoj
-- 
You cannot achieve the impossible without attempting the absurd.
Manoj Srivastava <srivasta@acm.org> <http://www.golden-gryphon.com/>  
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sat, 19 Sep 2009 07:29:48 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Apr 19 18:49:04 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.