summaryrefslogtreecommitdiff
path: root/pkg/tinyemu/patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/tinyemu/patch')
-rw-r--r--pkg/tinyemu/patch/0001-Include-sys-select.h-from-virtio.h-for-fd_set.patch25
-rw-r--r--pkg/tinyemu/patch/0002-Fix-ram-size-2048-MiB.patch39
2 files changed, 64 insertions, 0 deletions
diff --git a/pkg/tinyemu/patch/0001-Include-sys-select.h-from-virtio.h-for-fd_set.patch b/pkg/tinyemu/patch/0001-Include-sys-select.h-from-virtio.h-for-fd_set.patch
new file mode 100644
index 00000000..6266cac2
--- /dev/null
+++ b/pkg/tinyemu/patch/0001-Include-sys-select.h-from-virtio.h-for-fd_set.patch
@@ -0,0 +1,25 @@
+From 262d679517a8867f38e15369414a6cabe897ccb1 Mon Sep 17 00:00:00 2001
+From: Michael Forney <mforney@mforney.org>
+Date: Wed, 17 Oct 2018 16:48:16 -0700
+Subject: [PATCH] Include sys/select.h from virtio.h for fd_set
+
+---
+ virtio.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/virtio.h b/virtio.h
+index 92b1070..d53c8c4 100644
+--- a/virtio.h
++++ b/virtio.h
+@@ -24,6 +24,8 @@
+ #ifndef VIRTIO_H
+ #define VIRTIO_H
+
++#include <sys/select.h>
++
+ #include "iomem.h"
+ #include "pci.h"
+
+--
+2.19.0
+
diff --git a/pkg/tinyemu/patch/0002-Fix-ram-size-2048-MiB.patch b/pkg/tinyemu/patch/0002-Fix-ram-size-2048-MiB.patch
new file mode 100644
index 00000000..5f6ced22
--- /dev/null
+++ b/pkg/tinyemu/patch/0002-Fix-ram-size-2048-MiB.patch
@@ -0,0 +1,39 @@
+From 2554a4ba54ce78fd3c568bb74bdaa626935dc152 Mon Sep 17 00:00:00 2001
+From: Michael Forney <mforney@mforney.org>
+Date: Wed, 17 Oct 2018 16:49:06 -0700
+Subject: [PATCH] Fix ram size >= 2048 MiB
+
+---
+ machine.c | 2 +-
+ temu.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/machine.c b/machine.c
+index eab92b4..bc8edac 100644
+--- a/machine.c
++++ b/machine.c
+@@ -260,7 +260,7 @@ static int virt_machine_parse_config(VirtMachineParams *p,
+ tag_name = "memory_size";
+ if (vm_get_int(cfg, tag_name, &val) < 0)
+ goto tag_fail;
+- p->ram_size = val << 20;
++ p->ram_size = (uint64_t)val << 20;
+
+ tag_name = "bios";
+ if (vm_get_str_opt(cfg, tag_name, &str) < 0)
+diff --git a/temu.c b/temu.c
+index e8886ff..a5eba31 100644
+--- a/temu.c
++++ b/temu.c
+@@ -719,7 +719,7 @@ int main(int argc, char **argv)
+ /* override some config parameters */
+
+ if (ram_size > 0) {
+- p->ram_size = ram_size << 20;
++ p->ram_size = (uint64_t)ram_size << 20;
+ }
+ if (accel_enable != -1)
+ p->accel_enable = accel_enable;
+--
+2.19.0
+