Procházet zdrojové kódy

Fix some mkroot details

Elbing Miss před 9 roky
rodič
revize
43f83960e2
4 změnil soubory, kde provedl 22 přidání a 26 odebrání
  1. 8 8
      BUILD
  2. 4 10
      sys/src/9/k10/boot.fs
  3. 9 7
      sys/src/9/k10/k8cpu
  4. 1 1
      sys/src/9/k10/trap.c

+ 8 - 8
BUILD

@@ -134,7 +134,7 @@ compile_kernel()
     $CC $CFLAGS $WARNFLAGS -I${INC_ARCH} -I${INC_DIR} -I. -mcmodel=small -c ../boot/printstub.c
     check_error $? "compiling printstub.c"
     echo "$LD boot${CONF}.out"
-    $LD -static -o boot$CONF.elf.out boot$CONF.o printstub.o $LDFLAGS -L$BOOTDIR -lboot -lip -lauth -lc -emain -Ttext=0x200020
+    $LD -static -o boot$CONF.elf.out boot$CONF.o printstub.o $LDFLAGS -L$BOOTDIR -lboot -lip -lauth -lc -e_main
 	check_error $? "linking boot$CONF.elf.out"
 	
 	## systab.c ##
@@ -155,8 +155,8 @@ compile_kernel()
     $CC $UCFLAGS $WARNFLAGS -I${INC_ARCH} -I${INC_DIR} -I. -mcmodel=small -c ../port/initcode.c
     check_error $? "compiling initcode.c"
 
-	echo "$LD -static -o init init9.o initcode.o $LDFLAGS -lc -emain -Ttext=0x200020"
-    $LD -static -o init init9.o initcode.o $LDFLAGS -lc -emain -Ttext=0x200020
+	echo "$LD -static -o init init9.o initcode.o $LDFLAGS -lc -e_main -Ttext=0x200020"
+    $LD -static -o init init9.o initcode.o $LDFLAGS -lc -e_main -Ttext=0x200020
     check_error $? "linking init"
     echo "${UTIL_DIR}/elf2c init > init.h"
     ${UTIL_DIR}/elf2c init > init.h
@@ -170,11 +170,11 @@ compile_kernel()
 	
 	## mkroot ##
 	
-	strip boot$CONF.elf.out
-    check_error $? "to strip boot$CONF.elf.out"
-    echo "${UTIL_DIR}/data2c "boot$CONF"_out boot$CONF.elf.out >> k8cpu.root.c"
-    ${UTIL_DIR}/data2c "boot$CONF"_out boot$CONF.elf.out >> k8cpu.root.c
-	check_error $? "executing data2c"
+	#strip boot$CONF.elf.out
+    #check_error $? "to strip boot$CONF.elf.out"
+    #echo "${UTIL_DIR}/data2c "boot$CONF"_out boot$CONF.elf.out >> k8cpu.root.c"
+    #${UTIL_DIR}/data2c "boot$CONF"_out boot$CONF.elf.out >> k8cpu.root.c
+	#check_error $? "executing data2c"
 	
 
 	# we need a WAY better way to do this. We're having to do it for each file.

+ 4 - 10
sys/src/9/k10/boot.fs

@@ -1,12 +1,6 @@
 #!/boot/rc -m /boot/rcmain
-#/boot/echo Morning
 # boot script for file servers, including standalone ones
-path=(/boot /$cputype/bin /rc/bin .)
-bind -a /boot /bin
-bind -b '#c' /dev
-bind -b '#ec' /env
-bind -b '#e' /env
-bind -b '#s' /srv
-bind -a /boot /
-prompt=('cpu% ' '	')
-exec /boot/rc -m /boot/rcmain -i
+path=(/boot /amd64/bin /rc/bin .)
+echo -n Greetings professor Falken
+exec /boot/rc -m/boot/rcmain -i
+

+ 9 - 7
sys/src/9/k10/k8cpu

@@ -69,18 +69,20 @@ misc +dev
 #boot boot $3
 #	char* bootdisk = "$3";
 #
-boot cpu
-	tcp
+#boot cpu
+#	tcp
 
 rootdir
-	boot.fs boot
+	boot.fs	boot
 #	bootk8cpu.out boot
 #	/amd64/bin/auth/factotum factotum
 #	/amd64/bin/ip/ipconfig ipconfig
-	/amd64/bin/rc rc
-	/rc/lib/rcmain rcmain
-	/amd64/bin/bind bind
-	/amd64/bin/mount mount
+	/amd64/bin/rc
+	/rc/lib/rcmain
+	/amd64/bin/bind
+	/amd64/bin/mount
+	/amd64/bin/echo
+	/amd64/bin/cat
 #	../root/nvram nvram
 
 conf

+ 1 - 1
sys/src/9/k10/trap.c

@@ -654,7 +654,7 @@ hi("addr "); put64(addr); hi("\n");
 	m->externup->insyscall = 1;
 	if (0)hi("call fault\n");
 	if(fault(addr, read) < 0){
-iprint(" ould not fault %p\n", addr);
+iprint("could not fault %p\n", addr);
 die("fault went bad\n");
 
 		/*