Skip to content

Instantly share code, notes, and snippets.

Unpack ~/gcc
Unpack ~/binutils-gdb
Unpack ~/alpha/destdir.alpha, base and comp for openbsd/alpha.
Unpack /usr/pkgsrc
Install GNU sed (as gsed), makeinfo, gmake
Convenience: sudo, gmake, bsdtar.
for i in gmp mpcomplex mpfr; do make fetch -C /usr/pkgsrc/*/$i; done
@coypoop
coypoop / gist:5c97ffb28e51daf54e6c16f9b7ec7e49
Created January 18, 2018 21:36
ps2 tools (needs to be gcc.old)
We do have prefetch, ldc1, sdc1.
stop whining about double float, it requires changing the
status register to enable it.
Index: binutils/dist/gas/config/tc-mips.c
===================================================================
RCS file: /cvsroot/src/external/gpl3/binutils/dist/gas/config/tc-mips.c,v
retrieving revision 1.19
diff -u -r1.19 tc-mips.c
--- binutils/dist/gas/config/tc-mips.c 26 Oct 2016 18:42:55 -0000 1.19
Index: arch/mips/mips/locore_mips3.S
===================================================================
RCS file: /cvsroot/src/sys/arch/mips/mips/locore_mips3.S,v
retrieving revision 1.113
diff -u -r1.113 locore_mips3.S
--- arch/mips/mips/locore_mips3.S 27 Jul 2016 09:32:35 -0000 1.113
+++ arch/mips/mips/locore_mips3.S 18 Jan 2018 21:28:29 -0000
@@ -127,7 +127,7 @@
.set mips3
#endif
@coypoop
coypoop / gist:e0c7c36b59d5930c61b36ba106630c7c
Created June 19, 2017 23:39
Successful devel/ncurses build
=> Bootstrap dependency digest>=20010302: found digest-20160304
===> Skipping vulnerability checks.
=> Checksum SHA1 OK for ncurses-6.0.tar.gz
=> Checksum RMD160 OK for ncurses-6.0.tar.gz
=> Checksum SHA512 OK for ncurses-6.0.tar.gz
===> Installing dependencies for ncurses-6.0nb3
=> Tool dependency libtool-base>=2.4.2nb9: found libtool-base-2.4.6
=> Tool dependency gmake>=3.81: found gmake-4.1nb3
=> Tool dependency checkperms>=1.1: found checkperms-1.11nb1
=> Build dependency cwrappers>=20150314: found cwrappers-20170611
End result will be:
/* CPU dependent mtc0 hazard hook */
#if (MIPS32R2 + MIPS64R2) > 0
# define COP0_SYNC .set push; .set mips32r2; ehb; .set pop
# define JR_HB_RA .set push; .set mips32r2; jr.hb ra; nop; .set pop
#else
# define COP0_SYNC sll $0,$0,1; sll $0,$0,1; sll $0,$0,1
# define JR_HB_RA sll $0,$0,1; sll $0,$0,1; jr ra; sll $0,$0,1
#endif
From 1f6246cd4f15dfea22edba7d70119e8b8c0d6821 Mon Sep 17 00:00:00 2001
From: coypu <coypu@sdf.org>
Date: Thu, 9 Jun 2016 09:22:59 +0300
Subject: [PATCH 1/4] Rename AR9380 to AR9300
AR9300 is the name used in linux (upstream).
Also, it likely matches devices like AR9340, and it wouldn't make sense
to call that device newer than AR9380.
---
sys/dev/ic/athn.c | 48 ++++++++++++++++++++++++------------------------
From 42a99999e1cc44e0ccef31ab22d6f2bbcc136c99 Mon Sep 17 00:00:00 2001
From: coypu <coypu@sdf.org>
Date: Thu, 9 Jun 2016 10:08:03 +0300
Subject: [PATCH 1/1] Sprinkle AR9430 specific redefinitions
Adjust code to pass sc.
---
sys/dev/ic/arn5008.c | 16 ++++++++--------
sys/dev/ic/arn9003.c | 12 ++++++------
sys/dev/ic/athn.c | 32 ++++++++++++++++----------------
@coypoop
coypoop / gist:2724f4988bdf69845d0a6931ceaed7a4
Created June 9, 2016 05:35
Define AR_CR_RXE to be different for newer devices
From 89a1f6962c7338e0933b196d785e6d0d30574fc4 Mon Sep 17 00:00:00 2001
From: coypu <coypu@sdf.org>
Date: Thu, 9 Jun 2016 08:32:06 +0300
Subject: [PATCH 1/1] Define AR_CR_RXE to be different for newer devices
From linux.
Adjust users of AR_CR_RXE to pass sc so we can test it.
Note that AR_SREV_9300_OR_LATER in linux is same as our test for
@coypoop
coypoop / gist:29730578b31715fe7fed0815464832ab
Last active May 27, 2016 19:17
clean up wapbl_flush debugging code, feel free to rename the new function
From 2cdce88c4544c23e47a562b803f2583d3b1c949f Mon Sep 17 00:00:00 2001
From: coypu <coypu@sdf.org>
Date: Fri, 27 May 2016 22:16:35 +0300
Subject: [PATCH 1/1] Move wapbl_flush debugging code to separate function
Improves readability.
---
sys/kern/vfs_wapbl.c | 103 ++++++++++++++++++++++++++++-----------------------
1 file changed, 56 insertions(+), 47 deletions(-)
@coypoop
coypoop / gist:5d8a94b65a45ee91b3d054453c4080b7
Last active May 19, 2016 12:40
Combined all patches. you may have reservations about patches 4,5.
From dad83af033474363bbf4ce519adaab7190eceea5 Mon Sep 17 00:00:00 2001
From: coypu <coypu@sdf.org>
Date: Mon, 16 May 2016 18:24:56 +0300
Subject: [PATCH 1/6] Get rid of UFS_WAPBL_BEGIN1/END1
ufs makeinode no longer releases dvp, so incrementing the
usecount for wapbl is unnecessary.
---
sys/ufs/ufs/ufs_vnops.c | 16 ++++++++--------
sys/ufs/ufs/ufs_wapbl.h | 5 -----