diff options
Diffstat (limited to 'src/sysbin')
-rw-r--r-- | src/sysbin/bam.lua | 23 | ||||
-rw-r--r-- | src/sysbin/giosrv/Makefile | 12 | ||||
-rw-r--r-- | src/sysbin/init/Makefile | 12 | ||||
-rw-r--r-- | src/sysbin/init/main.c | 4 | ||||
-rw-r--r-- | src/sysbin/login/Makefile | 12 | ||||
-rw-r--r-- | src/sysbin/shell/Makefile | 12 | ||||
-rw-r--r-- | src/sysbin/terminal/Makefile | 12 |
7 files changed, 25 insertions, 62 deletions
diff --git a/src/sysbin/bam.lua b/src/sysbin/bam.lua new file mode 100644 index 0000000..819bc43 --- /dev/null +++ b/src/sysbin/bam.lua @@ -0,0 +1,23 @@ +local function sysbin_settings(name) + local s = TableDeepCopy(user_settings) + s.link.flags:Add("-T src/sysbin/linker.ld", + "-Xlinker -Map=build/" .. name .. ".map") + return s +end + +local function sysbin_exe(name) + local s = sysbin_settings(name) + + local src = Collect('src/sysbin/' .. name .. '/*.c') + local obj = Compile(s, src) + + return Link(s, name .. ".bin", {obj, libkogata}) +end + +sysbin = { + sysbin_exe('init'), + sysbin_exe('giosrv'), + sysbin_exe('login'), + sysbin_exe('terminal'), + sysbin_exe('shell'), +} diff --git a/src/sysbin/giosrv/Makefile b/src/sysbin/giosrv/Makefile deleted file mode 100644 index 9adc05a..0000000 --- a/src/sysbin/giosrv/Makefile +++ /dev/null @@ -1,12 +0,0 @@ - -OBJ = main.o - -LIB = ../../lib/libkogata/libkogata.lib - -CFLAGS = -I ./include -I ../../common/include -I ../../lib/include - -LDFLAGS = -T ../linker.ld -Xlinker -Map=giosrv.map - -OUT = giosrv.bin - -include ../../rules.make diff --git a/src/sysbin/init/Makefile b/src/sysbin/init/Makefile deleted file mode 100644 index e56d4c0..0000000 --- a/src/sysbin/init/Makefile +++ /dev/null @@ -1,12 +0,0 @@ - -OBJ = main.o - -LIB = ../../lib/libkogata/libkogata.lib - -CFLAGS = -I ./include -I ../../common/include -I ../../lib/include - -LDFLAGS = -T ../linker.ld -Xlinker -Map=init.map - -OUT = init.bin - -include ../../rules.make diff --git a/src/sysbin/init/main.c b/src/sysbin/init/main.c index f1cb77a..36ca884 100644 --- a/src/sysbin/init/main.c +++ b/src/sysbin/init/main.c @@ -156,7 +156,7 @@ int main(int argc, char **argv) { btree_t *cmdline = read_cmdline(); if (cmdline == 0) PANIC("[init] Could not parse cmdline"); - // Later : setup config: and read config file + // setup config: if (btree_find(cmdline, "config") == 0) { PANIC("[init] No config=xxx option specified on command line"); } else { @@ -170,7 +170,7 @@ int main(int argc, char **argv) { if (!ok) PANIC("[init] Could not setup config:"); } - // Setup sys: partition + // Setup sys: setup_sys(); // Setup GIP channel for communication between giosrv and login diff --git a/src/sysbin/login/Makefile b/src/sysbin/login/Makefile deleted file mode 100644 index 1232fa8..0000000 --- a/src/sysbin/login/Makefile +++ /dev/null @@ -1,12 +0,0 @@ - -OBJ = main.o - -LIB = ../../lib/libkogata/libkogata.lib - -CFLAGS = -I ./include -I ../../common/include -I ../../lib/include - -LDFLAGS = -T ../linker.ld -Xlinker -Map=login.map - -OUT = login.bin - -include ../../rules.make diff --git a/src/sysbin/shell/Makefile b/src/sysbin/shell/Makefile deleted file mode 100644 index 80d1009..0000000 --- a/src/sysbin/shell/Makefile +++ /dev/null @@ -1,12 +0,0 @@ - -OBJ = main.o - -LIB = ../../lib/libkogata/libkogata.lib - -CFLAGS = -I ./include -I ../../common/include -I ../../lib/include - -LDFLAGS = -T ../linker.ld -Xlinker -Map=shell.map - -OUT = shell.bin - -include ../../rules.make diff --git a/src/sysbin/terminal/Makefile b/src/sysbin/terminal/Makefile deleted file mode 100644 index cdbf2fe..0000000 --- a/src/sysbin/terminal/Makefile +++ /dev/null @@ -1,12 +0,0 @@ - -OBJ = main.o - -LIB = ../../lib/libkogata/libkogata.lib - -CFLAGS = -I ./include -I ../../common/include -I ../../lib/include - -LDFLAGS = -T ../linker.ld -Xlinker -Map=terminal.map - -OUT = terminal.bin - -include ../../rules.make |