summaryrefslogtreecommitdiff
path: root/emulators/gxemul/patches
diff options
context:
space:
mode:
authortsutsui <tsutsui>2008-09-14 06:15:35 +0000
committertsutsui <tsutsui>2008-09-14 06:15:35 +0000
commit691f2f9463b23fd2a9368fce03dac441acfda6e8 (patch)
tree31155f9cccff473c5ddc42c32d34fc39f088053d /emulators/gxemul/patches
parent300f23bff7d0cb105e61984911c78be863239ab0 (diff)
downloadpkgsrc-691f2f9463b23fd2a9368fce03dac441acfda6e8.tar.gz
Add a workaround to make NetBSD/arc work with vga/pckbd console.
(set proper ARC environments to avoid cngetc() on boot device detection) Bump PKGREVISION.
Diffstat (limited to 'emulators/gxemul/patches')
-rw-r--r--emulators/gxemul/patches/patch-aa42
1 files changed, 42 insertions, 0 deletions
diff --git a/emulators/gxemul/patches/patch-aa b/emulators/gxemul/patches/patch-aa
new file mode 100644
index 00000000000..6af48603e34
--- /dev/null
+++ b/emulators/gxemul/patches/patch-aa
@@ -0,0 +1,42 @@
+--- src/promemul/arcbios.c.orig 2007-08-30 05:36:35.000000000 +0900
++++ src/promemul/arcbios.c 2008-02-02 12:13:18.000000000 +0900
+@@ -2211,7 +2211,10 @@
+ }
+
+ if (machine->machine_type == MACHINE_ARC)
+- strlcat(init_bootpath, "\\", bootpath_len);
++ snprintf(init_bootpath + strlen(init_bootpath),
++ bootpath_len - strlen(init_bootpath),
++ "scsi(0)disk(%i)rdisk(0)partition(1)",
++ machine->bootdev_id);
+
+ CHECK_ALLOCATION(machine->bootstr = malloc(ARC_BOOTSTR_BUFLEN));
+
+@@ -2362,20 +2365,17 @@
+ add_environment_string(cpu, "kernname=unix", &addr);
+ } else {
+ char *tmp;
+- size_t mlen = strlen(machine->bootarg) +
+- strlen("OSLOADOPTIONS=") + 2;
++ size_t mlen = ARC_BOOTSTR_BUFLEN;
+ CHECK_ALLOCATION(tmp = malloc(mlen));
+ snprintf(tmp, mlen, "OSLOADOPTIONS=%s", machine->bootarg);
+ store_pointer_and_advance(cpu, &addr2, addr, is64bit);
+ add_environment_string(cpu, tmp, &addr);
+-
+- store_pointer_and_advance(cpu, &addr2, addr, is64bit);
+- add_environment_string(cpu, "OSLOADPARTITION=scsi(0)cdrom(6)"
+- "fdisk(0);scsi(0)disk(0)rdisk(0)partition(1)", &addr);
+-
+ store_pointer_and_advance(cpu, &addr2, addr, is64bit);
+- add_environment_string(cpu, "SYSTEMPARTITION=scsi(0)cdrom(6)"
+- "fdisk(0);scsi(0)disk(0)rdisk(0)partition(1)", &addr);
++ snprintf(tmp, mlen,
++ "OSLOADPARTITION=scsi(0)disk(%d)rdisk(0)partition(1)",
++ machine->bootdev_id);
++ add_environment_string(cpu, tmp, &addr);
++ free(tmp);
+ }
+
+ /* End the environment strings with an empty zero-terminated
+