Skip to content

Instantly share code, notes, and snippets.

View tsutsui's full-sized avatar

Izumi Tsutsui tsutsui

View GitHub Profile
[ 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.cgenfb_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
*/
@tsutsui
tsutsui / NetBSD-flag-AA.diff
Created December 24, 2025 16:43
Update NetBSD flag ASCII Art in bootloaders
Index: sys/lib/libsa/bootcfg.c
===================================================================
RCS file: /cvsroot/src/sys/lib/libsa/bootcfg.c,v
retrieving revision 1.10
diff -u -p -d -r1.10 bootcfg.c
--- sys/lib/libsa/bootcfg.c 6 May 2025 18:16:12 -0000 1.10
+++ sys/lib/libsa/bootcfg.c 24 Dec 2025 16:34:02 -0000
@@ -291,11 +291,11 @@ print_bootcfg_banner(const char *bootpro
/* If the user has not specified a banner, print a default one. */
@tsutsui
tsutsui / gist:98ffed5534af93fd21bfdfee43d92187
Created December 23, 2025 12:50
HP9000/362,382 Ethernet
HP9000/362,382 Ethernet
@tsutsui
tsutsui / README.md
Last active December 7, 2025 03:31
p6psgmmlc — PC-6001 PSG音源ドライバ用 MMLコンパイラ README ドラフト

p6psgmmlc

PC-6001 PSG音源ドライバ用 MMLコンパイラ (C言語コマンドライン版)

  • 現在のバージョン: 0.1.0 (2025/12/07)
  • 更新履歴は 更新履歴 項を参照

これはなに?

よっしゅさん作の PC-6001用PSG音源ドライバ ver1.1c 向けの MMLソーステキストを、音源ドライバがそのまま演奏可能な

@tsutsui
tsutsui / remotediskd-function-specification.md
Last active December 3, 2025 23:50
CISC-NEWS NWS-1750 PROM のネットワークブート仕様に対応するサーバー側デーモンの関数実装レベルの設計書

remotediskd(8) 関数仕様(案)

0. 全体方針

  • 単一プロセス・単一スレッドのイベントループ型デーモン。

  • コマンドラインオプション → struct rdd_cliopt に詰める。

  • struct rdd_config は「現在有効な設定 + クライアント状態」をまとめて持つ。

  • シグナルハンドラは volatile sig_atomic_t フラグを立てるだけ。

    • 実際の設定リロード、終了処理はイベントループ側で行う。
@tsutsui
tsutsui / remotediskd-implementation-specification-draft.md
Created November 30, 2025 03:50
SONY NEWS、具体的には CISC-NEWS NWS-1750 の PROM のネットワークブート仕様に対応するサーバー側デーモンの設計書

remotediskd(8) 設計仕様書(最新版)

1. 概要

1.1 目的

remotediskd(8) は、Sony NEWS の PROM/ブートローダが利用する 「rd(remote disk)」プロトコル によるネットワークブートを提供するデーモンである。

  • NEWS 実機からの bo rd 等の操作に応答し、 指定されたディスクイメージファイルを「リモートディスク」として提供する。
@tsutsui
tsutsui / pmap_68k.c.diff
Created November 26, 2025 16:46
NetBSD/m68k 11.99.4 (20251126) new pmap patch for 040 (and nono 1.6.2)
Index: pmap_68k.c
===================================================================
RCS file: /cvsroot/src/sys/arch/m68k/m68k/pmap_68k.c,v
retrieving revision 1.29
diff -u -p -d -r1.29 pmap_68k.c
--- pmap_68k.c 24 Nov 2025 21:56:19 -0000 1.29
+++ pmap_68k.c 26 Nov 2025 16:44:43 -0000
@@ -1600,8 +1600,10 @@ pmap_pv_pte(struct pv_entry * const pv)
* the storage for the new PV entry.
*