buninu-linux 0.14.57 → 0.15.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSES/linux-firmware/LICENCE.nvidia +131 -0
- package/LICENSES/linux-firmware/LICENSE.amdgpu +51 -0
- package/LICENSES/linux-firmware/LICENSE.amdisp +31 -0
- package/LICENSES/linux-firmware/LICENSE.i915 +39 -0
- package/LICENSES/linux-firmware/LICENSE.radeon +51 -0
- package/LICENSES/linux-firmware/LICENSE.xe +39 -0
- package/LICENSES/linux-firmware/WHENCE +10280 -0
- package/NOTICE.md +64 -46
- package/README.md +371 -87
- package/README.zh.md +2034 -0
- package/build-image.sh +10 -1
- package/build-uki.sh +3 -1
- package/fetch-alpine.sh +14 -0
- package/graphics.md +31 -0
- package/index.js +28 -11
- package/initramfs/bin/buninu-browser +4 -1
- package/initramfs/bin/buninu-land +1 -1
- package/initramfs/bin/bunterm +3 -3
- package/initramfs/bin/chroot +13 -0
- package/initramfs/bin/chvt +11 -0
- package/initramfs/bin/mount +4 -0
- package/initramfs/bin/umount +6 -0
- package/initramfs/bin/xdg-open +33 -0
- package/initramfs/buninu/CHANGELOG.md +19 -0
- package/initramfs/buninu/apps/bunmsh/CHANGELOG.md +4 -0
- package/initramfs/buninu/apps/bunmsh/package.json +1 -1
- package/initramfs/buninu/apps/bunmsh/src/main.js +1 -1
- package/initramfs/buninu/apps/jsgotty/README.en.md +40 -0
- package/initramfs/buninu/apps/jsgotty/README.md +40 -0
- package/initramfs/buninu/apps/jsgotty/package-lock.json +2 -2
- package/initramfs/buninu/apps/jsgotty/package.json +1 -1
- package/initramfs/buninu/apps/jsgotty/static/index.html +1 -0
- package/initramfs/buninu/apps/jsgotty/static/js/gotty.js +82 -17
- package/initramfs/buninu/apps/jsgotty/static/js/kitty-keyboard.js +193 -0
- package/initramfs/buninu/apps/jsgotty/tests/android-alt.test.js +115 -0
- package/initramfs/buninu/apps/jsgotty/tests/arrow-modifiers.test.js +80 -0
- package/initramfs/buninu/apps/jsgotty/tests/kitty-keyboard-browser.test.js +53 -0
- package/initramfs/buninu/apps/jsgotty/tests/kitty-keyboard.test.js +102 -0
- package/initramfs/buninu/apps/jsgotty/tests/manual/README.md +20 -0
- package/initramfs/buninu/apps/jsgotty/tests/manual/keyboard-collector.cjs +55 -0
- package/initramfs/buninu/apps/jsgotty/tests/manual/keyboard-debug.js +74 -0
- package/initramfs/buninu/apps/jsgotty/tests/manual/kitty-keyboard.js +80 -0
- package/initramfs/buninu/package.json +1 -1
- package/initramfs/init.js +19 -3
- package/initramfs/lib/bunterm/clipboard.js +14 -0
- package/initramfs/lib/bunterm/commands.js +37 -0
- package/initramfs/lib/bunterm/fps.js +38 -0
- package/initramfs/lib/bunterm/images.js +9 -5
- package/initramfs/lib/bunterm/input.js +58 -15
- package/initramfs/lib/bunterm/keyboard.js +62 -0
- package/initramfs/lib/bunterm/keycodes.js +104 -0
- package/initramfs/lib/bunterm/kitty-keyboard.cjs +195 -0
- package/initramfs/lib/bunterm/raw-protocol.js +33 -0
- package/initramfs/lib/bunterm/renderer.js +89 -20
- package/initramfs/lib/bunterm/selection.js +60 -0
- package/initramfs/lib/bunterm/terminal.js +146 -11
- package/initramfs/lib/bunterm/vt-menu.js +181 -0
- package/initramfs/lib/bunterm/vt.js +27 -1
- package/initramfs/lib/canvas.js +99 -0
- package/initramfs/lib/chvt.js +31 -0
- package/initramfs/lib/fbdev.js +21 -3
- package/initramfs/lib/gpu.js +77 -0
- package/initramfs/lib/raw-image.js +47 -0
- package/initramfs/lib/xdg-open.js +42 -0
- package/initramfs/usr/share/doc/buninu-linux/bunterm.md +85 -11
- package/initramfs/usr/share/doc/buninu-linux/chvt.md +34 -0
- package/initramfs/usr/share/doc/buninu-linux/xdg-open.md +43 -0
- package/package.json +1 -1
- package/scripts/arch.js +7 -5
- package/scripts/arch.sh +5 -5
- package/scripts/build.js +16 -3
- package/scripts/fetch-gpu.js +105 -0
- package/scripts/fetch.js +11 -1
- package/scripts/gpu-firmware.json +22 -0
- package/scripts/modules.js +4 -1
- package/scripts/npm-packages.md +17 -17
- package/test/bunterm-fps.test.js +17 -0
- package/test/bunterm-keyboard.test.js +116 -0
- package/test/bunterm-next-vt.test.js +9 -0
- package/test/bunterm-raw-protocol.test.js +19 -0
- package/test/bunterm-renderer.test.js +158 -0
- package/test/bunterm-selection.test.js +38 -0
- package/test/bunterm-vt-menu.test.js +178 -0
- package/test/chroot-bind.test.js +40 -2
- package/test/chvt.test.js +46 -0
- package/test/fbdev-sync.test.js +33 -0
- package/test/gpu.test.js +155 -0
- package/test/image-size.test.js +17 -0
- package/test/manual-bunterm-image-paths.js +31 -0
- package/test/mount-libc-lifetime.test.js +50 -0
- package/test/no-gpu.test.js +43 -0
- package/test/readme-cli.test.js +29 -0
- package/test/stage-npm.test.js +11 -4
- package/test/xdg-open.test.js +55 -0
package/README.md
CHANGED
|
@@ -28,7 +28,10 @@
|
|
|
28
28
|
|
|
29
29
|
---
|
|
30
30
|
|
|
31
|
+
- [繁體中文](README.zh.md)
|
|
31
32
|
- [Table of contents](#contents)
|
|
33
|
+
- Terminal documentation: `bun x buninu-linux --readme` (English),
|
|
34
|
+
`bun x buninu-linux --readme-zh` or `--docs` (Traditional Chinese).
|
|
32
35
|
- .
|
|
33
36
|
- Still in the early stages
|
|
34
37
|
- [Video here](https://www.reddit.com/r/bun/comments/1wkpraj/buninu_linux_a_distro_with_bun_as_pid_1): Booted successfully on real x86-64 UEFI hardware with `--real`:
|
|
@@ -117,6 +120,20 @@ bun ./index.js -fb --real --export
|
|
|
117
120
|
This fetches the pinned Alpine/Bun/npm inputs, selects the physical-hardware
|
|
118
121
|
modules, builds `vda.img`, and exports `buninu-linux-<version>.img`.
|
|
119
122
|
|
|
123
|
+
For a smaller image, add `--no-gpu` to either build command:
|
|
124
|
+
|
|
125
|
+
```sh
|
|
126
|
+
bun x buninu-linux -fb --real --no-gpu --export
|
|
127
|
+
# From a source checkout:
|
|
128
|
+
bun ./index.js -fb --real --no-gpu --export
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
The reference x86-64 `--real` builds produce a **128 MiB** image with
|
|
132
|
+
`--no-gpu`, versus **320 MiB** with the default GPU modules and firmware.
|
|
133
|
+
This omits the optional GPU bundle while retaining the framebuffer/bunterm
|
|
134
|
+
software display path. Image size is calculated from the packaged contents
|
|
135
|
+
and may change with later versions.
|
|
136
|
+
|
|
120
137
|
#### Write the image to a USB drive
|
|
121
138
|
|
|
122
139
|
The recommended method is **Ventoy**: install it on the USB drive once using
|
|
@@ -197,7 +214,7 @@ display and USB keyboard with a welcome ending like this:
|
|
|
197
214
|
Welcome to Buninu Linux!
|
|
198
215
|
Bun 1.4.2 is now PID 1
|
|
199
216
|
Type start() to run buninu --local
|
|
200
|
-
Configuration getters: cfg.all, cfg.disk, cfg.net, cfg.power, cfg.sound
|
|
217
|
+
Configuration getters: cfg.all, cfg.disk, cfg.net, cfg.power, cfg.sound, cfg.gpu
|
|
201
218
|
|
|
202
219
|
bun-repl>
|
|
203
220
|
```
|
|
@@ -326,9 +343,8 @@ toolchain (including `binutils-aarch64-linux-gnu` for aarch64), or set
|
|
|
326
343
|
|
|
327
344
|
`start()` in the serial REPL, then `bunterm 2` opens bunterm on VT 2 in the
|
|
328
345
|
QEMU window and returns to the serial shell; type into the window. The
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
detached (see [Multiple virtual consoles with bunterm](#multiple-virtual-consoles-with-bunterm)). The
|
|
346
|
+
bare `bunterm` also defaults to VT 2, leaving VT 1 available for hardware
|
|
347
|
+
setup. Using a VT other than the active one starts it detached (see [Multiple virtual consoles with bunterm](#multiple-virtual-consoles-with-bunterm)). The
|
|
332
348
|
firmware sets up ramfb at 800×600, and `init.js` loads `simpledrm` so it
|
|
333
349
|
becomes `/dev/fb0` (see [graphics.md](graphics.md#trying-it)).
|
|
334
350
|
* `--export` writes `buninu-linux-<version>-aarch64.img`.
|
|
@@ -414,6 +430,120 @@ mount -fv /dev/sda1 /mnt
|
|
|
414
430
|
|
|
415
431
|
Run `poweroff` for a synced shutdown.
|
|
416
432
|
|
|
433
|
+
### Using bunterm
|
|
434
|
+
|
|
435
|
+
Click the FPS button on the right of the bunterm menu title to toggle a cyan counter at the top-right of the terminal. It reports newly presented Kitty image frames per second (such as Casty/Land output), sampled once per second; mouse/menu redraws are excluded. Static images and text-only sessions show 0 FPS. The setting is local to this bunterm session and defaults off.
|
|
436
|
+
|
|
437
|
+
Native bunterm advertises its preferred raw pixel format from the framebuffer bitfields: BGRA or RGBA for supported 32-bit layouts, otherwise PNG. Updated Casty, buninu-browser and Land negotiate this automatically over shared-file Kitty transport; BGRA uses the private format `f=1111970369`, RGBA uses standard `f=32`. Other terminals and jsgotty retain their existing protocol.
|
|
438
|
+
|
|
439
|
+
To inspect the current picture path in Casty, press `Ctrl-E`, type `kitty`,
|
|
440
|
+
and press Enter. In Land, click **@** instead to open the command line.
|
|
441
|
+
For example, `Kitty: file · format=bgra` reports shared-file raw frames;
|
|
442
|
+
`rgba` is also raw, while PNG/JPEG indicate encoded images. Raw is negotiated
|
|
443
|
+
automatically with supported local peers; no extra launch flag is needed.
|
|
444
|
+
The bunterm FPS counter measures presented images, not a client's rendering FPS.
|
|
445
|
+
|
|
446
|
+
`bunterm` is the graphical terminal on the Linux framebuffer. It displays CJK
|
|
447
|
+
text, colour emoji and Kitty graphics without starting X11 or Wayland. On the
|
|
448
|
+
real-hardware image, enter the shell with `start()` at the `bun-repl>` prompt,
|
|
449
|
+
then run:
|
|
450
|
+
|
|
451
|
+
```sh
|
|
452
|
+
bunterm # open a new VT after the last session; first is tty2
|
|
453
|
+
bunterm 3 -s 16 # another session, with a 16 px font (default: 13)
|
|
454
|
+
# Alternatively, start a specific application on an unused VT:
|
|
455
|
+
bunterm 4 -e jsmdcui --allow-url README.md
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
To open a web URL or an existing local file in a new browser terminal:
|
|
459
|
+
|
|
460
|
+
```sh
|
|
461
|
+
xdg-open https://buninu.org
|
|
462
|
+
xdg-open "./page with spaces.html"
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
`xdg-open` runs `bunterm -e buninu-browser URL` on a new VT. HTTP/HTTPS URLs
|
|
466
|
+
and `about:` URLs open directly; local paths and `file://` URLs are resolved to existing regular
|
|
467
|
+
files and encoded as absolute file URLs. Directories and other URL schemes
|
|
468
|
+
are not supported. Run `xdg-open --help` for usage.
|
|
469
|
+
|
|
470
|
+
Use `Ctrl+Alt+F1` to return to the initial console, `Ctrl+Alt+F2` to return to
|
|
471
|
+
VT 2, or `Alt+Left` / `Alt+Right` to switch VTs. From a shell, `chvt 1` and
|
|
472
|
+
`chvt 2` do the same. Switching preserves the running sessions; exiting a
|
|
473
|
+
session's shell or application ends that bunterm.
|
|
474
|
+
|
|
475
|
+
Click the screen's top-left **2×2 pixels** to open its menu:
|
|
476
|
+
|
|
477
|
+
| Control | Usage |
|
|
478
|
+
| --- | --- |
|
|
479
|
+
| 🔤 Font − / + | Resize the current session's text and terminal grid. The size is centred between the buttons. |
|
|
480
|
+
| 📋 Copy | Left-drag to select terminal text, then copy it to the shared xclip clipboard. Selection is available only when the application has not enabled mouse reporting. |
|
|
481
|
+
| 📥 Paste | Paste from xclip. Applications that enable bracketed paste receive its delimiters; other applications receive plain text. |
|
|
482
|
+
| Command input | Click the light input field or press Tab. Type `font 16`, `font +`, `font -`, `copy`, `paste`, `vt 2` or `help`, then press Enter. These are local bunterm commands. |
|
|
483
|
+
| VT list | Switch to an existing bunterm or the initial tty. The active VT is marked `(current)`. |
|
|
484
|
+
| + New bunterm | Start bunterm on the tty after the highest listed number, using the current font size. |
|
|
485
|
+
|
|
486
|
+
Press Esc to close the menu. Font changes last for the current session.
|
|
487
|
+
The mouse wheel scrolls terminal history when the application does not request
|
|
488
|
+
mouse events. `--no-mouse` disables mouse input and the menu;
|
|
489
|
+
`--no-clipboard` disables both menu clipboard actions and OSC 52.
|
|
490
|
+
See [Clipboard](#clipboard) for sharing text between applications.
|
|
491
|
+
|
|
492
|
+
**Kitty keyboard:** applications can negotiate flags **1, 2 and 8**, using the
|
|
493
|
+
same encoder as jsgotty, to distinguish Ctrl/Alt/Shift/Super combinations and
|
|
494
|
+
request press, repeat and release events. No launch flag is needed. Ordinary
|
|
495
|
+
applications retain the console's translated input; the original keyboard mode is restored
|
|
496
|
+
when the application disables Kitty or bunterm exits. VT-switching shortcuts stay
|
|
497
|
+
reserved. Dead-key/Compose sequences are not yet implemented in Kitty mode.
|
|
498
|
+
Use `bunterm --help` for full options and keyboard details.
|
|
499
|
+
|
|
500
|
+
### Using Bun Modern Shell
|
|
501
|
+
|
|
502
|
+
bunmsh is the dependency-free, mksh-inspired shell bundled with Buninu. Its
|
|
503
|
+
main features are:
|
|
504
|
+
|
|
505
|
+
- Lines beginning with `Bun.*` run as JavaScript; returned values are printed
|
|
506
|
+
and promises are awaited automatically. Use `Bun.e;` or `Bun.e,` for
|
|
507
|
+
arbitrary JavaScript.
|
|
508
|
+
- Lightweight cwd tabs keep several working directories ready. In bunmsh,
|
|
509
|
+
`Ctrl-T` creates or cycles right through tabs, while `Alt-T` cycles left.
|
|
510
|
+
* Also useful cmds: `tab n`, `tab c`(Alt-C)
|
|
511
|
+
- Shell variables and JavaScript share a live variable table by `$.`, and `Bun.sha`
|
|
512
|
+
can retain JavaScript values across commands and cwd tabs.
|
|
513
|
+
- Saved history, Bash/Fish history import, completions, and ghost suggestions
|
|
514
|
+
are available interactively.
|
|
515
|
+
- `serve [directory]` starts a browsable HTTP file server. Together with
|
|
516
|
+
Android USB tethering, it provides a simple way to transfer files between
|
|
517
|
+
Buninu Linux and the connected phone.
|
|
518
|
+
- Cross-platform builtins and PATH-fallback commands.
|
|
519
|
+
- `Ctrl-U` removes and saves the text before the cursor; press it again at the
|
|
520
|
+
beginning of the line to restore it. `Ctrl-K` independently toggles the text
|
|
521
|
+
after the cursor when at the end of the line.
|
|
522
|
+
- Unquoted pathname patterns use `Bun.Glob` and follow directory symbolic
|
|
523
|
+
links used as intermediate path components, as traditional shells do. This
|
|
524
|
+
matters for sysfs, where class entries are normally links. For example:
|
|
525
|
+
|
|
526
|
+
```sh
|
|
527
|
+
ls /sys/class/net/*/device
|
|
528
|
+
```
|
|
529
|
+
|
|
530
|
+
For a readable process overview, run:
|
|
531
|
+
|
|
532
|
+
```sh
|
|
533
|
+
pspac
|
|
534
|
+
|
|
535
|
+
# Kernel threads show as [name]; filter them out to see only userspace
|
|
536
|
+
pspac | grep -v '\[[a-z]'
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
`pspac` shows the real `PID COMMAND` process table and highlights each command
|
|
540
|
+
line as shell syntax with micro's Monokai colours. Leading directories are
|
|
541
|
+
dimmed so the program name stands out. Use `pspa` for the same table as plain
|
|
542
|
+
text.
|
|
543
|
+
|
|
544
|
+
See the [bunmsh repository](https://github.com/jjtseng93/bunmsh) for its full
|
|
545
|
+
syntax, interactive controls, builtins, and current compatibility details.
|
|
546
|
+
|
|
417
547
|
### Editor quick start
|
|
418
548
|
|
|
419
549
|
The bundled `jmi` terminal editor works without a network connection:
|
|
@@ -457,7 +587,7 @@ If `Enter` is not recognized in a particular terminal, try `Ctrl-J` or
|
|
|
457
587
|
|
|
458
588
|
Run a separate `bunterm` on each Linux virtual console. A numeric positional
|
|
459
589
|
argument is a short form of the corresponding device, so `bunterm 2` means
|
|
460
|
-
`bunterm /dev/tty2
|
|
590
|
+
`bunterm /dev/tty2`. Omitting the argument opens a new VT after the last known session (tty2 initially):
|
|
461
591
|
|
|
462
592
|
```sh
|
|
463
593
|
bunterm 2
|
|
@@ -506,53 +636,6 @@ terminal panes, it creates a new editor tab instead of wrapping back to the
|
|
|
506
636
|
first terminal tab. In every other case it performs the normal next-tab cycle.
|
|
507
637
|
Use `Esc` only when you actually want to close the current terminal pane.
|
|
508
638
|
|
|
509
|
-
### Using Bun Modern Shell
|
|
510
|
-
|
|
511
|
-
bunmsh is the dependency-free, mksh-inspired shell bundled with Buninu. Its
|
|
512
|
-
main features are:
|
|
513
|
-
|
|
514
|
-
- Lines beginning with `Bun.*` run as JavaScript; returned values are printed
|
|
515
|
-
and promises are awaited automatically. Use `Bun.e;` or `Bun.e,` for
|
|
516
|
-
arbitrary JavaScript.
|
|
517
|
-
- Lightweight cwd tabs keep several working directories ready. In bunmsh,
|
|
518
|
-
`Ctrl-T` creates or cycles right through tabs, while `Alt-T` cycles left.
|
|
519
|
-
* Also useful cmds: `tab n`, `tab c`(Alt-C)
|
|
520
|
-
- Shell variables and JavaScript share a live variable table by `$.`, and `Bun.sha`
|
|
521
|
-
can retain JavaScript values across commands and cwd tabs.
|
|
522
|
-
- Saved history, Bash/Fish history import, completions, and ghost suggestions
|
|
523
|
-
are available interactively.
|
|
524
|
-
- `serve [directory]` starts a browsable HTTP file server. Together with
|
|
525
|
-
Android USB tethering, it provides a simple way to transfer files between
|
|
526
|
-
Buninu Linux and the connected phone.
|
|
527
|
-
- Cross-platform builtins and PATH-fallback commands.
|
|
528
|
-
- `Ctrl-U` removes and saves the text before the cursor; press it again at the
|
|
529
|
-
beginning of the line to restore it. `Ctrl-K` independently toggles the text
|
|
530
|
-
after the cursor when at the end of the line.
|
|
531
|
-
- Unquoted pathname patterns use `Bun.Glob` and follow directory symbolic
|
|
532
|
-
links used as intermediate path components, as traditional shells do. This
|
|
533
|
-
matters for sysfs, where class entries are normally links. For example:
|
|
534
|
-
|
|
535
|
-
```sh
|
|
536
|
-
ls /sys/class/net/*/device
|
|
537
|
-
```
|
|
538
|
-
|
|
539
|
-
For a readable process overview, run:
|
|
540
|
-
|
|
541
|
-
```sh
|
|
542
|
-
pspac
|
|
543
|
-
|
|
544
|
-
# Kernel threads show as [name]; filter them out to see only userspace
|
|
545
|
-
pspac | grep -v '\[[a-z]'
|
|
546
|
-
```
|
|
547
|
-
|
|
548
|
-
`pspac` shows the real `PID COMMAND` process table and highlights each command
|
|
549
|
-
line as shell syntax with micro's Monokai colours. Leading directories are
|
|
550
|
-
dimmed so the program name stands out. Use `pspa` for the same table as plain
|
|
551
|
-
text.
|
|
552
|
-
|
|
553
|
-
See the [bunmsh repository](https://github.com/jjtseng93/bunmsh) for its full
|
|
554
|
-
syntax, interactive controls, builtins, and current compatibility details.
|
|
555
|
-
|
|
556
639
|
### Showing images
|
|
557
640
|
|
|
558
641
|
The Linux text console cannot draw pictures, so first start `bunterm`, the
|
|
@@ -597,7 +680,20 @@ aarch64 guest also needs a QEMU display; see
|
|
|
597
680
|
passes every copy and paste to Buninu's `xclip -selection clipboard`. For
|
|
598
681
|
now that clipboard is a file, `$HOME/.xclip.clipboard`, read and written in
|
|
599
682
|
the ramdisk, so all bunterm sessions share it and it is gone after a reboot.
|
|
600
|
-
|
|
683
|
+
Left-drag selects text only when the application has not enabled mouse reporting.
|
|
684
|
+
Click the top-left **2×2 pixels** for **Copy / Paste**, **font − / +**, the VT
|
|
685
|
+
list and a local command field (`font 16`, `copy`, `paste`, `vt 2`, `help`).
|
|
686
|
+
Paste uses bracketed paste when the application requests it.
|
|
687
|
+
`bunterm --no-clipboard` disables both OSC 52 and menu clipboard actions.
|
|
688
|
+
|
|
689
|
+
See [Using bunterm](#using-bunterm) for the menu and Kitty keyboard support.
|
|
690
|
+
|
|
691
|
+
In `buninu-browser`, a website's Copy button can write text through
|
|
692
|
+
`navigator.clipboard.writeText()` after a user click or key press on HTTPS
|
|
693
|
+
or localhost. The browser controller prefers `xclip -selection clipboard`,
|
|
694
|
+
so copied text reaches the same clipboard used by bunterm and jsmdcui.
|
|
695
|
+
If no clipboard provider is available, the operation reports failure.
|
|
696
|
+
This is separate from selecting text and copying it with Casty's shortcuts.
|
|
601
697
|
|
|
602
698
|
For Chinese input, run the pinyin input method
|
|
603
699
|
[jspinyin](https://www.npmjs.com/package/@drxiaozhi/jspinyin) in a bunterm
|
|
@@ -613,6 +709,11 @@ jspinyin
|
|
|
613
709
|
OSC 52, and `Ctrl-V` pastes it in jsmdcui or jspinyin, since jsmdcui reads
|
|
614
710
|
from `xclip` first by default.
|
|
615
711
|
|
|
712
|
+
jspinyin also has **Clear / Restore** buttons. Clear saves the current result
|
|
713
|
+
before emptying it; Restore appends that saved text to the end of the result.
|
|
714
|
+
Restoring keeps the saved text, so repeated clicks can append it repeatedly.
|
|
715
|
+
The input panel's help link explains candidate selection and other controls.
|
|
716
|
+
|
|
616
717
|
### Playing YouTube with sound (experimental)
|
|
617
718
|
|
|
618
719
|
[jspulse](https://github.com/jjtseng93/jspulse), now a built-in, is a
|
|
@@ -646,23 +747,47 @@ chroot shell on tty2. `bun x` needs network access; see
|
|
|
646
747
|
bunterm 3
|
|
647
748
|
```
|
|
648
749
|
|
|
649
|
-
3. **
|
|
650
|
-
|
|
651
|
-
|
|
750
|
+
3. **Identify the sound card, set its volume, then test playback.** First
|
|
751
|
+
list the ALSA cards and their mixer controls:
|
|
752
|
+
|
|
753
|
+
```sh
|
|
754
|
+
jspulse --audio-info
|
|
755
|
+
```
|
|
756
|
+
|
|
757
|
+
For built-in speakers or headphones plugged into the computer's audio
|
|
758
|
+
jack, choose the **onboard analog audio** card. In the example with
|
|
759
|
+
card 0 **HDA Intel HDMI**, card 1 **HDA Intel PCH**, and card 2
|
|
760
|
+
**HDA NVIDIA**, try **card 1 (HDA Intel PCH)** first. Controls named
|
|
761
|
+
`Speaker Playback`, `Headphone Playback`, `PCM Playback`, or
|
|
762
|
+
`Master Playback` are useful clues for this output.
|
|
763
|
+
|
|
764
|
+
Choose an **HDMI/DisplayPort** card instead when you want sound from a
|
|
765
|
+
monitor or TV connected through that GPU. Intel HDMI and NVIDIA audio
|
|
766
|
+
do not normally feed the computer's analog headphone jack. A USB headset
|
|
767
|
+
or USB sound card should use its own USB audio card.
|
|
768
|
+
|
|
769
|
+
Card numbers vary by machine; replace `1` below with the card connected
|
|
770
|
+
to your intended output, then use the test tone to check it.
|
|
652
771
|
|
|
653
772
|
```sh
|
|
654
|
-
jspulse --volume 50
|
|
655
|
-
jspulse --play
|
|
773
|
+
jspulse --card 1 --volume 50
|
|
774
|
+
jspulse --card 1 --play
|
|
656
775
|
```
|
|
657
776
|
|
|
658
|
-
|
|
659
|
-
|
|
777
|
+
Setting a supported playback volume also unmutes its corresponding switch.
|
|
778
|
+
HDMI cards may have no hardware playback volume control; in that case skip
|
|
779
|
+
`--volume` and adjust the connected monitor/TV volume. This does not by
|
|
780
|
+
itself mean HDMI playback is unavailable. The test tone checks the selected
|
|
781
|
+
output; adjust the volume as needed.
|
|
782
|
+
|
|
783
|
+
4. **Start the sound server on the same card.** It keeps running in the
|
|
784
|
+
foreground, so leave this terminal as it is; `Ctrl+C` stops it:
|
|
660
785
|
|
|
661
786
|
```sh
|
|
662
|
-
jspulse --alsa
|
|
663
|
-
|
|
787
|
+
jspulse --alsa --card 1
|
|
788
|
+
|
|
664
789
|
# or start in the background
|
|
665
|
-
jspulse --alsa &
|
|
790
|
+
jspulse --alsa --card 1 &
|
|
666
791
|
```
|
|
667
792
|
|
|
668
793
|
5. **Start casty with sound.** Press `Ctrl+Alt+F2` to return to the chroot
|
|
@@ -689,6 +814,45 @@ chroot shell on tty2. `bun x` needs network access; see
|
|
|
689
814
|
If there is no sound, check step 4's terminal for errors, and make sure
|
|
690
815
|
`PULSE_SERVER` was exported in the same shell that started casty.
|
|
691
816
|
|
|
817
|
+
### Data and persistence
|
|
818
|
+
|
|
819
|
+
Buninu Linux runs from an in-memory initramfs. Changes to the default home
|
|
820
|
+
directory (`/buninu`), system configuration, and packages installed during a
|
|
821
|
+
session disappear after reboot unless saved to a mounted disk. `/tmp` is also
|
|
822
|
+
temporary. The boot image does not automatically save these changes back to
|
|
823
|
+
itself, and creating a directory under `/mnt` alone does not make it persistent.
|
|
824
|
+
|
|
825
|
+
To keep files, load storage drivers at the initial `bun-repl>` prompt, then
|
|
826
|
+
enter the shell:
|
|
827
|
+
|
|
828
|
+
```js
|
|
829
|
+
cfg.disk
|
|
830
|
+
start()
|
|
831
|
+
```
|
|
832
|
+
|
|
833
|
+
Mount an existing data partition (replace `/dev/sda1` with your partition),
|
|
834
|
+
then save or copy files into it:
|
|
835
|
+
|
|
836
|
+
```sh
|
|
837
|
+
mount /dev/sda1 /mnt/data --mkdir
|
|
838
|
+
mkdir -p /mnt/data/work
|
|
839
|
+
cp /buninu/notes.md /mnt/data/work/notes.md
|
|
840
|
+
cd /mnt/data/work
|
|
841
|
+
```
|
|
842
|
+
|
|
843
|
+
The copy example assumes you have already created `/buninu/notes.md`. Files
|
|
844
|
+
written under `/mnt/data` while the partition is mounted remain on that disk.
|
|
845
|
+
After reboot, mount the same partition again to access them. This does not
|
|
846
|
+
automatically restore your home directory, installed packages, or system settings.
|
|
847
|
+
|
|
848
|
+
Before unplugging the disk, close programs using it, leave its directories,
|
|
849
|
+
and unmount it successfully:
|
|
850
|
+
|
|
851
|
+
```sh
|
|
852
|
+
cd /
|
|
853
|
+
umount /mnt/data
|
|
854
|
+
```
|
|
855
|
+
|
|
692
856
|
## Commands inside /bin
|
|
693
857
|
|
|
694
858
|
| command | does | manual |
|
|
@@ -705,6 +869,8 @@ If there is no sound, check step 4's terminal for errors, and make sure
|
|
|
705
869
|
| `ping` | IPv4 ICMP / IPv6 ICMPv6 echo via Bun FFI; count, interval, timeout, deadline, payload size, TTL and source selection | `ping --help` |
|
|
706
870
|
| `ps` | composable process fields from `/proc`; also exports its snapshot and single-row formatter for other commands | `ps --help` |
|
|
707
871
|
| `top` | periodically refreshes the process snapshot and rows supplied by `ps` | `top --help` |
|
|
872
|
+
| `xdg-open` | open HTTP/HTTPS, `about:`, or an existing local file in buninu-browser on a new bunterm VT | `xdg-open --help` |
|
|
873
|
+
| `chvt` | Switch Linux VTs (`chvt 1` / `chvt 2`), including switching away from and back to bunterm | `chvt --help` |
|
|
708
874
|
| `poweroff` | sync pending writes and power off through the Linux reboot system call | `poweroff --help` |
|
|
709
875
|
| `reboot` | sync pending writes and restart through the shared Linux reboot logic | `reboot --help` |
|
|
710
876
|
| `tar` | create, extract, or list tar archives with gzip and zstd compression through `Bun.Archive` | `tar --help` |
|
|
@@ -755,6 +921,17 @@ REPL, then run `jspulse --alsa` in another terminal or use `jspulse --alsa &` to
|
|
|
755
921
|
buninu-browser about:audio
|
|
756
922
|
```
|
|
757
923
|
|
|
924
|
+
For a trusted test website with a self-signed HTTPS certificate, disable
|
|
925
|
+
certificate verification for that invocation only:
|
|
926
|
+
|
|
927
|
+
```sh
|
|
928
|
+
env NODE_TLS_REJECT_UNAUTHORIZED=0 buninu-browser https://localhost:8443
|
|
929
|
+
```
|
|
930
|
+
|
|
931
|
+
This also disables verification for other requests made by that process and
|
|
932
|
+
its inherited child processes. Avoid exporting it globally; verification
|
|
933
|
+
remains enabled when this override is absent.
|
|
934
|
+
|
|
758
935
|
### Buninu Land (early-stage, experimental)
|
|
759
936
|
|
|
760
937
|
Run `buninu-land` inside `bunterm` (or another Kitty-graphics terminal) to
|
|
@@ -765,6 +942,49 @@ requires no npm download.
|
|
|
765
942
|
buninu-land
|
|
766
943
|
```
|
|
767
944
|
|
|
945
|
+
The launcher enables Casty's `--no-shortcuts`: page keys go to Land and its
|
|
946
|
+
clients instead of triggering Casty shortcuts. To quit the frontend, click
|
|
947
|
+
**@** at the left of the address bar, type `q`, and press Enter. Clicking the
|
|
948
|
+
address itself edits it; the bar displays the actual Wayland socket path.
|
|
949
|
+
|
|
950
|
+
With the bundled Casty inside bunterm or a Kitty-keyboard-capable jsgotty,
|
|
951
|
+
Super combinations and key releases are forwarded automatically:
|
|
952
|
+
|
|
953
|
+
| Shortcut | Action |
|
|
954
|
+
| --- | --- |
|
|
955
|
+
| Super+Arrow | Focus a window in that direction |
|
|
956
|
+
| Super+W / Super+Q | Ask the focused window to close |
|
|
957
|
+
| Super+F | Toggle fullscreen |
|
|
958
|
+
| Super+T | Toggle floating/tiling |
|
|
959
|
+
| Super+Alt+F | Toggle maximization on Land's single output |
|
|
960
|
+
| Super+Shift+Arrow | Swap with a tiled window in that direction |
|
|
961
|
+
| Alt+Tab / Alt+Shift+Tab | Cycle forward/backward through windows |
|
|
962
|
+
| Super+1–9 | Switch workspace |
|
|
963
|
+
| Super+Shift+1–9 | Move the focused window to that workspace and follow it |
|
|
964
|
+
| Super+- / Super+= | Shrink/grow horizontally; add Shift for vertically |
|
|
965
|
+
|
|
966
|
+
Resize increments are 100 logical pixels; add Alt for 25 or Ctrl for 300.
|
|
967
|
+
Tiled windows change the split ratio. These are the implemented window actions,
|
|
968
|
+
not the complete Omarchy desktop. Legacy terminals cannot reliably send Super;
|
|
969
|
+
Ctrl+Alt combinations now pass through to clients rather than acting as aliases.
|
|
970
|
+
|
|
971
|
+
**Client GPU acceleration:** first run `cfg.gpu` in the initial REPL before
|
|
972
|
+
opening bunterm (see [Optional client GPU acceleration](#optional-client-gpu-acceleration-cfggpu)).
|
|
973
|
+
Then run Land in bunterm with the render node for the GPU you want to advertise:
|
|
974
|
+
|
|
975
|
+
```sh
|
|
976
|
+
buninu-land -- --gpu=/dev/dri/renderD128
|
|
977
|
+
```
|
|
978
|
+
|
|
979
|
+
Replace that example node with the actual one; numbering can change at boot.
|
|
980
|
+
The client environment still needs working Mesa drivers and access to the same
|
|
981
|
+
render node. Clients in a chroot also need access to Land's Wayland socket.
|
|
982
|
+
The preset enables linear DMA-BUF import, deferred capture and 2 ms polling.
|
|
983
|
+
Bare `--gpu` enables the preset without selecting a DRM device. Land itself
|
|
984
|
+
still composites in software; only client rendering can use the GPU.
|
|
985
|
+
Driver support is limited: the tested Intel path worked, but the tested Nouveau
|
|
986
|
+
path produced blank/corrupt images. This does not guarantee NVIDIA support.
|
|
987
|
+
|
|
768
988
|
The socket directory defaults to `$TMPDIR`, or the system temporary directory
|
|
769
989
|
if `TMPDIR` is unset; an explicitly set `XDG_RUNTIME_DIR` takes precedence.
|
|
770
990
|
No environment setup is needed to launch the compositor.
|
|
@@ -1124,7 +1344,7 @@ firmware console and waits; press any key to return to the firmware interface.
|
|
|
1124
1344
|
|
|
1125
1345
|
`build-image.sh` is shared with [Section 2](#2-buninu-linux-bun-as-pid-1) — see [Disk layout](#disk-layout).
|
|
1126
1346
|
|
|
1127
|
-
### 2. Buninu Linux
|
|
1347
|
+
### 2. Buninu Linux: Bun as PID 1
|
|
1128
1348
|
|
|
1129
1349
|
An unsigned x64 Unified Kernel Image assembled from official Alpine packages,
|
|
1130
1350
|
with Bun as the init process, replaces the hello-world application:
|
|
@@ -1195,7 +1415,7 @@ initramfs/ init.js, commands, userspace: the same for every archi
|
|
|
1195
1415
|
native/<arch>/ musl and the GCC runtime (committed); bun and modules (fetched)
|
|
1196
1416
|
```
|
|
1197
1417
|
|
|
1198
|
-
The `--real` inputs are Alpine v3.24 `linux-lts-6.18.
|
|
1418
|
+
The `--real` inputs are Alpine v3.24 `linux-lts-6.18.58-r0`, musl `1.2.6-r2`,
|
|
1199
1419
|
`systemd-efistub-260.2-r0`, `libstdc++`/`libgcc` `15.2.0-r5`, and Bun 1.4.2
|
|
1200
1420
|
`linux-x64-musl-baseline`. The aarch64 guest uses the same versions from
|
|
1201
1421
|
Alpine's aarch64 repository and Bun's `linux-aarch64-musl`. There is no BusyBox
|
|
@@ -1209,15 +1429,11 @@ tampered with is fetched again and has to pass the same hash before a script
|
|
|
1209
1429
|
extracts from it. Bumping a version changes both the file name and the hash, so
|
|
1210
1430
|
it always refetches.
|
|
1211
1431
|
|
|
1212
|
-
The five application packages are pinned
|
|
1213
|
-
`scripts/npm-packages.md
|
|
1214
|
-
|
|
1215
|
-
`@drxiaozhi/jspinyin@0.1.1`. These were npm's `latest` versions when checked
|
|
1216
|
-
on 2026-10-11, with buninu-browser updated on 2026-10-12, and
|
|
1217
|
-
casty 1.3.7 and buninu-land 0.1.3 verified on 2026-10-16;
|
|
1218
|
-
fetch never resolves `latest` or a version range at runtime.
|
|
1432
|
+
The five application packages and their exact versions are pinned in
|
|
1433
|
+
[`scripts/npm-packages.md`](scripts/npm-packages.md), the authoritative list
|
|
1434
|
+
for this image. Fetch never resolves `latest` or a version range at runtime.
|
|
1219
1435
|
Each registry tarball was checked against its published SHA-512 integrity
|
|
1220
|
-
before its SHA-256 was recorded in
|
|
1436
|
+
before its SHA-256 was recorded in that shared pins file.
|
|
1221
1437
|
|
|
1222
1438
|
The manifest uses fixed YAML-compatible blocks: a double-quoted
|
|
1223
1439
|
`"package@version":` header, followed by two ` - ` lines containing the
|
|
@@ -1346,7 +1562,9 @@ LBA 2048..262110 ESP, FAT32 "EFIBOOT", type GUID C12A7328-F81F-11D2-BA4B-00A0C
|
|
|
1346
1562
|
LBA 262111.. backup GPT
|
|
1347
1563
|
```
|
|
1348
1564
|
|
|
1349
|
-
128 MiB sparse,
|
|
1565
|
+
At least 128 MiB sparse, growing automatically with the EFI payload (64 MiB
|
|
1566
|
+
increments, with room for FAT metadata and free space), 1 MiB-aligned, with
|
|
1567
|
+
34 sectors reserved at the end for the
|
|
1350
1568
|
backup GPT. `EFI/BOOT/BOOTX64.EFI` and `EFI/BOOT/BOOTAA64.EFI` are the
|
|
1351
1569
|
architecture-specific removable-media fallback paths, so matching firmware
|
|
1352
1570
|
runs the one present in the image without any NVRAM boot entry.
|
|
@@ -1359,7 +1577,7 @@ The physical boot chain is firmware → the UKI stub → its embedded
|
|
|
1359
1577
|
and, with the currently pinned kernel, embeds this complete command line:
|
|
1360
1578
|
|
|
1361
1579
|
```text
|
|
1362
|
-
console=ttyS0,115200 console=tty0 REAL_MACHINE=1 panic=0 PATH=/bin KERNEL_RELEASE=6.18.
|
|
1580
|
+
console=ttyS0,115200 console=tty0 REAL_MACHINE=1 panic=0 PATH=/bin KERNEL_RELEASE=6.18.58-0-lts rdinit=/bin/bun -- -e import('/init.js')
|
|
1363
1581
|
```
|
|
1364
1582
|
|
|
1365
1583
|
Serial kernel logging is retained, while the final console makes
|
|
@@ -1383,7 +1601,7 @@ the same way). Build without `--real`; this selects Alpine `linux-virt`, omits t
|
|
|
1383
1601
|
module set, and puts `ttyS0` last so serial stdio owns `/dev/console`:
|
|
1384
1602
|
|
|
1385
1603
|
```text
|
|
1386
|
-
console=tty0 console=ttyS0,115200 panic=0 PATH=/bin KERNEL_RELEASE=6.18.
|
|
1604
|
+
console=tty0 console=ttyS0,115200 panic=0 PATH=/bin KERNEL_RELEASE=6.18.58-0-virt rdinit=/bin/bun -- -e import('/init.js')
|
|
1387
1605
|
```
|
|
1388
1606
|
|
|
1389
1607
|
Build and boot it with:
|
|
@@ -1500,7 +1718,7 @@ The default `--real` image embeds this kernel command line (shown for the
|
|
|
1500
1718
|
currently pinned LTS release):
|
|
1501
1719
|
|
|
1502
1720
|
```text
|
|
1503
|
-
console=ttyS0,115200 console=tty0 REAL_MACHINE=1 panic=0 PATH=/bin KERNEL_RELEASE=6.18.
|
|
1721
|
+
console=ttyS0,115200 console=tty0 REAL_MACHINE=1 panic=0 PATH=/bin KERNEL_RELEASE=6.18.58-0-lts rdinit=/bin/bun -- -e import('/init.js')
|
|
1504
1722
|
```
|
|
1505
1723
|
|
|
1506
1724
|
The physical display (`tty0`) is the final console and therefore owns PID 1's
|
|
@@ -1597,20 +1815,21 @@ seconds. Leases do not renew automatically. For manual static configuration,
|
|
|
1597
1815
|
see [Basic configuration](#basic-configuration).
|
|
1598
1816
|
|
|
1599
1817
|
On a `--real` image the REPL also offers the getter-based `cfg` namespace:
|
|
1600
|
-
`cfg.net`, `cfg.disk`, `cfg.power`, `cfg.sound` and `cfg.all` run as soon as the property is read, without
|
|
1818
|
+
`cfg.net`, `cfg.disk`, `cfg.power`, `cfg.sound`, `cfg.gpu` and `cfg.all` run as soon as the property is read, without
|
|
1601
1819
|
parentheses. `cfg.net` loads every packaged network module (including PHY and bus support),
|
|
1602
1820
|
then reads the `modalias` of every PCI and USB network device, matches it
|
|
1603
1821
|
against the `pci:`/`usb:` lines
|
|
1604
1822
|
`fetch-alpine.sh` kept in `modules.alias` and lists the interfaces. `cfg.disk`
|
|
1605
1823
|
loads the packaged SATA/PATA/SCSI, NVMe/VMD and USB storage stacks so
|
|
1606
1824
|
their disks and partitions appear in `/dev`, then lists `/sys/class/block`. `cfg.all`
|
|
1607
|
-
|
|
1825
|
+
attempts every packaged module **except GPU modules** and recursively loads its
|
|
1608
1826
|
declared dependencies. `--real` ships Intel `e1000`/`e1000e`/`igb`/`igc`,
|
|
1609
1827
|
Realtek `r8169`, Atheros `alx`, Broadcom `tg3`, common USB dongles, and
|
|
1610
1828
|
`rndis_host`/`cdc_ether`/`cdc_ncm`/`cdc_eem`/`cdc_subset`/`zaurus` for Android
|
|
1611
1829
|
USB tethering. `cfg.net` unconditionally attempts all of these packaged
|
|
1612
1830
|
network modules. `cfg.sound` likewise unconditionally attempts every packaged
|
|
1613
1831
|
module below `kernel/sound/`, then lists `/dev/snd`; it does no hardware probe.
|
|
1832
|
+
|
|
1614
1833
|
The packaged sound set covers QEMU ES1371/HDA and common PC HDA/HDMI and USB
|
|
1615
1834
|
audio where the selected kernel flavor provides them. `cfg.power` loads the ACPI
|
|
1616
1835
|
`battery`, `ac`, `button` and `thermal` modules through `/lib/modprobe.js`
|
|
@@ -1624,6 +1843,68 @@ reports nothing registered). Nothing loads them at boot. PID 1 also installs
|
|
|
1624
1843
|
the current process environment preserved, while overriding `PATH` and `HOME`
|
|
1625
1844
|
for the userspace session.
|
|
1626
1845
|
|
|
1846
|
+
### Optional client GPU acceleration (`cfg.gpu`)
|
|
1847
|
+
|
|
1848
|
+
To omit only the added GPU module requests and firmware when building:
|
|
1849
|
+
|
|
1850
|
+
```sh
|
|
1851
|
+
bun index.js -b --real --no-gpu
|
|
1852
|
+
```
|
|
1853
|
+
|
|
1854
|
+
The original simpledrm/fbcon/bunterm path, sound/network/storage modules, and
|
|
1855
|
+
any dependencies they require are retained. The setting applies to fetch/build
|
|
1856
|
+
and is forwarded into Docker. For direct shell scripts use
|
|
1857
|
+
`env BUNINU_NO_GPU=1 REAL_MACHINE=1 LINUX_FLAVOR=lts ./build-uki.sh`.
|
|
1858
|
+
Switching this option invalidates the module/firmware cache; omit the option
|
|
1859
|
+
(and unset `BUNINU_NO_GPU`) to restore the default GPU packaging. Cached APK
|
|
1860
|
+
downloads are retained but excluded from the image. This does not disable GPU
|
|
1861
|
+
support already compiled into the selected kernel.
|
|
1862
|
+
|
|
1863
|
+
|
|
1864
|
+
GPU drivers are packaged but are **not loaded by boot, `start()`, `cfg.all`, or
|
|
1865
|
+
`cfgMod`**. The existing simpledrm/framebuffer and software-rendered bunterm path
|
|
1866
|
+
stays the default. At the PID 1 REPL, before opening bunterm/fbdev, explicitly read:
|
|
1867
|
+
|
|
1868
|
+
```js
|
|
1869
|
+
cfg.gpu
|
|
1870
|
+
```
|
|
1871
|
+
|
|
1872
|
+
This is a one-shot PCI/virtio hardware probe, not a daemon. It matches available
|
|
1873
|
+
drivers, loads their module dependencies, and lists `/dev/dri/renderD*` and
|
|
1874
|
+
`/dev/fb*`. Individual driver failures are reported without stopping init. A
|
|
1875
|
+
missing render node is not reported as successful acceleration: inspect kernel
|
|
1876
|
+
firmware/driver messages; if probing is asynchronous, read `cfg.gpu` again later.
|
|
1877
|
+
If a process already holds an fd or mmap of `/dev/fb*`, it refuses to load GPU
|
|
1878
|
+
drivers. Exit that framebuffer client first; after GPU handoff, reopen it to
|
|
1879
|
+
discover the new framebuffer, resolution and pixel format. `fb0` is not guaranteed.
|
|
1880
|
+
|
|
1881
|
+
The x86_64 LTS module set includes Intel `i915`/`xe`, AMD `amdgpu`/legacy `radeon`,
|
|
1882
|
+
NVIDIA **Nouveau**, and VMware `vmwgfx`; both architectures request `virtio_gpu`.
|
|
1883
|
+
Modules absent from a selected Alpine kernel are skipped with a build-time note.
|
|
1884
|
+
The five pinned Alpine `linux-firmware-{i915,xe,amdgpu,radeon,nvidia}` packages are
|
|
1885
|
+
included when PC GPU modules are present (about 151 MB of downloads). Firmware
|
|
1886
|
+
symlinks and directory aliases are preserved, and the kernel reads their `.zst`
|
|
1887
|
+
files directly. Firmware pins live in `scripts/gpu-firmware.json`; licenses and
|
|
1888
|
+
WHENCE are under `LICENSES/linux-firmware/`. Rebuild existing images to include
|
|
1889
|
+
the new modules and firmware; the build detects older fetch caches.
|
|
1890
|
+
|
|
1891
|
+
Render nodes are set to `root:0`, mode `0660`, for this system's root clients.
|
|
1892
|
+
For non-root clients, set a numeric supplementary group before reading the getter:
|
|
1893
|
+
|
|
1894
|
+
```js
|
|
1895
|
+
process.env.BUNINU_RENDER_GID = "107" // use the actual client render group ID
|
|
1896
|
+
cfg.gpu
|
|
1897
|
+
```
|
|
1898
|
+
|
|
1899
|
+
The client must run with that numeric group and, inside a chroot/proot, see the
|
|
1900
|
+
real `/dev/dri` nodes and relevant `/sys`. Mesa, Vulkan loader/ICD and their
|
|
1901
|
+
dependencies belong in the **client's** environment; this change does not install
|
|
1902
|
+
them or accelerate CanvasKit/Land itself. A render node alone does not prove
|
|
1903
|
+
hardware rendering: verify `vulkaninfo`/the browser's renderer and visible output.
|
|
1904
|
+
QEMU additionally needs an accelerated host GPU backend (VirGL/Venus); a plain
|
|
1905
|
+
2D virtio GPU is not 3D acceleration. This does not include NVIDIA's proprietary
|
|
1906
|
+
driver, Android KGSL, or board-specific ARM GPU/DT/firmware enablement.
|
|
1907
|
+
|
|
1627
1908
|
## Contents
|
|
1628
1909
|
|
|
1629
1910
|
- [Quick start](#quick-start)
|
|
@@ -1639,16 +1920,18 @@ for the userspace session.
|
|
|
1639
1920
|
+ [Testing on a Linux host in Docker](#testing-on-a-linux-host-in-docker)
|
|
1640
1921
|
- [Using Buninu Linux](#using-buninu-linux)
|
|
1641
1922
|
* [Basic configuration](#basic-configuration)
|
|
1923
|
+
* [Using bunterm](#using-bunterm)
|
|
1924
|
+
* [Using Bun Modern Shell](#using-bun-modern-shell)
|
|
1642
1925
|
* [Editor quick start](#editor-quick-start)
|
|
1643
1926
|
+ [jsmdcui](#jsmdcui)
|
|
1644
1927
|
* [Multitasking modes](#multitasking-modes)
|
|
1645
1928
|
+ [Multiple virtual consoles with bunterm](#multiple-virtual-consoles-with-bunterm)
|
|
1646
1929
|
+ [Panes, terminals, and tabs with jsmdcui](#panes-terminals-and-tabs-with-jsmdcui)
|
|
1647
1930
|
- [Pane and tab controls](#pane-and-tab-controls)
|
|
1648
|
-
* [Using Bun Modern Shell](#using-bun-modern-shell)
|
|
1649
1931
|
* [Showing images](#showing-images)
|
|
1650
1932
|
* [Clipboard](#clipboard)
|
|
1651
1933
|
* [Playing YouTube with sound (experimental)](#playing-youtube-with-sound-experimental)
|
|
1934
|
+
* [Data and persistence](#data-and-persistence)
|
|
1652
1935
|
- [Commands inside /bin](#commands-inside-bin)
|
|
1653
1936
|
* [Buninu Browser (early-stage, experimental)](#buninu-browser-early-stage-experimental)
|
|
1654
1937
|
* [Buninu Land (early-stage, experimental)](#buninu-land-early-stage-experimental)
|
|
@@ -1667,7 +1950,7 @@ for the userspace session.
|
|
|
1667
1950
|
* [Old build from a source checkout](#old-build-from-a-source-checkout)
|
|
1668
1951
|
- [Implementation details](#implementation-details)
|
|
1669
1952
|
* [1. Hello world](#1-hello-world)
|
|
1670
|
-
* [2. Buninu Linux
|
|
1953
|
+
* [2. Buninu Linux: Bun as PID 1](#2-buninu-linux-bun-as-pid-1)
|
|
1671
1954
|
+ [Build flags](#build-flags)
|
|
1672
1955
|
+ [Build pipeline](#build-pipeline)
|
|
1673
1956
|
- [Pipeline inputs and outputs](#pipeline-inputs-and-outputs)
|
|
@@ -1680,13 +1963,14 @@ for the userspace session.
|
|
|
1680
1963
|
+ [Command implementation](#command-implementation)
|
|
1681
1964
|
+ [Reaching JavaScript with nothing mounted](#reaching-javascript-with-nothing-mounted)
|
|
1682
1965
|
+ [What init.js does](#what-initjs-does)
|
|
1966
|
+
* [Optional client GPU acceleration (`cfg.gpu`)](#optional-client-gpu-acceleration-cfggpu)
|
|
1683
1967
|
- [Authorship](#authorship)
|
|
1684
1968
|
- [License](#license)
|
|
1685
1969
|
* [Bundled component licenses](#bundled-component-licenses)
|
|
1686
1970
|
|
|
1687
1971
|
## Authorship
|
|
1688
1972
|
|
|
1689
|
-
Buninu Linux is written and maintained by Dr. John
|
|
1973
|
+
Buninu Linux is written and maintained by Dr. John, the author of
|
|
1690
1974
|
[Buninu](https://github.com/jjtseng93/buninu), whose userspace it runs. The
|
|
1691
1975
|
kernel, the C library, the GCC runtime, the UEFI stub and Bun itself are the
|
|
1692
1976
|
work of their respective projects; [NOTICE.md](NOTICE.md) names each one with
|
|
@@ -1726,12 +2010,12 @@ when redistributing the image.
|
|
|
1726
2010
|
| Linux kernels and networking, storage, xHCI, USB and HID modules | GPL-2.0-only with the Linux syscall note | image only |
|
|
1727
2011
|
| systemd EFI stub | LGPL-2.1-or-later | image only |
|
|
1728
2012
|
| Bun | MIT, plus the licenses of what it statically links | image only |
|
|
1729
|
-
| buninu-browser
|
|
1730
|
-
| buninu-land
|
|
2013
|
+
| buninu-browser | MIT for its own code; bundled components have their own licenses | npm download → image |
|
|
2014
|
+
| buninu-land | MIT for its own code; bundled components retain their own licenses and notices | npm download → image |
|
|
1731
2015
|
| wasmpeg / FFmpeg (`@wasmpeg/cpu` 1.0.1, bundled in buninu-browser) | LGPL-2.1-or-later, plus component notices; source archive and rebuild documentation retained | browser package → image |
|
|
1732
|
-
| `@drxiaozhi/casty`
|
|
1733
|
-
| `@drxiaozhi/jspulse`
|
|
1734
|
-
| `@drxiaozhi/jspinyin`
|
|
2016
|
+
| `@drxiaozhi/casty` | MIT | npm download → image |
|
|
2017
|
+
| `@drxiaozhi/jspulse` | LGPL-2.1-or-later, plus component notices | npm download → image |
|
|
2018
|
+
| `@drxiaozhi/jspinyin` | MIT; hanzipinyin material under the Unlicense | npm download → image |
|
|
1735
2019
|
| CanvasKit 0.41.1 (`initramfs/lib/canvaskit/`, Skia compiled to WebAssembly) | BSD-3-Clause (`LICENSES/BSD-3-Clause-Skia.txt`) | committed |
|
|
1736
2020
|
| xterm.js 6.0.0 headless core and unicode-graphemes addon (`initramfs/lib/xterm/`); box-drawing shape tables in `initramfs/lib/bunterm/glyphs.js` | MIT (`LICENSES/MIT-xterm.js.txt`) | committed |
|
|
1737
2021
|
| DejaVu Sans Mono (`initramfs/usr/share/fonts/DejaVuSansMono*.ttf`) | Bitstream Vera (`LICENSES/Bitstream-Vera.txt`) | committed |
|