changes for pack labels; use cpp, now are *.c
authorMike Karels <karels@ucbvax.Berkeley.EDU>
Fri, 29 Aug 1986 11:59:30 +0000 (03:59 -0800)
committerMike Karels <karels@ucbvax.Berkeley.EDU>
Fri, 29 Aug 1986 11:59:30 +0000 (03:59 -0800)
SCCS-vsn: sys/vax/mdec/Makefile 7.2
SCCS-vsn: sys/vax/mdec/hkboot.c 7.2
SCCS-vsn: sys/vax/mdec/hpboot.c 7.2
SCCS-vsn: sys/vax/mdec/raboot.c 7.2
SCCS-vsn: sys/vax/mdec/rlboot.c 7.2
SCCS-vsn: sys/vax/mdec/tuboot.c 7.2
SCCS-vsn: sys/vax/mdec/upboot.c 7.2

usr/src/sys/vax/mdec/Makefile
usr/src/sys/vax/mdec/hkboot.c
usr/src/sys/vax/mdec/hpboot.c
usr/src/sys/vax/mdec/raboot.c
usr/src/sys/vax/mdec/rlboot.c
usr/src/sys/vax/mdec/tuboot.c
usr/src/sys/vax/mdec/upboot.c

index dd28b91..e1d8bb9 100644 (file)
 # All rights reserved.  The Berkeley software License Agreement
 # specifies the terms and conditions for redistribution.
 #
 # All rights reserved.  The Berkeley software License Agreement
 # specifies the terms and conditions for redistribution.
 #
-#      @(#)Makefile    7.1 (Berkeley) %G%
+#      @(#)Makefile    7.2 (Berkeley) %G%
 #
 ALL=   hkboot hpboot htboot mtboot noboot raboot rlboot \
        upboot utboot tmboot tsboot tuboot \
        httoggle mttoggle tmtoggle tstoggle uttoggle
 
 #
 ALL=   hkboot hpboot htboot mtboot noboot raboot rlboot \
        upboot utboot tmboot tsboot tuboot \
        httoggle mttoggle tmtoggle tstoggle uttoggle
 
+CFLAGS= -DLOCORE
+INCLUDE= /usr/include
+
 all: ${ALL}
 
 all: ${ALL}
 
-hkboot: hkboot.s
-       as hkboot.s
+hkboot: hkboot.c ${INCLUDE}/sys/disklabel.h
+       cc -E ${CFLAGS} hkboot.c | as
        nm -u a.out
        strip a.out
        dd if=a.out bs=32 skip=1 of=b.out
        dd if=b.out of=hkboot conv=sync
        nm -u a.out
        strip a.out
        dd if=a.out bs=32 skip=1 of=b.out
        dd if=b.out of=hkboot conv=sync
+       rm b.out
 
 
-hpboot: hpboot.s
-       as hpboot.s
+hpboot: hpboot.c ${INCLUDE}/sys/disklabel.h
+       cc -E ${CFLAGS} hpboot.c | as
        nm -u a.out
        strip a.out
        dd if=a.out bs=32 skip=1 of=b.out
        dd if=b.out of=hpboot conv=sync
        nm -u a.out
        strip a.out
        dd if=a.out bs=32 skip=1 of=b.out
        dd if=b.out of=hpboot conv=sync
+       rm b.out
 
 
-htboot: htboot.s
-       as htboot.s
+htboot: htboot.c
+       cc -E ${CFLAGS} htboot.c | as
        nm -u a.out
        strip a.out
        dd if=a.out of=b.out bs=32 skip=1
        dd if=b.out of=htboot conv=sync
        nm -u a.out
        strip a.out
        dd if=a.out of=b.out bs=32 skip=1
        dd if=b.out of=htboot conv=sync
+       rm b.out
 
 
-mtboot: mtboot.s
-       as mtboot.s
+mtboot: mtboot.c
+       cc -E ${CFLAGS} mtboot.c | as
        nm -u a.out
        strip a.out
        dd if=a.out bs=32 skip=1 of=b.out
        dd if=b.out of=mtboot conv=sync
        nm -u a.out
        strip a.out
        dd if=a.out bs=32 skip=1 of=b.out
        dd if=b.out of=mtboot conv=sync
+       rm b.out
 
 
-raboot: raboot.s
-       as raboot.s
+raboot: raboot.c ${INCLUDE}/sys/disklabel.h
+       cc -E ${CFLAGS} raboot.c | as
        nm -u a.out
        strip a.out
        dd if=a.out bs=32 skip=1 of=b.out
        dd if=b.out of=raboot conv=sync
        nm -u a.out
        strip a.out
        dd if=a.out bs=32 skip=1 of=b.out
        dd if=b.out of=raboot conv=sync
+       rm b.out
 
 
-rlboot: rlboot.s
-       as rlboot.s
+rlboot: rlboot.c ${INCLUDE}/sys/disklabel.h
+       cc -E ${CFLAGS} rlboot.c | as
        nm -u a.out
        strip a.out
        dd if=a.out bs=32 skip=1 of=b.out
        dd if=b.out of=rlboot conv=sync
        nm -u a.out
        strip a.out
        dd if=a.out bs=32 skip=1 of=b.out
        dd if=b.out of=rlboot conv=sync
+       rm b.out
 
 
-tmboot: tmboot.s
-       as tmboot.s
+tmboot: tmboot.c
+       cc -E ${CFLAGS} tmboot.c | as
        nm -u a.out
        strip a.out
        dd if=a.out of=b.out bs=32 skip=1
        dd if=b.out of=tmboot conv=sync
        nm -u a.out
        strip a.out
        dd if=a.out of=b.out bs=32 skip=1
        dd if=b.out of=tmboot conv=sync
+       rm b.out
 
 
-tsboot: tsboot.s
-       as tsboot.s
+tsboot: tsboot.c
+       cc -E ${CFLAGS} tsboot.c | as
        nm -u a.out
        strip a.out
        dd if=a.out of=b.out bs=32 skip=1
        dd if=b.out of=tsboot conv=sync
        nm -u a.out
        strip a.out
        dd if=a.out of=b.out bs=32 skip=1
        dd if=b.out of=tsboot conv=sync
+       rm b.out
 
 
-upboot: upboot.s
-       as upboot.s
+upboot: upboot.c ${INCLUDE}/sys/disklabel.h
+       cc -E ${CFLAGS} upboot.c | as
        nm -u a.out
        strip a.out
        dd if=a.out bs=32 skip=1 of=b.out
        dd if=b.out of=upboot conv=sync
        nm -u a.out
        strip a.out
        dd if=a.out bs=32 skip=1 of=b.out
        dd if=b.out of=upboot conv=sync
+       rm b.out
 
 
-tuboot: tuboot.s
-       as tuboot.s
+tuboot: tuboot.c
+       cc -E ${CFLAGS} tuboot.c | as
        nm -u a.out
        strip a.out
        dd if=a.out of=b.out bs=32 skip=1
        dd if=b.out of=tuboot conv=sync
        nm -u a.out
        strip a.out
        dd if=a.out of=b.out bs=32 skip=1
        dd if=b.out of=tuboot conv=sync
+       rm b.out
 
 
-utboot: utboot.s
-       as utboot.s
+utboot: utboot.c
+       cc -E ${CFLAGS} utboot.c | as
        nm -u a.out
        strip a.out
        dd if=a.out bs=32 skip=1 of=b.out
        dd if=b.out of=utboot conv=sync
        nm -u a.out
        strip a.out
        dd if=a.out bs=32 skip=1 of=b.out
        dd if=b.out of=utboot conv=sync
+       rm b.out
 
 httoggle: httoggle.s
        as httoggle.s
 
 httoggle: httoggle.s
        as httoggle.s
index 05d4a27..937e444 100644 (file)
@@ -4,7 +4,8 @@
  * specifies the terms and conditions for redistribution.
  */
 
  * specifies the terms and conditions for redistribution.
  */
 
-/* @(#)hkboot.c        7.1 (Berkeley) %G% */
+/* @(#)hkboot.c        7.2 (Berkeley) %G% */
+#include <sys/disklabel.h>
 
        .set    MAJOR,3         /* major("/dev/hk0a") */
 
 
        .set    MAJOR,3         /* major("/dev/hk0a") */
 
@@ -48,6 +49,17 @@ init:
        bicw2   $0xf000,r5              /* remove from r5 */
        insv    r4,$8,$8,r10            /* set partition */
        movl    r5,r11                  /* boot flags */
        bicw2   $0xf000,r5              /* remove from r5 */
        insv    r4,$8,$8,r10            /* set partition */
        movl    r5,r11                  /* boot flags */
+       brw     start0
+
+/*
+ * Leave space for pack label.
+ */
+pad:
+       .space  LABELOFFSET - (pad - init)
+packlabel:
+       .space  d_end_
+
+start0:
        movl    physUBA[r9],r9          /* UNIBUS adaptor address */
        movl    r2,r8                   /* boot device CSR */
        movl    r3,r7                   /* unit number */
        movl    physUBA[r9],r9          /* UNIBUS adaptor address */
        movl    r2,r8                   /* boot device CSR */
        movl    r3,r7                   /* unit number */
@@ -82,9 +94,9 @@ start2:
        movw    $-PROGSIZE/2,HK_wc(r8)
        clrl    r0
 1:
        movw    $-PROGSIZE/2,HK_wc(r8)
        clrl    r0
 1:
-#      bisl3   $0x80000000,r0,UBA_MAP(r9)
-#      addl2   $4,r9
-#      aobleq  $BOOTSIZE,r0,1b
+/*     bisl3   $0x80000000,r0,UBA_MAP(r9) */
+/*     addl2   $4,r9 */
+/*     aobleq  $BOOTSIZE,r0,1b */
        clrw    HK_ba(r8)
        movw    $HK_SEL7+HK_RCOM+HK_GO,HK_cs1(r8)
 hkrdy:
        clrw    HK_ba(r8)
        movw    $HK_SEL7+HK_RCOM+HK_GO,HK_cs1(r8)
 hkrdy:
index 1ace3f2..d1e4514 100644 (file)
@@ -4,11 +4,10 @@
  * specifies the terms and conditions for redistribution.
  */
 
  * specifies the terms and conditions for redistribution.
  */
 
-/* "@(#)hpboot.c       7.1 (Berkeley) %G%" */
+/* "@(#)hpboot.c       7.2 (Berkeley) %G%" */
+#include <sys/disklabel.h>
 
 
 
 
-#define PARTITION              /* Partition is in bits 12 to 15 of R5
-
 /*
  * RP??/RM?? 1st level boot program: loads next 7.5Kbytes from
  * boot sectors of file system and sets it up to run.
 /*
  * RP??/RM?? 1st level boot program: loads next 7.5Kbytes from
  * boot sectors of file system and sets it up to run.
@@ -63,14 +62,23 @@ start:
        extzv   $13,$2,r1,r4            /* get MBA number from R1 */
        insv    r4,$24,$8,r10           /* set MBA number */
        insv    r3,$16,$8,r10           /* drive number */
        extzv   $13,$2,r1,r4            /* get MBA number from R1 */
        insv    r4,$24,$8,r10           /* set MBA number */
        insv    r3,$16,$8,r10           /* drive number */
-#ifdef PARTITION
        extzv   $12,$4,r5,r4            /* get partition from r5 */
        bicw2   $0xf000,r5              /* remove from r5 */
        insv    r4,$8,$4,r10            /* set partition */
        extzv   $12,$4,r5,r4            /* get partition from r5 */
        bicw2   $0xf000,r5              /* remove from r5 */
        insv    r4,$8,$4,r10            /* set partition */
-#endif
        movl    r5,r11
        movl    r1,r9                   /* save adaptor address */
        movl    r3,r8                   /* and unit number */
        movl    r5,r11
        movl    r1,r9                   /* save adaptor address */
        movl    r3,r8                   /* and unit number */
+       brw     start0
+
+/*
+ * Leave space for pack label.
+ */
+pad:
+       .space  LABELOFFSET - (pad - init)
+packlabel:
+       .space  d_end_
+
+start0:
        movl    $RELOC,sp
        moval   init,r6
        movc3   $end,(r6),(sp)
        movl    $RELOC,sp
        moval   init,r6
        movc3   $end,(r6),(sp)
index c8a58bd..d9db3ae 100644 (file)
@@ -4,7 +4,8 @@
  * specifies the terms and conditions for redistribution.
  */
 
  * specifies the terms and conditions for redistribution.
  */
 
-/* "@(#)raboot.c       7.1 (Berkeley) %G%" */
+/* "@(#)raboot.c       7.2 (Berkeley) %G%" */
+#include <sys/disklabel.h>
 
        .set    MAJOR,9                 /* major("/dev/ra0a") */
 
 
        .set    MAJOR,9                 /* major("/dev/ra0a") */
 
@@ -35,6 +36,17 @@ start:
        movl    r1,r9                   /* UNIBUS I/O page address */
        movl    r2,r8                   /* boot device CSR */
        movl    r3,r7                   /* unit number */
        movl    r1,r9                   /* UNIBUS I/O page address */
        movl    r2,r8                   /* boot device CSR */
        movl    r3,r7                   /* unit number */
+       brw     start0
+
+/*
+ * Leave space for pack label.
+ */
+pad:
+       .space  LABELOFFSET - (pad - init)
+packlabel:
+       .space  d_end_
+
+start0:
        movl    $RELOC,sp
        moval   init,r4
        movc3   $end,(r4),(sp)
        movl    $RELOC,sp
        moval   init,r4
        movc3   $end,(r4),(sp)
index d7ce884..f4c0f18 100644 (file)
@@ -4,7 +4,8 @@
  * specifies the terms and conditions for redistribution.
  */
 
  * specifies the terms and conditions for redistribution.
  */
 
-/* "@(#)rlboot.c       7.1 (Berkeley) %G%" */
+/* "@(#)rlboot.c       7.2 (Berkeley) %G%" */
+#include <sys/disklabel.h>
 
        .set    MAJOR,14                /* major("/dev/rl0a") */
 
 
        .set    MAJOR,14                /* major("/dev/rl0a") */
 
@@ -48,6 +49,17 @@ init:
        bicw2   $0xf000,r5              /* remove from r5 */
        insv    r4,$8,$8,r10            /* set partition */
        movl    r5,r11                  /* boot flags */
        bicw2   $0xf000,r5              /* remove from r5 */
        insv    r4,$8,$8,r10            /* set partition */
        movl    r5,r11                  /* boot flags */
+       brw     start0
+
+/*
+ * Leave space for pack label.
+ */
+pad:
+       .space  LABELOFFSET - (pad - init)
+packlabel:
+       .space  d_end_
+
+start0:
        movl    physUBA[r9],r9          /* UNIBUS adaptor address */
        movl    r2,r8                   /* boot device CSR */
        movl    r3,r7                   /* unit number */
        movl    physUBA[r9],r9          /* UNIBUS adaptor address */
        movl    r2,r8                   /* boot device CSR */
        movl    r3,r7                   /* unit number */
index 13a88f1..fd6fcb7 100644 (file)
@@ -4,7 +4,7 @@
  * specifies the terms and conditions for redistribution.
  */
 
  * specifies the terms and conditions for redistribution.
  */
 
-/* "@(#)tuboot.c       7.1 (Berkeley) %G%" */
+/* "@(#)tuboot.c       7.2 (Berkeley) %G%" */
 
 /*
  * VAX tu58 console cassette boot block
 
 /*
  * VAX tu58 console cassette boot block
@@ -172,8 +172,8 @@ dirred:
 1:
        addw2   FILSIZ(r5),r10          /* add file length to block pointer */
        addl2   $ENTSIZ,r5              /* move to next entry */
 1:
        addw2   FILSIZ(r5),r10          /* add file length to block pointer */
        addl2   $ENTSIZ,r5              /* move to next entry */
-     cpmb    STATUS(r5),$RT_NULL     /* check if deleted file */
-     beql    1b /* not really necessary since deleted entries will fail */
+/*     cpmb    STATUS(r5),$RT_NULL     /* check if deleted file */
+/*     beql    1b /* not really necessary since deleted entries will fail */
                   /* to compare anyway */
        cmpb    STATUS(r5),$RT_ESEG     /* check if end of segment */
        bneq    2b
                   /* to compare anyway */
        cmpb    STATUS(r5),$RT_ESEG     /* check if end of segment */
        bneq    2b
@@ -325,8 +325,8 @@ getc:
        cmpb    r0,$015
        bneq    putc                    /* echo and return */
        bsbb    putc                    /* carriage return */
        cmpb    r0,$015
        bneq    putc                    /* echo and return */
        bsbb    putc                    /* carriage return */
-#      movb    $0,r0
-#      bsbb    putc                    /* delay */
+/*     movb    $0,r0   */
+/*     bsbb    putc    */              /* delay */
        movb    $012,r0                 /* send line feed and return */
 putc:
        mfpr    $TXCS,r2
        movb    $012,r0                 /* send line feed and return */
 putc:
        mfpr    $TXCS,r2
index 70e8a01..f088325 100644 (file)
@@ -4,7 +4,8 @@
  * specifies the terms and conditions for redistribution.
  */
 
  * specifies the terms and conditions for redistribution.
  */
 
-/* "@(#)upboot.c       7.1 (Berkeley) %G%" */
+/* "@(#)upboot.c       7.2 (Berkeley) %G%" */
+#include <sys/disklabel.h>
 
        .set    MAJOR,2                 /* major("/dev/up0a") */
 
 
        .set    MAJOR,2                 /* major("/dev/up0a") */
 
@@ -54,10 +55,21 @@ init:
        bicw2   $0xf000,r5              /* remove from r5 */
        insv    r4,$8,$8,r10            /* set partition */
        movl    r5,r11                  /* boot flags */
        bicw2   $0xf000,r5              /* remove from r5 */
        insv    r4,$8,$8,r10            /* set partition */
        movl    r5,r11                  /* boot flags */
+
+       brw     start0
+
+/*
+ * Leave space for pack label.
+ */
+pad:
+       .space  LABELOFFSET - (pad - init)
+packlabel:
+       .space  d_end_
+
+start0:
        movl    physUBA[r9],r9          /* UNIBUS adaptor address */
        movl    r2,r8                   /* boot device CSR */
        movl    r3,r7                   /* unit number */
        movl    physUBA[r9],r9          /* UNIBUS adaptor address */
        movl    r2,r8                   /* boot device CSR */
        movl    r3,r7                   /* unit number */
-
        movl    $RELOC,sp
        moval   init,r4
        movc3   $end,(r4),(sp)
        movl    $RELOC,sp
        moval   init,r4
        movc3   $end,(r4),(sp)