NetBSD Problem Report #41672

From is@beverly.kleinbus.org  Mon Jul  6 09:27:48 2009
Return-Path: <is@beverly.kleinbus.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 476E663B913
	for <gnats-bugs@gnats.NetBSD.org>; Mon,  6 Jul 2009 09:27:48 +0000 (UTC)
Message-Id: <20090706092741.D6D6B20800@beverly.kleinbus.org>
Date: Mon,  6 Jul 2009 11:27:41 +0200 (CEST)
From: is@beverly.kleinbus.org
Reply-To: is@beverly.kleinbus.org
To: gnats-bugs@gnats.NetBSD.org
Subject: Install kernel in release directory is ELF version only.
X-Send-Pr-Version: 3.95

>Number:         41672
>Category:       port-shark
>Synopsis:       No a.out version of INSTALL kernel in release
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    port-shark-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 06 09:30:00 +0000 2009
>Closed-Date:    Fri Nov 06 15:40:15 +0000 2009
>Last-Modified:  Mon Nov 22 16:40:02 +0000 2010
>Originator:     Ignatios Souvatzis
>Release:        NetBSD 5.0.0_PATCH
>Organization:
seal your e-mail: http://www.gnupg.org/
>Environment:


System: NetBSD marie 5.0.0_PATCH NetBSD 5.0.0_PATCH (MARIE) #0: Sun Jul 5 22:28:50 CEST 2009 ignatios@random85:/var/itch/sources/5.0/os/sys/arch/shark/compile/MARIE shark
Architecture: arm
Machine: shark
>Description:
	release/shark/binary/kernel contains ELF and a.out versions of
	GENERIC, but only an ELF version of the INSTALL kernel.
>How-To-Repeat:
	Try to upgrade a Shark to 5.0.0_PATCH
>Fix:
	Workaround: use the install kernel from the object tree.
	Fix: make "make release" copy that, too.

	Note: ISTR that in earlier releases, only the a.out version was
	in the release tree. This might be an option, too - after all,
	it's not likely that kernel symbols will be needed by userland
	(e.g. systat) for the installation...

>Release-Note:

>Audit-Trail:
From: Ignatios Souvatzis <is@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-shark/41672: Install kernel in release directory is ELF version only.
Date: Mon, 6 Jul 2009 17:34:50 +0200

 On Mon, Jul 06, 2009 at 09:30:00AM +0000, gnats-admin@netbsd.org wrote:
 > Thank you very much for your problem report.
 > It has the internal identification `port-shark/41672'.
 > The individual assigned to look at your
 > report is: port-shark-maintainer. 
 > 
 > >Category:       port-shark
 > >Responsible:    port-shark-maintainer
 > >Synopsis:       No a.out version of INSTALL kernel in release
 > >Arrival-Date:   Mon Jul 06 09:30:00 +0000 2009

 Fix suggestion:

 release-aout-instkernel:
         ${RELEASE_INSTALL} netbsd-INSTALL.aout.gz \
             ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/kernel/


 instead of 
 	    ${RELEASEDIR}/${RELEASEMACHINEDIR}/instkernel/netbsd.gz

 maybe even
             ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/kernel/netbsd-INSTALL.gz

 which should be enough for installing.


 	-is


From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@NetBSD.org
Cc: port-shark-maintainer@NetBSD.org, gnats-admin@NetBSD.org,
        netbsd-bugs@NetBSD.org, is@beverly.kleinbus.org,
        tsutsui@ceres.dti.ne.jp
Subject: Re: port-shark/41672: Install kernel in release directory is ELF version
	 only.
Date: Tue, 7 Jul 2009 01:52:06 +0900

 is@NetBSD.org wrote:

 >  > >Synopsis:       No a.out version of INSTALL kernel in release

 >  Fix suggestion:
 >  
 >  release-aout-instkernel:
 >          ${RELEASE_INSTALL} netbsd-INSTALL.aout.gz \
 >              ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/kernel/
 >  
 >  
 >  instead of 
 >  	    ${RELEASEDIR}/${RELEASEMACHINEDIR}/instkernel/netbsd.gz
 >  
 >  maybe even
 >              ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/kernel/netbsd-INSTALL.gz
 >  
 >  which should be enough for installing.

 How about this instead? (taken from pmax or sgimips, but untested)

 ---
 Index: Makefile
 ===================================================================
 RCS file: /cvsroot/src/distrib/shark/instkernel/instkernel/Makefile,v
 retrieving revision 1.17
 diff -u -r1.17 Makefile
 --- Makefile	3 Apr 2009 22:36:35 -0000	1.17
 +++ Makefile	6 Jul 2009 16:49:00 -0000
 @@ -9,16 +9,11 @@
  MDSETTARGETS=		INSTALL ${RAMDISK} -
  MDSET_RELEASEDIR=	binary/kernel

 -MDSET_POST= \
 +MDSET_SUFFIXES.-=	aout create-aout
 +create-aout= \
  	${OBJCOPY} -O a.out-arm-netbsd -R .ident -R .arm.atpcs -R .comment \
 -	    ${.TARGET} ${.TARGET}.aout; \
 -	gzip -9nc ${.TARGET}.aout >${.TARGET}.aout.gz
 +	    ${.TARGET:R} ${.TARGET}

  .include "${DISTRIBDIR}/common/Makefile.mdset"

 -.PHONY: release-aout-instkernel
 -release-aout-instkernel:
 -	${RELEASE_INSTALL} netbsd-INSTALL.aout.gz \
 -	    ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/instkernel/netbsd.gz
 -
  .include <bsd.prog.mk>
 ---
 Izumi Tsutsui

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@NetBSD.org
Cc: port-shark-maintainer@NetBSD.org, gnats-admin@NetBSD.org,
        netbsd-bugs@NetBSD.org, tsutsui@ceres.dti.ne.jp
Subject: Re: port-shark/41672: Install kernel in release directory is ELF version
	 only.
Date: Mon, 24 Aug 2009 01:47:56 +0900

 > >Synopsis:       No a.out version of INSTALL kernel in release
  :
 > 	release/shark/binary/kernel contains ELF and a.out versions of
 > 	GENERIC, but only an ELF version of the INSTALL kernel.

 It seems put in shark/installation/instkernel,
 but the following patch should handle it more properly:

 ---
 Index: distrib/shark/instkernel/instkernel/Makefile
 ===================================================================
 RCS file: /cvsroot/src/distrib/shark/instkernel/instkernel/Makefile,v
 retrieving revision 1.17
 diff -u -r1.17 Makefile
 --- distrib/shark/instkernel/instkernel/Makefile	3 Apr 2009 22:36:35 -0000	1.17
 +++ distrib/shark/instkernel/instkernel/Makefile	23 Aug 2009 16:45:09 -0000
 @@ -9,16 +9,15 @@
  MDSETTARGETS=		INSTALL ${RAMDISK} -
  MDSET_RELEASEDIR=	binary/kernel

 -MDSET_POST= \
 -	${OBJCOPY} -O a.out-arm-netbsd -R .ident -R .arm.atpcs -R .comment \
 -	    ${.TARGET} ${.TARGET}.aout; \
 -	gzip -9nc ${.TARGET}.aout >${.TARGET}.aout.gz
 +MDSET_SUFFIXES.-=	aout create-aout
 +create-aout= \
 +	${OBJCOPY} -O a.out-arm-netbsd \
 +	    -R .ident -R .arm.atpcs -R .comment -R .note.netbsd.ident \
 +	    -R .debug_abbrev -R .debug_info -R .debug_line -R .debug_str \
 +	    -R .debug_frame -R .debug_loc -R .debug_pubnames \
 +	    -R .debug_aranges \
 +	    ${.TARGET:R} ${.TARGET}

  .include "${DISTRIBDIR}/common/Makefile.mdset"

 -.PHONY: release-aout-instkernel
 -release-aout-instkernel:
 -	${RELEASE_INSTALL} netbsd-INSTALL.aout.gz \
 -	    ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/instkernel/netbsd.gz
 -
  .include <bsd.prog.mk>
 Index: etc/etc.shark/Makefile.inc
 ===================================================================
 RCS file: /cvsroot/src/etc/etc.shark/Makefile.inc,v
 retrieving revision 1.10
 diff -u -r1.10 Makefile.inc
 --- etc/etc.shark/Makefile.inc	18 Mar 2008 04:20:37 -0000	1.10
 +++ etc/etc.shark/Makefile.inc	23 Aug 2009 16:45:09 -0000
 @@ -10,10 +10,3 @@
  KERNEL_SUFFIXES=	aout

  BUILD_KERNELS=		INSTALL
 -
 -INSTALLATION_DIRS+=	installation/instkernel
 -
 -snap_md_post:
 -	cd ${NETBSDSRCDIR}/distrib/shark/instkernel/instkernel && \
 -	    ${MAKE} release-aout-instkernel
 -	${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/instkernel '*.gz'
 ---
 Izumi Tsutsui

State-Changed-From-To: open->feedback
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Thu, 27 Aug 2009 23:57:46 +0900
State-Changed-Why:
patch provided


From: Ignatios Souvatzis <is@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/41672 CVS commit: src
Date: Fri, 6 Nov 2009 12:31:44 +0000

 Module Name:	src
 Committed By:	is
 Date:		Fri Nov  6 12:31:44 UTC 2009

 Modified Files:
 	src/distrib/shark/instkernel/instkernel: Makefile
 	src/etc/etc.shark: Makefile.inc

 Log Message:
 Install a.out version of INSTALL kernel in release. Slightly modified
 from a patch provided by Izumi Tsutsui as response to PR 41672.


 To generate a diff of this commit:
 cvs rdiff -u -r1.18 -r1.19 src/distrib/shark/instkernel/instkernel/Makefile
 cvs rdiff -u -r1.10 -r1.11 src/etc/etc.shark/Makefile.inc

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Ignatios Souvatzis <is@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/41672 CVS commit: src/distrib/shark/instkernel/instkernel
Date: Fri, 6 Nov 2009 13:01:37 +0000

 Module Name:	src
 Committed By:	is
 Date:		Fri Nov  6 13:01:37 UTC 2009

 Modified Files:
 	src/distrib/shark/instkernel/instkernel: Makefile

 Log Message:
 2nd part of "install kernel -> release" fix, inspired by tsutsui@'s patch
 to PR 41672.


 To generate a diff of this commit:
 cvs rdiff -u -r1.19 -r1.20 src/distrib/shark/instkernel/instkernel/Makefile

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: feedback->closed
State-Changed-By: is@NetBSD.org
State-Changed-When: Fri, 06 Nov 2009 15:40:15 +0000
State-Changed-Why:
A slightly modified patch has been committed, and indeed fixes this problem.
    -is


From: Soren Jacobsen <snj@pobox.com>
To: gnats-bugs@NetBSD.org
Cc: netbsd-bugs@netbsd.org, is@beverly.kleinbus.org, Izumi Tsutsui
 <tsutsui@ceres.dti.ne.jp>
Subject: Re: port-shark/41672: Install kernel in release directory is ELF
 version only.
Date: Fri, 6 Nov 2009 10:30:52 -0800

 On Aug 23, 2009, at 9:50 AM, Izumi Tsutsui wrote:

 >> 	release/shark/binary/kernel contains ELF and a.out versions of
 >> 	GENERIC, but only an ELF version of the INSTALL kernel.
 >
 > It seems put in shark/installation/instkernel,
 > but the following patch should handle it more properly:

 I don't see why having the kernel in shark/installation/instkernel/ is  
 not proper.  Other ports have used instkernel for a long time, and so  
 has shark.  I didn't check how long the kernel has been in instkernel,  
 but it has been documented in the INSTALL notes for over 7 years.  So  
 with the change that is@ made, shark/installation/ is empty and the  
 INSTALL notes are now wrong.

 To me, the real bug is that shark/binary/kernel/netbsd-INSTALL* exists  
 in the first place.  In the case of shark, where the firmware can boot  
 a kernel directly, installation/ seems the right location for an  
 INSTALL kernel.  The INSTALL kernel _is_ the installation media, and  
 if I were naively looking for installation media, I'd look in the  
 installation directory.  If I were following documentation, I'd also  
 look there ;)

 I'm mildly opposed to the change that was committed, since the problem  
 described in this PR ("there's no a.out INSTALL kernel") didn't  
 actually exist.  I do agree that having an ELF version of INSTALL is  
 confusing, but as noted elsewhere in this PR, it doesn't seem there's  
 any need for an ELF version of the INSTALL kernel anyway.

 I think the best thing to do would be to revert the changes and then  
 not place the ELF version of netbsd-INSTALL in shark/binary/kernel/.

 It's also quite clear that there's a lot of variation in how various  
 ports are organized.  That said, I think that instkernel is a good  
 location for installation kernels on ports where the kernel can be  
 loaded directly, and if anything is to be done about smoothing out the  
 inconsistencies between ports, it should be in the direction of  
 instkernel, not away from it.

 Anyway, I guess I'll shut up if someone updates the INSTALL notes, but  
 I will note that if instkernel is to be banished (and, as I've said, I  
 don't think it should be), then alpha, evbarm, and mac68k should be  
 changed as well.  Don't forget the other misfits like acorn26,  
 acorn32, evbmips, hpcarm, hpcmips, hpcsh, and ofppc.  There may be  
 some others that I missed, I only took a quick glance.

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: snj@pobox.com
Cc: gnats-bugs@netbsd.org, netbsd-bugs@netbsd.org, is@beverly.kleinbus.org,
        tsutsui@ceres.dti.ne.jp
Subject: Re: port-shark/41672: Install kernel in release directory is ELFversion
	 only.
Date: Sat, 7 Nov 2009 04:09:21 +0900

 I think there are three problems:

 (1)INSTALL notes should be sync'ed with reality

 I agree with it of course.

 (2)How install RAMDISK kernels should be built

 I think shark had a problem on it and fixes in the PR is correct.
 (cats has the same problem BTW)

 (3)Where and in which name install RAMDISK kernels should be put

 Maybe we should re-think about this.

 There are several historical and port specific variants.
 Some ports require special binary formats and others not.
 The firmware on shark and cats require a.out kernels,
 but gxemul emulating cats requires a standard ELF kernel.
 dreamcast requires a raw netbsd-GENERIC_MD.bin kernel for bootstrap,
 but it has been put in binary/kernel.
 arc requires netbsd-RAMDISK.gz kernel as alpha,
 but it has been put in binary/kernel.
 (yes, I did the latter two, but it was just because i386 put it there)

 For now, it might be a compromise to change MDSET_RELEASEDIR
 in distrib/shark/instkernel/instkernel/Makefile from
 binary/kernel to installation/instkernel, I think.

 ---
 Izumi Tsutsui

From: Soren Jacobsen <snj@pobox.com>
To: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Cc: gnats-bugs@netbsd.org, netbsd-bugs@netbsd.org, is@beverly.kleinbus.org
Subject: Re: port-shark/41672: Install kernel in release directory is
 ELFversion only.
Date: Sat, 7 Nov 2009 07:29:46 -0800

 On Nov 6, 2009, at 11:09 AM, Izumi Tsutsui wrote:

 > (3)Where and in which name install RAMDISK kernels should be put
 >
 > Maybe we should re-think about this.
 >
 > There are several historical and port specific variants.
 > Some ports require special binary formats and others not.
 > The firmware on shark and cats require a.out kernels,
 > but gxemul emulating cats requires a standard ELF kernel.
 > dreamcast requires a raw netbsd-GENERIC_MD.bin kernel for bootstrap,
 > but it has been put in binary/kernel.
 > arc requires netbsd-RAMDISK.gz kernel as alpha,
 > but it has been put in binary/kernel.
 > (yes, I did the latter two, but it was just because i386 put it there)
 >
 > For now, it might be a compromise to change MDSET_RELEASEDIR
 > in distrib/shark/instkernel/instkernel/Makefile from
 > binary/kernel to installation/instkernel, I think.

 That would be fine with me (INSTALLATION_DIRS+=installation/instkernel  
 also needs to be added to etc/etc.shark/Makefile.inc).

 One other thing, though:

 The ".aout" naming is inconsistent: netbsd.aout-GENERIC.gz and netbsd- 
 INSTALL.aout.gz.

 cats also uses the "netbsd.aout" form.

 I don't really care what the name of the file is, but I will note that  
 renaming it back to netbsd.gz would kill two birds with one stone.  
 Assuming the ELF version disappeared, anyway :)

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: snj@pobox.com
Cc: gnats-bugs@NetBSD.org, netbsd-bugs@NetBSD.org, is@beverly.kleinbus.org,
        tsutsui@ceres.dti.ne.jp
Subject: Re: port-shark/41672: Install kernel in release directory isELFversion
	 only.
Date: Sun, 8 Nov 2009 12:14:45 +0900

 > One other thing, though:
 > 
 > The ".aout" naming is inconsistent: netbsd.aout-GENERIC.gz and netbsd- 
 > INSTALL.aout.gz.

 Well, it's an old known problem caused by inconsistency of
 KERNEL_SUFFIXES handling between src/etc/Makefile (for GENERIC etc) and
 src/distrib/common/Makefile.mdset (for md image ones), but they are
 too hard to read for me...

 sgimips has had the same problem for ecoff ones.

 > cats also uses the "netbsd.aout" form.

 Hmm, because they use
 >>MDSET_POST.netbsd.aout-INSTALL= \
 rather than
 >>MDSET_SUFFIXES.-=       aout create-aout
 for multiple kernels?

 I prefer netbsd-FOO.aout.gz names than netbsd.aout-FOO.gz ones,
 so I think we should fix src/etc/Makefile.

 Anyway, this problem should be handled in another PR
 because it isn't shark specific.
 ---
 Izumi Tsutsui

From: Izumi Tsutsui <tsutsui@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/41672 CVS commit: src
Date: Mon, 4 Oct 2010 13:45:29 +0000

 Module Name:	src
 Committed By:	tsutsui
 Date:		Mon Oct  4 13:45:29 UTC 2010

 Modified Files:
 	src/distrib/shark/instkernel/instkernel: Makefile
 	src/etc/etc.shark: Makefile.inc

 Log Message:
 Copy ramdisk INSTALL.aout kernel into installation/instkernel in ${RELEASEDIR}
 where it had been put and documented. Actually closes PR port-shark/41672.


 To generate a diff of this commit:
 cvs rdiff -u -r1.20 -r1.21 src/distrib/shark/instkernel/instkernel/Makefile
 cvs rdiff -u -r1.11 -r1.12 src/etc/etc.shark/Makefile.inc

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Jeff Rizzo" <riz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/41672 CVS commit: [netbsd-5] src
Date: Mon, 22 Nov 2010 03:15:33 +0000

 Module Name:	src
 Committed By:	riz
 Date:		Mon Nov 22 03:15:33 UTC 2010

 Modified Files:
 	src/distrib/shark/instkernel/instkernel [netbsd-5]: Makefile
 	src/etc/etc.shark [netbsd-5]: Makefile.inc

 Log Message:
 Pull up following revision(s) (requested by is in ticket #1127):
 	distrib/shark/instkernel/instkernel/Makefile: revision 1.20
 	etc/etc.shark/Makefile.inc: revision 1.11
 	distrib/shark/instkernel/instkernel/Makefile: revision 1.19
 Install a.out version of INSTALL kernel in release. Slightly modified
 from a patch provided by Izumi Tsutsui as response to PR 41672.
 2nd part of "install kernel -> release" fix, inspired by tsutsui@'s patch
 to PR 41672.


 To generate a diff of this commit:
 cvs rdiff -u -r1.16 -r1.16.2.1 \
     src/distrib/shark/instkernel/instkernel/Makefile
 cvs rdiff -u -r1.10 -r1.10.6.1 src/etc/etc.shark/Makefile.inc

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Jeff Rizzo" <riz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/41672 CVS commit: [netbsd-5] src
Date: Mon, 22 Nov 2010 16:37:16 +0000

 Module Name:	src
 Committed By:	riz
 Date:		Mon Nov 22 16:37:15 UTC 2010

 Modified Files:
 	src/distrib/shark/instkernel/instkernel [netbsd-5]: Makefile
 	src/etc/etc.shark [netbsd-5]: Makefile.inc

 Log Message:
 Pull up following revision(s) (requested by tsutsui in ticket #1127):
 	distrib/shark/instkernel/instkernel/Makefile: revision 1.21
 	etc/etc.shark/Makefile.inc: revision 1.12
 Copy ramdisk INSTALL.aout kernel into installation/instkernel in ${RELEASEDIR}
 where it had been put and documented. Actually closes PR port-shark/41672.


 To generate a diff of this commit:
 cvs rdiff -u -r1.16.2.1 -r1.16.2.2 \
     src/distrib/shark/instkernel/instkernel/Makefile
 cvs rdiff -u -r1.10.6.1 -r1.10.6.2 src/etc/etc.shark/Makefile.inc

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.