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 > Debian > Debian Kernel

 
 
LinkBack Thread Tools
 
Old 07-11-2011, 08:59 PM
Marcus Osdoba
 
Default preferred solution for building kernel.deb and defining Entry point address

Hello Mailinglist,

I recently experimented with building kernels based on squeeze's
patchlevel. The target (Wii, a powerpc flavor) is not that important for
the next question:
What is the currently preferred solution for building kernel packages -
make-kpkg or deb-pkg?


The FAQ proposes make-kpkg while the kernel handbook talks about deb-pkg
target only [1]. The "kernel building" sources in [2] "recommend" the
make deb-pkg.


Background: Both variants (make-kpkg and deb-pkg) produced a kernel
different to using plain make statements. In my example the resulting
image using debian-scripts had an Entry point address at 0xc0000000.
Using plain make statements produced an Entry point address at 0x600000.
Unfortunatly the non-scripted version booted successfuly, the Entry
point 0xc0000000 didn't boot on my Wii.


I grepped the debian/rules and .configs, but I didn't figure out, WHERE
this Entry point is defined. Maybe it is some Debian default for the
powerpc architecture - differing to upstream default?


Since playing with a bootable Wii kernel based on squeeze's patchlevel
is highly experimental and just private hobby, I don't expect any deeper
help, BUT it should be documented, that the debian rules are choosing an
Entry point address for you (or please enlight me if my suspicion is
completly wrong).


Thanks in advance,
Marcus

[1]
http://www.debian.org/doc/FAQ/ch-kernel.en.html
http://kernel-handbook.alioth.debian.org/ch-common-tasks.html
[2]
http://anonscm.debian.org/viewvc/kernel/dists/squeeze/linux-2.6/debian/README.Debian?view=markup


--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4E1B6415.1010709@googlemail.com">http://lists.debian.org/4E1B6415.1010709@googlemail.com
 
Old 07-11-2011, 11:43 PM
Ben Hutchings
 
Default preferred solution for building kernel.deb and defining Entry point address

On Mon, Jul 11, 2011 at 10:59:01PM +0200, Marcus Osdoba wrote:
> Hello Mailinglist,
>
> I recently experimented with building kernels based on squeeze's
> patchlevel. The target (Wii, a powerpc flavor) is not that important
> for the next question:
> What is the currently preferred solution for building kernel
> packages - make-kpkg or deb-pkg?

The kernel team usually recommends 'make deb-pkg', and some of us work
on the scripts for that upstream.

> The FAQ proposes make-kpkg while the kernel handbook talks about
> deb-pkg target only [1]. The "kernel building" sources in [2]
> "recommend" the make deb-pkg.
>
> Background: Both variants (make-kpkg and deb-pkg) produced a kernel
> different to using plain make statements.

They should both be using 'make' i.e. the default target.

> In my example the
> resulting image using debian-scripts had an Entry point address at
> 0xc0000000. Using plain make statements produced an Entry point
> address at 0x600000. Unfortunatly the non-scripted version booted
> successfuly, the Entry point 0xc0000000 didn't boot on my Wii.
>
> I grepped the debian/rules and .configs, but I didn't figure out,
> WHERE this Entry point is defined. Maybe it is some Debian default
> for the powerpc architecture - differing to upstream default?
>
> Since playing with a bootable Wii kernel based on squeeze's
> patchlevel is highly experimental and just private hobby, I don't
> expect any deeper help, BUT it should be documented, that the debian
> rules are choosing an Entry point address for you (or please enlight
> me if my suspicion is completly wrong).
[...]

The upstream default for CONFIG_KERNEL_START on powerpc is 0xc0000000.
The 'deb-pkg' scripts don't make any changes to the kernel config.

Please explain exactly how you are building the kernel with a
different entry point (config changes and commands).

Ben

--
Ben Hutchings
We get into the habit of living before acquiring the habit of thinking.
- Albert Camus


--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110711234315.GP29924@decadent.org.uk">http://lists.debian.org/20110711234315.GP29924@decadent.org.uk
 
Old 07-12-2011, 09:05 PM
Marcus Osdoba
 
Default preferred solution for building kernel.deb and defining Entry point address

Am 12.07.2011 01:43, schrieb Ben Hutchings:

Please explain exactly how you are building the kernel with a
different entry point (config changes and commands).

Hi Ben, many thanks for the answer.
I'm working with the debian sources on patchlevel 31 as base and applied
the mikep5 patch [1]. I also tried to use the default powerpc-config (I
grepped it from a powerpc-kernel-deb).


The commands on a recent amd64 Squeeze were:

linux-src#>sudo make-kpkg --initrd --cross-compile powerpc-linux-gnu-
--arch powerpc --append-to-version +mikep5 kernel_image
linux-src#>sudo make KDEB_PKGVERSION=upstreamdebpkgcreatorNOINITRD.1.0
ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- deb-pkg


linux-src#>sudo make ARCH=powerpc CROSS32_COMPILE=powerpc-linux-gnu-
CROSS_COMPILE=powerpc-linux-gnu- zImage


All commands were launched within the same linux-src-tree.
readelf -h <image out of deb generated by make-kpkg> --> 0xc0000000
readelf -h <image out of deb generated by make deb-pkg> --> 0xc0000000
readelf -h arch/powerpc/boot/zImage --> desired 0x600000

I know, that 0x600000 works for my Wii. And I know, that the powerpc
images of the official packages have an Entry point address of 0xc0000000.


Nevertheless, I don't understand, why make-kpkg/make deb-pkg are
producing an image with a different address than using plain make commands.


Regards,
Marcus

[1]
http://www.gc-linux.org/wiki/Building_a_GameCube_Linux_Kernel_%28ARCH%3Dpowerpc %29



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4E1CB70A.8010605@googlemail.com">http://lists.debian.org/4E1CB70A.8010605@googlemail.com
 
Old 07-13-2011, 01:41 AM
Ben Hutchings
 
Default preferred solution for building kernel.deb and defining Entry point address

On Tue, 2011-07-12 at 23:05 +0200, Marcus Osdoba wrote:
> Am 12.07.2011 01:43, schrieb Ben Hutchings:
> > Please explain exactly how you are building the kernel with a
> > different entry point (config changes and commands).
> Hi Ben, many thanks for the answer.
> I'm working with the debian sources on patchlevel 31 as base and applied
> the mikep5 patch [1]. I also tried to use the default powerpc-config (I
> grepped it from a powerpc-kernel-deb).
>
> The commands on a recent amd64 Squeeze were:
>
> linux-src#>sudo make-kpkg --initrd --cross-compile powerpc-linux-gnu-
> --arch powerpc --append-to-version +mikep5 kernel_image
> linux-src#>sudo make KDEB_PKGVERSION=upstreamdebpkgcreatorNOINITRD.1.0
> ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- deb-pkg
>
> linux-src#>sudo make ARCH=powerpc CROSS32_COMPILE=powerpc-linux-gnu-
> CROSS_COMPILE=powerpc-linux-gnu- zImage
>
> All commands were launched within the same linux-src-tree.
> readelf -h <image out of deb generated by make-kpkg> --> 0xc0000000
> readelf -h <image out of deb generated by make deb-pkg> --> 0xc0000000
> readelf -h arch/powerpc/boot/zImage --> desired 0x600000
[...]

I think the problem may be that make-kpkg and make deb-pkg use the
vmlinux file and not the zImage file which is what you need.

Ben.

--
Ben Hutchings
All extremists should be taken out and shot.
 
Old 07-14-2011, 09:10 PM
Marcus Osdoba
 
Default preferred solution for building kernel.deb and defining Entry point address

Am 13.07.2011 03:41, schrieb Ben Hutchings:

On Tue, 2011-07-12 at 23:05 +0200, Marcus Osdoba wrote:

Am 12.07.2011 01:43, schrieb Ben Hutchings:
The commands on a recent amd64 Squeeze were:

linux-src#>sudo make-kpkg --initrd --cross-compile powerpc-linux-gnu-
--arch powerpc --append-to-version +mikep5 kernel_image
linux-src#>sudo make KDEB_PKGVERSION=upstreamdebpkgcreatorNOINITRD.1.0
ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- deb-pkg

linux-src#>sudo make ARCH=powerpc CROSS32_COMPILE=powerpc-linux-gnu-
CROSS_COMPILE=powerpc-linux-gnu- zImage



I think the problem may be that make-kpkg and make deb-pkg use the
vmlinux file and not the zImage file which is what you need.
True. The default for powerpc seems to be vmlinux in any case. I tried
to override it.
make deb-pkg: KBUILD_IMAGE=zImage -> That worked. The image inside the
generated deb had the desired entry point of 0x600000.


make-kpkg: I tried the equivalent here (--zimage or IMAGE_TYPE=zImage).
But that didn't work. The image inside the deb package still had 0xc0000000.


So it is still possible to use the "generate-deb"-scripts (at least the
recommended one) for creating bootable Wii kernels.



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4E1F5B60.3070907@googlemail.com">http://lists.debian.org/4E1F5B60.3070907@googlemail.com
 

Thread Tools




All times are GMT. The time now is 06:43 AM.

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