Skip to content

Instantly share code, notes, and snippets.

View ao-kenji's full-sized avatar

Kenji Aoyama ao-kenji

View GitHub Profile
@ao-kenji
ao-kenji / obsd-luna88k-rsa98-try-20240504.diff
Created May 4, 2024 07:53
Experimental code to use RSA-98 serial board on LUNA-88K2
Index: luna88k/cbus/cbus.c
===================================================================
RCS file: /cvs/src/sys/arch/luna88k/cbus/cbus.c,v
diff -u -r1.9 cbus.c
--- luna88k/cbus/cbus.c 11 Mar 2021 11:16:58 -0000 1.9
+++ luna88k/cbus/cbus.c 4 May 2024 07:46:55 -0000
@@ -36,11 +36,16 @@
#define CBUS_DEBUG
#endif
@ao-kenji
ao-kenji / nono-mpu-cmmu-version.diff
Last active April 16, 2024 11:14
[merged into the main tree with modification] A patch for nono to set reasonable MPU/CMMU version.
--- vm/mpu88xx0.cpp.orig Fri Feb 23 08:37:00 2024
+++ vm/mpu88xx0.cpp Fri Feb 23 11:21:39 2024
@@ -37,6 +37,11 @@
cmmu[0].reset(new m88200(this, 7));
cmmu[1].reset(new m88200(this, 6));
+ // xmem の writeback バグが修正されているバージョンを設定する。(所有している実機にあわせ 0x9)
+ // OpenBSD の sys/arch/m88k/m88k/m8820x_machdep.c::m8820x_apr_cmode() 参照。
+ cmmu[0]->SetVersion(0x9);
+ cmmu[1]->SetVersion(0x9);
#!/bin/sh
#
# partially taken from 7.1: ports/net/curl/Makefile
# works fine with curl-7.85.0
#
# speed up some time-consuming configure tests
export curl_cv_func_select_args="int,fd_set *,struct timeval *,int"
export curl_cv_func_recv_args="int,void *,size_t,int,ssize_t"
export curl_cv_func_send_args="int,const void *,size_t,int,ssize_t"
@ao-kenji
ao-kenji / sjson-c99.diff
Last active June 18, 2023 06:59
[Merged into nanotodon tree]
diff --git a/sjson.h b/sjson.h
index 24a0d88..3069b13 100644
--- a/sjson.h
+++ b/sjson.h
@@ -196,10 +196,37 @@ typedef struct sjson_node
};
} sjson_node;
+typedef struct sjson__str_page
+{
@ao-kenji
ao-kenji / luna88k-make-perl-test.230130-130730
Created February 4, 2023 04:44
Perl 5.36.0 test log on luna88k
Mon Jan 30 13:07:30 JST 2023
aurora.in.nk-home.net
cd /usr/src/gnu/usr.bin/perl && exec make -f Makefile.bsd-wrapper1 perl.build
cd /usr/src/gnu/usr.bin/perl/obj && exec make
LD_LIBRARY_PATH=/usr/src/gnu/usr.bin/perl/obj ./miniperl -Ilib make_ext.pl cpan/version/pm_to_blib MAKE="make" LIBPERL_A=libperl.so.23.0
Running pm_to_blib for cpan/version directly
LD_LIBRARY_PATH=/usr/src/gnu/usr.bin/perl/obj ./miniperl -Ilib make_ext.pl cpan/perlfaq/pm_to_blib MAKE="make" LIBPERL_A=libperl.so.23.0
Running pm_to_blib for cpan/perlfaq directly
LD_LIBRARY_PATH=/usr/src/gnu/usr.bin/perl/obj ./miniperl -Ilib make_ext.pl cpan/parent/pm_to_blib MAKE="make" LIBPERL_A=libperl.so.23.0
Running pm_to_blib for cpan/parent directly
@ao-kenji
ao-kenji / luna88k-make-perl-build.230129-123109
Created January 30, 2023 04:11
Perl 5.36.0 build log on luna88k
Sun Jan 29 12:31:13 JST 2023
aurora.in.nk-home.net
cd /usr/src/gnu/usr.bin/perl/obj && PATH="/bin:/usr/bin:/sbin:/usr/sbin" exec /bin/sh /usr/src/gnu/usr.bin/perl/Configure -dse -Dopenbsd_distribution=defined -Dmksymlinks
(I see you are using the Korn shell. Some ksh's blow up on Configure,
mainly on older exotic systems. If yours does, try the Bourne shell instead.)
Sources for perl5 found in "/usr/src/gnu/usr.bin/perl".
First let's make sure your kit is complete. Checking...
Locating common programs...
Checking compatibility between /bin/echo and builtin echo (if any)...
Symbolic links are supported.
@ao-kenji
ao-kenji / obsd-luna88k-romconsboot.diff
Created December 14, 2022 13:41
Study to use ROM putchar in luna88k bootloader
Index: sys/arch/luna88k/stand/boot/Makefile
===================================================================
RCS file: /cvs/src/sys/arch/luna88k/stand/boot/Makefile,v
retrieving revision 1.12
diff -u -r1.12 Makefile
--- sys/arch/luna88k/stand/boot/Makefile 10 Dec 2019 11:28:13 -0000 1.12
+++ sys/arch/luna88k/stand/boot/Makefile 14 Dec 2022 13:34:32 -0000
@@ -31,9 +31,11 @@
SRCS+= boot.c
SRCS+= cons.c prf.c awaitkey.c
@ao-kenji
ao-kenji / LUNA-88K2-diag-mode.log
Created August 7, 2022 06:30
LUNA-88K2 diag mode (set DIPSW1-8:on then power on) log
PIO set Start End
LUNA 88K2 SELF DIAGONOSIS TEST Ver 1.2
1. MULTI CPU Test.
3 Port Memory clear Start End
Main memory size check (Memory : 07000000 Hex byte)
LCD Display Check.
Main Memory Clear ( 3f0000H )
CMMU set Start End
CPU 0 OK CPU 2 OK CPU 1 OK
@ao-kenji
ao-kenji / obsd-luna88k-lunafb-8bpp.diff
Last active November 12, 2023 12:13
[Merged into the main tree] Need this diff to use 8bpp X server on LUNA
Index: sys/arch/luna88k/dev/lunafb.c
===================================================================
RCS file: /cvs/src/sys/arch/luna88k/dev/lunafb.c,v
retrieving revision 1.29
diff -u -r1.29 lunafb.c
--- sys/arch/luna88k/dev/lunafb.c 15 Jul 2022 17:57:26 -0000 1.29
+++ sys/arch/luna88k/dev/lunafb.c 5 Aug 2022 15:11:01 -0000
@@ -260,7 +260,11 @@
return omsetcmap(sc, (struct wsdisplay_cmap *)data);
@ao-kenji
ao-kenji / obsd-luna88k-wsfb-8bpp.diff
Last active November 12, 2023 12:14
[Merged into the main tree] Work-in-progress diff for OpenBSD/luna88k 256-color X server on 8bpp framebuffer. You also need to apply small diff on luna88k/dev/lunafb.c.
Index: driver/xf86-video-wsfb/src/wsfb_driver.c
===================================================================
RCS file: /cvs/xenocara/driver/xf86-video-wsfb/src/wsfb_driver.c,v
retrieving revision 1.43
diff -u -r1.43 wsfb_driver.c
--- driver/xf86-video-wsfb/src/wsfb_driver.c 10 Nov 2022 17:38:58 -0000 1.43
+++ driver/xf86-video-wsfb/src/wsfb_driver.c 6 Jul 2023 12:34:04 -0000
@@ -114,6 +114,8 @@
static Bool WsfbCloseScreen(CLOSE_SCREEN_ARGS_DECL);
static void *WsfbWindowLinear(ScreenPtr, CARD32, CARD32, int, CARD32 *,