Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm26/stand/boot26 Wrap boot26 in a minimal relocat...



details:   https://anonhg.NetBSD.org/src/rev/ce56dfb87f1c
branches:  trunk
changeset: 513524:ce56dfb87f1c
user:      bjh21 <bjh21%NetBSD.org@localhost>
date:      Thu Aug 02 23:55:55 2001 +0000

description:
Wrap boot26 in a minimal relocatable module.  When *RMRun, it just copies the
existing boot26 code to 0x8000 and runs it.

diffstat:

 sys/arch/arm26/stand/boot26/Makefile   |  13 +++++++++--
 sys/arch/arm26/stand/boot26/rmheader.S |  35 ++++++++++++++++++++++++++++++++++
 sys/arch/arm26/stand/boot26/version    |   5 ++-
 3 files changed, 48 insertions(+), 5 deletions(-)

diffs (75 lines):

diff -r 158992373e1d -r ce56dfb87f1c sys/arch/arm26/stand/boot26/Makefile
--- a/sys/arch/arm26/stand/boot26/Makefile      Thu Aug 02 23:47:07 2001 +0000
+++ b/sys/arch/arm26/stand/boot26/Makefile      Thu Aug 02 23:55:55 2001 +0000
@@ -1,7 +1,14 @@
-#      $NetBSD: Makefile,v 1.1 2001/07/27 23:13:50 bjh21 Exp $
+#      $NetBSD: Makefile,v 1.2 2001/08/02 23:55:55 bjh21 Exp $
 
 PROG=          boot26
-PROGSOURCE=    boot26.c start.S
+PROGSOURCE=    rmheader.S rmvers.c srt0.S boot26.c start.S
 NEWVERSWHAT=   "RISC OS Boot"
+RISCOSTYPE=    ffa
 
-.include "../Makefile.buildboot"
\ No newline at end of file
+rmvers.c: ${.CURDIR}/version
+       sh ${.CURDIR}/../lib/newvers_rm.sh ${.CURDIR}/version "NetBSD Boot"
+.PHONY: rmvers.c
+
+CLEANFILES+=   rmvers.c
+
+.include "../Makefile.buildboot"
diff -r 158992373e1d -r ce56dfb87f1c sys/arch/arm26/stand/boot26/rmheader.S
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/arm26/stand/boot26/rmheader.S    Thu Aug 02 23:55:55 2001 +0000
@@ -0,0 +1,35 @@
+#include <riscoscalls.h>
+
+rmbase:
+       .word   rmstart - rmbase        /* Start code */
+       .word   0                       /* Initialisation code */
+       .word   0                       /* Finalisation code */
+       .word   0                       /* Service call handler */
+       .word   rmtitle - rmbase        /* Title string */
+       .word   rmhelp - rmbase         /* Help string */
+       .word   0                       /* Help and command keyword table */
+
+rmtitle:
+       .asciz  "boot26"
+       .align
+rmstart:
+       /*
+        * This entry point is called when we're started up as an application,
+        * so we're allowed to use application workspace.  This is good,
+        * because most of our code is linked to run at 0x8000.
+        */
+       mov     r0, #0x8000
+       adr     r1, rmbase
+       ldr     r2, Lsize
+Lcopyloop:
+       ldr     r3, [r1], #4
+       str     r3, [r0], #4
+       subs    r2, r2, #4
+       bgt     Lcopyloop
+       ldr     r0, Lstart
+       mov     pc, r0
+
+Lsize:
+       .word   end - rmbase
+Lstart:
+       .word   _start
\ No newline at end of file
diff -r 158992373e1d -r ce56dfb87f1c sys/arch/arm26/stand/boot26/version
--- a/sys/arch/arm26/stand/boot26/version       Thu Aug 02 23:47:07 2001 +0000
+++ b/sys/arch/arm26/stand/boot26/version       Thu Aug 02 23:55:55 2001 +0000
@@ -1,5 +1,6 @@
-       $NetBSD: version,v 1.3 2001/08/02 20:24:03 bjh21 Exp $
+       $NetBSD: version,v 1.4 2001/08/02 23:55:55 bjh21 Exp $
 
 0.90:  Experimental C version
 0.91:  General cleanup
-1.0:   loadfile() update:  ELF symbols no longer need backward seeks.
\ No newline at end of file
+1.0:   loadfile() update:  ELF symbols no longer need backward seeks.
+1.1:   Now wrapped in a relocatable module.



Home | Main Index | Thread Index | Old Index