Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/mvme68k/stand Explicitly link SRT0.o (Standalone Ru...



details:   https://anonhg.NetBSD.org/src/rev/9370849a683a
branches:  trunk
changeset: 790142:9370849a683a
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sat Sep 21 08:32:39 2013 +0000

description:
Explicitly link SRT0.o (Standalone RunTime startup code) first.

This is my fault on changes to make mvme68k bootloaders use MI libsa:
http://mail-index.netbsd.org/source-changes/2011/01/02/msg016539.html
MVME PROM requires raw binaries (by objcopy -O binary) so we have to
make sure the entry point is located at the first address of the binaries.

The problem (6.1 netboot fails with an illegal instruction message)
is reported by Andrew Gillham on port-mvme68k@:
http://mail-index.netbsd.org/port-mvme68k/2013/09/17/msg000082.html
Note mvme68k bootloadres in netbsd-6 still have another bug triggered
by gcc-4.5.

Should be pulled up to netbsd-6 branches.

diffstat:

 sys/arch/mvme68k/stand/Makefile.booters   |  4 +++-
 sys/arch/mvme68k/stand/libsa/Makefile     |  6 ++++--
 sys/arch/mvme68k/stand/libsa/Makefile.inc |  5 ++---
 3 files changed, 9 insertions(+), 6 deletions(-)

diffs (57 lines):

diff -r b17265a113d3 -r 9370849a683a sys/arch/mvme68k/stand/Makefile.booters
--- a/sys/arch/mvme68k/stand/Makefile.booters   Sat Sep 21 06:24:43 2013 +0000
+++ b/sys/arch/mvme68k/stand/Makefile.booters   Sat Sep 21 08:32:39 2013 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.booters,v 1.23 2013/08/12 16:34:05 joerg Exp $
+#      $NetBSD: Makefile.booters,v 1.24 2013/09/21 08:32:39 tsutsui Exp $
 
 S?=            ${.CURDIR}/../../../..
 MDEC_DIR?=     /usr/mdec
@@ -59,6 +59,8 @@
 LIBSA=         ${LIBSA_DIR}/lib/sa/libsa.a
 LIBKERN=       ${LIBSA_DIR}/lib/kern/libkern.a
 
+SRTOBJ?= ${LIBSA_DIR}/SRT0.o
+
 LIB_BUG_DIR=   ${.CURDIR}/../libbug
 LIBBUG_DIR!=   cd ${LIB_BUG_DIR} && ${PRINTOBJDIR}
 LIBBUG=${LIBBUG_DIR}/libbug.a
diff -r b17265a113d3 -r 9370849a683a sys/arch/mvme68k/stand/libsa/Makefile
--- a/sys/arch/mvme68k/stand/libsa/Makefile     Sat Sep 21 06:24:43 2013 +0000
+++ b/sys/arch/mvme68k/stand/libsa/Makefile     Sat Sep 21 08:32:39 2013 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.33 2011/01/02 05:30:12 tsutsui Exp $
+#      $NetBSD: Makefile,v 1.34 2013/09/21 08:32:39 tsutsui Exp $
 
 S!= cd ${.CURDIR}/../../../..; pwd
 
@@ -31,7 +31,9 @@
 
 LIBS= ${LIBSA} ${LIBKERN}
 
-all realall: ${LIBS}
+CLEANFILES+= SRT0.o
+
+all realall: ${LIBS} SRT0.o
 
 cleandir distclean: .WAIT cleanlibdir
 
diff -r b17265a113d3 -r 9370849a683a sys/arch/mvme68k/stand/libsa/Makefile.inc
--- a/sys/arch/mvme68k/stand/libsa/Makefile.inc Sat Sep 21 06:24:43 2013 +0000
+++ b/sys/arch/mvme68k/stand/libsa/Makefile.inc Sat Sep 21 08:32:39 2013 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.inc,v 1.5 2011/01/02 05:30:12 tsutsui Exp $
+#      $NetBSD: Makefile.inc,v 1.6 2013/09/21 08:32:39 tsutsui Exp $
 
 S!= cd ${SA_EXTRADIR}/../../../..; pwd
 
@@ -9,8 +9,7 @@
 
 SRC_mvme= exec_mvme.c
 
-SRC_here= SRT0.S \
-         bugdev.c \
+SRC_here= bugdev.c \
          chiptotime.c clock.c \
          parse_args.c
 



Home | Main Index | Thread Index | Old Index