summaryrefslogtreecommitdiff
path: root/pkg/tinyemu/gen.lua
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2018-10-17 16:55:23 -0700
committerMichael Forney <mforney@mforney.org>2018-10-17 16:55:23 -0700
commit171fc7752185f5a24293d995966999f06d23448b (patch)
tree287212f1070515c424010bb52bd68fe3638a2f2e /pkg/tinyemu/gen.lua
parent7061b93e655fe28ceeaef7836614af65b37b0d1f (diff)
Add tinyemu 2018-09-23
Diffstat (limited to 'pkg/tinyemu/gen.lua')
-rw-r--r--pkg/tinyemu/gen.lua25
1 files changed, 25 insertions, 0 deletions
diff --git a/pkg/tinyemu/gen.lua b/pkg/tinyemu/gen.lua
new file mode 100644
index 00000000..8ad2e4d9
--- /dev/null
+++ b/pkg/tinyemu/gen.lua
@@ -0,0 +1,25 @@
+cflags{
+ '-D _GNU_SOURCE',
+ '-D CONFIG_RISCV_MAX_XLEN=64',
+ '-D CONFIG_SLIRP',
+ [[-D 'CONFIG_VERSION="2018-09-23"']],
+}
+
+build('cc', '$outdir/riscv_cpu32.o', '$srcdir/riscv_cpu.c', {cflags='$cflags -DMAX_XLEN=32'})
+build('cc', '$outdir/riscv_cpu64.o', '$srcdir/riscv_cpu.c', {cflags='$cflags -DMAX_XLEN=64'})
+
+exe('temu', [[
+ virtio.c pci.c fs.c cutils.c iomem.c simplefb.c
+ json.c machine.c temu.c
+ slirp/(
+ bootp.c ip_icmp.c mbuf.c slirp.c tcp_output.c cksum.c ip_input.c
+ misc.c socket.c tcp_subr.c udp.c if.c ip_output.c sbuf.c
+ tcp_input.c tcp_timer.c
+ )
+ fs_disk.c
+ riscv_machine.c softfp.c riscv_cpu32.o riscv_cpu64.o
+ x86_cpu.c x86_machine.c ide.c ps2.c vmmouse.c pckbd.c vga.c
+]])
+file('bin/temu', '755', '$outdir/temu')
+
+fetch 'curl'