Browse Source

blaze: just make the kernel depend on //sys/src/cmd:cmds
panic: runtime error: slice bounds out of range

goroutine 1 [running]:
panic(0x743e40, 0xc420010150)
/home/sevki/code/golang/src/runtime/panic.go:500 +0x18c
sevki.org/build/postprocessor.(*PostProcessor).ProcessDependencies(0xc4203df638, 0x7fd500e29138, 0xc4201dc9a0, 0x0, 0xc42028cae0)
/home/sevki/code/go/src/sevki.org/build/postprocessor/postprocessor.go:47 +0x623
sevki.org/build/builder.(*Builder).getTarget(0xc420078180, 0xc4200b80a2, 0xf, 0xc4200b80b2, 0x4, 0x4)
/home/sevki/code/go/src/sevki.org/build/builder/builder.go:108 +0x458
sevki.org/build/builder.(*Builder).Add(0xc420078180, 0xc4200b80a0, 0x16, 0x4)
/home/sevki/code/go/src/sevki.org/build/builder/builder.go:146 +0x61
sevki.org/build/builder.(*Builder).getTarget(0xc420078180, 0xc420230f22, 0xf, 0xc420230f32, 0x5, 0x5)
/home/sevki/code/go/src/sevki.org/build/builder/builder.go:116 +0x4f5
sevki.org/build/builder.(*Builder).Add(0xc420078180, 0xc420230f20, 0x17, 0xc4203dfad0)
/home/sevki/code/go/src/sevki.org/build/builder/builder.go:146 +0x61
sevki.org/build/builder.(*Builder).getTarget(0xc420078180, 0x7fffba07d955, 0xf, 0x7fffba07d965, 0x6, 0x6)
/home/sevki/code/go/src/sevki.org/build/builder/builder.go:116 +0x4f5
sevki.org/build/builder.(*Builder).Add(0xc420078180, 0x7fffba07d953, 0x18, 0x25)
/home/sevki/code/go/src/sevki.org/build/builder/builder.go:146 +0x61
main.execute(0x7fffba07d953, 0x18)
/home/sevki/code/go/src/sevki.org/build/cmd/build/main.go:118 +0xdf
main.main()
/home/sevki/code/go/src/sevki.org/build/cmd/build/main.go:68 +0x7a

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>

Ronald G. Minnich 4 years ago
parent
commit
93169d2f54
3 changed files with 21 additions and 49 deletions
  1. 6 39
      sys/src/9/amd64/BUILD
  2. 9 6
      sys/src/BUILD
  3. 6 4
      sys/src/cmd/BUILD

+ 6 - 39
sys/src/9/amd64/BUILD

@@ -1,4 +1,6 @@
 load("//sys/src/FLAGS", "LIB_COMPILER_FLAGS")
+load("//sys/src/cmd/BUILD", "CMDS")
+load("//sys/src/BUILD", "LIBS", "KLIBS")
 
 CORE_SRCS = [
     "entry.S",
@@ -54,7 +56,6 @@ PORT_SRCS = [
     "//sys/src/9/port/devdup.c",
     "//sys/src/9/port/devenv.c",
     "//sys/src/9/port/devfdmux.c",
-    "//sys/src/9/port/devkexec.c",
     "//sys/src/9/port/devkprof.c",
     "//sys/src/9/port/devmnt.c",
     "//sys/src/9/port/devmouse.c",
@@ -73,7 +74,6 @@ PORT_SRCS = [
     "//sys/src/9/port/devuart.c",
     "//sys/src/9/port/devwd.c",
     "//sys/src/9/port/devws.c",
-    "//sys/src/9/port/devzp.c",
     "//sys/src/9/port/edf.c",
     "//sys/src/9/port/elf64.c",
     "//sys/src/9/port/ethermii.c",
@@ -83,7 +83,6 @@ PORT_SRCS = [
     "//sys/src/9/port/hexdump.c",
     "//sys/src/9/port/image.c",
     "//sys/src/9/port/kdebug.c",
-    "//sys/src/9/port/kexec.c",
     "//sys/src/9/port/ipchecksum.c",
     "//sys/src/9/port/mul64fract.c",
     "//sys/src/9/port/netif.c",
@@ -377,12 +376,7 @@ cc_binary(
         ":systab",
         ":sys",
         ":inith",
-        "//sys/src/libmemlayer:libkmemlayer",
-        "//sys/src/libmemdraw:libkmemdraw",
-        "//sys/src/libdraw:libkdraw",
-        "//sys/src/libc:libkc",
-        "//sys/src/libip:libkip",
-        "//sys/src/libsec:libksec",
+        "//sys/src:klibs",
     ],
     ld="kernel.ld",
     linkopts=[
@@ -394,37 +388,9 @@ cc_binary(
     ]
 )
 
-KERNEL_DEPS = [
-	":bind",
-	":boot",
-	":cat",
-	":date",
-	":echo",
-	":factotum",
-	":fdisk",
-	":fossil",
-	":ipconfig", 
-	":ls",
-	":mount",
-# nvram FILE ADDED
-	":prep",
-	":rc",
-	":ps",
-	":ed",
-# rcmain FILE ADDED
-	":screenconsole",
-	":realemu",
-	":vga",
-	":srv",
-# startdisk FILE ADDED
-	":usbd",
-	":venti",
-	":ratrace",
-]
-
 config(
     name="amd64cpu",
-    deps=KERNEL_DEPS,
+    deps=CMDS,
     code=[
         "int cpuserver = 1;",
         "uint32_t kerndate = 1;",
@@ -525,7 +491,8 @@ cc_binary(
         "-mcmodel=small",
     ],
     deps=[
-        "//sys/src/libc:libc"
+	LIBS,
+	KLIBS,
     ],
     includes=[
         "//sys/include",

+ 9 - 6
sys/src/BUILD

@@ -1,6 +1,4 @@
-group(
-    name="klibs",
-    deps=[
+KLIBS=[
         "//sys/src/libc:libkc",
         "//sys/src/libip:libkip",
         "//sys/src/libdraw:libkdraw",
@@ -8,10 +6,12 @@ group(
         "//sys/src/libmemlayer:libkmemlayer",
         "//sys/src/libsec:libksec",
     ]
-)
 group(
-    name="libs",
-    deps=[
+    name="klibs",
+    deps=KLIBS
+)
+
+LIBS=[
         "//sys/src/libc:libc",
         "//sys/src/libip:libip",
         "//sys/src/libdraw:libdraw",
@@ -43,6 +43,9 @@ group(
         "//sys/src/libusb:libusb",
         "//sys/src/libventi:libventi",
     ]
+group(
+    name="libs",
+    deps=LIBS
 )
 
 

+ 6 - 4
sys/src/cmd/BUILD

@@ -9,9 +9,7 @@ load('//sys/src/FLAGS', "LIB_COMPILER_FLAGS", "CMD_LINK_OPTS")
 # "/$ARCH/lib/libip.a",
 # "/$ARCH/lib/libc.a"
 
-group(
-    name="cmds",
-    deps=[
+CMDS=[
         "//sys/src/cmd/acme:acme",
         "//sys/src/cmd/rc:rc",
         "//sys/src/cmd/ip/ipconfig:ipconfig",
@@ -22,6 +20,10 @@ group(
         ":ls",
         ":bind",
     ]
+
+group(
+    name="cmds",
+    deps=CMDS
 )
 
 cc_binary(
@@ -190,4 +192,4 @@ cc_binary(
         "//amd64/include",
     ],
     linkopts=CMD_LINK_OPTS
-)
+)