vx32

Local 9vx git repository for patches.
git clone git://r-36.net/vx32
Log | Files | Refs

commit bd21de03ccb49344d258b1e0d6c63ee79e0b5956
parent d66e3ab6a3789eb88f1d5cf6534ead17169e5bcb
Author: Jesus Galan Lopez (yiyus) <yiyu.jgl@gmail.com>
Date:   Tue, 29 Jun 2010 03:06:56 +0200

fix bootboot

Diffstat:
src/9vx/bootboot.ed | 23+++++++++++------------
src/9vx/bootcode.9 | 0
src/9vx/main.c | 3+++
3 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/src/9vx/bootboot.ed b/src/9vx/bootboot.ed @@ -1,12 +1,12 @@ diff -e plan9/sys/src/9//boot/aux.c 9vx/sys/src/9//boot/aux.c 73,74c - exits(buf); + exits(smprint("boot: %s: %s\n", s, buf)); . diff -e plan9/sys/src/9//boot/boot.c 9vx/sys/src/9//boot/boot.c 154a Init: . -94a +92a if(localroot){ bind(localroot, "/", MAFTER); srvcreate("boot", fd); @@ -14,15 +14,20 @@ Init: } . 6a -char *localroot; +char* localroot; . diff -e plan9/sys/src/9//boot/boot.h 9vx/sys/src/9//boot/boot.h 16a extern char* localroot; . +diff -e plan9/sys/src/9//boot/bootip.c 9vx/sys/src/9//boot/bootip.c +76,77c + // if(w->msg[0] != 0) + // fatal(w->msg); +. diff -e plan9/sys/src/9//boot/local.c 9vx/sys/src/9//boot/local.c 278c - //if((fd = connectlocalkfs()) < 0) + // if((fd = connectlocalkfs()) < 0) . 276a if((fd = connectlocalroot()) < 0) @@ -33,7 +38,7 @@ connectlocalroot(void) int fd; char buf[1024]; - snprint(buf, sizeof buf, "%s/386/bin/rc", disk); + snprint(buf, sizeof buf, "%s/%s/bin/rc", disk, cputype); if(stat(buf, statbuf, sizeof statbuf) < 0) return -1; localroot = disk; @@ -51,12 +56,6 @@ connectlocalroot(void) int . 171c + //fatal("open /net/ipifc/clone for loopback"); return; . -diff -e plan9/sys/src/9//pc/pcf 9vx/sys/src/9//pc/pcf -119a - tcp -. -117,118c -boot boot #Z/usr/local/9vx -. diff --git a/src/9vx/bootcode.9 b/src/9vx/bootcode.9 Binary files differ. diff --git a/src/9vx/main.c b/src/9vx/main.c @@ -49,6 +49,7 @@ int doabort = 1; // for now int abortonfault; char* argv0; char* conffile = "9vx"; +char* defaultroot = "local!#Z/usr/local/9vx"; Conf conf; static Mach mach0; @@ -426,6 +427,8 @@ bootargs(void *base) av[ac++] = pusharg("9vx"); for(i = 0; i < bootargc && ac < 32; i++) av[ac++] = pusharg(bootargv[i]); + if(i == 0) + av[ac++] = pusharg(defaultroot); /* 4 byte word align stack */ sp = (uchar*)((uintptr)sp & ~3);