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.
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.
kumba: you might be interested in the other changes I made in bug 186653
(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?
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
(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.
Created attachment 131265 [details, diff] Add --ktarget support to genkernel, rev 2 Updated against genkernel SVN rev 544
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.
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?
PS: Adding keyword "Inclusion" and "[patch] " prefix to better show this bugs nature in searches...
Is there still interest in getting this patch applied? If I do not hear nything in two weaks, I may close this bug.
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.