Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 179294 - [patch] Add --ktarget support to genkernel
Summary: [patch] Add --ktarget support to genkernel
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords: Inclusion
Depends on: 193826
Blocks: 245389
  Show dependency tree
 
Reported: 2007-05-21 05:58 UTC by Joshua Kinard
Modified: 2021-06-14 22:03 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Add --ktarget support to genkernel, rev 1 (genkernel-3.4.8-kumba_kicks_butt.patch,17.50 KB, patch)
2007-05-21 06:01 UTC, Joshua Kinard
Details | Diff
Add --ktarget support to genkernel, rev 2 (genkernel-svn-544-ktarget.patch,16.37 KB, patch)
2007-09-19 03:09 UTC, Joshua Kinard
Details | Diff
Add --ktarget support to genkernel, rev 3 (genkernel-add-ktarget-support.patch,11.25 KB, patch)
2007-09-26 01:24 UTC, Joshua Kinard
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Kinard gentoo-dev 2007-05-21 05:58:15 UTC
genkernel doesn't currently support multiple kernel targets for a given arch in an automated fashion without doing some nasty sedfu in the middle of a catalyst run.  --ktarget solves this by adding a command-line parameter defining what kernel target to build.  If --ktarget is not specified, genkernel will fall back on a default defined in <arch>/config.sh.

Example: mips IP22 and IP32 machines, as of 2.6.17, need to be built with the 'vmlinux.32' kernel target.  IP30 machines and others will use the 'vmlinux' target.  While a 'vmlinux' target is buildable (and actually part of the process of 'vmlinux.32'), they are not suitable for booting, either because the IP22 PROM simply doesn't understand 64bit kernel images, or IP32 systems can exhibit a severe slowdown, as well as other strange behavior.
Comment 1 Joshua Kinard gentoo-dev 2007-05-21 06:01:24 UTC
Created attachment 119865 [details, diff]
Add --ktarget support to genkernel, rev 1

This is the first revision of a patch to add --ktarget support.  It's been tested in a mips catalyst/netboot2 run to generate bootable netboot images of the correct bitness for each system (e.g., vmlinux.32 for IP32, vmlinux for IP30).  However, it has not been tested on other archs, and may even break Pegasos builds because of the changes to some of the "modifications" made to enable Peagsos support (--genzimage, for example).

I'll post a more complete/finalized patch once I determine if the Pegasos kludges are actually rendered obselete by --ktarget or not.  And if I can get a test on some other archs too, that'll give me some valuable feedback.
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-07-26 07:52:16 UTC
kumba: you might be interested in the other changes I made in bug 186653
Comment 3 Joshua Kinard gentoo-dev 2007-08-23 04:44:29 UTC
(In reply to comment #2)
> kumba: you might be interested in the other changes I made in bug 186653

I thought we already had support for config.sh under the arch subdirs?  The thing was, we couldn't specify a different kernel target to the make command gk ultimately spawns, because even for netboot, we still have to tell ip22 and ip32 systems to build using the vmlinux.32 target, while the rest use plain vmlinux (this was necessitated by changes upstream in order to properly build the hybrid 32/64bit kernels for ip22/ip32 that we use).

Or am I missing something with that bug?  Got a sample config.sh around?
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-08-23 06:46:50 UTC
kumba: the patch from bug 186653 allows you to specify a total custom config.sh, not just overriding the ktarget. Eg you can have /usr/share/genkernel/mips/ip32-config.sh
Comment 5 Joshua Kinard gentoo-dev 2007-09-02 08:17:11 UTC
(In reply to comment #4)
> kumba: the patch from bug 186653 allows you to specify a total custom
> config.sh, not just overriding the ktarget. Eg you can have
> /usr/share/genkernel/mips/ip32-config.sh

Ah ha, I see where this would be useful.  Curious, are the configs tied to the kernel image names themselves?, i.e., if I have ip32r5k as a target kernel image, would I need ip32r5k-config.sh, or are we going to pass a command line option instead?

ip32 is a good test example because I'll be building three images for that machine alone nowadays: ip32r5k, ip32rm5k2, and ip32rm7k.  All three would have virtually identical configs if using the former system, the differences between them lying in the kernel conigs passed to catalyst/gk in another setting.  If a command line instead, this could be one config file, and just referenced three times.
Comment 6 Joshua Kinard gentoo-dev 2007-09-19 03:09:19 UTC
Created attachment 131265 [details, diff]
Add --ktarget support to genkernel, rev 2

Updated against genkernel SVN rev 544
Comment 7 Joshua Kinard gentoo-dev 2007-09-26 01:24:42 UTC
Created attachment 131916 [details, diff]
Add --ktarget support to genkernel, rev 3

Very similar to rev 2, except it breaks out the Pegasos changes into Bug #193826 instead.
Comment 8 Chris Gianelloni 2008-11-03 12:30:39 UTC
We should probably revisit this and try to get this done as soon as possible.  Do you think that you might have time to rebase this against the git repository at git://git.wolf31o2.org/projs/genkernel.git?
Comment 9 Sebastian Pipping gentoo-dev 2011-01-05 22:38:25 UTC
PS: Adding keyword "Inclusion" and "[patch] " prefix to better show this bugs nature in searches...
Comment 10 Sebastian Pipping gentoo-dev 2011-05-31 02:21:15 UTC
Is there still interest in getting this patch applied?

If I do not hear nything in two weaks, I may close this bug.
Comment 11 Joshua Kinard gentoo-dev 2021-06-14 22:03:50 UTC
Self-closing as obsolete due to sheer age.  I'll revisit sometime down the road if I ever attempt to build an SGI bootable CD again.