[eros-cvs] cvs commit: eros/src/base/cross/bin/mkimage mkimage.preinclude Makefile gram.y lex.l

shap@eros.cs.jhu.edu shap@eros.cs.jhu.edu
Fri, 6 Jul 2001 14:25:18 -0400


shap        01/07/06 14:25:18

  Modified:    src/base/cross/bin/mkimage Makefile gram.y lex.l
  Added:       src/base/cross/bin/mkimage mkimage.preinclude
  Log:
  Beginnings of auto-support for auto-constituents

Revision  Changes    Path
1.30      +3 -0      eros/src/base/cross/bin/mkimage/Makefile

Index: Makefile
===================================================================
RCS file: /cvs/eros/src/base/cross/bin/mkimage/Makefile,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- Makefile	2001/05/11 12:50:54	1.29
+++ Makefile	2001/07/06 18:25:18	1.30
@@ -37,6 +37,7 @@
 LIBS+=	$(EROS_ROOT)/cross/lib/libzlib.a
 OTHER_LIBS=	-lbfd -liberty
 DIRS=
+HEADERS=mkimage.preinclude
 
 include $(EROS_SRC)/build/lib/make/makerules.mk
 
@@ -58,6 +59,8 @@
 install: all
 	$(INSTALL) -d $(EROS_ROOT)/cross
 	$(INSTALL) -d $(EROS_ROOT)/cross/bin
+	$(INSTALL) -d $(EROS_ROOT)/cross/include
 	$(INSTALL) -m 755 $(TARGETS) $(EROS_ROOT)/cross/bin
+	$(INSTALL) -m 755 $(HEADERS) $(EROS_ROOT)/cross/include
 
 -include .*.m



1.79      +16 -1     eros/src/base/cross/bin/mkimage/gram.y

Index: gram.y
===================================================================
RCS file: /cvs/eros/src/base/cross/bin/mkimage/gram.y,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -r1.78 -r1.79
--- gram.y	2001/07/03 04:35:54	1.78
+++ gram.y	2001/07/06 18:25:18	1.79
@@ -163,7 +163,7 @@
 %token <NONE> WRAPPER
 %token <NONE> ARCH PRINT SPACE REG KEEPER START BACKGROUND IOSPACE
 %token PRIORITY SCHEDULE
-%token <NONE> BRAND GENREG SLOT ROOT OREQ KEY SUBSEG AT CLONE
+%token <NONE> BRAND GENREG SLOT ROOT OREQ KEY SUBSEG AT CLONE COPY
 %token <NONE> PC SP ALL SLOTS KEYS STRING LIMIT RUN IPL AS
 %token <NONE> RANGE NUMBER SCHED MISC VOLSIZE DIRECTORY PRIME
 %token <NONE> PHYSMEM
@@ -513,6 +513,17 @@
 	   image.SetNodeSlot(genKeys, $4, $6);
         }
 
+       | node SLOTS '=' COPY node {
+	   SHOWPARSE("=== stmt -> node = COPY SLOTS node\n");
+	   DiskKey toKey = $1;
+	   DiskKey fromKey = $5;
+      
+	   for (uint32_t i = 0; i < EROS_NODE_SIZE; i++) {
+	     DiskKey tmp = image.GetNodeSlot(fromKey, i);
+	     image.SetNodeSlot(toKey, i, tmp);
+	   }
+       }
+
        | segmode offset '=' WORD arith_expr {
 	   SHOWPARSE("=== stmt -> segment offset = WORD arith_expr\n");
 	   DiskKey pageKey;
@@ -1820,6 +1831,10 @@
 
   if (use_std_inc_path)		/* std includes come last */
     cpp_cmd << stdinc;
+
+  cpp_cmd << " -include ";
+  cpp_cmd << App::BuildPath("/eros/cross/include/mkimage.preinclude");
+  cpp_cmd << ' ';
 
   if (argc == 1) {
     current_file = App::BuildPath(argv[0]);



1.31      +1 -0      eros/src/base/cross/bin/mkimage/lex.l

Index: lex.l
===================================================================
RCS file: /cvs/eros/src/base/cross/bin/mkimage/lex.l,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- lex.l	2001/07/03 04:35:54	1.30
+++ lex.l	2001/07/06 18:25:18	1.31
@@ -112,6 +112,7 @@
 start	{ return START; }
 misc	{ return MISC; }
 clone	{ return CLONE; }
+copy	{ return COPY; }
 number	{ return NUMBER; }
 background|bg	{ return BACKGROUND; }
 priority	{ return PRIORITY; }



1.1                  eros/src/base/cross/bin/mkimage/mkimage.preinclude

Index: mkimage.preinclude
===================================================================
#define CONSTIT(proc, name, slot) proc[ProcGenKeys][1][slot]