Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/cats/conf If TOOLDIR is not set just use the standa...



details:   https://anonhg.NetBSD.org/src/rev/5616c608eaa3
branches:  trunk
changeset: 521519:5616c608eaa3
user:      chris <chris%NetBSD.org@localhost>
date:      Thu Jan 31 21:50:06 2002 +0000

description:
If TOOLDIR is not set just use the standard objdump and size commands.  Also check that there is a netbsd file.  chmod the output netbsd file, and display the size info for it.

diffstat:

 sys/arch/cats/conf/elf2aout.sh |  18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)

diffs (39 lines):

diff -r c35ddce05f8a -r 5616c608eaa3 sys/arch/cats/conf/elf2aout.sh
--- a/sys/arch/cats/conf/elf2aout.sh    Thu Jan 31 21:15:08 2002 +0000
+++ b/sys/arch/cats/conf/elf2aout.sh    Thu Jan 31 21:50:06 2002 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $NetBSD: elf2aout.sh,v 1.1 2002/01/31 10:37:41 chris Exp $
+# $NetBSD: elf2aout.sh,v 1.2 2002/01/31 21:50:06 chris Exp $
 # Shell script to convert a cats 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
@@ -16,8 +16,18 @@
         printf "\0\0\0\0\040\0\0\360\0\0\0\0\0\0\0\0" \
 }'
 
-OBJCOPY=$TOOLDIR/bin/arm--netbsdelf-objcopy
-SIZE=$TOOLDIR/bin/arm--netbsdelf-size
+if [ "x${TOOLDIR}" = "x" ]; then
+OBJCOPY=objcopy
+SIZE=size
+else
+OBJCOPY=${TOOLDIR}/bin/arm--netbsdelf-objcopy
+SIZE=${TOOLDIR}/bin/arm--netbsdelf-size
+fi
+
+if [ ! -f netbsd ]; then 
+echo "Missing netbsd kernel"
+exit 1
+fi
 
 mv -f netbsd netbsd.elf
 ${OBJCOPY} -O binary -j .text netbsd.elf netbsd.text
@@ -48,5 +58,7 @@
 ) > netbsd.aout
 
 cp netbsd.aout netbsd
+${SIZE} netbsd
+chmod 755 netbsd
 
 exit 0



Home | Main Index | Thread Index | Old Index