Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm32/conf Use arm/conf/Makefile.arm, and add suppo...



details:   https://anonhg.NetBSD.org/src/rev/8950d61df57e
branches:  trunk
changeset: 521836:8950d61df57e
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Wed Feb 06 19:59:41 2002 +0000

description:
Use arm/conf/Makefile.arm, and add support for building ELF kernels
and converting them to a.out.

diffstat:

 sys/arch/arm32/conf/Makefile.arm32     |  104 ---------------------------------
 sys/arch/arm32/conf/Makefile.arm32.inc |   22 ++++++
 2 files changed, 22 insertions(+), 104 deletions(-)

diffs (134 lines):

diff -r 070a4c2ae215 -r 8950d61df57e sys/arch/arm32/conf/Makefile.arm32
--- a/sys/arch/arm32/conf/Makefile.arm32        Wed Feb 06 19:59:30 2002 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-#      $NetBSD: Makefile.arm32,v 1.65 2001/12/19 17:43:19 thorpej Exp $
-
-# Makefile for NetBSD
-#
-# This makefile is constructed from a machine description:
-#      config machineid
-# Most changes should be made in the machine description
-#      /sys/arch/arm32/conf/``machineid''
-# after which you should do
-#      config machineid
-# Machine generic makefile changes should be made in
-#      /sys/arch/arm32/conf/Makefile.arm32
-# after which config should be rerun for all machines of that type.
-#
-# To specify debugging, add the config line: makeoptions DEBUG="-g"
-# A better way is to specify -g only for a few files.
-#
-#      makeoptions DEBUGLIST="uvm* trap if_*"
-
-USETOOLS?=     no
-NEED_OWN_INSTALL_TARGET?=no
-.include <bsd.own.mk>
-
-##
-## (1) port identification
-##
-ARM32=         $S/arch/arm32
-ARM=           $S/arch/arm
-GENASSYM=      ${ARM}/arm32/genassym.cf
-GENASSYM_EXTRAS+=      ${ARM32}/arm32/genassym.cf
-
-##
-## (2) compile settings
-##
-CPPFLAGS+=     -Darm32
-CWARNFLAGS+=   -Wcomment
-LOOSE_PROTOTYPES= yes
-AFLAGS+=       -x assembler-with-cpp
-
-##
-## (3) libkern and compat
-##
-KERN_AS=       obj
-
-##
-## (4) local objects, compile rules, and dependencies
-##
-MD_OBJS=       locore.o
-MD_CFILES=
-MD_SFILES=     ${ARM}/arm32/locore.S
-
-locore.o: ${ARM}/arm32/locore.S assym.h
-       ${NORMAL_S}
-
-.ifdef MONITOR
-MD_OBJS+=      modedefs.o
-MD_CFILES+=    modedefs.c
-
-modedefs.c: ${ARM32}/vidc/makemodes.awk ${ARM32}/conf/monitors/${MONITOR} Makefile
-       awk -f ${ARM32}/vidc/makemodes.awk ${ARM32}/conf/monitors/${MONITOR} ${MODES} >modedefs.c
-
-modedefs.o: modedefs.c
-       ${NORMAL_C}
-.endif
-
-##
-## (5) link settings
-##
-LOADADDRESS?=  0xF0000000
-LINKFLAGS_NORMAL=      -x
-
-##
-## (6) port specific target dependencies
-##
-
-# depend on CPU configuration
-cpufunc.o cpufunc_asm.o: Makefile
-
-# depend on DIAGNOSTIC etc.
-cpuswitch.o fault.o machdep.o: Makefile
-
-##
-## (7) misc settings
-##
-
-##
-## (8) config(8) generated machinery
-##
-%INCLUDES
-
-%OBJS
-
-%CFILES
-
-%SFILES
-
-%LOAD
-
-%RULES
-
-##
-## (9) port independent kernel machinery
-##
-.include "$S/conf/Makefile.kern.inc"
diff -r 070a4c2ae215 -r 8950d61df57e sys/arch/arm32/conf/Makefile.arm32.inc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/arm32/conf/Makefile.arm32.inc    Wed Feb 06 19:59:41 2002 +0000
@@ -0,0 +1,22 @@
+#      $NetBSD: Makefile.arm32.inc,v 1.1 2002/02/06 19:59:41 thorpej Exp $
+
+GENASSYM_EXTRAS+=      ${THISARM}/arm32/genassym.cf
+
+.if (${OBJECT_FMT} == "ELF")
+# Need to convert the kernel from ELF to a.out so that OpenFirmware
+# can load it.
+
+# ZMAGIC a.out includes the a.out header in front of the text
+# segment, so if we link the kernel at the normal load address,
+# it will be wrong once the a.out header is stuck in the file.
+# XXX HOWEVER, by linking it +32 bytes to compensate, the resulting
+# XXX ELF kernel cannot be booted itself.
+LOADADDRESS=0xF0000020
+
+SYSTEM_LD_TAIL_EXTRA+=; \
+       ${DBSYM} $@ || true; \
+       echo OBJCOPY=${OBJCOPY:Q} SIZE=${SIZE:Q} \
+           ${ARM}/conf/elf2aout.sh $@ $@.aout; \
+       OBJCOPY=${OBJCOPY:Q} SIZE=${SIZE:Q} \
+           ${ARM}/conf/elf2aout.sh $@ $@.aout
+.endif



Home | Main Index | Thread Index | Old Index