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
This commit is contained in:
parent
551471e419
commit
2ba81d8c9c
@ -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 @@ function r(v) { return sprintf("%d", ((v + 4095) / 4096)) * 4096 }
|
||||
{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}
|
||||
|
||||
|
@ -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 @@ LOADADDRESS=0xF0000020
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user