Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch Update elf2aout to cope with infile and outfile bei...



details:   https://anonhg.NetBSD.org/src/rev/5d842dd0c856
branches:  trunk
changeset: 521953:5d842dd0c856
user:      chris <chris%NetBSD.org@localhost>
date:      Sat Feb 09 11:53:58 2002 +0000

description:
Update elf2aout to cope with infile and outfile being the same.
Make the cats a.out kernel be called netbsd.  This means that make install installs the correct kernel

diffstat:

 sys/arch/arm/conf/elf2aout.sh        |  7 +++++--
 sys/arch/cats/conf/Makefile.cats.inc |  6 +++---
 2 files changed, 8 insertions(+), 5 deletions(-)

diffs (44 lines):

diff -r 70786287d378 -r 5d842dd0c856 sys/arch/arm/conf/elf2aout.sh
--- a/sys/arch/arm/conf/elf2aout.sh     Sat Feb 09 11:43:27 2002 +0000
+++ b/sys/arch/arm/conf/elf2aout.sh     Sat Feb 09 11:53:58 2002 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $NetBSD: elf2aout.sh,v 1.1 2002/02/06 19:54:47 thorpej Exp $
+# $NetBSD: elf2aout.sh,v 1.2 2002/02/09 11:53:58 chris Exp $
 # Shell script to convert an ARM ELF kernel into a bootable a.out kernel by
 # changing the header block on the kernel, and shuffling bits around in the
 # file.  Care has to be taken with the sections as they need to be page
@@ -47,10 +47,13 @@
 {print r($2 + 32768 - (r($1) - $1)) - ($2 + 32768 - (r($1) - $1))}'`
 echo DPAD = $DPAD
 
-(${SIZE} ${infile} | tail +2 | awk "${AWKPROG}" ; \
+cp -f ${infile} ${infile}.elf
+(${SIZE} ${infile}.elf | tail +2 | awk "${AWKPROG}" ; \
   cat ${infile}.text ; dd if=/dev/zero bs=32k count=1; cat ${infile}.data; dd if=/dev/zero bs=$DPAD count=1 \
 ) > ${outfile}
 
+rm ${infile}.elf
+
 ${SIZE} ${outfile}
 chmod 755 ${outfile}
 
diff -r 70786287d378 -r 5d842dd0c856 sys/arch/cats/conf/Makefile.cats.inc
--- a/sys/arch/cats/conf/Makefile.cats.inc      Sat Feb 09 11:43:27 2002 +0000
+++ b/sys/arch/cats/conf/Makefile.cats.inc      Sat Feb 09 11:53:58 2002 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.cats.inc,v 1.5 2002/02/06 19:59:01 thorpej Exp $
+#      $NetBSD: Makefile.cats.inc,v 1.6 2002/02/09 11:53:59 chris Exp $
 
 GENASSYM_EXTRAS+=      ${ARM}/footbridge/genassym.cf
 LOOSE_PROTOTYPES=      NO
@@ -17,7 +17,7 @@
 SYSTEM_LD_TAIL_EXTRA=; \
        ${DBSYM} $@ || true; \
        echo OBJCOPY=${OBJCOPY:Q} SIZE=${SIZE:Q} \
-           ${ARM}/conf/elf2aout.sh $@ $@.aout; \
+           ${ARM}/conf/elf2aout.sh $@ $@; \
        OBJCOPY=${OBJCOPY:Q} SIZE=${SIZE:Q} \
-           ${ARM}/conf/elf2aout.sh $@ $@.aout
+           ${ARM}/conf/elf2aout.sh $@ $@
 .endif 



Home | Main Index | Thread Index | Old Index