* Re: 2.6.19-git13: uts banner changes break SLES9 (at least) [not found] ` <Pine.LNX.4.64.0612111106310.12500@woody.osdl.org> @ 2006-12-11 22:04 ` Paul Mackerras 2006-12-12 0:05 ` David Miller 0 siblings, 1 reply; 3+ messages in thread From: Paul Mackerras @ 2006-12-11 22:04 UTC (permalink / raw) To: Linus Torvalds Cc: Andrew Morton, Olaf Hering, Steve Fox, linux-kernel, Andi Kleen, linuxppc-dev Linus Torvalds writes: > On Mon, 11 Dec 2006, Olaf Hering wrote: > > > > arch/powerpc/boot/wrapper:156: version=`${CROSS}strings "$kernel" | grep '^Linux version [-0-9.]' | \ > > This is also obviously broken (and really sad), but actually ends up being > better than what get_kernel_version apparently does, by at least adding > the requirement that the string "Linux version" be slightly more correct. > > However, it's also TOTALLY BROKEN. It's the minimum effort for the barely acceptable outcome. :) The wrapper script, although it currently lives in arch/powerpc/boot, is designed and intended to be standalone, so that people can use it outside the kernel tree, and possibly even without having the kernel source easily to hand. Therefore I didn't want to use any kernel header files. Apparently the only reason "mkimage" wants to know the kernel version is to put it as a comment in the image, which can be displayed to the user when booting with u-boot (the bootloader used on some embedded platforms). So it's not critical if the grep fails, and it's slightly more useful to do the grep than it would be to not even try to provide any version string to mkimage. If there is a reliable way to get the version string, great, I'll use that. Paul. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: 2.6.19-git13: uts banner changes break SLES9 (at least) 2006-12-11 22:04 ` 2.6.19-git13: uts banner changes break SLES9 (at least) Paul Mackerras @ 2006-12-12 0:05 ` David Miller 2006-12-12 9:10 ` Gerd Hoffmann 0 siblings, 1 reply; 3+ messages in thread From: David Miller @ 2006-12-12 0:05 UTC (permalink / raw) To: paulus; +Cc: akpm, olaf, drfickle, linux-kernel, ak, linuxppc-dev, torvalds From: Paul Mackerras <paulus@samba.org> Date: Tue, 12 Dec 2006 09:04:41 +1100 > If there is a reliable way to get the version string, great, I'll use > that. FWIW, on sparc and sparc64 we have this information block for the boot loader. The first two instructions at the entry point simply branch over the boot loader information block header. The information block starts with a known magic string "HdrS" which does not match any valid Sparc instruction. Any tool can search for it starting at the symbol "_start" in the kernel image. Inside this information block we stick a 32-bit word which contains LINUX_VERSION_CODE. That only gives you the version, not the whole version string, but you could put the whole string in such a location when adding such a facility to powerpc if you wanted to. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: 2.6.19-git13: uts banner changes break SLES9 (at least) 2006-12-12 0:05 ` David Miller @ 2006-12-12 9:10 ` Gerd Hoffmann 0 siblings, 0 replies; 3+ messages in thread From: Gerd Hoffmann @ 2006-12-12 9:10 UTC (permalink / raw) To: David Miller Cc: akpm, olaf, drfickle, linux-kernel, ak, linuxppc-dev, torvalds, paulus Hi, > That only gives you the version, not the whole version string, but you > could put the whole string in such a location when adding such a > facility to powerpc if you wanted to. Hmm, as we have those fancy ELFNOTE macros now, can't we just the version string into one? cheers, Gerd -- Gerd Hoffmann <kraxel@suse.de> ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-12-12 9:10 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <457D750C.9060807@shadowen.org> [not found] ` <20061211163333.GA17947@aepfle.de> [not found] ` <Pine.LNX.4.64.0612110840240.12500@woody.osdl.org> [not found] ` <Pine.LNX.4.64.0612110852010.12500@woody.osdl.org> [not found] ` <20061211180414.GA18833@aepfle.de> [not found] ` <20061211181813.GB18963@aepfle.de> [not found] ` <Pine.LNX.4.64.0612111022140.12500@woody.osdl.org> [not found] ` <20061211182908.GC7256@MAIL.13thfloor.at> [not found] ` <Pine.LNX.4.64.0612111040160.12500@woody.osdl.org> [not found] ` <20061211185536.GA19338@aepfle.de> [not found] ` <Pine.LNX.4.64.0612111106310.12500@woody.osdl.org> 2006-12-11 22:04 ` 2.6.19-git13: uts banner changes break SLES9 (at least) Paul Mackerras 2006-12-12 0:05 ` David Miller 2006-12-12 9:10 ` Gerd Hoffmann
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).