AGENTS.md for mobile/* and ext/src, ext/src/glibc (t0235; written by a free-model subagent from the directory contents, checked against ls and mobile/AGENTS.md)
mobile/build is ignored by .gitignore (build output): no AGENTS.md there. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c4af5f5402
commit
7eb8ff29d1
10 files changed
+280
No files matched your search
@@ -0,0 +1,31 @@
|
||||
# ext/src/ -- imported third-party source trees (forks)
|
||||
|
||||
## What it is for
|
||||
|
||||
Container for upstream source trees that Makronix ships and changes as forks,
|
||||
each under `ext/src/<name>/` with its own `IMPORT` and (where applicable) recipe
|
||||
directories, as described in `ext/AGENTS.md`.
|
||||
|
||||
## What is in it
|
||||
|
||||
- `afpfs-ng/` -- AFP client fork (has `pkgsrc/` recipe, per `ext/AGENTS.md`).
|
||||
- `glibc/` -- glibc 2.44 for Makronix/Linux (recipe in `mx/`, no `pkgsrc/`; see
|
||||
`ext/src/glibc/AGENTS.md`).
|
||||
- `mcde/` -- MCDE fork of CDE 2.5.3 (see `ext/src/mcde/AGENTS.md`).
|
||||
|
||||
## What may be changed
|
||||
|
||||
- Add a new `<name>/` tree only as an imported fork following `ext/AGENTS.md`
|
||||
(first commit the upstream archive unchanged, with `IMPORT` recording source,
|
||||
version, hash, signature and licence).
|
||||
- Work inside an existing fork per that fork's own `AGENTS.md` and `ext/AGENTS.md`
|
||||
(ordinary commits, visible diffs after the import).
|
||||
|
||||
## What must not be touched
|
||||
|
||||
- Do not overwrite a fork silently: updates are merges with `IMPORT` renewed
|
||||
(`ext/AGENTS.md`).
|
||||
- Nothing here is built by `build.sh`; each is built from its recipe
|
||||
(`pkgsrc/` or, for glibc, `mx/`) as specified in `ext/AGENTS.md`.
|
||||
|
||||
<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
|
||||
@@ -0,0 +1,30 @@
|
||||
# ext/src/glibc/ -- GNU C Library 2.44 for Makronix/Linux
|
||||
|
||||
## What it is for
|
||||
|
||||
Imported upstream glibc source used as the C library for Makronix/Linux (the
|
||||
mobile/Linux side), built via Makronix's own recipe rather than pkgsrc
|
||||
(see `ext/AGENTS.md` and `IMPORT`).
|
||||
|
||||
## What is in it
|
||||
|
||||
- Upstream glibc 2.44 tree (large: configure, sources, `sysdeps/`, `nptl/`, etc.)
|
||||
plus `IMPORT` (records upstream, version, archive, hash/signature).
|
||||
- `mx/` -- the Makronix recipe/build integration for this tree (a NetBSD-style
|
||||
Makefile run by the Makronix/Linux build, per `ext/AGENTS.md`).
|
||||
|
||||
## What may be changed
|
||||
|
||||
- `mx/` and Makronix-specific integration maintained here, consistent with
|
||||
`mobile/docs/NETBSD-USERLAND.md` and the Makronix/Linux build.
|
||||
- Local changes to the imported tree only as deliberate, visible commits (the
|
||||
fork model in `ext/AGENTS.md`).
|
||||
|
||||
## What must not be touched
|
||||
|
||||
- The imported upstream tree contents (thousands of files) are not authored by
|
||||
us; do not rewrite them casually or silently overwrite with a new upstream
|
||||
archive (updates must renew `IMPORT`, per `ext/AGENTS.md`).
|
||||
- There is no `pkgsrc/` recipe here; its recipe is `mx/` (`ext/AGENTS.md`).
|
||||
|
||||
<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
|
||||
@@ -0,0 +1,25 @@
|
||||
# mobile/conf/ -- make configuration for building src/ for the phone
|
||||
|
||||
## What it is for
|
||||
|
||||
Provides the `make(1)` configuration used when building NetBSD `src/` for a
|
||||
Makronix/Linux target (the mobile userland/toolchain side).
|
||||
|
||||
## What is in it
|
||||
|
||||
- `mk.conf` -- `MAKECONF` for building `src/` for a Makronix/Linux target, used
|
||||
together with the tooldir produced by `mobile/tools/mktooldir.sh` (see its
|
||||
header).
|
||||
|
||||
## What may be changed
|
||||
|
||||
- `mk.conf`, when the way `src/` is built for Linux targets must change. Keep
|
||||
it consistent with `mobile/tools/mktooldir.sh`, `mobile/Makefile`, and the
|
||||
plans in `mobile/docs/` (especially `NETBSD-USERLAND.md`).
|
||||
|
||||
## What must not be touched
|
||||
|
||||
- Do not add device-specific hacks here: platform differences belong in
|
||||
`soc.conf` / `device.conf` or in shared code (see `mobile/AGENTS.md`).
|
||||
|
||||
<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
|
||||
@@ -0,0 +1,27 @@
|
||||
# mobile/devices/ -- one directory per phone
|
||||
|
||||
## What it is for
|
||||
|
||||
Holds the per-device definitions. The phone in hand selects the device; no
|
||||
tool knows a device by name (see `mobile/AGENTS.md`).
|
||||
|
||||
## What is in it
|
||||
|
||||
- `<codename>/` -- one phone (currently `hotdogb/`, the OnePlus 7T), containing
|
||||
its `device.conf`, `kernel.config`, `cmdline`, and a device `AGENTS.md` (for
|
||||
example `hotdogb/AGENTS.md`).
|
||||
|
||||
## What may be changed
|
||||
|
||||
- Add a new `<codename>/` for a new phone, following `mobile/docs/PORTING.md`.
|
||||
- Edit files inside an existing device directory to describe that device (config,
|
||||
kernel config, cmdline), keeping the device as the unit.
|
||||
|
||||
## What must not be touched
|
||||
|
||||
- Do not encode device names or device-specific branches in `mobile/tools/`; such
|
||||
settings belong in a `.conf` here or in `mobile/soc/`.
|
||||
- Do not assume `hotdogb` and `hotdog` are interchangeable: they differ (panel
|
||||
and init sequence) and only `hotdogb` is supported here.
|
||||
|
||||
<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
|
||||
@@ -0,0 +1,27 @@
|
||||
# mobile/docs/ -- plans and notes for Makronix Mobile Edition
|
||||
|
||||
## What it is for
|
||||
|
||||
Documentation for porting and bringing up the mobile system: boot, the
|
||||
NetBSD-on-Linux userland plan, device porting, and handoff/status notes.
|
||||
|
||||
## What is in it
|
||||
|
||||
- `BOOT.md` -- boot notes.
|
||||
- `NETBSD-USERLAND.md`, `PORTING-USERLAND.md` -- the plan and guidance for the
|
||||
NetBSD userland on Linux/glibc (read before porting anything, per
|
||||
`mobile/AGENTS.md`).
|
||||
- `PORTING.md` -- how to add a new phone.
|
||||
- `NEXT.md`, `HANDOFF.md` -- next steps and handoff/status notes.
|
||||
|
||||
## What may be changed
|
||||
|
||||
- These documents, when plans, measurements, or procedures change. Keep claims
|
||||
tied to measurements or explicit references (see the root `AGENTS.md`).
|
||||
|
||||
## What must not be touched
|
||||
|
||||
- Do not rewrite history or recorded measurements to match a desired outcome;
|
||||
update with what is actually observed.
|
||||
|
||||
<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
|
||||
@@ -0,0 +1,33 @@
|
||||
# mobile/kernel/ -- kernel pin and Makronix patch series
|
||||
|
||||
## What it is for
|
||||
|
||||
Records which Linux kernel the phones are built from and carries Makronix's own
|
||||
changes to it as an ordered patch series.
|
||||
|
||||
## What is in it
|
||||
|
||||
- `PIN` -- the kernel pin (`KERNEL_COMMIT` / `KERNEL_PATCHDIR`, read by
|
||||
`mobile/tools/fetch-kernel.sh`); source is `../refs/linux/7.0.14` (shared,
|
||||
read-only submodule), as described in `mobile/AGENTS.md`.
|
||||
- `patches/` -- the patch series applied in filename order (0001 onward).
|
||||
- `patches-7.4/` -- historical patches, not applied (see `mobile/AGENTS.md` and
|
||||
`mobile/docs/NEXT.md`).
|
||||
|
||||
## What may be changed
|
||||
|
||||
- `PIN` when the kernel pin moves, updated together with the shared submodule and
|
||||
the measurement that justifies it (`mobile/tools/fetch-kernel.sh` checks for
|
||||
drift).
|
||||
- `patches/` -- add or update patches (exported from a build tree, e.g. with
|
||||
`git format-patch`) to carry Makronix's kernel changes.
|
||||
|
||||
## What must not be touched
|
||||
|
||||
- The imported kernel tree `../refs/linux/7.0.14` is read-only; never edit it.
|
||||
Own changes live only as patches in `mobile/kernel/patches/`.
|
||||
- `patches-7.4/` is history, not the applied series.
|
||||
- Note: `mobile/patches/` (a separate, empty directory under `mobile/`) is not the
|
||||
same as `mobile/kernel/patches/` and is unused per `mobile/AGENTS.md`.
|
||||
|
||||
<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
|
||||
@@ -0,0 +1,23 @@
|
||||
# mobile/patches/ -- unused (empty)
|
||||
|
||||
## What it is for
|
||||
|
||||
Present in the mobile layout but currently unused; reserved location, not the
|
||||
active kernel patch series.
|
||||
|
||||
## What is in it
|
||||
|
||||
- Nothing (directory is empty).
|
||||
|
||||
## What may be changed
|
||||
|
||||
- Not described yet. `mobile/AGENTS.md` states "`patches/` and `pkgsrc/` here
|
||||
are empty and unused"; any future purpose should be defined there first.
|
||||
|
||||
## What must not be touched
|
||||
|
||||
- Do not place the phone kernel patches here: the applied series lives in
|
||||
`mobile/kernel/patches/` (see `mobile/kernel/AGENTS.md` and the root
|
||||
`AGENTS.md`, "What belongs where").
|
||||
|
||||
<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
|
||||
@@ -0,0 +1,25 @@
|
||||
# mobile/pkgsrc/ -- unused (empty)
|
||||
|
||||
## What it is for
|
||||
|
||||
Present in the mobile layout but currently unused. Mobile userland packages come
|
||||
from the shared `../pkgsrc` at the repository root (pinned in `../PINS`), not
|
||||
from a copy here (see `mobile/AGENTS.md`, "One tree").
|
||||
|
||||
## What is in it
|
||||
|
||||
- Nothing (directory is empty).
|
||||
|
||||
## What may be changed
|
||||
|
||||
- Not described yet. `mobile/AGENTS.md` states "`patches/` and `pkgsrc/` here
|
||||
are empty and unused"; any future purpose should be defined there and in the
|
||||
root `AGENTS.md` first.
|
||||
|
||||
## What must not be touched
|
||||
|
||||
- Do not copy or fork the shared `pkgsrc/` into this directory. Platform and
|
||||
device differences are handled via variables/options and `../packages.list`
|
||||
(`@aarch64`), as described in `mobile/AGENTS.md`.
|
||||
|
||||
<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
|
||||
@@ -0,0 +1,27 @@
|
||||
# mobile/soc/ -- per-SoC definitions shared by phones
|
||||
|
||||
## What it is for
|
||||
|
||||
Holds what every phone with a given SoC shares: its configuration and the root
|
||||
filesystem fragments used when assembling device images.
|
||||
|
||||
## What is in it
|
||||
|
||||
- `<soc>/` -- one SoC (currently `sm8150/`), containing `soc.conf`, `rootfs/`
|
||||
(files for its root image, any base), and `rootfs-<base>/` variants such as
|
||||
`rootfs-void/` for a specific base (per `mobile/AGENTS.md` layout).
|
||||
|
||||
## What may be changed
|
||||
|
||||
- Add a new `soc/<soc>/` (with `soc.conf` and rootfs fragments) when supporting a
|
||||
new SoC.
|
||||
- Adjust `soc.conf` and the `rootfs*` contents for an existing SoC, keeping
|
||||
device-specific settings in `mobile/devices/<codename>/` instead.
|
||||
|
||||
## What must not be touched
|
||||
|
||||
- Do not put per-device (phone) settings here; those belong in
|
||||
`mobile/devices/<codename>/` (`mobile/AGENTS.md`, "No tool knows a device by
|
||||
name").
|
||||
|
||||
<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
|
||||
@@ -0,0 +1,32 @@
|
||||
# mobile/tools/ -- scripts for building and managing mobile targets
|
||||
|
||||
## What it is for
|
||||
|
||||
POSIX `sh` tools used by the mobile Makefile and workflows to build kernels and
|
||||
userland pieces, assemble and flash images, and run checks for devices.
|
||||
|
||||
## What is in it
|
||||
|
||||
- Build/assemble scripts: e.g. `fetch-kernel.sh`, `build-kernel.sh`,
|
||||
`mktoolchain.sh`, `mktooldir.sh`, `mktargetlibs.sh`, `mkglibc.sh`,
|
||||
`assemble-rootfs.sh`, `mkrootimg.sh`, `mkrootfs-*.sh`, `mkbootimg.sh`,
|
||||
`mkinitramfs.sh`, `mkroottar.sh`, `mx*.sh`, `userland-*.sh`.
|
||||
- Flashing and device helpers: e.g. `flash.sh`, `flash-root.sh`, `update-root.sh`,
|
||||
`boot-loop.sh`, `reboot-loop.sh`, `phone-*.sh`, `netconsole-listen.sh`.
|
||||
- Shared library and checks: `lib.sh` (loads `soc.conf` then `device.conf`),
|
||||
`check.sh`, and the `checks/` directory.
|
||||
|
||||
## What may be changed
|
||||
|
||||
- Scripts here, kept as POSIX `sh` (no Python, no bashisms) with accurate
|
||||
headers. Changes must preserve the rule that no tool knows a device by name
|
||||
(settings belong in `soc.conf` / `device.conf`).
|
||||
|
||||
## What must not be touched
|
||||
|
||||
- Do not add device-name conditionals in tools; move such settings to `.conf`
|
||||
files under `mobile/soc/` or `mobile/devices/`.
|
||||
- Do not introduce prebuilt binaries requiring a foreign libc, or unattended
|
||||
loops/timers, per `mobile/AGENTS.md` and the root `AGENTS.md`.
|
||||
|
||||
<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
|
||||
Reference in new issue
Block a user