Re: port-shark/41672: Install kernel in release directory is ELF version only.

View: New views
6 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: port-shark/41672: Install kernel in release directory is ELF version only.

by Izumi Tsutsui :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The following reply was made to PR port-shark/41672; it has been noted by GNATS.

From: Izumi Tsutsui <tsutsui@...>
To: gnats-bugs@...
Cc: port-shark-maintainer@..., gnats-admin@...,
        netbsd-bugs@..., tsutsui@...
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
 

Re: port-shark/41672: Install kernel in release directory is ELF version only.

by Soren Jacobsen-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.

Re: port-shark/41672: Install kernel in release directory is ELFversion only.

by Izumi Tsutsui :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

Re: port-shark/41672: Install kernel in release directory is ELFversion only.

by Soren Jacobsen-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 :)

Re: port-shark/41672: Install kernel in release directory isELFversion only.

by Izumi Tsutsui :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> 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

Parent Message unknown Re: port-shark/41672: Install kernel in release directory isELFversion only.

by Izumi Tsutsui :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The following reply was made to PR port-shark/41672; it has been noted by GNATS.

From: Izumi Tsutsui <tsutsui@...>
To: snj@...
Cc: gnats-bugs@..., netbsd-bugs@..., is@...,
        tsutsui@...
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