Skip to content

docs: which parts of this kernel are NebulaOS - #2

Merged
coreflake1 merged 5 commits into
openkefrom
docs/kernel
Nov 12, 2026
Merged

coreflake1 merged 5 commits into
openkefrom
docs/kernel

Conversation

@coreflake1

@coreflake1 coreflake1 commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

What this is

docs/nebulaos/WHAT_NEBULAOS_CHANGES.md — which parts of this kernel are NebulaOS, and which
are Ingenic's or OpenKE's. From the nebulaos-docs background session.

Most of this repository is a vendor SDK, and nothing separated the layers. That's the question a
developer actually arrives with.

The branch layout is the key

Branch What it is
main a98c2e1f2 "initial release" — the pristine vendor baseline, forked from Llixuma/ingenic-linux-kernel6.6-x2000-v1.0-20250221
openke 133 commits on top; the branch NebulaOS builds from

So git diff origin/main origin/openke is the complete change set.

The page warns about that diff rather than quoting it as a figure of merit. It reports
around 13,000 files changed, almost all of which is vendor tree reorganisation from the OpenKE
import. Presenting that as NebulaOS's footprint would be misleading by about a factor of a
thousand.

The three layers

  1. The OpenKE layer — one commit, inherited. Attributed to OpenKE, not NebulaOS.
  2. Five real hardware-bug fixes in the vendor board description: a missing third cell in
    wlan_pwrseq reset-gpios, a missing post-power-on-delay-ms causing an SDIO probe race,
    drvvbus-gpio on the wrong pin, uart1 never wired up at all, and as_dmic holding the pins
    uart1 needed. Presented as a group, because the last two are one story: the link to the
    mainboard MCU did not exist in the board file, and a second device held its pins.
  3. Eight NebulaOS commits, each with its G-number and the subsystem it touches — boot logo,
    display takeover, boot diagnostics, NS2009 sysfs, buzzer PWM, watchdog arming, log levels.

Three of those are explained by what needs them above the kernel, which reading the kernel
alone doesn't reveal: the buzzer is a PWM channel so Klipper's nebulaos_beeper can drive it
from userspace, the watchdog arms with a programmed timeout so S02nebulaos-watchdog can feed
it, and the power-on picture survives the display takeover so the boot logo doesn't flash to
black before NebulaScreen appears.

One thing worth knowing if you compare documents

The mission asks which changes are maintained here versus applied by the firmware build. The
answer: all of them are here, and none are applied.

The changes used to come from patches/x2000_kernel_6.6-openke.patch at build time. They are
now real commits on openke, which 00-fetch-vendor-sources.sh checks out directly — so
scripts/build/01-apply-kernel-patches.sh applies nothing. It verifies that the expected
changes are present, and keeps its 01- number on purpose so existing documentation and habits
still work.

Scope

Nothing on the page was observed on a printer by its author. Also not covered: the vendor
SDK itself, and U-Boot. The scheduling model is covered now — see the refresh below.

The pinned commit that actually ships is KERNEL_PIN in
NebulaOS-firmware/manifests/dependencies.conf; this branch's tip is not, when the two differ.

Refreshed 2026-11-10, at 95d0321e — which is also what 1.0.2 ships

Rebased on openke. The tip is 95d0321e, and that is the kernel NebulaOS 1.0.2 ships
(KERNEL_PIN in the firmware manifest at v1.0.2), so for once there is no pin gap to footnote.
133 commits over the vendor baseline now, 25 config changes.

Two new sections, and one claim withdrawn:

  • The freeze-diagnosis layer, eleven commits written after two real failures on the
    development printer — a partial hang on 2026-11-06 and a mid-print freeze on 2026-11-08.
    pstore/ramoops in the DTS so the kernel's own log survives the reset, soft- and hard-lockup
    panic with report-only hung-task detection, the watchdog pre-timeout dump at 40 s of the
    armed 60 s so there is evidence before the board is reset, a lock-free sched_clock read in
    ingenic_core_ost.c so a dump cannot deadlock on the clocksource lock, the
    nebulaos_sdio_idle runtime parameter in brcmfmac, and i2c-ingenic masking interrupts before
    reset and before gating the clock.
  • The scheduling model: CONFIG_PREEMPT, not PREEMPT_RT. The tree is still based on
    linux-stable-rt and localversion-rt was removed. The previous version of this page listed
    PREEMPT_RT under not covered on the grounds that it was unestablished; it is established now,
    read from the defconfig, so the bullet is replaced by what the defconfig actually sets.

No page claims any of these mitigations is proven to fix the freeze. They are what the source
does; whether the printer still freezes is a hardware question this session cannot answer.


Developer wiki (2026-11-12)

The kernel's developer documentation is now this repository's wiki: eight pages in a
top-level wiki/ directory, the same shape as the central manual and the NebulaScreen wiki -
Home.md, _Sidebar.md, one page per topic, wiki-style links. Nothing is published; wiki/ is
Markdown in this branch and publishing stays the owner's step.

docs/ is reduced to a pointer for this one page: docs/nebulaos/WHAT_NEBULAOS_CHANGES.md
is now a table pointing at the wiki. The vendor SDK's own documentation under docs/doc/ is
untouched, and the README's link follows the content.

The pages

Page Source
Home, _Sidebar new
What-NebulaOS-Changes the four layers on openke, from WHAT_NEBULAOS_CHANGES.md
Freeze-Diagnosis the eleven-commit diagnosis layer, which was layer 4 of that page
Scheduling-Model CONFIG_PREEMPT rather than CONFIG_PREEMPT_RT, and what went with it
Branch-Model the branch layout, and the openke name
Build-And-Integration how the firmware consumes this repository, plus new material (below)
Hardware SoC, display, touch

The 7 pages published on the wiki today

They are from 2026-08-15 and describe a project that has moved: they name the coreflake1
organisation, the retired NebulaOS-klipper fork, GuppyScreen, PREEMPT_RT, and eight build-time
"qualified variants" applied by scripts/build/apply-qualified-baseline.sh.

Old page Fate
Home replaced by Home
_Sidebar replaced by _Sidebar
Branch-Model replaced by Branch-Model - same subject, corrected organisation and no retired repositories
Kernel-Development merged into What-NebulaOS-Changes, which lists the changes as commits rather than as areas
Kernel-Build-and-Test merged into Build-And-Integration
Integration-with-NebulaOS-firmware merged into Build-And-Integration
Debugging replaced by Freeze-Diagnosis. The old page said in as many words that there was no kernel-debugging guide yet and was a pointer; there is one now
Qualified-Variants dropped. The eight build-time variant scripts and apply-qualified-baseline.sh do not exist at 1.0.2. Kernel changes are commits on openke and 01-apply-kernel-patches.sh applies nothing. QUALIFIED_BASELINE_TAG still exists in the manifest as the config-comparison reference and is documented in the firmware wiki's Build-Provenance, not here

New material, read from source at 95d0321e and firmware 3bdf3ff

  • What stage 01 actually verifies, now that it applies nothing: the pin (read from the
    manifest, and checked independently of stage 00, so a hand-run git pull between the two is
    still caught), a completely unmodified checkout, and five specific pieces of the fork's
    content - ns2009.c, the panel-openke-general-480x272.c display driver,
    openke,bcm4343x-bt in hci_h5.c, ns2009@48 in halley5_v30.dts, and the literal line
    gzip -nv9f $(obj)/vmlinux.bin in arch/mips/boot/zcompressed/Makefile.
  • That last line is the build-reproducibility fix, and it is a commit here. The firmware's
    docs/REPRODUCIBILITY.md still describes it as kernel-gzip-determinism-variant.sh; no such
    script exists at 1.0.2. The page says so, which is the honest form of "the two documents
    disagree".
  • Why the branch-name check was removed rather than special-cased: a pinned checkout is a
    detached HEAD, so git rev-parse --abbrev-ref HEAD reports the literal string HEAD and the
    check failed a checkout that was exactly correct.
  • What CI here is: a compile check of xImage for nebulaos_halley5_v30 with Ubuntu's GCC
    13 and without the Wi-Fi firmware blobs. Not a qualification, and the page says so.

Freeze-Diagnosis ends with what it is not: instrumentation and two mitigations, none of it
verified on a printer by its author, and no claim that the freeze is fixed.

check_links.py: 8 pages, no broken links, every page reachable from the sidebar.

Follow-up the same day: the gzip -n commit has a name

Firmware d464b46 corrected the firmware's reproducibility record, which had credited the
kernel's gzip -n fix to a build-time variant script that does not exist. Build-And-Integration
now names the commit - b31be02d9 here, one line, gzip -v9f to gzip -nv9f in
arch/mips/boot/zcompressed/Makefile, an ancestor of the 1.0.2 pin, verified in this repository -
and what it bought: firmware 3bdf3ff built twice gives the same xImage byte for byte.

🤖 Generated with Claude Code

Most of this repository is a vendor SDK, and nothing separated NebulaOS's own
work from Ingenic's or OpenKE's. docs/nebulaos/WHAT_NEBULAOS_CHANGES.md does
that, which is the question a developer actually arrives with.

The branch layout is the key: main is a98c2e1 "initial release", the pristine
vendor baseline forked from Llixuma/ingenic-linux-kernel6.6-x2000-v1.0-20250221,
and openke carries 122 commits on top. So git diff origin/main origin/openke is
the complete change set.

The page warns about that diff rather than quoting it as a figure of merit: it
reports around 13,000 files changed, almost all of it vendor tree reorganisation
from the OpenKE import. Presenting that as NebulaOS's footprint would be
misleading by a factor of a thousand.

The real surface is three layers. The inherited OpenKE commit. Five commits
fixing genuine errors in the vendor board description - a missing third cell in
wlan_pwrseq reset-gpios, a missing post-power-on-delay-ms causing an SDIO probe
race, drvvbus-gpio on the wrong pin, uart1 never wired up at all, and as_dmic
holding the pins uart1 needed. And eight NebulaOS commits, each with a G-number,
listed with the subsystem each touches.

Those five fixes are presented as a group on purpose: the last two are one story,
in which the link to the mainboard MCU did not exist in the vendor board file and
a second device was holding its pins.

Three NebulaOS changes are explained by what needs them above the kernel, which
reading the kernel alone does not reveal: the buzzer exists as a PWM channel so
Klipper's nebulaos_beeper can drive it from userspace, the watchdog arms with a
programmed timeout so S02nebulaos-watchdog can feed it, and the power-on picture
survives the display takeover so the boot logo does not flash to black before
NebulaScreen appears.

And the answer to the mission's question about which changes are maintained here
versus applied by the firmware build: all of them are here, none are applied.
01-apply-kernel-patches.sh applies nothing now - it verifies that the expected
changes are present, and keeps its 01- number so existing documentation still
works. Anyone comparing older documents needs that.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
coreflake1 and others added 4 commits November 10, 2026 08:51
Re-verified against openke 95d0321, which is also the kernel NebulaOS 1.0.2
ships (KERNEL_PIN in the firmware manifest at v1.0.2).

- New section: the eleven-commit diagnosis layer written after the 2026-11-06
  partial hang and the 2026-11-08 mid-print freeze - pstore/ramoops in the DTS,
  soft/hard-lockup panic and report-only hung-task detection, the watchdog
  pre-timeout dump at 40 s of the armed 60 s, the lock-free sched_clock read,
  the nebulaos_sdio_idle A/B parameter and the I2C INTM masking.
- New section: the scheduling model is CONFIG_PREEMPT, not PREEMPT_RT; the tree
  stays on linux-stable-rt and localversion-rt was removed.
- The "not covered" bullet claiming PREEMPT_RT was unestablished is replaced by
  what the defconfig actually sets; commit counts refreshed (133 commits over
  the vendor baseline, 25 config changes).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ory's wiki

docs/nebulaos/WHAT_NEBULAOS_CHANGES.md becomes six wiki pages in a top-level
wiki/ directory - Home, _Sidebar, What-NebulaOS-Changes, Freeze-Diagnosis,
Scheduling-Model, Branch-Model, Build-And-Integration, Hardware - with
wiki-style links, the same shape as the central manual and the NebulaScreen
wiki. The in-repo document stays as a pointer table; the vendor SDK's own
docs/doc/ is untouched.

The seven pages published on the wiki today are from 2026-08-15 and describe a
project that has moved: they name the coreflake1 organisation, the retired
NebulaOS-klipper fork, PREEMPT_RT, and eight build-time "qualified variants"
applied by a script that no longer exists. Replacing all of them.

New material, read from source at 95d0321 and firmware 3bdf3ff rather than
carried over:

- Build-And-Integration documents what stage 01 verifies, now that it applies
  nothing: the pin (independently of stage 00, so a hand-run git pull between
  them is caught), a completely unmodified checkout, and five specific pieces of
  the fork's content - including the literal `gzip -nv9f` line in
  arch/mips/boot/zcompressed/Makefile. That line is the build-reproducibility
  fix, and it is a commit here, not a build-time variant: the firmware's
  REPRODUCIBILITY.md still calls it kernel-gzip-determinism-variant.sh, and no
  such script exists at 1.0.2. The page says so.
- It also records why the branch-name check was removed rather than special-cased
  (a pinned checkout is a detached HEAD, so --abbrev-ref HEAD reports "HEAD").
- The CI line is now what the workflow says: a compile check of xImage for
  nebulaos_halley5_v30 with Ubuntu's GCC 13 and without the Wi-Fi blobs, which is
  not a qualification.

Freeze-Diagnosis ends with what it is not: instrumentation and two mitigations,
none of it verified on a printer by its author, and no claim that the freeze is
fixed.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…s too

Build-And-Integration said stage 01 verifies the literal `gzip -nv9f` line and
that the firmware's reproducibility record wrongly credited it to a build-time
variant script. The firmware corrected that (d464b46), so the page names the
commit instead: b31be02 here, one line in
arch/mips/boot/zcompressed/Makefile, an ancestor of the 1.0.2 pin - verified in
this repository, not taken from the other one's say-so - and what it bought:
firmware 3bdf3ff built twice gives the same xImage byte for byte.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@coreflake1
coreflake1 merged commit 1dbe846 into openke Nov 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant