Skip to content

Instantly share code, notes, and snippets.

View tsutsui's full-sized avatar

Izumi Tsutsui tsutsui

View GitHub Profile
@tsutsui
tsutsui / netbsd-mvme88k-on-gxemul.log
Last active October 7, 2026 17:32
WIP NetBSD/mvme88k on patched GXemul 0.7.0
optiplex-% gxemul -e mvme187 -d liveimage-netbsd-mvme88k-raw-20261008.img netbsd-GENERIC.gz
GXemul 0.7.0 Copyright (C) 2003-2021 Anders Gavare
Read the source code and/or documentation for other Copyright messages.
net:
simulated network:
10.0.0.0/8 (max outgoing: TCP=100, UDP=100)
gateway+nameserver: 10.0.0.254 (60:50:40:30:20:10)
nameserver uses real nameserver 192.168.1.1
machine:
@tsutsui
tsutsui / How_does_ChatGPT_build_NetBSD_m88k_liveimage.md
Created October 4, 2026 17:43
ChatGPT が NetBSD/luna88k の Live Image を自分で作ってテストしだしたので作り方を訊いてみたメモ

はい。ChatGPT 側の Ubuntu 24.04.3 LTS 環境で、指定ブランチ tsutsui-luna88k の HEAD を使って作成しました。

手順は次のとおりです。

  1. tsutsui-luna88k を checkout。
  2. NetBSD の cross tools と release をビルド。
./build.sh -U -m luna88k -j8 release
@tsutsui
tsutsui / OpenBSD_m88k_Compiler_ABI_Syscall_Timeline_20261002_ja.md
Created October 3, 2026 15:20
OpenBSD/m88k compiler・ABI・syscall 年表

OpenBSD/m88k compiler・ABI・syscall 年表

調査日 2026-10-02。設計書とは別の調査資料。日付・時刻は upstream commit の UTC。対象の終点は2025-10-23の GCC4 デフォルト切替で、直後の GCC3 削除も併記する。

読み方と調査範囲

「ABI変更」は外部の呼出し規約・データ配置等の変更、「ABI追従」はその変更を別部品へ反映するもの。「修正」は不正な code generation の修正を含む。修正により既存オブジェクトとの一部組合せが変わり得ても、すべてを意図的な ABI 切替と同一視しない。kernel依存と旧バイナリ非互換も区別する。

GCC2/GCC3/GCC4 の m88k backend、m88k libc、共通 trap.c、bsd.own.mk のパス履歴は全ページを取得した。関連 header と周辺 commit を追加照合した。主表は意味のある変更を選び、付録には主要パスの取得範囲内の全 commit を残す。主表の説明は commit message を基礎とし、argument-area/syscallの中核、varargs、既定切替などは差分も照合した。全索引項目の差分を一件ずつ精査したという意味ではない。

@tsutsui
tsutsui / pkgsrc-emulators-nono-options-pulseaudio.diff
Created August 29, 2026 15:50
add options.mk for alsa and pulseaudio to pkgsrc/emulators/nono 1.8.3
diff --git a/emulators/nono/Makefile b/emulators/nono/Makefile
index 4745ebd763ff..e9b360c1719b 100644
--- a/emulators/nono/Makefile
+++ b/emulators/nono/Makefile
@@ -1,6 +1,6 @@
# $NetBSD: Makefile,v 1.70 2026/07/25 15:06:59 jun Exp $
-DISTNAME= nono-1.8.2
+DISTNAME= nono-1.8.3
CATEGORIES= emulators
@tsutsui
tsutsui / NetBSD_news68k_Keyboard_Console_Polling_Design_20260823_002.md
Last active August 22, 2026 23:18
NetBSD/news68k の既存 `wskbd(9)` console keyboard path を normal autoconfiguration 前から利用可能にする検討の設計書

NetBSD/news68k Keyboard Console Polling Design

Revision: 20260823_002
Status: Accepted — implementation authorized
Target: NetBSD/news68k keyboard console path; initial validation on NEWS1700 / NWS-1750
Date: 2026-08-23

1. 目的

本設計書は、NetBSD/news68k の既存 wskbd(9) console keyboard path を normal autoconfiguration 前から利用可能にし、consinit() 直後の DDB を含む完全な polling console input を成立させるための設計を定義する。

@tsutsui
tsutsui / FreeWnn-1.1.1-a023-gcc15.diff
Created July 9, 2026 18:18
Patch to build FreeWnn-1.1.1-a023 with gcc15 (i.e. with the default `-std=gnu23 -Werror=incompatible-pointer-types`)
diff --git a/PubdicPlus/pod.c b/PubdicPlus/pod.c
index 009daa7..315b96d 100644
--- a/PubdicPlus/pod.c
+++ b/PubdicPlus/pod.c
@@ -154,17 +154,18 @@ static struct descpack *searchdesc (Wchar *hin);
static void store_description (void);
static long internkind (Wchar *s);
static void listkinds (void);
-static int kindcompar (struct kindpack *k1, struct kindpack *k2);
+static int kindcompar (const void *k1, const void *k2);
[ 1.0000000] NetBSD/evbarm (fdt) booting ...
[ 1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
[ 1.0000000] 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013,
[ 1.0000000] 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023,
[ 1.0000000] 2024, 2025, 2026
[ 1.0000000] The NetBSD Foundation, Inc. All rights reserved.
[ 1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[ 1.0000000] The Regents of the University of California. All rights reserved.
[ 1.0000000] NetBSD 11.0_RC2 (GENERIC64_INSECURE) #6: Wed Mar 18 20:43:08 JST 2026
ok
[ 1.0000000] uboot: args 0, 0xc42, 0x2eff6a00, 0x1000040
[ 1.0000000] NetBSD/evbarm (fdt) booting ...
[ 1.0000000] FDT /memory @ 0x0 size 0x3b400000
[ 1.0000000] FDT /memory @ 0x40000000 size 0xbc000000
[ 1.0000000] initarm: memory start 0 end fc000000 (len fc000000)
[ 1.0000000] initarm: fdt_build_bootconfig
[ 1.0000000] Usable memory:
[ 1.0000000] 1000 - 3b3fffff
[ 1.0000000] 40000000 - fbffffff

以下は、あなたが挙げた 3 つの参照(デバドラ書き方・genfb_pci.c・genfb_machdep.c)の“やり方”に合わせて、ISA VGA(VESA LFB 前提)で genfb を wsdisplay フレームバッファコンソールとして使うための

  • src/sys/dev/isa/genfb_isa.c の設計書(要点)
  • 実装(KNF寄り)

を、NetBSD/x86(i386/amd64)限定としてまとめたものです。


設計書:genfb_isa の狙いと前提

@tsutsui
tsutsui / gpio_mmap_test.c
Created February 16, 2026 17:34
Raspberry Pi 3 GPIO test on NetBSD/evbarm
/*
* gpio_mmap_test.c
* Minimal Raspberry Pi GPIO test using GPIO access via /dev/mem mmap(2)
*
* Wiring:
* GPIO20 -> LED (1: on, 0: off)
*
* Build:
* cc -O2 -Wall -Wextra -o gpio_mmap_test gpio_mmap_test.c
*/