tree: drop xsrc, track src, X from pkgsrc

- xsrc/ deleted; X11_TYPE=modular, Xorg and the X libraries come from pkgsrc
  (packages.list), in the cross configuration and the build VM.
- overlay/ and patches/ are gone; their content is in src/ (commit 64934f16).
- Makefile: no -x/-X, no overlay target, stamp no longer syncs an overlay.
- makronix-pins.sh: src/BASE + pkgsrc; msrc-stage: no .git/xsrc, src comes
  from the NetBSD source sets.
- AGENTS/GOAL/docs updated to the new model (src tracked, refs/ read-only).
- mobile: kernel source is refs/linux/7.0.0, patches stay in
  mobile/kernel/patches; fetch-kernel clones it locally and checks the pin.
This commit is contained in:
lotherk committed 2026-11-09 23:30:07 +00:00
1 parent 64934f16ca
commit e7bd6d9407
556 files changed
+258 -95807

No files matched your search

+45 -43
View File
@@ -35,25 +35,20 @@ quiet change in the tree.
## What belongs where
- `src/` and `xsrc/` are the NetBSD import at the pinned commit. Every
change to them is recorded in this repository, in one of two forms, and
never made by hand in the import:
- a **patch** under `patches/src/` or `patches/xsrc/`, applied in filename
order, for a small edit to a file NetBSD owns;
- an **overlay unit** under `overlay/`, a full tracked copy of a directory
we really rework (today `usr.sbin/sysinst`), put into `src/` by
`tools/overlay.sh sync` before every build. Work in `overlay/`, not in
`src/` (`overlay/AGENTS.md`).
Not both for the same directory. Both are applied in place, because
`build.sh` builds from `src/`; so `git -C src status` shows the files our
patches and overlay units touch, plus the untracked `AGENTS.md` files
(below) -- anything beyond that is an edit nobody recorded. A patch that no
longer applies is a finding, never something to force. Upgrading the
import is a rebase of the patches and of the overlay (`overlay/AGENTS.md`),
not a merge of local edits. `tools/apply-patches.sh` is not called by the
`Makefile` and cannot yet tell "already applied" from "conflicts" for
patches that stack on one file (0001 and 0002): known defect, see
`tools/AGENTS.md`.
- `src/` is **Makronix's NetBSD tree**, tracked in this repository. It began
as the upstream commit recorded in `src/BASE` (`e523df740`) and is edited
here directly: there are no patches for `src/` and no overlay any more.
`refs/netbsd/src` is upstream NetBSD trunk, shallow and read-only -- look
there, never build from it. X comes from pkgsrc (`X11_TYPE=modular`); the
tree has no `xsrc/`.
- NetBSD conventions still bind `src/`: read the upstream documentation and
the `AGENTS.md` of the directory, look for the pattern that already exists
(`git grep`), use the building block, and let the comment name the pattern.
A change that breaks a NetBSD convention is a finding for the report, never a
quiet change.
- `mobile/` is the Linux tree for the phones: sources live in
`refs/linux/7.0.0` (submodule), the changes as `mobile/kernel/patches/`.
Same model: the imported tree is read-only, our work is in patches.
- `ext/` holds third-party sources that Makronix ships: `ext/src/<name>/` is the
unpacked upstream tree, `ext/src/<name>/pkgsrc/` its recipe, and an `IMPORT`
record names pkgsrc path, version, archive, hash and licence. An update
@@ -79,8 +74,8 @@ of the root `Makefile` and nothing else:
make compress pack the raw install images in the release directory
for a download (tools/images.sh pack)
make sourcesets the source sets in RELEASEDIR/source/sets: NetBSD's
(with their .git) and msrc (pkgsrc, patches,
tools, the Makronix distfiles, PINS; docs/OFFLINE-BUILD.md)
(with their .git) and msrc (pkgsrc, tools, the
Makronix tree, the distfiles, PINS; docs/OFFLINE-BUILD.md)
make isosrc the DVD with those source sets on it
make userland the pkgsrc userland of the makronix set: cross-built here
and built natively in the build VM (tools/userland.sh,
@@ -99,8 +94,8 @@ derived artefacts, `distribution` does not recreate `instkernel`, and
`iso-image` stops with `netbsd-GENERIC.gz: stat: No such file or directory`
(`build/logs/make-iso-2026-11-06.log:49`). `iso-image` only packages. Since
2026-11-06 `make iso` checks first (`tools/build-stamp.sh -c`) and stops with
a message, without removing anything, if the sources, patches or the overlay
changed since the last `make release`.
a message, without removing anything, if the sources changed since the last
`make release`.
A boot message `WARNING: 1 module failed to load` for `cd9660` is not a
defect: the INSTALL kernel has cd9660 built in, the loader's attempt to push
@@ -127,14 +122,17 @@ reported as missing. Do not hand-roll the `checkflist` environment -- the make
target carries the set options (`-L base,x`, the METALOG sanitising) that the
lists are written against.
## The imports
## The imports and the references
- `src/` -- NetBSD, pinned at `e523df740`.
- `xsrc/` -- NetBSD X, pinned at `99aacae3`.
- `pkgsrc/` -- pkgsrc trunk, pinned at `3c1118e94`.
- `src/` -- Makronix's NetBSD tree, a fork of `e523df740` (`src/BASE`),
tracked in this repository.
- `pkgsrc/` -- pkgsrc trunk, pinned at `3c1118e94`; its own git repository.
- `refs/netbsd/src` -- upstream NetBSD trunk, shallow submodule, reference.
- `refs/openbsd/src`, `refs/linux/7.0.0` -- OpenBSD and Linux references
(Linux is the tree `mobile/` builds from).
Each is its own git repository and a shallow clone; the pin is what the tree is
built from, and moving a pin is a decision, not an accident.
`pkgsrc/` and the reference trees are their own repositories; moving a pin is
a decision. `src/` is ours: a change is a commit here, not a patch.
## Third-party packages (pkgsrc)
@@ -202,12 +200,12 @@ of the set: it is pkgsrc's registration database for the build, and `checkflist`
ignores it the same way it ignores `var/db/syspkg`.
`makronix` is named in `src/distrib/sets/sets.subr` as one of the base sets, so
`build.sh`'s `-L base,x` and `make release` pick it up without a second flag.
`build.sh`'s `-L base` and `make release` pick it up without a second flag.
Removing a package means removing its entries from the list; entries that
existed keep the NetBSD convention and are marked `obsolete`.
sysinst installs it. `SET_MAKRONIX` is an enum value in
`overlay/usr.sbin/sysinst/defs.h`, a row in `dist_list` in `util.c`, part of
`src/usr.sbin/sysinst/defs.h`, a row in `dist_list` in `util.c`, part of
`SET_SYSTEM` -- so a full installation and an installation without X11 both
take it, a minimal one (`SET_CORE`) does not -- and a message in every
`msg.mi.*`; `msg_xlat.sh` fails the build on a missing translation. Those
@@ -343,9 +341,11 @@ everywhere else:
`cp `, `touch `, `chmod `, `sed -i` or `>` -- a redirection such as `2>&1`
is enough, so a read-only `ls` can be refused. Do such reads without
redirections, or in a script under `tools/`.)
- `git checkout`, `git clean`, `git reset` anywhere that touches `src/`,
`xsrc/` or `pkgsrc/`. The import's state is the build; undo a patch with
`patch -R` after a `--dry-run`, and record the change in `patches/`.
- `git reset --hard`, `git checkout -- .` or `git clean -fdx` in the
repository root: `src/` and `mobile/` are tracked, and those commands throw
away uncommitted work. `pkgsrc/` and the `refs/` submodules are their own
repositories; do not rewrite them. Undo a change with `git restore <file>`
(or `git diff` + `apply -R`), after looking at what it is.
- deleting `src/distrib/sets/lists/**` to make `checkflist` pass.
- unattended loops: cron jobs, timers, or "tick" scripts that start builds or
tests or hand work to an agent. An earlier setup did this every fifteen
@@ -360,8 +360,9 @@ everywhere else:
guess and is treated as one.
- Do not trust a status document, a commit message or an old log over a
measurement you can repeat. Repeat it.
- `src/`, `xsrc/`, `pkgsrc/` are untracked on purpose (each is its own
repository). Changes to them go through `patches/<tree>/NNNN-*.patch`.
- `src/` and `mobile/` are tracked in this repository and edited here.
`pkgsrc/` and `refs/` are their own repositories: change them only by
moving the submodule/pin, never by editing inside them.
- Tools in `tools/` are POSIX `sh`: no Python, no bashisms. Check with
`dash -n` and, where installed, `checkbashisms`.
@@ -372,13 +373,14 @@ what the directory is for, what is in it, what may be changed and how, what
must not be touched. When a directory gains a purpose, a rule or a hazard,
its `AGENTS.md` changes in the same commit.
The three imports (`src/`, `xsrc/`, `pkgsrc/`) are upstream trees of about
49,000 directories. They carry an `AGENTS.md` at the root of each, and `src/`
one in each of its 21 top-level directories (decided 2026-11-06). These files
sit directly in the imports, untracked and outside `patches/`: they are not
upstream, and a new import does not contain them, so after an upgrade they must
be written again. Do not add `AGENTS.md` below that level: what a directory is
for is answered by the upstream documentation (`README`, the manual pages,
`src/` (about 49,000 directories), `pkgsrc/` and the reference trees carry an
`AGENTS.md` at the root, and `src/` one in each of its 21 top-level
directories (decided 2026-11-06). `src/` is tracked now, so those files are
tracked with it and an upstream base update is a merge, not a rewrite.
`pkgsrc/` and `refs/` are still separate repositories: their `AGENTS.md` files
are untracked there and must be written again when the pin moves. Do not add
`AGENTS.md` below the top-level directories: what a directory is for is
answered by the upstream documentation (`README`, the manual pages,
`src/BUILDING`, hier(7)), and `pkgsrc` alone has tens of thousands of packages.
## Status of the measurements in this file
+32 -25
View File
@@ -25,7 +25,11 @@ später ganz andere Dinge in die Quellen packen.
(`git grep`), dann den vorhandenen Baustein benutzen, erst dann Code
schreiben. Der Kommentar nennt das NetBSD-Muster, dem er folgt.
- Plattformneutral denken. amd64 ist das erste Ziel, nicht das einzige.
- Änderungen an `src/` und `xsrc/` gibt es nur als Patch unter `patches/`.
- Änderungen an `src/` sind Commits in diesem Repo (der Baum ist unserer, seit
2026-11-09); NetBSD-Konventionen gelten weiter. `refs/netbsd/src` ist
Upstream zum Nachlesen, kein Build-Input.
- Änderungen an `pkgsrc/` und `refs/` gibt es nur durch das Verschieben des
Pins, nie durch Editieren im Baum.
- Werkzeuge unter `tools/` sind POSIX-`sh`. Kein Python, keine Bashismen.
- Ein Patch, der eine NetBSD-Konvention bricht, ist ein Befund für den
Bericht, keine stille Änderung.
@@ -63,11 +67,12 @@ Zielplatte. Der Stand heute ist in `AGENTS.md` beschrieben.
Makronix kann sich 100 % offline selbst bauen. Dafür trägt das Medium die
Quellen mit:
- NetBSD-`src` und `xsrc` über die vorhandenen Source-Sets von NetBSD
(`makesrctars`: `src`, `gnusrc`, `syssrc`, `sharesrc`, `xsrc`).
- NetBSD-`src` über die vorhandenen Source-Sets von NetBSD
(`makesrctars`: `src`, `gnusrc`, `syssrc`, `sharesrc`). `xsrc` gibt es
nicht mehr: X kommt aus pkgsrc (`X11_TYPE=modular`).
- Ein eigenes Set (Arbeitsname `msrc`) mit allem, was NetBSD nicht
abdeckt: `pkgsrc`, `patches`, `tools`, `Makefile`, `docs`, die Distfiles und
eine Datei mit den Pins der Importe.
abdeckt: `pkgsrc`, `tools`, `Makefile`, `docs`, die Distfiles und
eine Datei mit den Pins.
- Die Distfiles sind nur die, die zu Makronix gehören (die `makronix`-
Paketliste), nicht der ganze pkgsrc-Bestand.
- Das Source-Set ist in sysinst wie alles andere standardmäßig ausgewählt.
@@ -90,8 +95,8 @@ isosrc`) trägt alle Sets und braucht keinen Wechsel. Gemessen am 2026-11-07:
- Eine zweite Installationsmethode neben sysinst.
- Umwege über selbstgebaute Ramdisk-Bootpfade, wenn sysinst und der
NetBSD-Standard das Problem lösen. Die Patches `0005` und `0006`
(cgdroot-Ramdisk) wurden am 2026-11-06 deshalb aus dem Baum genommen
(`patches/unused/`).
(cgdroot-Ramdisk) wurden am 2026-11-06 deshalb aus dem Baum genommen; mit
`patches/` sind am 2026-11-09 auch die Reste entfallen.
## Wann ein Teil fertig ist
@@ -113,8 +118,9 @@ liegt. Die Regeln für Befehl, Beleg und Quelle stehen in
Entschieden (Konrad, 2026-11-06): Medien, Standardauswahl des Source-Sets und
Umfang der Distfiles wie oben. `AGENTS.md` in den Eigenverzeichnissen des
Repos, je eine im Root von `src`, `xsrc` und `pkgsrc` und je eine in den 21
obersten Verzeichnissen von `src`, direkt im Baum und nicht als Patch.
Repos, je eine im Root von `src` und `pkgsrc` und je eine in den 21
obersten Verzeichnissen von `src`; seit `src/` getrackt ist, sind sie Teil des
Baums, kein Beiwerk.
Offen:
@@ -122,11 +128,10 @@ Offen:
NetBSD-Standard? Das wird im Quelltext von sysinst und im Bootloader
nachgelesen, bevor Code entsteht.
- Endgültiger Name des Source-Sets (`msrc` oder anders).
- Die `AGENTS.md`-Dateien in den Importen gehen bei einem neuen Import
verloren (sie liegen untracked direkt im Baum, nicht in `patches/`). Wer sie
danach neu anlegt, und woher der Text kommt, ist nicht festgelegt.
## Entschieden: X11 und Wayland (Konrad, 2026-11-07)
## Überholt: X11 und Wayland (Konrad, 2026-11-07)
Überholt am 2026-11-09: `xsrc` ist gelöscht, X kommt aus pkgsrc (siehe unten).
- Der Desktop (NetBSD) behält NetBSDs `xsrc`; `X11_TYPE=native`. Grund: die
Binärpakete von pkgsrc (Firefox, Thunderbird, QEMU) hängen am X der Basis,
@@ -159,20 +164,22 @@ das offen in `docs/PLATFORMS.md`, und der Beleg kommt von echter Hardware.
Das System heißt Makronix 0.99.9, "based on NetBSD". `uname -s` bleibt NetBSD
(pkgsrc und `config.guess` entscheiden danach); Patch `0015`.
## Geplant: X aus pkgsrc statt `xsrc` (Konrad, 2026-11-08)
## Entschieden: X aus pkgsrc statt `xsrc` (Konrad, 2026-11-09)
Konrad will `xsrc` streichen und X aus pkgsrc nehmen (`X11_TYPE=modular`). Das
ersetzt die Entscheidung vom 2026-11-07 oben, deren Grund war, dass die
Binärpakete am X der Basis hängen: mit pkgsrc-X werden sie alle gegen das
pkgsrc-X gebaut. Vorher ein Machbarkeitsbau (`modular-xorg` und CDE in der
Build-VM, Sitzung startet); `xsrc` wird erst danach gelöscht.
`xsrc/` ist gelöscht, `X11_TYPE=modular`. Xorg, die X-Bibliotheken und die
X-Clients kommen aus pkgsrc unter `/usr/pkg`; die Basis hat kein X mehr.
Der Machbarkeitsbau (Xorg + CDE in der Build-VM, Sitzung startet) steht noch
aus — bis dahin ist das eine Entscheidung mit offenem Beleg, kein gemessener
Zustand. Die Binärpakete müssen gegen das pkgsrc-X neu gebaut werden.
## Geplant: NetBSD-Baum im Root-Repo (Konrad, 2026-11-08)
## Entschieden: NetBSD-Baum im Root-Repo (Konrad, 2026-11-09)
`src/` wird direkt ins Root-Repo übernommen (ein Import-Commit, Upstream auf
einem Branch `vendor/netbsd`, Merge mit `-X subtree=src`), weil `mobile/` auch
im Repo liegt und der Baum stark verändert wird (DRM, WLAN-Treiber).
`overlay/` und `patches/src` gehen dann als Commits in `src/` auf.
`src/` ist ins Root-Repo übernommen: getrackt, ohne eigenes `.git`, Basis in
`src/BASE` (`e523df740`). `overlay/` und `patches/src` sind aufgelöst, ihre
Änderungen stehen in `src/`. Upstream bleibt als `refs/netbsd/src` (trunk,
shallow) zum Nachlesen. Ein `vendor/netbsd`-Branch für spätere Merges ist
noch nicht angelegt; bis dahin ist Upstream ein Vergleichsbaum, kein
Merge-Ziel.
## Entschieden: `make release` baut alles (Konrad, 2026-11-08)
@@ -194,7 +201,7 @@ unterstützt in der Liste, wenn ihr Test grün ist (`docs/PLATFORMS.md`).
- Erster Schritt (gemacht): `tools/theme-logo.sh PALETTE.dp NAME OUTDIR` leitet das
Logo aus einer Palette ab (`docs/logo/camouflage/`). Offen: das Icon-Set (die
CDE-Icons in den Palettenfarben), das Installer-Theme (statt der festen
Standardpalette in `overlay/usr.sbin/sysinst/util.c` `do_coloring()`), der
Standardpalette in `src/usr.sbin/sysinst/util.c` `do_coloring()`), der
Release-Name in Banner, motd und `uname -v`.
## Geplant: Upgrade mit einem Klick (Konrad, 2026-11-09)
+15 -22
View File
@@ -11,7 +11,6 @@
TOP := $(CURDIR)
SRC := $(TOP)/src
XSRC := $(TOP)/xsrc
OBJ := $(TOP)/build/obj
JOBS ?= $(shell nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 2)
@@ -29,25 +28,19 @@ endif
BUILD_SH := cd $(SRC) && ./build.sh \
-U -u -j $(JOBS) -m $(MACHINE) \
-M $(OBJ) -O $(OBJ) -x -X $(XSRC)
-M $(OBJ) -O $(OBJ)
.PHONY: all build release install tools kernel clean-sanity stamp overlay \ test compress
.PHONY: all build release install tools kernel clean-sanity stamp test compress
sourcesets isosrc cdtest userland usb mcde-linux
# Where tools/msrc-stage.sh assembles the msrc set.
SRCSTAGE := $(TOP)/build/msrc
# The directories Makronix owns as full copies (overlay/) go into src/ before
# anything is keyed or built. Stops, without overwriting, when src/ holds an
# edit that is not in the overlay. See tools/overlay.sh.
overlay:
@tools/overlay.sh sync
# Before every build: drop the derived artefacts whose content depends on the
# import commit, on our patches or on the overlay. Without this, an
# incremental run keeps an old INSTALL ramdisk and the test measures the
# previous code (measured 2026-11-03). See tools/build-stamp.sh.
stamp: overlay
# sources. Without this, an incremental run keeps an old INSTALL ramdisk and
# the test measures the previous code (measured 2026-11-03). See
# tools/build-stamp.sh.
stamp:
@tools/build-stamp.sh
# The default: everything the system consists of, no medium.
@@ -67,7 +60,7 @@ release: stamp
# images directory"). One build.sh operation, not a chain.
# It only packages what `make release' built, so it checks that nothing has
# changed since (tools/build-stamp.sh -c) instead of discarding the release.
iso: overlay
iso:
@tools/build-stamp.sh -c
tools/cd3.sh stage
$(BUILD_SH) iso-image
@@ -76,7 +69,7 @@ iso: overlay
# the bootable installation image for a USB stick (GPT, MBR and EFI), built from
# what `make release' made: images/Makronix-*-amd64-install.img.gz
usb: overlay
usb:
@tools/build-stamp.sh -c
$(BUILD_SH) install-image
@tools/images.sh unpack
@@ -92,12 +85,12 @@ test:
@tools/test.sh
# The source sets, RELEASEDIR/source/sets: NetBSD's own (src, gnusrc, syssrc,
# sharesrc, xsrc: `build.sh sourcesets', src/BUILDING) and msrc, which
# carries the rest a system needs to rebuild itself offline -- pkgsrc, patches,
# tools, the Makefile, docs, the archives of the Makronix packages only, and
# the pins of the imports (tools/msrc-stage.sh, patch 0010 for
# makesrctars -m). Needs the distfiles (tools/makronix-distfiles.sh fetch).
sourcesets: overlay
# sharesrc: `build.sh sourcesets', src/BUILDING) and msrc, which carries the
# rest a system needs to rebuild itself offline -- pkgsrc, tools, the Makefile,
# docs, the archives of the Makronix packages only, and the pins (tools/
# msrc-stage.sh, patch 0010 for makesrctars -m). Needs the distfiles
# (tools/makronix-distfiles.sh fetch).
sourcesets:
tools/makronix-pins.sh check
tools/makronix-distfiles.sh check
tools/msrc-stage.sh $(SRCSTAGE)
@@ -108,7 +101,7 @@ sourcesets: overlay
# and upstream skips the CD when CDSOURCE is defined (distrib/amd64/cdroms/
# Makefile), so this writes the DVD only, over the one `make iso' made.
# Run `make release ARCH=...' and `make sourcesets' first.
isosrc: overlay
isosrc:
@tools/build-stamp.sh -c
tools/cd3.sh stage
$(BUILD_SH) -V CDSOURCE=true iso-image
+4 -3
View File
@@ -1,5 +1,6 @@
# The commits of the imports this tree belongs to (tools/makronix-pins.sh).
# The commits this tree belongs to (tools/makronix-pins.sh).
# src/ is a tracked fork, not a repository: this is the upstream NetBSD commit
# it was taken from (also src/BASE). refs/netbsd/src is upstream trunk, for
# watching, not a build input.
src e523df740a5bedc3e9fab13d5758f22a29f2d3c2
xsrc 99aacae3060c7409b82101d7e873fc500e602b8b
pkgsrc 3c1118e9443240d45c83193ab89f92e0eb20b2ff
overlay-base e523df740a5bedc3e9fab13d5758f22a29f2d3c2
+5 -3
View File
@@ -33,9 +33,11 @@ ist verboten:
`nb-install-image` mit selbstgewaehlten Argumenten
- keine Handarbeit an `build/obj/releasedir/**` — nicht loeschen, nicht
verschieben, nicht ersetzen. Ist ein Artefakt falsch, ist der Build falsch.
- kein `git checkout` / `git clean` / `git reset` in `src/`, um einen
fehlgeschlagenen Lauf zu "bereinigen". Aenderungen gehoeren als Patch nach
`patches/src/`.
- kein `git reset --hard` / `git checkout -- .` / `git clean -fdx` im
Repo-Root, um einen fehlgeschlagenen Lauf zu "bereinigen". `src/` und
`mobile/` sind getrackt; unfertige Arbeit wird nicht weggeworfen, sondern
als Commit festgehalten oder mit `git restore <datei>` einzeln
zurueckgenommen.
- kein Loeschen von `src/distrib/sets/lists/makronix`, damit `checkflist`
durchgeht.
+2 -2
View File
@@ -124,8 +124,8 @@ tooldir and object files on the local disk, sources from the share):
"at least 4 times slower", not as a measured factor.
What follows for the work: **edit through the share, build from a local copy.**
`overlay/`, `patches/`, `tools/` and `docs/` are small and read warm; `src/`,
`xsrc/` and `pkgsrc/` are built from the VM's own disk (`/usr/src`, `/usr/msrc`).
`tools/` and `docs/` are small and read warm; `src/` and `pkgsrc/` are built
from the VM's own disk (`/usr/src`, `/usr/msrc`).
### How it is set up
+5
View File
@@ -1,5 +1,10 @@
# NEXT -- Arbeitsplan zur Übergabe (Stand 2026-11-09, Konrad: "ein anderes Modell soll weitermachen")
> **Überholt am 2026-11-09:** `src/` ist jetzt getrackt, `xsrc/` ist gelöscht,
> und X kommt aus pkgsrc (`X11_TYPE=modular`). Die Abschnitte über
> `patches/src`, `overlay/` und `/usr/xsrc` beschreiben den Stand davor; die
> Karten darin sind Geschichte, nicht Auftrag.
Dies ist ein **datiertes Arbeitsblatt**, kein Statusdokument (`docs/AGENTS.md`): wer einen
Punkt erledigt, streicht ihn; ist die Datei leer, wird sie gelöscht. Zuerst lesen:
`GOAL.md`, `AGENTS.md`, `docs/BUILD-CONTRACT.md`, `docs/PLATFORMS.md`. Konrad spricht
+9 -11
View File
@@ -8,16 +8,14 @@ What the source sets are, where they land, and what is and is not proven.
| set | unpacks to | what |
|---|---|---|
| `src`, `gnusrc`, `syssrc`, `sharesrc` | `/usr/src` | NetBSD, at the pin in `PINS`, with our patches and the overlay already applied, with its `.git` (in `src`) |
| `xsrc` | `/usr/xsrc` | NetBSD X, with its `.git` |
| `msrc` | `/usr/msrc` | the Makronix tree: `Makefile`, `GOAL.md`, `AGENTS.md`, `docs/`, `tools/`, `patches/`, `overlay/`, `packages.list`, `PINS`, `distfiles.lst`, its own `.git`, `pkgsrc/` (pinned checkout with `.git`), `distfiles/` (only the archives of Makronix packages), and the links `src -> /usr/src`, `xsrc -> /usr/xsrc` |
| `src`, `gnusrc`, `syssrc`, `sharesrc` | `/usr/src` | Makronix's NetBSD tree (base `src/BASE`), as it is in the repository; no `.git` |
| `msrc` | `/usr/msrc` | the Makronix tree: `Makefile`, `GOAL.md`, `AGENTS.md`, `docs/`, `tools/`, `packages.list`, `PINS`, `distfiles.lst`, `pkgsrc/` (pinned checkout with `.git`), `distfiles/` (only the archives of Makronix packages), and the link `src -> /usr/src` |
The first five come from NetBSD's `makesrctars`; `msrc` from the same
command (`-m`, patch 0010), assembled by `tools/msrc-stage.sh`. The
trees carry their git repositories (`makesrctars -g`), so on the installed
system `git -C /usr/msrc/src status` shows the same as in development,
and `tools/overlay.sh`, `tools/build-stamp.sh` and `tools/makronix-pins.sh`
need nothing special. `tools/makronix-pins.sh check` compares `PINS` with
The first four come from NetBSD's `makesrctars`; `msrc` from the same
command (`-m`, patch 0010), assembled by `tools/msrc-stage.sh`. `src/` is
tracked in the development repository, so the source sets carry the files a
rebuild needs, not the history; `pkgsrc/` still carries its own `.git`.
`tools/makronix-pins.sh check` compares `PINS` with
the repositories.
The sets are `.tgz` (`makesrctars`), about 2.3 GB together with the git
@@ -59,8 +57,8 @@ log)
### Measured 2026-11-07
- The DVD made by `make isosrc` installs `/usr/src`, `/usr/xsrc` and
`/usr/msrc` (with `PINS`, `pkgsrc`, and all 71 distfiles of `distfiles.lst`);
- The DVD made by `make isosrc` installs `/usr/src` and `/usr/msrc` (with
`PINS`, `pkgsrc`, and all 71 distfiles of `distfiles.lst`);
`PINS` names the overlay base of the tree it was made from:
`build/logs/install-src-cd13-2026-11-07.log` (all checks PASS).
- Not proven yet: that a system installed this way rebuilds itself with no
+1 -1
View File
@@ -8,7 +8,7 @@ measured. Nothing here has been run on an installed system over time.
- **Where they come from.** The installer writes `/etc/pkg_install.conf` with
`PKG_PATH` (the NetBSD project's binary repository for the release the
packages of the media come from, `PKG_REPOSITORY` in
`overlay/usr.sbin/sysinst/setup.c`) and `CHECK_OS_VERSION=no` (the packages
`src/usr.sbin/sysinst/setup.c`) and `CHECK_OS_VERSION=no` (the packages
are built for NetBSD 11.0, Makronix is 11.99.9: `pkg_add` would warn about
every one). So `pkg_add firefox` and `pkg_add -u` work as on any NetBSD.
- **Security.** The installer sets `fetch_pkg_vulnerabilities=YES` in
+14 -4
View File
@@ -54,6 +54,7 @@ here.
docs/ PORTING.md (new phone), BOOT.md (boot chain)
base/ pkgsrc/ patches/ later phases; empty now
build/ output, ignored
../refs/linux/<version> the shared Linux source (submodule, read-only)
## Rules
@@ -72,10 +73,19 @@ here.
## Where the kernel lives (today)
`kernel/PIN` names the upstream commit, `kernel/patches/` the series on top;
`make linux` makes `build/linux-<device>` from them (`KERNEL_TREE`), and
`make kernel` builds the Image, the modules and the device's DTB
(`KERNEL_DTB` in `device.conf`) there. The tree is build output: change it
The kernel source is **outside `mobile/`**, one shared Linux tree for the
whole repository: `../refs/linux/7.0.0` (a shallow submodule at the commit in
`kernel/PIN`). `mobile/` holds only the changes: `kernel/patches/` is the
series on top, applied in filename order.
`make linux` clones the shared tree locally (hardlinks, no network) into
`build/linux-<device>` (`KERNEL_TREE`), checks it out at the pin and applies
the patches; `make kernel` builds the Image, the modules and the device's DTB
(`KERNEL_DTB` in `device.conf`) there. The build tree is output: change it
with commits, then export them into `kernel/patches/` (`git format-patch
--start-number N`). Since 2026-11-08 the DTS of hotdogb is in the series too
(0007); there is no binary DTB any more.
The shared tree is never edited. A pin moves by updating the submodule and
`kernel/PIN` together, with the measurement that justifies it; a drift
between them is an error (`tools/fetch-kernel.sh`).
+10 -4
View File
@@ -1,7 +1,13 @@
# The Linux tree the phones' kernels are built from: an upstream commit plus
# the patches in patches/, applied in filename order (tools/fetch-kernel.sh).
# Read by sh (`. kernel/PIN`). A phone may name a different tree in its
# device.conf (KERNEL_URL, KERNEL_COMMIT, KERNEL_PATCHDIR).
# The Linux tree the phones' kernels are built from: the shared tree
# ../refs/linux/7.0.0 (a submodule, shallow) at KERNEL_COMMIT, plus the
# patches in KERNEL_PATCHDIR, applied in filename order
# (tools/fetch-kernel.sh). Read by sh (`. kernel/PIN`).
#
# KERNEL_URL/KERNEL_COMMIT are provenance and drift check: the shared tree
# must be at KERNEL_COMMIT. A phone may name a different tree in its
# device.conf (KERNEL_REF, KERNEL_URL, KERNEL_COMMIT, KERNEL_PATCHDIR); without
# KERNEL_REF the build falls back to cloning KERNEL_URL.
KERNEL_REF=refs/linux/7.0.0
KERNEL_URL=https://gitlab.nura.eco/soc/qualcomm-sm8150/linux.git
KERNEL_COMMIT=8e126dbc4044ef2cec3ebe5754ddb05faa554af6
KERNEL_PATCHDIR=kernel/patches
+22 -6
View File
@@ -2,13 +2,16 @@
#
# Create the kernel tree for a device: the pinned upstream commit with our
# patches applied on top. The tree is build output (build/linux-<device>),
# never source; the source is the pin and the patches.
# never source; the source is the shared tree at the repository root
# (../refs/linux/<version>, KERNEL_REF in kernel/PIN) plus the patches.
#
# Usage: fetch-kernel.sh DEVICEDIR DESTDIR
#
# KERNEL_URL in the environment overrides the pin's URL: point it at a local
# clone to work offline (KERNEL_URL=$HOME/src/nura/sm8150-linux). The commit
# must be in that clone. An existing DESTDIR is left alone.
# The shared tree is cloned locally (hardlinks, no network) and must be at
# KERNEL_COMMIT; a drift is an error, not a silent fetch of something else.
# A device that names KERNEL_COMMIT but no KERNEL_REF falls back to KERNEL_URL
# (the old behaviour, for a device built from its own tree).
# An existing DESTDIR is left alone.
set -eu
. "$(dirname "$0")/lib.sh"
@@ -18,7 +21,7 @@ load_device "$1"
dest=$2
# the device's own pin, else the shared one
: "${KERNEL_URL:=}" "${KERNEL_COMMIT:=}" "${KERNEL_PATCHDIR:=}"
: "${KERNEL_URL:=}" "${KERNEL_COMMIT:=}" "${KERNEL_PATCHDIR:=}" "${KERNEL_REF:=}"
env_url=$KERNEL_URL
if [ -z "$KERNEL_COMMIT" ]; then
. "$ROOT/kernel/PIN"
@@ -31,7 +34,20 @@ if [ -e "$dest/.git" ]; then
exit 0
fi
git clone -q --no-checkout "$KERNEL_URL" "$dest"
if [ -n "$KERNEL_REF" ]; then
case $KERNEL_REF in
/*) ref=$KERNEL_REF ;;
*) ref=$ROOT/../$KERNEL_REF ;;
esac
[ -e "$ref/.git" ] || die "$KERNEL_REF missing; run: git submodule update --init --depth 1 $KERNEL_REF"
have=$(git -C "$ref" rev-parse HEAD) || die "cannot read $KERNEL_REF"
[ "$have" = "$KERNEL_COMMIT" ] ||
die "$KERNEL_REF is at $have, kernel/PIN says $KERNEL_COMMIT"
# local clone: hardlinks, no network, stays shallow
git clone -q --no-checkout "$ref" "$dest" || die "cannot clone $KERNEL_REF"
else
git clone -q --no-checkout "$KERNEL_URL" "$dest"
fi
git -C "$dest" checkout -q "$KERNEL_COMMIT"
for p in "$patchdir"/*.patch; do
[ -e "$p" ] || break
-48
View File
@@ -1,48 +0,0 @@
# overlay/ -- the directories Makronix owns
A directory that Makronix changes a lot is kept here as a full, tracked copy of
the NetBSD directory, under the same path it has in `src/`. Before every
build `tools/overlay.sh sync` puts it into `src/`, so the build gets the
overlay and `src/` is build input, not the place to work. This is the vendor
branch pattern: the import is the vendor version, this is the local version.
## Layout
- `UNITS` -- the directories that are overlays, one per line, relative to
`src/`. Today: `usr.sbin/sysinst`.
- `BASE` -- the `src/` commit the copies were taken from.
- `<path>/` -- the copy, for example `usr.sbin/sysinst/`.
## Rules
- Work **here**. Never edit a unit inside `src/`: the next sync would
overwrite it, and `overlay.sh sync` refuses to (it stops and lists the
difference) so that nothing is lost silently.
- `tools/overlay.sh diff` shows what we changed against the import at `BASE`;
`check` says whether `src/` matches; `list` shows the units.
- A unit's directory contains everything that belongs to it, including its own
`AGENTS.md`. It is copied into `src/` with the rest.
- Adding a unit: unpack the directory from `src/` at `BASE` (it must be the
pristine import: `git -C src archive`), add the path to `UNITS`, delete every
patch in `patches/src/` that touched the directory (its content moves into
the copy), run `tools/overlay.sh check`, then build. Do this in one commit.
- Which tool to choose: a small edit to a file NetBSD owns stays a patch
(`patches/AGENTS.md`); a directory we really rework becomes a unit. Do not
keep both for the same directory.
- Style and conventions are NetBSD's (`src/share/misc/style`), exactly as for
patches. The comment says which NetBSD pattern a change follows.
## Upgrading the import
When `src/` moves to a new commit, `sync` stops ("the import moved") until the
overlay is rebased. The recipe is a three-way merge per file: base = the file
at `BASE`, theirs = the file at the new commit, ours = the file here
(`git merge-file`), then `BASE` is set to the new commit. **No script does
this yet**, and it has not been tried: it needs the old `BASE` commit from
the shallow clone, and whether the remote hands it out is untested.
## Not done
- `sync` is a no-op for a unit that already matches, so a build keeps its
incremental state; but the first build after a change recompiles what the
changed files feed (for sysinst, the install ramdisk and the media).
-1
View File
@@ -1 +0,0 @@
e523df740a5bedc3e9fab13d5758f22a29f2d3c2
-3
View File
@@ -1,3 +0,0 @@
# Directories Makronix owns: full copies under overlay/, relative to src/.
# One per line. tools/overlay.sh puts them into src/ before every build.
usr.sbin/sysinst
-267
View File
@@ -1,267 +0,0 @@
# usr.sbin/sysinst/ -- the installer (Makronix fork)
NetBSD's `sysinst(8)`, kept as an overlay unit (`overlay/AGENTS.md`). Edit it
in `overlay/usr.sbin/sysinst/`; the copy in `src/` is overwritten by the sync.
Based on the import at `overlay/BASE`; `tools/overlay.sh diff` shows our
changes.
## Goal of the fork (`GOAL.md`)
1. CDE default palette for the colours.
2. Simple installation: choose the target disk, the rest is automatic; manual
partitioning stays available.
3. Optional encryption of the target disk (cgd), bootable.
What the code already does about each, with file and line:
`docs/reference/sysinst-survey.txt` (read it before designing a change).
## The simple installation mode (done, measured 2026-11-06)
`do_install()` (`install.c`) first asks "Select the installation mode":
Simple, Advanced, Abandon. `simple_install` (`defs.h`, set in `install.c`,
reset by the `do_install` wrapper so that an upgrade in the same session does
not inherit it) is checked at these places; each skips a question that only
exists to shape the layout or the sets, and keeps the default the question
would have offered:
- `part_edit.c`: `select_part_scheme` takes GPT where it can be booted;
`edit_outer_parts` uses the whole disk.
- `bsddisklabel.c`: `make_bsd_partitions` takes the default layout
(`LY_USEDEFAULT`) instead of `ask_layout`.
- `label.c`: `edit_and_check_label` does not show the partition editor; if
`verify_parts` rejects the layout, it is shown after all.
- `arch/i386/md.c` (used by amd64): `md_get_info` drops the partitioning that
is on the disk; `get_bios_info` does not ask when exactly one BIOS disk
matches; `md_post_newfs_bios` keeps the console the installer runs on for
the boot blocks.
- `util.c`: `get_and_unpack_sets` tries `get_via_cdrom()` before it shows the
"Install from" menu.
- `install.c`: all sets (`init_set_status(0)`), no set menu.
Kept on purpose (they protect data or secrets): "Shall we continue?", the disk,
the last chance, the warning when other partitions would be overwritten, the
root password, the entropy menu when the kernel asks for it, the config menu,
the notice that an optional set is not on the medium.
Test: `tools/install-simple.sh` (about 25 keys with the last step, then `login:`, the `makronix` set,
CDE and the GPT are checked). Known limits: the simple mode without encryption was run on BIOS only; the
messages exist in five languages but only English was seen; on a disk with a
second system that system is erased without being offered as a choice.
## Encrypted installation (done, measured 2026-11-06, BIOS and UEFI, amd64)
In the simple mode sysinst asks "Encrypt the disk?" (`cgdroot.c`, built only
where the port defines `-DCGDROOT`, today `arch/amd64/Makefile`). Design and
sources: `docs/reference/cgdroot-design.txt`. Test: `tools/install-cgd.sh`
(passphrase typed at the install and at boot, then `login:`, `makronix` set,
CDE, root on `/dev/cgd0a`, and no root file name readable in the raw disk
image; logs `build/logs/install-cgd-{bios,uefi}-*-2026-11-06.log`; `-f uefi`
for UEFI). UEFI layout: ESP (loader, copy of boot.cfg), `cgd.conf` (FFS:
kernel, module, boot.cfg, cgd.conf, parameters; the EFI loader takes the first
FFS partition as its default device), `cgdroot`. Limits: simple mode only, wrong
passphrase and kernel update (copy to `/cgdboot`) not tested, only English
seen. `cgd` is in `is_bootable_device()`'s list (`disks.c`) so cgd0 is handled
like raid.
## Colours (2026-11-06)
The default pair is black on white (`main.c`). `do_coloring()` (`util.c`)
sets three pairs: 1 text on the window colour, 2 the selected menu line, 3 the
menu box. Where `can_change_color()` the colours are those of the CDE default
palette: window colour = slot 5 (proven on a running CDE,
`docs/reference/cde-colours.txt`), selection and box = slot 4 (a design choice,
not proven), selected text white; on a fixed 8-colour console: white on blue.
With no colours at all (vt220 over serial) nothing changes. Pairs 2 and 3 are
drawn by `menuc`, which needs `patches/src/0009-menuc-colour-pairs.patch`.
## What is here
- `main.c`, `util.c`, `run.c`, `install.c`, `upgrade.c`, `target.c`,
`configmenu.c`, `net.c` -- the flow, the target, configuration, utilities.
- `disks.c`, `part_edit.c`, `partitions.[ch]`, `gpt.c`, `mbr.c`, `label.c`,
`disklabel.c`, `bsddisklabel.c`, `geom.c` -- disks and partition schemes.
- `partman.c`, `menus.pm`, `msg.pm.*` -- the extended partition manager (RAID,
LVM, cgd, vnd).
- `menus.mi`, `menus.entropy`, `msg.*.{de,en,es,fr,pl}` -- menus and messages
in five languages.
- `arch/<port>/` -- machine-dependent code: `md.c`, `md.h`, `Makefile`, and
for some ports `msg.md.*`. `arch/amd64` has only `md.c`, `md.h` and
`Makefile`. `Makefile` builds `arch/${MACHINE}` (or `arch/dummy`).
- `sysinst.8` -- the manual page; `TODO`, `README.md_defs` -- notes.
- `Makefile`, `Makefile.inc` -- the build; sysinst is also built into the
install ramdisks of the ports (`distrib/*/ramdisks`, `list.sysinst`).
## Rules for this directory
- **Every port uses this code.** Machine-independent files must stay portable
and must not assume amd64 or UEFI; what only amd64 needs goes into
`arch/amd64/`. A change that cannot be portable is a finding for the
report.
- A new or changed message exists in **every** language of `LANGUAGES`
(`Makefile.inc`: `de en es fr pl pt`), in each `msg.*.<lang>` file.
`msg_xlat.sh` reports a missing translation as an error (`-i` would ignore
it; do not). Change the manual page `sysinst.8` with the behaviour.
- `menu_defs.c` and `msg_defs.c` are generated from `menus.*` and `msg.*`
(`Makefile.inc`, `SRCS`); edit the sources, never generated files.
- NetBSD style: `src/share/misc/style`. Reuse the existing helpers
(`run_program`, `add_rc_conf`, the partitioning-scheme interface in
`partitions.h`) instead of new mechanisms.
- Test through a built medium, one change at a time, with the log kept in
`build/logs/`. A change is done when an installation from the medium
reaches `login:` (`GOAL.md`).
## Two CDs, the welcome screen and the last step (measured 2026-11-07)
- **Welcome** (`main.c`, `MENU_welcome`): after the language menu, "Welcome to
Makronix <release>", a short description, OK.
- **Two CDs** (`util.c`, `extract_file_to`): the first CD boots the GENERIC
kernel and loads `miniroot.kmod`, so the installer runs from RAM
(`root_is_ramdisk()`). When a set is not on the CD in the drive, the CD is
unmounted, `MENU_nextcd` asks for the next one (continue / skip this set),
and `cd_has_sets()` is retried silently for 16 s because the drive needs
time after a medium change. In `dist_list` the `makronix` set is the last
entry on purpose: the sets are extracted in list order, so there is one
change of CD, not one per set after it. The DVD needs none of this.
- **The last step of the simple mode** (`setup.c`, `makronix_setup()`, called
from `install.c` instead of `do_configmenu()`): hostname, network through the
configuration-menu form while the target is mounted (`configmenu.c`,
`makronix_config_network()` -> `set_network()`; if the network is not up,
`dhcpcd=YES`), time zone (`set_timezone()`), root password
(`root_pw_setup()`), a user through the configuration-menu form
(`makronix_config_user()` -> `add_new_user()`), then the created non-system
users (uid 1000..59999) are added to the groups wheel, operator, staff, users,
dialer, games, wsrc with `usermod(8)` in the chroot. `ntpdate`/`ntpd`,
`sshd`, mDNS, npf, pkg defaults and `dtlogin` in place of `xdm` (rc.d script
and PAM file copied from the pkgsrc examples) follow. `target.c`'s
`dup_file_into_target()` copies `/etc/wpa_supplicant.conf` and
`/etc/resolv.conf` only when the source exists. Passwords go to the chroot in
an environment variable, never on a command line. The advanced mode keeps the
configuration menu.
- Tests (all on the serial console, `build/logs/*-cd13-2026-11-07.log`,
`install-cgd-uefi-cd2-2026-11-07.log`): `tools/install-simple.sh` (CD 1, CD
2), `install-cgd.sh -f bios|uefi`, `install-simple.sh -S` (DVD with sources).
Checked after the boot: login as root with the typed password, `id` of the
user, host name, `rc.conf`, `/etc/localtime`, `dtlogin` running.
Not measured: that the CDE login screen is drawn (only that the process
runs); a wrong passphrase; the other languages.
## The extra programs and CD 3 (written 2026-11-07, test pending)
`extras.c`, `makronix_extras()`, called from `install.c` in the simple mode
after the sets (and after `cgdroot_finish()`, which needs CD 2 in the drive).
It asks nothing since 2026-11-09 (the extra programs are part of the userland:
Firefox, Thunderbird, QEMU, about 2.6 GB, measured as the sum of `SIZE_PKG` of the
112 packages), looks for
`<medium>/<machine>/packages/All/pkg_summary.gz`, asks for the next CD when
the installer runs from RAM and the medium in the drive has none (the same
Next-CD menu, its own message), copies the packages (about 480 MB) into
`/var/tmp/makronix-pkgs` of the target and runs the target's own
`/usr/sbin/pkg_add` in the chroot with `PKG_PATH` pointing there and the names of
`<machine>/packages/top.list`, then removes the copy. A second mount of the
medium inside the target does not work: the device is mounted already and
cd9660 refuses (EBUSY); the first try did that and said "Installing the extra
programs failed" with no pkg_add output (`install-simple-cd20-2026-11-07.log`). The DVD carries the directory (`build/cd3` through `CDBUILDEXTRA`, patch 0008, see
`tools/cd3.sh`), CD 3 is made by it. Nothing here is needed for a working
system: "no", or a medium without the directory, leaves it out.
Measured on the build VM (not yet through sysinst), `pkg_add -P` into a copy of
the sysroot's `/usr/pkg` with the files of the set already in place:
`pkg_add firefox thunderbird qemu` exit 0, 116 packages registered in
`/usr/pkg/pkgdb`, no conflict with the unregistered files of the set (only
xmlcatmgr says its catalogs "already exist"), `qemu-system-aarch64 --version`
prints 11.1.1 on NetBSD 11.99.9, 29 `qemu-system-*` targets. pkg_add warns
"was built for a different platform: NetBSD 11.0 vs 11.99.9" for every package
and goes on.
## The desktop services and four CDs (2026-11-07, test pending)
Decided by the owner of the project, 2026-11-07: remote login on by default,
root allowed with the password ("I do not care"), mDNS and the like on by
default, PulseAudio as the sound daemon, and a four-CD install set is fine.
So the question about ssh that was written first (`MENU_sshmode`) is gone.
- `setup.c`: `set_ssh()` -- `sshd=YES`, a line `PermitRootLogin yes` at the end
of `/etc/ssh/sshd_config` (password login is the default; the shipped file
has `PermitRootLogin` at `prohibit-password` in a comment), `/etc/npf.conf`
and `npf=YES`; `set_mdns()` -- `mdnsd=YES` and `hosts: files mdnsd dns` in
`/etc/nsswitch.conf` (mDNSResponder and its NSS module are in the base
system: `usr.sbin/mdnsd`, `lib nss_mdnsd.so.0`, `rc.d/mdnsd`; the module
answers only `.local`); `set_pkg_defaults()` -- `PKG_PATH`,
`CHECK_OS_VERSION=no`, `fetch_pkg_vulnerabilities=YES` (`docs/UPDATING.md`).
The firewall opens ssh and UDP 5353 and nothing else
(`docs/reference/npf-default.conf`, validated with `npfctl validate`).
- `extras.c`: the packages come from CD 3 and, if they need more, CD 4, ...
(`tools/cd3.sh` splits them first-fit to 700 MB per CD; each CD has
`packages/disc` "N M"). All CDs are copied into the target, then `pkg_add`
runs once; `dbus` and `cupsd` are enabled from the examples the packages bring
(`share/examples/rc.d`). PulseAudio needs no rc script: the clients start it.
The set today: Firefox, Thunderbird, QEMU, PulseAudio with `pavucontrol`, CUPS
with `cups-filters`; 164 packages, 569 MB, so **one** CD for amd64 -- CD 4
appears when the packages pass 700 MB. The multi-CD code is tested by
building the CDs with `CDPKG_LIMIT=300000000`.
- `msg.mi.{de,es,fr,pl}`: **an error found on 2026-11-07**: the messages I had
appended with `printf '\0344'` in zsh had control characters where the umlauts
and accents belong (zsh reads `\0NNN` as three digits including the 0), in
four languages, from the setup step on; they were repaired byte by byte
(`b*8+c`), the files now show the right letters. The languages were never
looked at on a screen: only English has been run.
## Portuguese (Brazil), 2026-11-07, not built yet
`msg.mi.pt`, `msg.pm.pt`, `msg.mbr.pt`, `msg.entropy.pt` and `arch/i386/msg.md.pt`
(ISO-8859-1, `pt` in `LANGUAGES`, locale `pt_BR.ISO8859-1`), plus patch `0013`
for the two lists that name a catalog (`list.sysinst`, `lists/base/md.amd64`).
The text was translated in five parts by parallel helpers from the English
files with one fixed rule set (structure, `printf` conversions, glossary,
80 columns); the main file is the four parts put together. Checked by me with a
script: all 496 + 114 + 29 + 26 + 37 message names in the same order, the same
`%` conversions and `@@...@@` in every message, and every file encodable in
ISO-8859-1. **Not checked:** that `msgc`/`msg_xlat.sh` accept it (that is the
build), how it looks on the screen (line widths of menus), and the quality of
the Portuguese by a native speaker. The Polish texts written for the Makronix
messages have no diacritics (ASCII) -- the same kind of gap.
## The install image on a USB stick (2026-11-08)
`disks.c`, `is_root_wedge_parent()`: the root of the install image is a wedge
(`dk1`) of the stick (`sd0`); `is_active_rootpart()` compares names only and did
not exclude the stick, so the disk list offered the stick first (measured with
`tools/install-simple.sh -U`: `a: sd0 (3.0G)`). The disk whose wedge is the
root is no longer listed.
## Makronix, not NetBSD, in the messages (2026-11-08)
The texts say Makronix; `@@MXVERSION@@` (from `src/sys/conf/makronix-release`,
`MAKRONIXVER` in `Makefile.inc`) is the product version, `@@VERSION@@` stays the
NetBSD version. Kept as NetBSD on purpose: the CDN and the entropy-file
messages (they name NetBSD infrastructure), the partition type name in `mbr.c`,
the `EFI/NetBSD` directory of the ESP (efiboot reads `esp:/EFI/NetBSD/boot.cfg`),
the message identifiers and the RCS ids. Patch `0015-makronix-identity` does the
same for the kernel banner, the boot loaders and the media names.
## The theme of the release (2026-11-08)
`palette.dp` is a copy of the CDE palette the release is named after
(`/usr/pkg/dt/share/palettes/Camouflage.dp`); `Makefile.inc` turns its slots 5
(window colour) and 4 (selected line, box) into `palette.h`, which `util.c`
includes for `do_coloring()`. A release changes its installer colours by
replacing `palette.dp` (or `make PALETTE_DP=...`), not the C code. Checked: the
default palette gives the old constants, 776/698/659 and 408/435/510. Seen only
where the terminal can redefine colours (`can_change_color()`); on a fixed
8-colour console the installer is white on blue as before. The welcome screen
shows the release name (`@@MXNAME@@` from `sys/conf/makronix-codename`).
## Why a command failed (2026-11-08)
`run.c`: upstream's `run_program()` says only "Command failed" for a command that
printed nothing on the screen (`RUN_SILENT`), and the output of such a command is
thrown away. A MacBook Pro 2011 failed to create the partitions and the screen
said nothing else. Now every command's output is kept (the last 512 bytes) and the
status line says `Command failed (<exit status>): <last line it printed>`; the log
(`Logging functions`) has the command and its whole tail, and silent commands'
output goes to the log. `install.c`: before the partitions are written, the
simple mode clears the first and the last 4 MB of the disk (`wipe_disk_ends()`):
old partition maps, a GPT and its backup copy, LVM/LUKS headers. Not done for
the encrypted install (`cgdroot`), which partitions in its own way. Not yet
measured on a disk that failed: the QEMU tests only show that an installation
still works.
-68
View File
@@ -1,68 +0,0 @@
# $NetBSD: Makefile,v 1.4 2024/01/06 07:38:13 thorpej Exp $
#
# sysinst is usually built when the crunched install binary is built,
# but can be built here as a normal program for testing.
.if exists(arch/${MACHINE})
SUBDIR+=arch/${MACHINE}
.else
SUBDIR+=arch/dummy
.endif
.if ALL_MACHINES
SUBDIR += arch/acorn32
SUBDIR += arch/alpha
SUBDIR += arch/amd64
SUBDIR += arch/amiga
SUBDIR += arch/arc
SUBDIR += arch/atari
SUBDIR += arch/bebox
SUBDIR += arch/cats
SUBDIR += arch/cobalt
SUBDIR += arch/emips
SUBDIR += arch/evbarm
SUBDIR += arch/evbmips
SUBDIR += arch/evbppc
SUBDIR += arch/ews4800mips
SUBDIR += arch/hp300
SUBDIR += arch/hpcarm
SUBDIR += arch/hpcmips
SUBDIR += arch/hpcsh
SUBDIR += arch/hppa
SUBDIR += arch/i386
SUBDIR += arch/landisk
SUBDIR += arch/mac68k
SUBDIR += arch/macppc
SUBDIR += arch/mipsco
SUBDIR += arch/mvme68k
SUBDIR += arch/news68k
SUBDIR += arch/newsmips
SUBDIR += arch/ofppc
SUBDIR += arch/playstation2
SUBDIR += arch/pmax
SUBDIR += arch/prep
SUBDIR += arch/sandpoint
SUBDIR += arch/sgimips
SUBDIR += arch/shark
SUBDIR += arch/sparc
SUBDIR += arch/sparc64
SUBDIR += arch/vax
SUBDIR += arch/virt68k
SUBDIR += arch/x68k
SUBDIR += arch/zaurus
# XXX notyet SUBDIR += arch/iyonix
# These dirs are present in sys/arch but not here:
# amigappc cesfic dreamcast epoc32 evbsh3 ia64 ibmnws iyonix luna68k
# mmeye mvmeppc netwinder next68k rs6000 sbmips sun2 sun3
# (also evbsh5, but it doesn't really exist)
SUBDIR += arch/dummy
.endif
install:
.include <bsd.subdir.mk>
-324
View File
@@ -1,324 +0,0 @@
# $NetBSD: Makefile.inc,v 1.56 2026/07/12 20:07:45 martin Exp $
#
# Makefile for sysinst
.if exists(${.CURDIR}/../../../Makefile.inc)
.include "${.CURDIR}/../../../Makefile.inc"
.endif
PROG= sysinst
MAN= sysinst.8
WARNS= 4
SRCS+= menu_defs.c msg_defs.c main.c install.c upgrade.c \
txtwalk.c run.c factor.c net.c disks.c disks_lfs.c util.c geom.c \
label.c target.c md.c sizemultname.c configmenu.c checkrc.c \
disklabel.c partitions.c part_edit.c cgdroot.c setup.c extras.c
SRCS+= ${MD_OPTIONS:MAOUT2ELF:S/AOUT2ELF/aout2elf.c/}
SRCS+= ${CPPFLAGS:M-DWSKBD:S/-DWSKBD/wskbd.c/}
SRCS+= ${NODISKLABEL:D:Ubsddisklabel.c}
SRCS+= ${NOPARTMAN:D:Upartman.c}
.PATH: ${.CURDIR}/../../../../sbin/fsck
SRCS+=partutil.c
DPSRCS+= defs.h
SYSINSTLANG?= en
LANGUAGES?= de en es fr pl pt
MENUS_MI= menus.mi
MENUS_MI+= ${NOPARTMAN:D:Umenus.pm}
# Provide a timestamp when this binary was build for TODR sanity checking
.if ${MKREPRO_TIMESTAMP:Uno} != "no"
CPPFLAGS+= -DBUILD_TIMESTAMP=${MKREPRO_TIMESTAMP}
.else
BUILD_TS!= ${TOOL_DATE} -u '+%s'
CPPFLAGS+= -DBUILD_TIMESTAMP=${BUILD_TS}
.endif
.if ${NO_GPT:Uno} != "yes"
CPPFLAGS+= -DHAVE_GPT
MD_OPTIONS+= HAVE_GPT
GPT_DIR=${.CURDIR}/../../../../sbin/gpt
SRCS+= gpt.c gpt_uuid.c
CPPFLAGS.gpt_uuid.c+= -I${GPT_DIR}
CPPFLAGS.gpt.c+= -I${GPT_DIR}
.endif
.if ${NO_MBR:Uyes} != "yes"
CPPFLAGS+= -DHAVE_MBR
SRCS+= mbr.c
COPTS.mbr.c+= ${CC_WNO_MAYBE_UNINITIALIZED}
.endif
.if ${NO_CLONES:Uno} == "yes"
CPPFLAGS+= -DNO_CLONES
.else
MD_OPTIONS+= HAVE_CLONES
.endif
.if ${HAVE_DVD_IMAGE:Uno} == "yes"
CPPFLAGS+= -DHAVE_DVD_IMAGE
MD_OPTIONS+= HAVE_DVD_IMAGE
.endif
.if ${NO_DISKSIZE_CHECKS:Uno} == "yes"
CPPFLAGS+= -DNO_DISKSIZE_CHECKS
.else
MD_OPTIONS+= HAVE_DISKSIZE_CHECKS
.endif
.if ${CHECK_ENTROPY:Uyes} != "no"
MENUS_MI+= menus.entropy
CPPFLAGS+= -DCHECK_ENTROPY=1
.endif
MSG_MD?= msg.md.${SYSINSTLANG}
MENUS_MD?= menus.md.${SYSINSTLANG}
.include <bsd.own.mk> # for mk.conf
#.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
MAKRONIXVER!= cat ${NETBSDSRCDIR}/sys/conf/makronix-release
MAKRONIXNAME!= cat ${NETBSDSRCDIR}/sys/conf/makronix-codename
DISTRIBVER!= ${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh
DISTRIBVERDEP= ${NETBSDSRCDIR}/sys/sys/param.h \
${NETBSDSRCDIR}/sys/conf/osrelease.sh
_MKSHTARGET_CREATE?= ${_MKSHMSG_CREATE} ${.CURDIR:T}/${.TARGET}
DPADD= ${LIBCURSES} ${LIBTERMLIB} ${LIBPROP} ${LIBUTIL}
LDADD= -lcurses -ltermlib -lprop -lutil
UNIF_AWK= ${.CURDIR}/../../unif.awk
MSG_XLAT_SH= ${.CURDIR}/../../msg_xlat.sh
MSG_CMP_SH= ${.CURDIR}/../../msg_cmp.sh
SETS_TAR_SUFF=${"${USE_XZ_SETS:Uno}"!="no":?"tar.xz":"tgz"}
.if ${MKBSDTAR:Uno} == "no"
CPPFLAGS+= -DUSING_PAXASTAR
.endif
.if ${MKCOMPAT:Uno} != "no"
CPPFLAGS+= -DHAVE_BASE32
.endif
.if ${MKCOMPAT:Uno} != "no" && \
(${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el")
CPPFLAGS+= -DHAVE_BASE64
.endif
.if ${MKCOMPAT:Uno} != "no" && ${MKDEBUG:Uno} != "no"
CPPFLAGS+= -DHAVE_DEBUG32
.endif
.if ${MKCOMPAT:Uno} != "no" && ${MKDEBUG:Uno} != "no" && \
(${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el")
CPPFLAGS+= -DHAVE_DEBUG64
.endif
.if ${MKDTB:Uno} != "no"
CPPFLAGS+= -DHAVE_DTB
.endif
.if ${MKKMOD:Uno} != "no"
CPPFLAGS+= -DHAVE_MODULES
.endif
CATALOGDIR= /usr/share/sysinst/catalog
CPPFLAGS+= -I. -I${.CURDIR}/../.. -I${.CURDIR} \
-I${.CURDIR}/../../../../sbin/fsck \
-DSETS_TAR_SUFF=${SETS_TAR_SUFF:Q} \
-DREL=\"${DISTRIBVER}\" -DMACH=\"${MACHINE}\" \
-DMACH_${MACHINE} -DARCH_${MACHINE_ARCH} \
${NODISKLABEL:D-DNO_DISKLABEL} \
${NOPARTMAN:D-DNO_PARTMAN}
.if ${USE_XZ_SETS:Uno} != "no"
CPPFLAGS+= -DEXTRACT_NEEDS_BIG_RAM
.endif
.if ${RELEASEMACHINEDIR} != ${MACHINE}
CPPFLAGS+= -DARCH_SUBDIR="\"${RELEASEMACHINEDIR}\""
CPPFLAGS+= -DPKG_ARCH_SUBDIR="\"${MACHINE_ARCH}\""
.endif
.if defined(NETBSD_OFFICIAL_RELEASE) && ${NETBSD_OFFICIAL_RELEASE} == "yes"
CPPFLAGS+= -DSYSINST_FTP_HOST=\"ftp.NetBSD.org\" -DNETBSD_OFFICIAL_RELEASE
CPPFLAGS+= -DSYSINST_HTTP_HOST=\"cdn.NetBSD.org\" -DNETBSD_OFFICIAL_RELEASE
CPPFLAGS+= -DREL_PATH=\"netbsd-${DISTRIBVER:C/\.[0-9][_A-Z]*[0-9]*$//:S/./-/}\"
CPPFLAGS+= -DPKG_SUBDIR="\"${DISTRIBVER:C/_.*$//}\""
.else
CPPFLAGS+= -DSYSINST_FTP_HOST=\"nyftp.NetBSD.org\"
CPPFLAGS+= -DSYSINST_HTTP_HOST=\"nycdn.NetBSD.org\"
.if (${DISTRIBVER:M*.99.*})
CPPFLAGS+= -DREL_PATH=\"HEAD\"
CPPFLAGS+= -DPKG_SUBDIR="\"${DISTRIBVER:C/\.99\.[0-9]*[_A-Z]*$//}.0\""
.elif (${DISTRIBVER:M*.[0-9].[0-9]*})
CPPFLAGS+= -DREL_PATH=\"netbsd-${DISTRIBVER:C/\.[0-9][_A-Z]*[0-9]*$//:S/./-/}\"
CPPFLAGS+= -DPKG_SUBDIR="\"${DISTRIBVER:C/_.*$//}\""
.elif (${DISTRIBVER:M*.[0-9]*})
CPPFLAGS+= -DREL_PATH=\"netbsd-${DISTRIBVER:C/\.[0-9][_A-Z]*[0-9]*$//}\"
CPPFLAGS+= -DPKG_SUBDIR="\"${DISTRIBVER:C/_.*$//}\""
.endif
.endif
CPPFLAGS+= -DNETBSD_MAJOR='"${DISTRIBVER:C/\..*//}"'
.if !defined(DEBUG)
CPPFLAGS+= -DCATALOG_DIR=\"${CATALOGDIR}\"
.endif
.if (defined(DEBUG))
.if ${ACTIVE_CC} == "gcc"
# make gcc run additional passes for better debug info (only needed
# when compiling with -O0)
O0TRACKING= -fvar-tracking-assignments -fvar-tracking
.endif
CPPFLAGS+=-DDEBUG
DBG +=-g -O0 ${O0TRACKING}
COPTS.net.c += ${CC_WNO_MAYBE_UNINITIALIZED}
.else
.if defined(SMALLPROG)
COPTS += -Os
CPPFLAGS+= -DNO_HTTPS
.endif
.endif
.if (!defined(SMALLPROG) || defined(SMALLPROG_INET6)) && (${USE_INET6} != "no")
CPPFLAGS+=-DINET6
.endif
COPTS+= ${CC_WNO_FORMAT_TRUNCATION}
COPTS.disklabel.c+= ${CC_WNO_STRINGOP_TRUNCATION}
# Host to ftp from. Default:
# "ftp.NetBSD.org"
#
.if defined(SYSINST_FTP_HOST)
CPPFLAGS+= -DSYSINST_FTP_HOST=\"${SYSINST_FTP_HOST}\"
.endif
# Top-level ftp directory. Default:
# "pub/NetBSD/NetBSD-" + VER + "/" + MACH
#
.if defined(SYSINST_FTP_DIR)
CPPFLAGS+= -DSYSINST_FTP_DIR=\"${SYSINST_FTP_DIR}\"
.endif
# Top-level CDROM directory. Default:
# "/" + MACH
#
.if defined(SYSINST_CDROM_DIR)
CPPFLAGS+= -DSYSINST_CDROM_DIR=\"${SYSINST_CDROM_DIR}\"
.endif
DPSRCS+= msg_defs.h menu_defs.h
# The release palette (GOAL.md: a release is named after a CDE palette and looks
# like it): palette.dp is a copy of that palette, eight lines `#RRRRGGGGBBBB'.
# Slot 5 is the window colour, slot 4 the selected line and the box (util.c,
# do_coloring). curses wants 0..1000 per channel: the high byte of each 16 bit
# value * 1000 / 255. `make PALETTE_DP=...' builds another release.
PALETTE_DP?= ${.CURDIR}/../../palette.dp
DPSRCS+= palette.h
CLEANFILES+= palette.h
palette.h: ${PALETTE_DP}
${_MKTARGET_CREATE}
${TOOL_AWK} 'function hx(s, i, v) { v = 0; s = tolower(s); for (i = 1; i <= length(s); i++) v = v * 16 + index("0123456789abcdef", substr(s, i, 1)) - 1; return v } \
function c(h, o) { return int(hx(substr(h, o, 2)) * 1000 / 255 + 0.5) } \
NR == 5 { h = substr($$0, 2); print "#define\tCDE_BG_R\t" c(h, 1); print "#define\tCDE_BG_G\t" c(h, 5); print "#define\tCDE_BG_B\t" c(h, 9) } \
NR == 4 { h = substr($$0, 2); print "#define\tCDE_SEL_R\t" c(h, 1); print "#define\tCDE_SEL_G\t" c(h, 5); print "#define\tCDE_SEL_B\t" c(h, 9) }' \
${PALETTE_DP} > ${.TARGET}
CLEANFILES= menu_defs.c menu_defs.h menus.def \
msg_defs.c msg_defs.h msg.def msgtouch \
sysinstmsgs.*
.PATH: ${.CURDIR}/../..
menu_defs.h: menu_defs.c
[ -f ${.TARGET} ] || { \
${_MKSHTARGET_CREATE}; \
${TOOL_MENUC} menus.def; \
}
menu_defs.c: menus.def
${_MKTARGET_CREATE}
[ ! -f menu_defs.h ] || mv -f menu_defs.h menu_defs.oh
${TOOL_MENUC} menus.def
! cmp -s menu_defs.oh menu_defs.h || mv -f menu_defs.oh menu_defs.h
@rm -f menu_defs.oh
msg_defs.h: msg_defs.c
[ -f ${.TARGET} ] || { \
${_MKSHTARGET_CREATE}; \
${TOOL_MSGC} msg.def; \
}
msg_defs.c: msg.def
${_MKTARGET_CREATE}
[ ! -f msg_defs.h ] || mv -f msg_defs.h msg_defs.oh
${TOOL_MSGC} msg.def
! cmp -s msg_defs.oh msg_defs.h || mv -f msg_defs.oh msg_defs.h
@rm -f msg_defs.oh
# Needed to get proper dependency checks on osrelease
msgtouch: ${DISTRIBVERDEP}
touch ${.TARGET}
.if !defined(NOPARTMAN)
MSG_MD+= msg.pm.${SYSINSTLANG}
.endif
.if ${CHECK_ENTROPY:Uyes} != "no"
MSG_MD+= msg.entropy.${SYSINSTLANG}
.endif
msg.def: msg.mi.${SYSINSTLANG} ${MSG_MD} msgtouch
${_MKTARGET_CREATE}
${TOOL_SED} -e "s/@@VERSION@@/${DISTRIBVER}/" -e "s/@@MXVERSION@@/${MAKRONIXVER}/" -e "s/@@MXNAME@@/${MAKRONIXNAME}/" ${.ALLSRC} | \
${TOOL_SED} "s/@@MACHINE@@/${MACHINE}/" | \
${TOOL_AWK} -f ${UNIF_AWK} -v defines="${MD_OPTIONS}" > ${.TARGET}
menus.def: ${MENUS_MI} ${MENUS_MD} msgtouch
${_MKTARGET_CREATE}
${TOOL_SED} -e "s/@@VERSION@@/${DISTRIBVER}/" -e "s/@@MXVERSION@@/${MAKRONIXVER}/" -e "s/@@MXNAME@@/${MAKRONIXNAME}/" ${.ALLSRC} | \
${TOOL_SED} "s/@@MACHINE@@/${MACHINE}/" | \
${TOOL_AWK} -f ${UNIF_AWK} -v defines="${MD_OPTIONS}" > ${.TARGET}
sysinstmsgs.fmtcnt: msg.mi.${SYSINSTLANG} ${MSG_MD} msgtouch msg_defs.h
${_MKTARGET_CREATE}
${TOOL_SED} -e "s/@@VERSION@@/${DISTRIBVER}/" -e "s/@@MXVERSION@@/${MAKRONIXVER}/" -e "s/@@MXNAME@@/${MAKRONIXNAME}/" \
${.ALLSRC:M*.${SYSINSTLANG}} | \
${TOOL_SED} "s/@@MACHINE@@/${MACHINE}/" | \
${TOOL_AWK} -f ${UNIF_AWK} -v defines="${MD_OPTIONS}" | \
${HOST_SH} ${MSG_XLAT_SH} -c > ${.TARGET}
.for LANG in ${LANGUAGES:N${SYSINSTLANG}}
sysinstmsgs.${LANG}: msg.mi.${LANG} ${MSG_MD:S/.${SYSINSTLANG}$/.${LANG}/} msgtouch msg_defs.h sysinstmsgs.fmtcnt
${_MKTARGET_CREATE}
${TOOL_SED} -e "s/@@VERSION@@/${DISTRIBVER}/" -e "s/@@MXVERSION@@/${MAKRONIXVER}/" -e "s/@@MXNAME@@/${MAKRONIXNAME}/" ${.ALLSRC:M*.${LANG}} | \
${TOOL_SED} "s/@@MACHINE@@/${MACHINE}/" | \
${TOOL_AWK} -f ${UNIF_AWK} -v defines="${MD_OPTIONS}" | \
${HOST_SH} ${MSG_XLAT_SH} -f sysinstmsgs.fmtcnt > ${.TARGET}
DPSRCS+= sysinstmsgs.${LANG}
FILES+= sysinstmsgs.${LANG}
FILESDIR_sysinstmsgs.${LANG}= ${CATALOGDIR}
.endfor
.PHONY: check-lang
check-lang: msg.def msg_defs.h
${_MKTARGET_CREATE}
${TOOL_SED} -e "s/@@VERSION@@/${DISTRIBVER}/" -e "s/@@MXVERSION@@/${MAKRONIXVER}/" -e "s/@@MXNAME@@/${MAKRONIXNAME}/" msg.def | \
${TOOL_SED} "s/@@MACHINE@@/${MACHINE}/" | \
${TOOL_AWK} -f ${UNIF_AWK} -v defines="${MD_OPTIONS}" | \
${HOST_SH} ${MSG_XLAT_SH} -i > /tmp/sysinst.en
${HOST_SH} ${MSG_CMP_SH} msg_defs.h /tmp/sysinst.en sysinstmsgs.${LANG}
@rm /tmp/sysinst.en
COPTS.util.c+= ${CC_WNO_STRINGOP_TRUNCATION}
COPTS+= -fcommon
.include <bsd.prog.mk>
-131
View File
@@ -1,131 +0,0 @@
/* $NetBSD: README.md_defs,v 1.8 2023/01/06 15:05:52 martin Exp $ */
The following is trying to document the most important machine dependent
defines used in the sysinst code.
If HAVE_GPT is true, the MD code may limit the space used for the
GPT at the beginning of the disk to allow e.g. a bootloader
being added after it (see evbarm on allwinner SoCs, u-boot is
copied at 8k into the image).
/* Size limit for the initial GPT part, in bytes */
#define MD_GPT_INITIAL_SIZE (8*1024)
The default installation description is created as a static array using
lots of conditionals. It may be overridden / replaced in the MD code
(see below), an example for that is arch/i386/md.c when we have been
booted from UEFI firmware.
Name Value / example Description
PART_BOOT (8*MEG) (undefined) if defined, a boot partition
of this size (in bytes, rounded)
will be part of the default partition
suggestions. Must be compile time
const! Use MD_PART_DEFAULTS if
runtime adjustment is needed.
PART_BOOT_MOUNT "/boot" (undefined) Add boot partition to fstab for
this mount point
PART_BOOT_TYPE FS_BSDFS Kind of filesystem used
PART_BOOT_SUBT MBR_PTYPE_FAT12 File system specific sub type
The boot partition is always inserted at the front of the suggested default
partitions, to cope with firmwares that may not be able to load from the
whole disk.
If multiple boot partitions are required (see ofppc, where various schemes
are supported, depending on exact model), the variables above can all be
repeated with _BOOT1_ or _BOOT2_ name instead of _BOOT_.
ATTENTION:
PART_BOOT is in BYTE (not MB), while most other sizes
(DEFROOTSIZE, DEFSWAP, ...) are in MB!
The following macros provide optional MD hooks:
MD_PART_DEFAULTS may be undefined
used like:
void MD_PART_DEFAULTS(struct pm_dev*, struct part_usage_info*,
size_t num_usage_infos),
Called before any of the partition usage defaults is ever used, can be used
to adjust e.g. partition sizes to actual system requirements (align boot
partition with cylindersize), or (since it is a macro and all params are
by references) to completely swap the defaults (e.g. EFI vs. biosboot).
If swapping, make sure allocation and num_usage_infos stays consistent,
old allocation is done by calloc(3), use free(3) to release.
MD_NEED_BOOTBLOCK may be undefined
used like:
bool MD_NEED_BOOTBLOCK(struct install_partition_desc *install)
returns true if this setup needs boot blocks. Used for example on x86
when UEFI installs do not need any bootblocks, but BIOS ones do.
MD_MAY_SWAP_TO may be undefined
used like:
bool MD_MAY_SWAP_TO(const char *disk_name)
returns true if the disk is usable as a swap device. Typical implementation
in utils.c:may_swap_if_not_sdmmc.
MD_SET_EXTRACT_FINALIZE may be undefined
used like:
int MD_SET_EXTRACT_FINALIZE(int update)
extracts any additional parts of the distribution. Returns an error code
if something fails.
HAVE_PLAIN_DISKLABEL_BOOT may be undefined, only used on architectures
that have MBR as primary with disklabel as
secondary partitioning scheme (RAW_PART == 3)
used like:
bool HAVE_PLAIN_DISKLABEL_BOOT(const char *disk)
returns true if the disk could be made bootable with only a disklabel
(and no MBR).
DISKLABEL_NO_ONDISK_VERIFY usually undefined
If defined, do not verify the presence of on-disk disklabels before
offering the disklabel partitioning scheme. This allows ports to use
kernel translation for the disklabel ioctls (e.g. x68k uses Human68k
partitions this way).
HAVE_GPT_BOOT defined if the architecture can boot from GPT
HAVE_EFI_BOOT defined if the architecture may be able
to boot from an EFI partition
NO_DISKLABEL_BOOT defined if the architecture can NOT boot
from a disklabel partitioned disk
MD_DISKLABEL_PART_INDEX_CHECK usually undefined
if defined evaluates to a boolean attribute
which is passed a struct disklabel, an integer
index and a const struct disk_part_info*.
The result qualifies the given new partition
to take the disklabel l_partition entry
with the given index. Used for example
in luna68k to move the FFSv1 boot partition
(which would otherwise end up as partition 'a')
to a partition past RAW_PART (so 'd' on luna68k)
-15
View File
@@ -1,15 +0,0 @@
$NetBSD: SPELLING.en,v 1.1 2014/07/26 19:30:44 dholland Exp $
right: wrong: authority:
reenter re-enter www.m-w.com
reedit re-edit www.m-w.com
reinstall re-install www.m-w.com
reconfigure re-configure www.m-w.com
successful successfull
retrieve retreive
accurately acurately
anomalies anomolies
hard disk harddisk www.m-w.com
overlapping overlaping
file system filesystem www.m-w.com
-129
View File
@@ -1,129 +0,0 @@
# $NetBSD: TODO,v 1.1 2014/07/26 19:30:44 dholland Exp $
Things to do .... in no specific order.
-- On error messages, do something to allow the user to
see any errors from anything run by run_prog().
Ideas suggested maximum entropy <entropy@zippy.bernstein.com>.
are:
#1:
if (run_prog("foo") != 0)
sleep(5);
#2:
endwin();
run_prog("foo");
printf("press return to continue");
getchar();
initscr();
#3: (modification of #2):
endwin();
if (run_prog("foo") != 0) {
printf("press return to continue");
getchar();
}
initscr();
#4:
Manually fork and exec everything, dup2 fd's 1 and 2
onto sockets in the child, and paginate the output in
your curses app :-)
We currently implement a special-case variant of #1 for untarring
release sets, since the GNU tar in 1.3 fails to report many
errors in its exit status.
-- "browse" for a local directory to get the
distribution set from. Maybe just allowing the user to shell
out and look around is good enough (this needs more thought).
-- check for already-mounted filesystems before install newfs.
Abort with message.
-- check for already-mounted filesystems before upgrade fsck.
(ignore?)
-- check for already-mounted filesystems before upgrade mount.
Continue, if device mount is where we wanted it?
(Jonathan ran into the above 3 by upgrading from a live
system to a scratch disk. sysinst copied the live /etc/fstab
to the target. The upgrade failed because sysinst wanted
to mount the active system's /usr. Could happen when a
real upgrade aborts, even running from ramdisk root.)
-- Handle ccd's and raid's during an upgrade.
-- Use bootp or dhcp to get network info (hostname, domain name,
name servers, ...)
-- Things like having config_network()
possibly use the information on the fixed disk instead of having
to ask everything.
-- Build the disktab as a profile, not a true /etc/disktab so it
doesn't overwrite the real disktab.
-- Have both ftp and floppy gets get the file, extract the file,
and then remove the file before going on to the next set to
save disk space.
-- Set current time and date.
-- Configure NTP servers, set NTP in rc.conf
-- On i386 (and others) allow for storing localtime in the RTC.
Need to patch kernel variable with offset from UTC. Any
other kernel variables we might want to patch as well???
-- A little more clean-up of the run_prog suite so things work
nicely for all ports.
-- fix "disklabel -r -w" vs. "disklabel -w": I still don't grok why
the -r, and the manpage says it will lose totally on sparcs.
Phil, was there some reason to bypass the incore label on i386?
Can we just do "disklabel -w" everywhere?
-- Michael bumped the in-memory disklabel struct up to 16 entries.
Also add a runtime check in case that grows in future
(e.g., slices). Maybe bump to 32 entries just in case.
-- Fix sanity-check message code. It currently gets over-written
immediately by the following message.
-- check for disklabel edits changing active root partition.
reject.
-- remove any possibly-stale ld.so.cache files from the target
/etc after unpacking sets. Maybe just don't copy ld.so.cache
from /etc.old?
-- Full configuration of rc.conf?
-- If we're doing a fresh install and there's already a label
on the disk, maybe use that instead of the compiled-in default
label?
-- symlinks for /tmp (/tmp -> /var/tmp or some such)
-- Do non-standard installs from arbitrary tar files (?)
-- Install binary packages. (possibly a second program
run after installation.)
-- Provide the user a menu to select each installation step on
its own. Currently there's no way to repeat steps or leave
them out. (See the Debian installer for a good example.)
-- Allow the user to install binary snapshots available from releng.
This could be done in the following way:
* list the available snapshots in ftp.NetBSD.org
(eg.: ls /pub/NetBSD-daily/*/*/${ARCH} using ftp(1)).
* present the user with the possible selections (handle the
case of zero options).
* set the variables and install via FTP showing first the
FTP installation screen.
-447
View File
@@ -1,447 +0,0 @@
/* $NetBSD: aout2elf.c,v 1.2 2019/06/12 06:20:17 martin Exp $
*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Written by Philip A. Nelson for Piermont Information Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* aout2elf.c -- routines for upgrading an a.out system to ELF */
#include <sys/param.h>
#include <sys/exec.h>
#include <sys/exec_aout.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <dirent.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <err.h>
#include "defs.h"
#include "md.h"
#include "msg_defs.h"
#include "menu_defs.h"
/* Local prototypes */
static int is_aout_shared_lib(const char *name);
static void handle_aout_x_libs(const char *srcdir, const char *tgtdir);
static int handle_aout_libs(const char *dir, int op, const void *arg);
static char *target_realpath(const char *, char *);
#define LIB_COUNT 0
#define LIB_MOVE 1
/* XXX NAH. This probably needs moving to arch/<foo>/md.h
*
* a.out X libraries to move. These have not changed since 1.3.x
*/
const char *x_libs[] = {
"libICE.so.6.3",
"libPEX5.so.6.0",
"libSM.so.6.0",
"libX11.so.6.1",
"libXIE.so.6.0",
"libXaw.so.6.1",
"libXext.so.6.3",
"libXi.so.6.0",
"libXmu.so.6.0",
"libXp.so.6.2",
"libXt.so.6.0",
"libXtst.so.6.1",
"liboldX.so.6.0",
};
static int
is_aout_shared_lib(const char *name)
{
struct exec ex;
struct stat st;
int fd;
if (stat(name, &st) < 0)
return 0;
if ((st.st_mode & (S_IFREG|S_IFLNK)) == 0)
return 0;
fd = open(name, O_RDONLY);
if (fd < 0) {
return 0;
}
if (read(fd, &ex, sizeof ex) - sizeof ex != 0) {
close(fd);
return 0;
}
close(fd);
if (N_GETMAGIC(ex) != ZMAGIC ||
(N_GETFLAG(ex) & EX_DYNAMIC) == 0)
return 0;
return 1;
}
static void
handle_aout_x_libs(const char *srcdir, const char *tgtdir)
{
char src[MAXPATHLEN];
unsigned int i;
for (i = 0; i < (sizeof x_libs / sizeof (const char *)); i++) {
snprintf(src, MAXPATHLEN, "%s/%s", srcdir, x_libs[i]);
if (!is_aout_shared_lib(src))
continue;
run_program(0, "mv -f %s %s", src, tgtdir);
}
/*
* Don't care if it fails; X may not have been installed.
*/
}
/*
* Function to count or move a.out shared libraries.
*/
static int
handle_aout_libs(const char *dir, int op, const void *arg)
{
DIR *dd;
struct dirent *dp;
char *full_name;
const char *destdir = NULL; /* XXX -Wuninitialized [many] */
int n;
destdir = NULL; /* XXX gcc */
dd = opendir(dir);
if (dd == NULL)
return -1;
n = 0;
switch (op) {
case LIB_COUNT:
break;
case LIB_MOVE:
destdir = (const char *)arg;
break;
default:
return -1;
}
while ((dp = readdir(dd)) != NULL) {
/*
* strlen("libX.so")
*/
if (dp->d_namlen < 7)
continue;
if (strncmp(dp->d_name, "lib", 3) != 0)
continue;
if (asprintf(&full_name, "%s/%s", dir, dp->d_name) == -1) {
warn("Out of memory");
continue;
}
if (!is_aout_shared_lib(full_name))
goto endloop;
switch (op) {
case LIB_COUNT:
n++;
break;
case LIB_MOVE:
run_program(0, "mv -f %s %s/%s",
full_name, destdir, dp->d_name);
break;
}
endloop:
free(full_name);
}
closedir(dd);
return n;
}
__dead static void
abort_libupdate(void)
{
hit_enter_to_continue(MSG_aoutfail, NULL);
exit(1);
}
int
move_aout_libs(void)
{
int n, backedup = 0;
char prefix[MAXPATHLEN], src[MAXPATHLEN];
struct stat st;
n = handle_aout_libs(target_expand("/usr/lib"), LIB_COUNT, NULL);
if (n <= 0)
return n;
/*
* See if /emul/aout already exists, taking symlinks into
* account. If so, no need to create it, just use it.
*/
if (target_realpath("/emul/aout", prefix) != NULL && stat(prefix, &st) == 0)
goto domove;
/*
* See if /emul exists. If not, create it.
*/
if (target_realpath("/emul", prefix) == NULL || stat(prefix, &st) < 0) {
strlcpy(prefix, target_expand("/emul"), sizeof(prefix));
if (lstat(prefix, &st) == 0) {
run_program(0, "mv -f %s %s", prefix,
target_expand("/emul.old"));
backedup = 1;
}
scripting_fprintf(NULL, "mkdir %s\n", prefix);
mkdir(prefix, 0755);
}
/*
* Can use strcpy, target_expand has made sure it fits into
* MAXPATHLEN. XXX all this copying is because concat_paths
* returns a pointer to a static buffer.
*
* If an old aout link exists (apparently pointing to nowhere),
* move it out of the way.
*/
strlcpy(src, concat_paths(prefix, "aout"), sizeof(src));
if (lstat(src, &st) == 0) {
run_program(0, "mv -f %s %s", src,
concat_paths(prefix, "aout.old"));
backedup = 1;
}
/*
* We have created /emul if needed. Since no previous /emul/aout
* existed, we'll use a symbolic link in /emul to /usr/aout, to
* avoid overflowing the root partition.
*/
strlcpy(prefix, target_expand("/usr/aout"), sizeof(prefix));
if (run_program(0, "mkdir -p %s", prefix))
abort_libupdate();
if (run_program(0, "ln -s %s %s", "/usr/aout", src))
abort_libupdate();
domove:
/*
* Rename etc and usr/lib if they already existed, so that we
* do not overwrite old files.
*
* Then, move /etc/ld.so.conf to /emul/aout/etc/ld.so.conf,
* and all a.out dynamic libraries from /usr/lib to
* /emul/aout/usr/lib. This is where the a.out code in ldconfig
* and ld.so respectively will find them.
*/
strlcpy(src, concat_paths(prefix, "usr/lib"), sizeof(src));
run_program(0, "mv -f %s %s", src, concat_paths(prefix, "usr/lib.old"));
strlcpy(src, concat_paths(prefix, "etc/ld.so.conf"), sizeof(src));
run_program(0, "mv -f %s %s",
src, concat_paths(prefix, "etc/ld.so.conf.old"));
if (run_program(0, "mkdir -p %s ", concat_paths(prefix, "usr/lib")))
abort_libupdate();
if (run_program(0, "mkdir -p %s ", concat_paths(prefix, "etc")))
abort_libupdate();
strlcpy(src, target_expand("/etc/ld.so.conf"), sizeof(src));
if (run_program(0, "mv -f %s %s",
src, concat_paths(prefix, "etc/ld.so.conf")))
abort_libupdate();
strlcpy(src, target_expand("/usr/lib"), sizeof(src));
n = handle_aout_libs(src, LIB_MOVE, concat_paths(prefix, "usr/lib"));
if (run_program(0, "mkdir -p %s ",
concat_paths(prefix, "usr/X11R6/lib")))
abort_libupdate();
strlcpy(src, target_expand("/usr/X11R6/lib"), sizeof(src));
handle_aout_x_libs(src, concat_paths(prefix, "usr/X11R6/lib"));
if (backedup) {
hit_enter_to_continue(MSG_emulbackup, NULL);
}
return n;
}
/*
* XXXX had to include this to deal with symlinks in some places.
* When the target * disk is mounted under /targetroot, absolute symlinks
* on it don't work right.
* This function will resolve them using the mountpoint as prefix.
* Copied verbatim from libc, with added prefix handling.
*
* char *realpath(const char *path, char resolved_path[MAXPATHLEN]);
*
* Find the real name of path, by removing all ".", ".." and symlink
* components. Returns (resolved) on success, or (NULL) on failure,
* in which case the path which caused trouble is left in (resolved).
*/
static char *
target_realpath(const char *path, char *resolved)
{
struct stat sb;
int fd, n, rootd, serrno, nlnk = 0;
char *p, *q, wbuf[MAXPATHLEN];
char solidus[2], empty[1];
solidus[0] = '/';
solidus[1] = '\0';
empty[0] = '\0';
/* Save the starting point. */
if ((fd = open(".", O_RDONLY)) < 0) {
(void)strlcpy(resolved, ".", MAXPATHLEN);
return (NULL);
}
/*
* Find the dirname and basename from the path to be resolved.
* Change directory to the dirname component.
* lstat the basename part.
* if it is a symlink, read in the value and loop.
* if it is a directory, then change to that directory.
* get the current directory name and append the basename.
*/
if (target_prefix() != NULL && strcmp(target_prefix(), "") != 0)
snprintf(resolved, MAXPATHLEN, "%s/%s", target_prefix(), path);
else
if (strlcpy(resolved, path, MAXPATHLEN) >= MAXPATHLEN) {
errno = ENAMETOOLONG;
goto err1;
}
loop:
q = strrchr(resolved, '/');
if (q != NULL) {
p = q + 1;
if (q == resolved)
q = solidus;
else {
do {
--q;
} while (q > resolved && *q == '/');
q[1] = '\0';
q = resolved;
}
if (chdir(q) < 0)
goto err1;
} else
p = resolved;
/* Deal with the last component. */
if (lstat(p, &sb) == 0) {
if (S_ISLNK(sb.st_mode)) {
if (nlnk++ >= MAXSYMLINKS) {
errno = ELOOP;
goto err1;
}
n = readlink(p, wbuf, MAXPATHLEN - 1);
if (n < 0)
goto err1;
wbuf[n] = '\0';
if (wbuf[0] == '/')
snprintf(resolved, MAXPATHLEN, "%s%s",
target_prefix(), wbuf);
else
strlcpy(resolved, wbuf, MAXPATHLEN);
goto loop;
}
if (S_ISDIR(sb.st_mode)) {
if (chdir(p) < 0)
goto err1;
p = empty;
}
}
/*
* Save the last component name and get the full pathname of
* the current directory.
*/
if (strlcpy(wbuf, p, sizeof(wbuf)) >= sizeof(wbuf)) {
errno = ENAMETOOLONG;
goto err1;
}
/*
* Call the internal internal version of getcwd which
* does a physical search rather than using the $PWD short-cut
*/
if (getcwd(resolved, MAXPATHLEN) == 0)
goto err1;
/*
* Join the two strings together, ensuring that the right thing
* happens if the last component is empty, or the dirname is root.
*/
if (resolved[0] == '/' && resolved[1] == '\0')
rootd = 1;
else
rootd = 0;
if (*wbuf) {
if (strlen(resolved) + strlen(wbuf) + (rootd ? 0 : 1) + 1 >
MAXPATHLEN) {
errno = ENAMETOOLONG;
goto err1;
}
if (rootd == 0)
if (strlcat(resolved, "/", MAXPATHLEN) >= MAXPATHLEN) {
errno = ENAMETOOLONG;
goto err1;
}
if (strlcat(resolved, wbuf, MAXPATHLEN) >= MAXPATHLEN) {
errno = ENAMETOOLONG;
goto err1;
}
}
/* Go back to where we came from. */
if (fchdir(fd) < 0) {
serrno = errno;
goto err2;
}
/* It's okay if the close fails, what's an fd more or less? */
(void)close(fd);
return (resolved);
err1: serrno = errno;
(void)fchdir(fd);
err2: (void)close(fd);
errno = serrno;
return (NULL);
}
@@ -1,13 +0,0 @@
# $NetBSD: Makefile,v 1.2 2019/06/13 06:34:30 martin Exp $
#
# Makefile for acorn32
#
MD_OPTIONS= AOUT2ELF
.ifdef SMALLPROG
NOPARTMAN= yes
NO_GPT= yes
.endif
.include "../../Makefile.inc"
-372
View File
@@ -1,372 +0,0 @@
/* $NetBSD: md.c,v 1.9 2026/09/03 02:12:15 gutteridge Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Based on code written by Philip A. Nelson for Piermont Information
* Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
/* md.c -- arm32 machine specific routines */
#include <stdio.h>
#include <curses.h>
#include <unistd.h>
#include <fcntl.h>
#include <util.h>
#include <sys/types.h>
#include <sys/disklabel_acorn.h>
#include <sys/ioctl.h>
#include <sys/param.h>
#include "defs.h"
#include "md.h"
#include "msg_defs.h"
#include "menu_defs.h"
static int filecore_checksum(u_char *);
void
md_init(void)
{
}
void
md_init_set_status(int flags)
{
(void)flags;
}
bool
md_get_info(struct install_partition_desc *install)
{
struct disklabel disklabel;
int fd;
char dev_name[100];
static unsigned char bb[DEV_BSIZE];
struct filecore_bootblock *fcbb = (struct filecore_bootblock *)bb;
int offset = 0;
snprintf(dev_name, 100, "/dev/r%s%c", pm->diskdev, 'a' + getrawpartition());
fd = open(dev_name, O_RDONLY, 0);
if (fd < 0) {
endwin();
fprintf(stderr, "Can't open %s\n", dev_name);
exit(1);
}
if (ioctl(fd, DIOCGDINFO, &disklabel) == -1) {
endwin();
fprintf(stderr, "Can't read disklabel on %s.\n", dev_name);
close(fd);
exit(1);
}
if (lseek(fd, (off_t)FILECORE_BOOT_SECTOR * DEV_BSIZE, SEEK_SET) < 0
|| read(fd, bb, sizeof(bb)) - sizeof(bb) != 0) {
endwin();
fprintf(stderr, "%s", msg_string(MSG_badreadbb));
close(fd);
exit(1);
}
/* Check if table is valid. */
if (filecore_checksum(bb) == fcbb->checksum) {
/*
* Check for NetBSD/arm32 (RiscBSD) partition marker.
* If found the NetBSD disklabel location is easy.
*/
offset = (fcbb->partition_cyl_low +
(fcbb->partition_cyl_high << 8)) *
fcbb->heads * fcbb->secspertrack;
if (fcbb->partition_type == PARTITION_FORMAT_RISCBSD)
;
else if (fcbb->partition_type == PARTITION_FORMAT_RISCIX) {
/*
* Ok we need to read the RISCiX partition table and
* search for a partition named RiscBSD, NetBSD or
* Empty:
*/
struct riscix_partition_table *riscix_part =
(struct riscix_partition_table *)bb;
struct riscix_partition *part;
int loop;
if (lseek(fd, (off_t)offset * DEV_BSIZE, SEEK_SET) < 0
|| read(fd, bb, sizeof(bb)) - sizeof(bb) != 0) {
endwin();
fprintf(stderr, "%s",
msg_string(MSG_badreadriscix));
close(fd);
exit(1);
}
/* Break out as soon as we find a suitable partition */
for (loop = 0; loop < NRISCIX_PARTITIONS; ++loop) {
part = &riscix_part->partitions[loop];
if (strcmp((char *)part->rp_name, "RiscBSD") == 0
|| strcmp((char *)part->rp_name, "NetBSD") == 0
|| strcmp((char *)part->rp_name, "Empty:") == 0) {
offset = part->rp_start;
break;
}
}
if (loop == NRISCIX_PARTITIONS) {
/*
* Valid filecore boot block, RISCiX partition
* table but no NetBSD partition. We should
* leave this disc alone.
*/
endwin();
fprintf(stderr, "%s",
msg_string(MSG_notnetbsdriscix));
close(fd);
exit(1);
}
} else {
/*
* Valid filecore boot block and no non-ADFS partition.
* This means that the whole disc is allocated for ADFS
* so do not trash ! If the user really wants to put a
* NetBSD disklabel on the disc then they should remove
* the filecore boot block first with dd.
*/
endwin();
fprintf(stderr, "%s", msg_string(MSG_notnetbsd));
close(fd);
exit(1);
}
}
close(fd);
pm->dlcyl = disklabel.d_ncylinders;
pm->dlhead = disklabel.d_ntracks;
pm->dlsec = disklabel.d_nsectors;
pm->sectorsize = disklabel.d_secsize;
pm->dlcylsize = disklabel.d_secpercyl;
/*
* Compute whole disk size. Take max of (pm->dlcyl*pm->dlhead*pm->dlsec)
* and secperunit, just in case the disk is already labelled.
* (If our new label's RAW_PART size ends up smaller than the
* in-core RAW_PART size value, updating the label will fail.)
*/
pm->dlsize = pm->dlcyl*pm->dlhead*pm->dlsec;
if (disklabel.d_secperunit > pm->dlsize)
pm->dlsize = disklabel.d_secperunit;
pm->ptstart = offset;
/* endwin();
printf("pm->dlcyl=%d\n", pm->dlcyl);
printf("pm->dlhead=%d\n", pm->dlhead);
printf("pm->dlsec=%d\n", pm->dlsec);
printf("secsz=%d\n", pm->sectorsize);
printf("cylsz=%d\n", pm->dlcylsize);
printf("dlsz=%d\n", pm->dlsize);
printf("pstart=%d\n", pm->ptstart);
printf("pstart=%d\n", partsize);
printf("secpun=%d\n", disklabel.d_secperunit);
backtowin();*/
return true;
}
/*
* md back-end code for menu-driven BSD disklabel editor.
*/
int
md_make_bsd_partitions(struct install_partition_desc *install)
{
return make_bsd_partitions(install);
}
/*
* any additional partition validation
*/
bool
md_check_partitions(struct install_partition_desc *install)
{
return 1;
}
/*
* hook called before writing new disklabel.
*/
bool
md_pre_disklabel(struct install_partition_desc *install,
struct disk_partitions *part)
{
return 0;
}
/*
* hook called after writing disklabel to new target disk.
*/
bool
md_post_disklabel(struct install_partition_desc *install,
struct disk_partitions *part)
{
return true;
}
/*
* hook called after upgrade() or install() has finished setting
* up the target disk but immediately before the user is given the
* ``disks are now set up'' message.
*/
int
md_post_newfs(struct install_partition_desc *install)
{
return 0;
}
int
md_post_extract(struct install_partition_desc *install, bool upgrade)
{
return 0;
}
void
md_cleanup_install(struct install_partition_desc *install)
{
#ifndef DEBUG
enable_rc_conf();
#endif
}
int
md_pre_update(struct install_partition_desc *install)
{
return 1;
}
/* Upgrade support */
int
md_update(struct install_partition_desc *install)
{
md_post_newfs(install);
return 1;
}
/*
* static int filecore_checksum(u_char *bootblock)
*
* Calculates the filecore boot block checksum. This is used to validate
* a filecore boot block on the disk. If a boot block is validated then
* it is used to locate the partition table. If the boot block is not
* validated, it is assumed that the whole disk is NetBSD.
*
* The basic algorithm is:
*
* for (each byte in block, excluding checksum) {
* sum += byte;
* if (sum > 255)
* sum -= 255;
* }
*
* That's equivalent to summing all of the bytes in the block
* (excluding the checksum byte, of course), then calculating the
* checksum as "cksum = sum - ((sum - 1) / 255) * 255)". That
* expression may or may not yield a faster checksum function,
* but it's easier to reason about.
*
* Note that if you have a block filled with bytes of a single
* value "X" (regardless of that value!) and calculate the cksum
* of the block (excluding the checksum byte), you will _always_
* end up with a checksum of X. (Do the math; that can be derived
* from the checksum calculation function!) That means that
* blocks which contain bytes which all have the same value will
* always checksum properly. That's a _very_ unlikely occurrence
* (probably impossible, actually) for a valid filecore boot block,
* so we treat such blocks as invalid.
*/
static int
filecore_checksum(u_char *bootblock)
{
u_char byte0, accum_diff;
u_int sum;
int i;
sum = 0;
accum_diff = 0;
byte0 = bootblock[0];
/*
* Sum the contents of the block, keeping track of whether
* or not all bytes are the same. If 'accum_diff' ends up
* being zero, all of the bytes are, in fact, the same.
*/
for (i = 0; i < 511; ++i) {
sum += bootblock[i];
accum_diff |= bootblock[i] ^ byte0;
}
/*
* Check to see if the checksum byte is the same as the
* rest of the bytes, too. (Note that if all of the bytes
* are the same except the checksum, a checksum compare
* won't succeed, but that's not our problem.)
*/
accum_diff |= bootblock[i] ^ byte0;
/* All bytes in block are the same; call it invalid. */
if (accum_diff == 0)
return (-1);
return (sum - ((sum - 1) / 255) * 255);
}
int
md_pre_mount(struct install_partition_desc *install, size_t ndx)
{
return 0;
}
#ifdef HAVE_GPT
/*
* New GPT partitions have been written, update bootloader or remember
* data until needed in md_post_newfs
*/
bool
md_gpt_post_write(struct disk_partitions *parts, part_id root_id,
bool root_is_new, part_id efi_id, bool efi_is_new)
{
return true;
}
#endif
bool
md_parts_use_wholedisk(struct disk_partitions *parts)
{
return parts_use_wholedisk(parts, 0, NULL);
}
@@ -1,66 +0,0 @@
/* $NetBSD: md.h,v 1.4 2025/04/26 03:49:32 tsutsui Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Based on code written by Philip A. Nelson for Piermont Information
* Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* md.h -- Machine specific definitions for the Acorn32 */
/* Constants and defines */
#define DEFUSRSIZE 1024 /* Default /usr size, if /home */
#define XNEEDMB 256 /* Extra megs for full X installation */
#define DEBNEEDMB 980 /* Extra megs for debug sets */
/* have support for booting from UFS2 */
#define HAVE_UFS2_BOOT
/*
* Default filesets to fetch and install during installation
* or upgrade. The standard sets are:
* base etc comp games man misc rescue tests text xbase xcomp xetc xfont xserver
*/
#define SET_KERNEL_1_NAME "kern-GENERIC"
#define SET_KERNEL_2_NAME "kern-NC"
/*
* Machine-specific command to write a new label to a disk.
* For example, acorn32 uses "/sbin/disklabel -w -r", just like acorn32
* miniroot scripts, though this may leave a bogus incore label.
* Sun ports should probably use DISKLABEL_CMD "/sbin/disklabel -w"
* to get incore to ondisk inode translation for the Sun proms.
* If not defined, we assume the port does not support disklabels and
* hand-edited disklabel will NOT be written by MI code.
*/
#define DISKLABEL_CMD "disklabel -w -r"
@@ -1,37 +0,0 @@
/* $NetBSD: menus.md.en,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Based on code written by Philip A. Nelson for Piermont Information
* Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* Acorn32 machine dependent menus, english */
@@ -1,37 +0,0 @@
/* $NetBSD: menus.md.es,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Based on code written by Philip A. Nelson for Piermont Information
* Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* Acorn32 machine dependent menus, spanish */
@@ -1,37 +0,0 @@
/* $NetBSD: menus.md.fr,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Based on code written by Philip A. Nelson for Piermont Information
* Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* Acorn32 machine dependent menus, french */
@@ -1,39 +0,0 @@
/* $NetBSD: menus.md.pl,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/* Based on english version: */
/* NetBSD: menus.md.en,v 1.3 2002/02/14 15:28:31 reinoud Exp */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Based on code written by Philip A. Nelson for Piermont Information
* Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* Acorn32 machine dependent menus, Polish */
@@ -1,78 +0,0 @@
/* $NetBSD: msg.md.de,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Based on code written by Philip A. Nelson for Piermont Information
* Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* acorn32 machine dependent messages, German */
message md_hello
{
}
message md_may_remove_boot_medium
{Wenn Sie von einer Diskette gebootet haben, können Sie diese jetzt
enfernen.
}
message badreadbb
{Kann den Bootblock des Filecores nicht lesen
}
message badreadriscix
{Kann die RISCiX Paritionstabelle nicht lesen
}
message notnetbsdriscix
{Keine NetBSD Partition in der RISCiX Partitionstabelle gefunden - erstellen
eines Labels nicht möglich.
}
message notnetbsd
{Keine NetBSD Partition gefunden (eine Nur-Filecore Platte?) - erstellen eines
Labels nicht möglich.
}
message dobootblks
{Installiere die Bootblöcke auf %s ...
}
message set_kernel_1
{Kernel (GENERIC)}
message set_kernel_2
{Kernel (GENERIC_NC)}
message arm32fspart
{Dies sind die NetBSD Partitionen auf %s (Größe und Offset in %s):
}
@@ -1,75 +0,0 @@
/* $NetBSD: msg.md.en,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Based on code written by Philip A. Nelson for Piermont Information
* Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* acorn32 machine dependent messages, english */
message md_hello
{
}
message md_may_remove_boot_medium
{If you booted from a floppy, you may now remove the disk.
}
message badreadbb
{Cannot read filecore boot block
}
message badreadriscix
{Cannot read RISCiX partition table
}
message notnetbsdriscix
{No NetBSD partition found in RISCiX partition table - Cannot label
}
message notnetbsd
{No NetBSD partition found (filecore only disk ?) - Cannot label
}
message dobootblks
{Installing boot blocks on %s....
}
message set_kernel_1
{Kernel (GENERIC)}
message set_kernel_2
{Kernel (GENERIC_NC)}
message arm32fspart
{We now have your NetBSD partitions on %s as follows (Size and Offset in %s):
}
@@ -1,78 +0,0 @@
/* $NetBSD: msg.md.es,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Based on code written by Philip A. Nelson for Piermont Information
* Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* acorn32 machine dependent messages, spanish */
message md_hello
{
}
message md_may_remove_boot_medium
{Si ha iniciado desde disquette, ahora debería retirar el disco.
}
message badreadbb
{No se puede leer el bloque de arranque filecore
}
message badreadriscix
{No se puede leer la tabla de particiones RISCiX
}
message notnetbsdriscix
{No se ha encontrado ninguna partición NetBSD en la tabla de
particiones RISCiX - No se puede etiquetar
}
message notnetbsd
{No se ha encontrado ninguna partición NetBSD (¿disco solo de filecore?)
- No se puede etiquetar
}
message dobootblks
{Instalando bloques de arranque en %s...
}
message set_kernel_1
{Nucleo (GENERIC)}
message set_kernel_2
{Nucleo (GENERIC_NC)}
message arm32fspart
{Ahora tenemos nuestras particiones NetBSD en %s como sigue (Tamaño y
Compensación en %s):
}
@@ -1,77 +0,0 @@
/* $NetBSD: msg.md.fr,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Based on code written by Philip A. Nelson for Piermont Information
* Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* acorn32 machine dependent messages, french */
message md_hello
{
}
message md_may_remove_boot_medium
{Si vous avez démarré sur une disquette, vous pouvez maintenant la retirer.
}
message badreadbb
{Impossible de lire le contenu du secteur de démarrage
}
message badreadriscix
{Impossible de lire la table de partitions RISCiX
}
message notnetbsdriscix
{Aucune partition NetBSD trouvée dans la table de partitions RISCiX. Impossible
de créer un label.
}
message notnetbsd
{Aucune partition NetBSD trouvée (disque filecore uniquement ?). Impossible
de créer un label.
}
message dobootblks
{Installation des blocs de démarrage sur %s ...
}
message set_kernel_1
{Kernel (GENERIC)}
message set_kernel_2
{Kernel (GENERIC_NC)}
message arm32fspart
{Nous avons maintenant vos partitions NetBSD sur %s comme suit
(taille et Offset en %s) :
}
@@ -1,76 +0,0 @@
/* $NetBSD: msg.md.pl,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/* Based on english version: */
/* NetBSD: msg.md.en,v 1.2 2002/04/02 17:11:21 thorpej Exp */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Based on code written by Philip A. Nelson for Piermont Information
* Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* acorn32 machine dependent messages, Polish */
message md_hello
{
}
message md_may_remove_boot_medium
{Jesli uruchomiles komputer z dyskietki, mozesz ja teraz wyciagnac.
}
message badreadbb
{Nie moge przeczytac bootbloku filecore
}
message badreadriscix
{Nie moge przeczytac tablicy partycji RISCiX
}
message notnetbsdriscix
{Nie znalazlem partycji NetBSD w tablicy partycji RISCiX - Nie moge nazwac
}
message notnetbsd
{Nie znalazlem partycji NetBSD (dysk filecore?) - Nie moge nazwac
}
message dobootblks
{Instalowanie bootblokow na %s....
}
message set_kernel_1
{Kernel (GENERIC)}
message set_kernel_2
{Kernel (GENERIC_NC)}
message arm32fspart
{Partycje NetBSD na dysku %s wygladaja teraz tak (Rozmiary i Przesuniecia w %s):
}
@@ -1,6 +0,0 @@
# $NetBSD: Makefile,v 1.1 2014/07/26 19:30:44 dholland Exp $
#
# Makefile for alpha
#
.include "../../Makefile.inc"
-230
View File
@@ -1,230 +0,0 @@
/* $NetBSD: md.c,v 1.11 2026/09/03 02:12:15 gutteridge Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Based on code written by Philip A. Nelson for Piermont Information
* Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
/* md.c -- alpha machine specific routines */
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/param.h>
#include <stdio.h>
#include <curses.h>
#include <unistd.h>
#include <fcntl.h>
#include <util.h>
#include "defs.h"
#include "md.h"
#include "msg_defs.h"
#include "menu_defs.h"
void
md_init(void)
{
}
void
md_init_set_status(int flags)
{
(void)flags;
}
bool
md_get_info(struct install_partition_desc *install)
{
struct disklabel disklabel;
int fd;
char dev_name[100];
snprintf (dev_name, 100, "/dev/r%s%c", pm->diskdev, 'a' + getrawpartition());
fd = open (dev_name, O_RDONLY, 0);
if (fd < 0) {
endwin();
fprintf (stderr, "Can't open %s\n", dev_name);
exit(1);
}
if (ioctl(fd, DIOCGDINFO, &disklabel) == -1) {
endwin();
fprintf (stderr, "Can't read disklabel on %s.\n", dev_name);
close(fd);
exit(1);
}
close(fd);
pm->dlcyl = disklabel.d_ncylinders;
pm->dlhead = disklabel.d_ntracks;
pm->sectorsize = disklabel.d_secsize;
pm->dlsize = disklabel.d_secperunit;
/*
* Tru64 UNIX's disklabel is the same format as BSD disklabel,
* and it seems Tru64 stores incorrect geometry values in
* d_nsectors (sectors/track) and d_secpercyl (sectors/cylinder).
* d_secperunit seems always reliable so use it to get
* dlsec (sectors/track) and dlcylsize (sectors/cylinder) values.
* See PR/48697 for details.
*/
pm->dlsec = pm->dlsize / (pm->dlhead * pm->dlcyl);
pm->dlcylsize = pm->dlsec * pm->dlhead;
return true;
}
/*
* md back-end code for menu-driven BSD disklabel editor.
*/
int
md_make_bsd_partitions(struct install_partition_desc *install)
{
return make_bsd_partitions(install);
}
/*
* any additional partition validation
*/
bool
md_check_partitions(struct install_partition_desc *install)
{
return 1;
}
/*
* hook called before writing new disklabel.
*/
bool
md_pre_disklabel(struct install_partition_desc *install,
struct disk_partitions *part)
{
return true;
}
/*
* hook called after writing disklabel to new target disk.
*/
bool
md_post_disklabel(struct install_partition_desc *install,
struct disk_partitions *part)
{
return true;
}
/*
* hook called after upgrade() or install() has finished setting
* up the target disk but immediately before the user is given the
* ``disks are now set up'' message.
*
* On the Alpha, we use this opportunity to install the boot blocks.
*/
int
md_post_newfs(struct install_partition_desc *install)
{
char *bootxx;
int error;
msg_fmt_display(MSG_dobootblks, "%s", pm->diskdev);
cp_to_target("/usr/mdec/boot", "/boot");
bootxx = bootxx_name(install);
if (bootxx != NULL) {
error = run_program(RUN_DISPLAY | RUN_NO_CLEAR,
"/usr/sbin/installboot /dev/r%sc %s", pm->diskdev, bootxx);
free(bootxx);
} else
error = -1;
if (error != 0)
process_menu(MENU_ok,
__UNCONST("Warning: disk is probably not bootable"));
wclear(stdscr);
touchwin(stdscr);
clearok(stdscr, 1);
refresh();
return 0;
}
int
md_post_extract(struct install_partition_desc *install, bool upgrade)
{
return 0;
}
void
md_cleanup_install(struct install_partition_desc *install)
{
#ifndef DEBUG
enable_rc_conf();
#endif
}
int
md_pre_update(struct install_partition_desc *install)
{
return 1;
}
/* Upgrade support */
int
md_update(struct install_partition_desc *install)
{
md_post_newfs(install);
return 1;
}
int
md_pre_mount(struct install_partition_desc *install, size_t ndx)
{
return 0;
}
#ifdef HAVE_GPT
/*
* New GPT partitions have been written, update bootloader or remember
* data until needed in md_post_newfs
*/
bool
md_gpt_post_write(struct disk_partitions *parts, part_id root_id,
bool root_is_new, part_id efi_id, bool efi_is_new)
{
return true;
}
#endif
bool
md_parts_use_wholedisk(struct disk_partitions *parts)
{
return parts_use_wholedisk(parts, 0, NULL);
}
-66
View File
@@ -1,66 +0,0 @@
/* $NetBSD: md.h,v 1.4 2025/04/26 03:49:32 tsutsui Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Based on code written by Philip A. Nelson for Piermont Information
* Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* md.h -- Machine specific definitions for the alpha */
/* Constants and defines */
/* Megs required for a full X installation. */
#define XNEEDMB 300
#define DEFROOTSIZE 128
#define DEFUSRSIZE 900
#define DEBNEEDMB 1024
/* have support for booting from UFS2 */
#define HAVE_UFS2_BOOT
/* have file system specific primary boot loader */
#define HAVE_BOOTXX_xFS
#define BOOTXXDIR "/usr/mdec"
#define BOOTXX_FFSV1 "bootxx_ffs"
#define BOOTXX_FFSV2 "bootxx_ffsv2"
/*
* Default filesets to fetch and install during installation
* or upgrade.
*/
#define SET_KERNEL_1_NAME "kern-GENERIC"
/*
* Machine-specific command to write a new label to a disk.
* If not defined, we assume the port does not support disklabels and
* the hand-edited disklabel will NOT be written by MI code.
*/
#define DISKLABEL_CMD "disklabel -w -r"
@@ -1,37 +0,0 @@
/* $NetBSD: menus.md.en,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Based on code written by Philip A. Nelson for Piermont Information
* Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* alpha machine dependent menus, english */
@@ -1,37 +0,0 @@
/* $NetBSD: menus.md.es,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Based on code written by Philip A. Nelson for Piermont Information
* Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* alpha machine dependent menus, spanish */
@@ -1,37 +0,0 @@
/* $NetBSD: menus.md.fr,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Based on code written by Philip A. Nelson for Piermont Information
* Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* alpha machine dependent menus, french */
@@ -1,39 +0,0 @@
/* $NetBSD: menus.md.pl,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/* Based on english version: */
/* NetBSD: menus.md.en,v 1.16 2001/11/29 23:20:56 thorpej Exp */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Based on code written by Philip A. Nelson for Piermont Information
* Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* alpha machine dependent menus, Polish */
@@ -1,53 +0,0 @@
/* $NetBSD: msg.md.de,v 1.2 2020/09/22 02:53:52 snj Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Based on code written by Philip A. Nelson for Piermont Information
* Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* alpha machine dependent messages, German */
message md_hello
{
}
message md_may_remove_boot_medium
{Wenn Sie von einer Diskette gebootet haben, können Sie diese jetzt
enfernen.
}
message dobootblks
{Installiere die Bootblöcke auf %s ...
}
message set_kernel_1
{Kernel (GENERIC)}
@@ -1,52 +0,0 @@
/* $NetBSD: msg.md.en,v 1.2 2020/09/22 02:53:52 snj Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Based on code written by Philip A. Nelson for Piermont Information
* Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* alpha machine dependent messages, english */
message md_hello
{
}
message md_may_remove_boot_medium
{If you booted from a floppy, you may now remove the disk.
}
message dobootblks
{Installing boot blocks on %s....
}
message set_kernel_1
{Kernel (GENERIC)}
@@ -1,52 +0,0 @@
/* $NetBSD: msg.md.es,v 1.2 2020/09/22 02:53:52 snj Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Based on code written by Philip A. Nelson for Piermont Information
* Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* alpha machine dependent messages, spanish */
message md_hello
{
}
message md_may_remove_boot_medium
{Si ha iniciado desde disquette, ahora debería retirar el disco.
}
message dobootblks
{Instalando bloques de arranque en %s...
}
message set_kernel_1
{Núcleo (GENERIC)}
@@ -1,52 +0,0 @@
/* $NetBSD: msg.md.fr,v 1.2 2020/09/22 02:53:52 snj Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Based on code written by Philip A. Nelson for Piermont Information
* Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* alpha machine dependent messages, french */
message md_hello
{
}
message md_may_remove_boot_medium
{Si vous avez démarré sur une disquette, vous pouvez maintenant la retirer.
}
message dobootblks
{Installation des blocs de démarrage sur %s ...
}
message set_kernel_1
{Kernel (GENERIC)}
@@ -1,54 +0,0 @@
/* $NetBSD: msg.md.pl,v 1.2 2020/09/22 02:53:52 snj Exp $ */
/* Based on english version: */
/* NetBSD: msg.md.en,v 1.6 2000/12/03 01:54:47 minoura Exp */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Based on code written by Philip A. Nelson for Piermont Information
* Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* alpha machine dependent messages, Polish */
message md_hello
{
}
message md_may_remove_boot_medium
{Jesli uruchomiles komputer z dyskietki, mozesz ja teraz wyciagnac.
}
message dobootblks
{Instalowanie bootblokow na %s....
}
message set_kernel_1
{Kernel (GENERIC)}
@@ -1,18 +0,0 @@
# $NetBSD: Makefile,v 1.3 2026/06/22 19:26:01 martin Exp $
#
# Makefile for amd64
#
MENUS_MD= ../i386/menus.md
MSG_MD= ../i386/msg.md.${SYSINSTLANG} msg.mbr.${SYSINSTLANG}
MD_OPTIONS= BOOTSEL AOUT2ELF HAVE_INSTALL_IMAGE
NO_MBR=no
HAVE_DVD_IMAGE=yes
CPPFLAGS+= -DBOOTSEL -DWSKBD
# Makronix: the installer can encrypt the target disk (cgdroot.c). The boot
# loader and the cgdroot miniroot module this needs are the x86 ones.
CPPFLAGS+= -DCGDROOT
.include "../../Makefile.inc"
-22
View File
@@ -1,22 +0,0 @@
/* $NetBSD: md.c,v 1.2 2019/11/16 21:25:14 martin Exp $ */
/* md.c -- Machine specific code for amd64 */
#include "../i386/md.c"
void amd64_md_boot_cfg_finalize(const char *path);
void
amd64_md_boot_cfg_finalize(const char *path)
{
char buf[MAXPATHLEN];
if (get_kernel_set() != SET_KERNEL_2)
return;
run_program(RUN_CHROOT|RUN_FATAL,
"sh -c 'sed -e \"s:;boot:;pkboot:\" "
"< %s > %s.1", path, path);
snprintf(buf, sizeof buf, "%s.1", path);
mv_within_target_or_die(buf, path);
}
-135
View File
@@ -1,135 +0,0 @@
/* $NetBSD: md.h,v 1.11 2024/04/09 15:17:25 nia Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Written by Philip A. Nelson for Piermont Information Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* md.h -- Machine specific definitions for the i386 */
#include <machine/cpu.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/bootblock.h>
#include <fcntl.h>
#include <unistd.h>
/* i386 uses the mbr code. */
#include "mbr.h"
/* constants and defines */
#define DEFROOTSIZE 128 /* Default root size */
#define DEFUSRSIZE 0 /* Default /usr size, if /home */
#define XNEEDMB 300 /* Extra megs for full X installation */
#define DEBNEEDMB 1400 /* Extra megs for debug sets */
#define DEFSWAPSIZE (-1)
/* use UFS2 by default for ffs */
#define DEFAULT_UFS2
/* have support for booting from UFS2 */
#define HAVE_UFS2_BOOT
/* have support for booting from GPT disks */
#define HAVE_GPT_BOOT
/* allow using tmpfs for /tmp instead of mfs */
#define HAVE_TMPFS
/* have file system specific primary boot loader */
#define HAVE_BOOTXX_xFS
#define BOOTXXDIR "/usr/mdec"
#define BOOTXX_FFSV1 "bootxx_ffsv1"
#define BOOTXX_FFSV2 "bootxx_ffsv2"
#define BOOTXX_LFSV2 "bootxx_lfsv2"
/*
* Default filesets to fetch and install during installation
* or upgrade. The standard sets are:
* base base32 etc comp games gpufw makronix man manhtml misc rescue
* tests text
* xbase xcomp xetc xfont xserver
*
* x86_64 has the MD set kern first, because generic kernels are too
* big to fit on install floppies.
*
* Third entry is the last extension name in the split sets for loading
* from floppy.
*/
#define SET_KERNEL_1_NAME "kern-GENERIC"
#define SET_KERNEL_2_NAME "kern-GENERIC_KASLR"
#define SET_KERNEL_GENERIC SET_KERNEL_1
/*
* Machine-specific command to write a new label to a disk.
* For example, i386 uses "/sbin/disklabel -w -r", just like i386
* miniroot scripts, though this may leave a bogus incore label.
* Sun ports should probably use DISKLABEL_CMD "/sbin/disklabel -w"
* to get incore to ondisk inode translation for the Sun proms.
* If not defined, we assume the port does not support disklabels and
* hand-edited disklabel will NOT be written by MI code.
*
* On amd64, do what the 1.2 install scripts did.
*/
#define DISKLABEL_CMD "disklabel -w -r"
#define _PATH_MBR DEFAULT_BOOTDIR "/" DEFAULT_BOOTCODE
#define _PATH_BOOTSEL DEFAULT_BOOTDIR "/" DEFAULT_BOOTSELCODE
extern struct mbr_bootsel *mbs;
/*
* prototypes for MD code.
*/
/*
* When we do an UEFI install, we have completely different default
* partitions and need to adjust the description at runtime.
*/
void x86_md_part_defaults(struct pm_devs*, struct part_usage_info**,
size_t *num_usage_infos);
#define MD_PART_DEFAULTS(A,B,C) x86_md_part_defaults(A,&(B),&(C))
/* no need to install bootblock if installing for UEFI */
bool x86_md_need_bootblock(struct install_partition_desc *install);
#define MD_NEED_BOOTBLOCK(A) x86_md_need_bootblock(A)
/* post-process boot.cfg for KASLR if that kernel has been selected */
void amd64_md_boot_cfg_finalize(const char*);
#define MD_BOOT_CFG_FINALIZE(P) amd64_md_boot_cfg_finalize(P)
#define HAVE_EFI_BOOT 1 /* we support EFI boot partitions */
@@ -1,8 +0,0 @@
# $NetBSD: Makefile,v 1.1 2014/07/26 19:30:44 dholland Exp $
#
LANGUAGES= en fr de
NODISKLABEL= yes
MD_OPTIONS= ADOS_FLOPPY
.include "../../Makefile.inc"
-190
View File
@@ -1,190 +0,0 @@
/* $NetBSD: md.c,v 1.11 2026/09/03 02:12:15 gutteridge Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Based on code written by Philip A. Nelson for Piermont Information
* Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
/* md.c -- amiga machine specific routines */
#include <stdio.h>
#include <util.h>
#include <sys/param.h>
#include <machine/cpu.h>
#include <sys/sysctl.h>
#include "defs.h"
#include "md.h"
#include "msg_defs.h"
#include "menu_defs.h"
void
md_init(void)
{
}
void
md_init_set_status(int flags)
{
(void)flags;
}
bool
md_get_info(struct install_partition_desc *install)
{
set_default_sizemult(pm->diskdev, MEG, pm->sectorsize);
return true;
}
/*
* md back-end code for menu-driven BSD disklabel editor.
*/
int
md_make_bsd_partitions(struct install_partition_desc *install)
{
return 1;
}
/*
* any additional partition validation
*/
bool
md_check_partitions(struct install_partition_desc *install)
{
return true;
}
/*
* hook called before writing new disklabel.
*/
bool
md_pre_disklabel(struct install_partition_desc *install,
struct disk_partitions *parts)
{
return false;
}
/*
* hook called after writing disklabel to new target disk.
*/
bool
md_post_disklabel(struct install_partition_desc *install,
struct disk_partitions *parts)
{
return true;
}
#ifdef DISKLABEL_NO_ONDISK_VERIFY
/*
* hook to check if disklabel returned by readdisklabel(9) via DIOCGDINFO
* seems the default one, on ports that have no BSD disklabel on disks.
*/
bool
md_disklabel_is_default(const struct disklabel *lp)
{
bool maybe_default =
lp->d_npartitions == RAW_PART + 1 &&
lp->d_partitions[RAW_PART].p_size == 0x1fffffff &&
lp->d_partitions[0].p_size == lp->d_partitions[RAW_PART].p_size &&
lp->d_partitions[0].p_offset == 0 &&
lp->d_partitions[0].p_fstype == FS_BSDFFS;
return maybe_default;
}
#endif
/*
* hook called after upgrade() or install() has finished setting
* up the target disk but immediately before the user is given the
* ``disks are now set up'' message.
*/
int
md_post_newfs(struct install_partition_desc *install)
{
/* boot blocks ... */
msg_fmt_display(MSG_dobootblks, "%s", pm->diskdev);
return run_program(RUN_DISPLAY,
"/usr/mdec/installboot -v /usr/mdec/xxboot /dev/r%sa", pm->diskdev);
}
int
md_post_extract(struct install_partition_desc *install, bool upgrade)
{
return 0;
}
void
md_cleanup_install(struct install_partition_desc *install)
{
#ifndef DEBUG
enable_rc_conf();
#endif
}
int
md_pre_update(struct install_partition_desc *install)
{
return 1;
}
/* Upgrade support */
int
md_update(struct install_partition_desc *install)
{
md_post_newfs(install);
return 1;
}
int
md_pre_mount(struct install_partition_desc *install, size_t ndx)
{
return 0;
}
#ifdef HAVE_GPT
/*
* New GPT partitions have been written, update bootloader or remember
* data until needed in md_post_newfs
*/
bool
md_gpt_post_write(struct disk_partitions *parts, part_id root_id,
bool root_is_new, part_id efi_id, bool efi_is_new)
{
return true;
}
#endif
bool
md_parts_use_wholedisk(struct disk_partitions *parts)
{
return parts_use_wholedisk(parts, 0, NULL);
}
-84
View File
@@ -1,84 +0,0 @@
/* $NetBSD: md.h,v 1.6 2021/12/05 04:42:55 msaitoh Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Written by Philip A. Nelson for Piermont Information Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* md.h -- Machine specific definitions for the amiga */
#include <machine/cpu.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
/* constants and defines */
/* Megs required for a full X installation. */
#define XNEEDMB 225
/*
* Default filesets to fetch and install during installation
* or upgrade. The standard sets are:
* base etc comp games man misc rescue tests text xbase xcomp xetc xfont xserver
*/
#define SET_KERNEL_1_NAME "kern-GENERIC"
/*
* Machine-specific command to write a new label to a disk.
* For example, i386 uses "/sbin/disklabel -w -r", just like i386
* miniroot scripts, though this may leave a bogus incore label.
* Sun ports should probably use DISKLABEL_CMD "/sbin/disklabel -w"
* to get incore to ondisk inode translation for the Sun proms.
* If not defined, we assume the port does not support disklabels and
* hand-edited disklabel will NOT be written by MI code.
*
* On amiga, disklabel can't be used to rewrite the RDB
*/
/* #define DISKLABEL_CMD "disklabel -w -r" */
/*
* We rely on kernel support to translate native RDB partitions
* to in-core disklabels, so we can not check for existence of "real"
* disklabels on-disk before offering disklabel partitions.
*/
#define DISKLABEL_NO_ONDISK_VERIFY 1
/*
* prototypes for MD code.
*/
@@ -1,36 +0,0 @@
/* $NetBSD: menus.md.en,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Written by Philip A. Nelson for Piermont Information Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* Menu definitions for sysinst. amiga version, machine dependent. */
@@ -1,36 +0,0 @@
/* $NetBSD: menus.md.es,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Written by Philip A. Nelson for Piermont Information Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* Menu definitions for sysinst. amiga version, machine dependent. */
@@ -1,36 +0,0 @@
/* $NetBSD: menus.md.fr,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Written by Philip A. Nelson for Piermont Information Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* Menu definitions for sysinst. amiga version, machine dependent. */
@@ -1,51 +0,0 @@
/* $NetBSD: msg.md.de,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Written by Philip A. Nelson for Piermont Information Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* MD Message catalog -- German, amiga version */
message md_hello
{
}
message md_may_remove_boot_medium
{Wenn Sie von einer Diskette gebootet haben, können Sie diese jetzt
entfernen.
}
message dobootblks
{Installiere die Bootblöcke auf %s ...
}
message set_kernel_1
{Kernel (GENERIC)}
@@ -1,50 +0,0 @@
/* $NetBSD: msg.md.en,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Written by Philip A. Nelson for Piermont Information Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* MD Message catalog -- english, amiga version */
message md_hello
{
}
message md_may_remove_boot_medium
{If you booted from a floppy, you may now remove the disk.
}
message dobootblks
{Installing boot blocks on %s....
}
message set_kernel_1
{Kernel (GENERIC)}
@@ -1,50 +0,0 @@
/* $NetBSD: msg.md.es,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Written by Philip A. Nelson for Piermont Information Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* MD Message catalog -- english, amiga version */
message md_hello
{
}
message md_may_remove_boot_medium
{Si ha iniciado desde disquette, ahora debería retirar el disco.
}
message dobootblks
{Instalando boot blocks en %s....
}
message set_kernel_1
{Núcleo (GENERIC)}
@@ -1,50 +0,0 @@
/* $NetBSD: msg.md.fr,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Written by Philip A. Nelson for Piermont Information Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* MD Message catalog -- french, amiga version */
message md_hello
{
}
message md_may_remove_boot_medium
{Si vous avez démarré sur une disquette, vous pouvez maintenant la retirer.
}
message dobootblks
{Installation des blocs de démarrage sur %s ...
}
message set_kernel_1
{Kernel (GENERIC)}
@@ -1,12 +0,0 @@
# $NetBSD: Makefile,v 1.2 2019/06/12 06:20:18 martin Exp $
#
# Makefile for arc
#
MENUS_MD= menus.md.${SYSINSTLANG}
MSG_MD= msg.md.${SYSINSTLANG} msg.mbr.${SYSINSTLANG}
NO_MBR=no
LANGUAGES= # no translations ready yet
.include "../../Makefile.inc"
-309
View File
@@ -1,309 +0,0 @@
/* $NetBSD: md.c,v 1.15 2026/03/17 20:55:41 andvar Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Based on code written by Philip A. Nelson for Piermont Information
* Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
/* md.c -- arc machine specific routines */
#include <sys/param.h>
#include <sys/sysctl.h>
#include <stdio.h>
#include <util.h>
#include <machine/cpu.h>
#include "defs.h"
#include "md.h"
#include "msg_defs.h"
#include "menu_defs.h"
/*
* ARC BIOS recognizes only FAT, so we have to have a FAT partition
* to store our native bootloader.
*/
static int nobootfs = 0;
void
md_init(void)
{
}
void
md_init_set_status(int flags)
{
(void)flags;
}
bool
md_get_info(struct install_partition_desc *install)
{
int res;
if (pm->no_mbr || pm->no_part)
return true;
again:
if (pm->parts == NULL) {
const struct disk_partitioning_scheme *ps =
select_part_scheme(pm, NULL, true, NULL);
if (!ps)
return false;
struct disk_partitions *parts =
(*ps->create_new_for_disk)(pm->diskdev,
0, pm->dlsize, true, NULL);
if (!parts)
return false;
pm->parts = parts;
if (ps->size_limit > 0 && pm->dlsize > ps->size_limit)
pm->dlsize = ps->size_limit;
}
res = set_bios_geom_with_mbr_guess(pm->parts);
if (res == 0)
return false;
else if (res == 1)
return true;
pm->parts->pscheme->destroy_part_scheme(pm->parts);
pm->parts = NULL;
goto again;
}
/*
* md back-end code for menu-driven BSD disklabel editor.
*/
int
md_make_bsd_partitions(struct install_partition_desc *install)
{
return make_bsd_partitions(install);
}
/*
* any additional partition validation
*/
bool
md_check_partitions(struct install_partition_desc *install)
{
size_t i;
/*
* We need to find a boot partition, otherwise we can't write our
* bootloader. We make the assumption that the user hasn't done
* something stupid, like move it away from the MBR partition.
*/
for (i = 0; i < install->num; i++) {
if (install->infos[i].fs_type == FS_MSDOS)
return true;
}
msg_display(MSG_nobootpartdisklabel);
process_menu(MENU_ok, NULL);
return false;
}
/*
* hook called before writing new disklabel.
*/
bool
md_pre_disklabel(struct install_partition_desc *install,
struct disk_partitions *parts)
{
if (parts->parent == NULL)
return true; /* no outer partitions */
parts = parts->parent;
msg_display_subst(MSG_dofdisk, 3, parts->disk,
msg_string(parts->pscheme->name),
msg_string(parts->pscheme->short_name));
/* write edited "MBR" onto disk. */
if (!parts->pscheme->write_to_disk(parts)) {
msg_display(MSG_wmbrfail);
process_menu(MENU_ok, NULL);
return false;
}
return true;
}
/*
* hook called after writing disklabel to new target disk.
*/
bool
md_post_disklabel(struct install_partition_desc *install,
struct disk_partitions *parts)
{
return true;
}
/*
* hook called after upgrade() or install() has finished setting
* up the target disk but immediately before the user is given the
* ``disks are now set up'' message.
*/
int
md_post_newfs(struct install_partition_desc *install)
{
if (!nobootfs) {
msg_fmt_display(msg_string(MSG_copybootloader), "%s",
pm->diskdev);
cp_to_target("/usr/mdec/boot", PART_BOOT_MOUNT);
}
return 0;
}
int
md_post_extract(struct install_partition_desc *install, bool upgrade)
{
return 0;
}
void
md_cleanup_install(struct install_partition_desc *install)
{
#ifndef DEBUG
enable_rc_conf();
#endif
msg_display(MSG_howtoboot);
process_menu(MENU_ok, NULL);
}
int
md_pre_update(struct install_partition_desc *install)
{
size_t i;
/*
* Verify the msdos partition exists and is big enough.
*/
for (i = 0; i < install->num; i++) {
if (install->infos[i].fs_type != PART_BOOT_TYPE)
continue;
if (install->infos[i].size/512 >= PART_BOOT_MIN)
break;
msg_display(MSG_boottoosmall);
msg_fmt_display_add(MSG_nobootpart, "%d", 0);
if (!ask_yesno(NULL))
return false;
nobootfs = 1;
break;
}
if (md_check_partitions(install) == 0)
nobootfs = 1;
return 1;
}
/* Upgrade support */
int
md_update(struct install_partition_desc *install)
{
md_post_newfs(install);
return 1;
}
int
md_check_mbr(struct disk_partitions *parts, mbr_info_t *mbri, bool quiet)
{
mbr_info_t *ext;
struct mbr_partition *part;
int i;
for (ext = mbri; ext; ext = ext->extended) {
part = ext->mbr.mbr_parts;
for (i = 0; i < MBR_PART_COUNT; part++, i++) {
if (part->mbrp_type == MBR_PTYPE_FAT12) {
pm->bootstart = part->mbrp_start;
pm->bootsize = part->mbrp_size;
break;
}
}
}
if (pm->bootsize < (PART_BOOT_MIN / 512)) {
if (quiet)
return 0;
msg_display(MSG_boottoosmall);
return ask_reedit(parts);
}
if (pm->bootstart == 0 || pm->bootsize == 0) {
if (quiet)
return 0;
msg_display(MSG_nobootpart);
return ask_reedit(parts);
}
return 2;
}
bool
md_parts_use_wholedisk(struct disk_partitions *parts)
{
struct disk_part_info boot_part = {
.size = PART_BOOT / 512,
.fs_type = PART_BOOT_TYPE,
.fs_sub_type = MBR_PTYPE_FAT12,
.last_mounted = PART_BOOT_MOUNT,
};
boot_part.nat_type = parts->pscheme->get_fs_part_type(
PT_root, boot_part.fs_type, boot_part.fs_sub_type);
return parts_use_wholedisk(parts, 1, &boot_part);
}
int
md_pre_mount(struct install_partition_desc *install, size_t ndx)
{
return 0;
}
bool
md_mbr_update_check(struct disk_partitions *parts, mbr_info_t *mbri)
{
return false; /* no change, no need to write back */
}
#ifdef HAVE_GPT
bool
md_gpt_post_write(struct disk_partitions *parts, part_id root_id,
bool root_is_new, part_id efi_id, bool efi_is_new)
{
/* no GPT boot support, nothing needs to be done here */
return true;
}
#endif
-88
View File
@@ -1,88 +0,0 @@
/* $NetBSD: md.h,v 1.5 2022/06/16 14:03:37 tsutsui Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Written by Philip A. Nelson for Piermont Information Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* md.h -- Machine specific definitions for the arc */
#include <machine/cpu.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
/* arc uses the mbr code. */
#include "mbr.h"
/* constants and defines */
#define PART_BOOT (2 * 1024 * 1024) /* 2MB boot partition */
#define PART_BOOT_MIN (1 * 1024 * 1024) /* 1MB minimum */
/* We want the boot MSDOS partition mounted on /msdos during install */
#define PART_BOOT_MOUNT "/msdos"
#define PART_BOOT_TYPE FS_MSDOS
#define PART_BOOT_SUBT MBR_PTYPE_FAT12
/* default partition size */
#define DEFROOTSIZE 64 /* Default root size */
#define DEFSWAPSIZE 128 /* Default swap size */
#define DEFVARSIZE 64 /* Default /var size, if created */
#define DEFUSRSIZE 750 /* Default /usr size, if created */
/* Megs required for a full X installation. */
#define XNEEDMB 300
#define DEBNEEDMB 900 /* Extra megs for debug sets */
/* have support for booting from UFS2 */
#define HAVE_UFS2_BOOT
/*
* Default filesets to fetch and install during installation
* or upgrade. The standard sets are:
* base etc comp games man misc rescue tests text xbase xcomp xetc xfont xserver
*/
#define SET_KERNEL_1_NAME "kern-GENERIC"
#define MD_SETS_SELECTED SET_KERNEL_1, SET_SYSTEM, SET_X11_NOSERVERS
/*
* Machine-specific command to write a new label to a disk.
* For example, arc uses "/sbin/disklabel -w -r", just like i386
* miniroot scripts, though this may leave a bogus incore label.
* Sun ports should probably use DISKLABEL_CMD "/sbin/disklabel -w"
* to get incore to ondisk inode translation for the Sun proms.
* If not defined, we assume the port does not support disklabels and
* hand-edited disklabel will NOT be written by MI code.
*/
#define DISKLABEL_CMD "disklabel -w -r"
@@ -1,36 +0,0 @@
/* $NetBSD: menus.md.en,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Written by Philip A. Nelson for Piermont Information Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* Menu definitions for sysinst. arc version, machine dependent. */
@@ -1,91 +0,0 @@
/* $NetBSD: msg.md.en,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Written by Philip A. Nelson for Piermont Information Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* MD Message catalog -- English, arc version */
message md_hello
{Make sure you have a backup of your disk if needed since
sysinst on this port is still experimental.
}
message md_may_remove_boot_medium
{
}
message dobad144
{Installing the bad block table ...
}
message dobootblks
{Installing boot blocks on %s....
}
message pickdisk
{Choose disk: }
message partabovechs
{The NetBSD part of the disk lies outside of the range that the BIOS on
your machine can address. Booting from it may not be possible. Are you
sure you that you want to do this?
(Answering 'no' will take you back to the partition edit menu.)}
message nobootpart
{There is no FAT12 MS-DOS partition in the MBR partition table.}
message boottoosmall
{The MS-DOS FAT12 partition to install the native bootloader is too small.
It needs to be at least 1MB in size, however a size of at least 2MB is
recommended.}
message nobootpartdisklabel
{There is no boot partition in the disklabel. The boot partition should
match the boot partition you set up in the MBR partition table.}
message copybootloader
{Copying bootloader into the MS-DOS FAT12 partition on %s...
}
message howtoboot
{The installation is almost complete. Note the installer doesn't set
ARC BIOS environments for the BIOS to load NetBSD's bootloader by default.
To boot NetBSD, you need to specify the following boot command on
'Run a program' prompt of the ARC BIOS menu.
scsi()disk()rdisk()partition(1)boot scsi()disk()rdisk()partition(2)netbsd
}
message set_kernel_1
{Kernel (GENERIC)}
@@ -1,20 +0,0 @@
# $NetBSD: Makefile,v 1.7 2026/07/12 20:07:45 martin Exp $
#
# Makefile for atari
#
#MD_OPTIONS= AOUT2ELF
LANGUAGES= en de
CPPFLAGS+= -DSUPPORT_8_3_SOURCE_FILESYSTEM
.ifdef SMALLPROG
CHECK_ENTROPY= no # do not check entropy/offer adding
NOPARTMAN= yes
NO_GPT= yes
NO_DISKSIZE_CHECKS= yes # we only have disklabel, can't do large disks
NO_MBR= yes
NO_CLONES= yes
.endif
.include "../../Makefile.inc"
-217
View File
@@ -1,217 +0,0 @@
/* $NetBSD: md.c,v 1.11 2024/01/04 18:09:37 tsutsui Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Based on code written by Philip A. Nelson for Piermont Information
* Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
/* md.c -- atari machine specific routines */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/utsname.h>
#include "defs.h"
#include "md.h"
#include "msg_defs.h"
#include "menu_defs.h"
void
md_init(void)
{
}
void
md_init_set_status(int flags)
{
struct utsname instsys;
(void)flags;
/*
* Get the name of the kernel we are running under and
* enable the installation of the corresponding GENERIC-like kernel.
*/
uname(&instsys);
if (strstr(instsys.version, "(ATARITT"))
set_kernel_set(SET_KERNEL_1);
else if (strstr(instsys.version, "(FALCON"))
set_kernel_set(SET_KERNEL_2);
else if (strstr(instsys.version, "(SMALL030"))
set_kernel_set(SET_KERNEL_3);
else if (strstr(instsys.version, "(HADES"))
set_kernel_set(SET_KERNEL_4);
else if (strstr(instsys.version, "(MILAN-ISAIDE"))
set_kernel_set(SET_KERNEL_5);
else if (strstr(instsys.version, "(MILAN-PCIIDE"))
set_kernel_set(SET_KERNEL_6);
}
bool
md_get_info(struct install_partition_desc *install)
{
set_default_sizemult(pm->diskdev, MEG, pm->sectorsize);
return true;
}
/*
* md back-end code for menu-driven BSD disklabel editor.
*/
int
md_make_bsd_partitions(struct install_partition_desc *install)
{
msg_fmt_display(MSG_infoahdilabel, "%s", pm->diskdev);
if (ask_noyes(NULL)) {
run_program(RUN_DISPLAY, "ahdilabel /dev/r%sc", pm->diskdev);
}
return make_bsd_partitions(install);
}
/*
* any additional partition validation
*/
bool
md_check_partitions(struct install_partition_desc *install)
{
return true;
}
/*
* hook called before writing new disklabel.
*/
bool
md_pre_disklabel(struct install_partition_desc *install,
struct disk_partitions *parts)
{
return true;
}
/*
* hook called after writing disklabel to new target disk.
*/
bool
md_post_disklabel(struct install_partition_desc *install,
struct disk_partitions *parts)
{
return true;
}
/*
* hook called after upgrade() or install() has finished setting
* up the target disk but immediately before the user is given the
* ``disks are now set up'' message.
*/
int
md_post_newfs(struct install_partition_desc *install)
{
static const int mib[2] = {CTL_HW, HW_MODEL};
size_t len;
char *cpu_model;
int milan;
char bootpath[MAXPATHLEN];
int rv;
/* check machine type via sysctl to select appropriate bootloaders */
milan = 0; /* std is default */
sysctl(mib, 2, NULL, &len, NULL, 0);
cpu_model = malloc(len);
sysctl(mib, 2, cpu_model, &len, NULL, 0);
/* XXX model strings should be a common macro to sync with kernel */
if (strstr(cpu_model, "Milan") != NULL)
milan = 1;
free(cpu_model);
/* copy tertiary boot and install boot blocks */
msg_fmt_display(MSG_dobootblks, "%s", pm->diskdev);
snprintf(bootpath, sizeof(bootpath), "/usr/mdec/%s/boot.atari",
milan ? "milan" : "std");
rv = cp_to_target(bootpath, "/");
if (rv != 0)
return rv;
rv = run_program(RUN_DISPLAY, "/usr/mdec/installboot -v%s /dev/r%sc",
milan ? "m" : "", pm->diskdev);
return rv;
}
int
md_post_extract(struct install_partition_desc *install, bool upgrade)
{
return 0;
}
void
md_cleanup_install(struct install_partition_desc *install)
{
#ifndef DEBUG
enable_rc_conf();
#endif
}
int
md_pre_update(struct install_partition_desc *install)
{
return 1;
}
/* Upgrade support */
int
md_update(struct install_partition_desc *install)
{
md_post_newfs(install);
return 1;
}
int
md_pre_mount(struct install_partition_desc *install, size_t ndx)
{
return 0;
}
bool
md_parts_use_wholedisk(struct disk_partitions *parts)
{
return parts_use_wholedisk(parts, 0, NULL);
}
#ifdef HAVE_GPT
bool
md_gpt_post_write(struct disk_partitions *parts, part_id root_id,
bool root_is_new, part_id efi_id, bool efi_is_new)
{
/* no GPT boot support, no special checks needed */
return true;
}
#endif
-74
View File
@@ -1,74 +0,0 @@
/* $NetBSD: md.h,v 1.6 2025/04/26 03:49:32 tsutsui Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Written by Philip A. Nelson for Piermont Information Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* md.h -- Machine specific definitions for the atari */
#include <machine/cpu.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
/* constants and defines */
#define DEFROOTSIZE 40 /* Default root size */
#define DEFSWAPSIZE 32 /* Default swap size */
#define DEFVARSIZE 32 /* Default /var size, if created */
#define DEFUSRSIZE 700 /* Default /usr size, if /home */
#define XNEEDMB 250 /* Extra megs for full X installation */
#define DEBNEEDMB 800 /* Extra megs for debug sets */
/*
* Default filesets to fetch and install during installation
* or upgrade. The standard sets are:
* base etc comp games man misc rescue tests text xbase xcomp xetc xfont xserver
*/
#define SET_KERNEL_1_NAME "kern-ATARITT"
#define SET_KERNEL_2_NAME "kern-FALCON"
#define SET_KERNEL_3_NAME "kern-SMALL030"
#define SET_KERNEL_4_NAME "kern-HADES"
#define SET_KERNEL_5_NAME "kern-MILAN-ISAIDE"
#define SET_KERNEL_6_NAME "kern-MILAN-PCIIDE"
/*
* Machine-specific command to write a new label to a disk.
* For example, i386 uses "/sbin/disklabel -w -r", just like i386
* miniroot scripts, though this may leave a bogus incore label.
* Sun ports should probably use DISKLABEL_CMD "/sbin/disklabel -w"
* to get incore to ondisk inode translation for the Sun proms.
* If not defined, we assume the port does not support disklabels and
* hand-edited disklabel will NOT be written by MI code.
*
*/
#define DISKLABEL_CMD "disklabel -w"
@@ -1,36 +0,0 @@
/* $NetBSD: menus.md.en,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Written by Philip A. Nelson for Piermont Information Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* Menu definitions for sysinst. atari version, machine dependent. */
@@ -1,79 +0,0 @@
/* $NetBSD: msg.md.de,v 1.2 2014/11/24 15:22:59 tsutsui Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Written by Philip A. Nelson for Piermont Information Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* MD Message catalog -- German, atari version */
message md_hello
{
}
message md_may_remove_boot_medium
{Wenn Sie von einer Diskette gebootet haben, können Sie diese jetzt
entfernen.
}
message dobootblks
{Installiere die Bootblöcke auf %s ...
}
message infoahdilabel
{Sie müssen nun Ihre Rootdisk zur Installation von NetBSD vorbereiten.
Nachfolgend wird dieser Vorgang 'Labeling' einer Festplatte genannt.
Zuvor besteht die Möglichkeit eine AHDI-kompatible Partitionierung
auf der Festplatte zu bearbeiten oder neu zu erstellen, auf der dann NetBSD
installiert werden soll.
Beachten Sie, dass NetBSD nicht auf AHDI Partitionen angewiesen ist - Details
können Sie der NetBSD Installationsdokumentation entnehmen.
Wenn Sie eine AHDI-kompatible Partitionierung nutzen wollen, müssen Sie
NetBSD einige Partitionen zuweisen, damit NetBSD fähig ist die Festplatte
zu nutzen. Stellen Sie die 'Id' all jener Partitionen, die Sie nutzen
wollen, auf 'NBD'. Setzen Sie zusätzlich die 'Id' der als Swap zu nutzenden
Partition auf 'SWP'.
Wünschen Sie eine AHDI-kompatible Partitionierung?
}
message set_kernel_1
{Kernel (ATARITT)}
message set_kernel_2
{Kernel (FALCON)}
message set_kernel_3
{Kernel (SMALL030)}
message set_kernel_4
{Kernel (HADES)}
message set_kernel_5
{Kernel (MILAN-ISAIDE)}
message set_kernel_6
{Kernel (MILAN-PCIIDE)}
@@ -1,75 +0,0 @@
/* $NetBSD: msg.md.en,v 1.2 2014/11/24 15:22:59 tsutsui Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Written by Philip A. Nelson for Piermont Information Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* MD Message catalog -- english, atari version */
message md_hello
{
}
message md_may_remove_boot_medium
{If you booted from a floppy, you may now remove the disk.
}
message dobootblks
{Installing boot blocks on %s....
}
message infoahdilabel
{You now have to prepare your root disk for the installation of NetBSD. This
is further referred to as 'labeling' a disk.
First you get the chance to edit or create an AHDI compatible partitioning on
the installation disk. Note that NetBSD can do without AHDI partitions,
check the documentation.
If you want to use an AHDI compatible partitioning, you have to assign some
partitions to NetBSD before NetBSD is able to use the disk. Change the 'id'
of all partitions you want to use for NetBSD file systems to 'NBD'. Change
the 'id' of the partition you wish to use for swap to 'SWP'.
Do you want AHDI compatible partitioning?
}
message set_kernel_1
{Kernel (ATARITT)}
message set_kernel_2
{Kernel (FALCON)}
message set_kernel_3
{Kernel (SMALL030)}
message set_kernel_4
{Kernel (HADES)}
message set_kernel_5
{Kernel (MILAN-ISAIDE)}
message set_kernel_6
{Kernel (MILAN-PCIIDE)}
@@ -1,10 +0,0 @@
# $NetBSD: Makefile,v 1.2 2019/06/12 06:20:19 martin Exp $
#
# Makefile for bebox
#
MENUS_MD= menus.md.${SYSINSTLANG}
MSG_MD= msg.md.${SYSINSTLANG} msg.mbr.${SYSINSTLANG}
NO_MBR=no
.include "../../Makefile.inc"
-227
View File
@@ -1,227 +0,0 @@
/* $NetBSD: md.c,v 1.11 2026/09/03 02:12:15 gutteridge Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Based on code written by Philip A. Nelson for Piermont Information
* Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
/* md.c -- bebox machine specific routines */
#include <sys/param.h>
#include <sys/sysctl.h>
#include <stdio.h>
#include <util.h>
#include "defs.h"
#include "md.h"
#include "msg_defs.h"
#include "menu_defs.h"
void
md_init(void)
{
}
void
md_init_set_status(int flags)
{
(void)flags;
}
bool
md_get_info(struct install_partition_desc *install)
{
int res;
if (pm->no_mbr || pm->no_part)
return true;
again:
if (pm->parts == NULL) {
const struct disk_partitioning_scheme *ps =
select_part_scheme(pm, NULL, true, NULL);
if (!ps)
return false;
struct disk_partitions *parts =
(*ps->create_new_for_disk)(pm->diskdev,
0, pm->dlsize, true, NULL);
if (!parts)
return false;
pm->parts = parts;
if (ps->size_limit > 0 && pm->dlsize > ps->size_limit)
pm->dlsize = ps->size_limit;
}
res = set_bios_geom_with_mbr_guess(pm->parts);
if (res == 0)
return false;
else if (res == 1)
return true;
pm->parts->pscheme->destroy_part_scheme(pm->parts);
pm->parts = NULL;
goto again;
}
/*
* md back-end code for menu-driven BSD disklabel editor.
*/
int
md_make_bsd_partitions(struct install_partition_desc *install)
{
return make_bsd_partitions(install);
}
/*
* any additional partition validation
*/
bool
md_check_partitions(struct install_partition_desc *install)
{
return true;
}
/*
* hook called before writing new disklabel.
*/
bool
md_pre_disklabel(struct install_partition_desc *install,
struct disk_partitions *parts)
{
if (parts->parent == NULL)
return true; /* no outer partitions */
parts = parts->parent;
msg_display_subst(MSG_dofdisk, 3, parts->disk,
msg_string(parts->pscheme->name),
msg_string(parts->pscheme->short_name));
/* write edited "MBR" onto disk. */
if (!parts->pscheme->write_to_disk(parts)) {
msg_display(MSG_wmbrfail);
process_menu(MENU_ok, NULL);
return false;
}
return true;
}
/*
* hook called after writing disklabel to new target disk.
*/
bool
md_post_disklabel(struct install_partition_desc *install,
struct disk_partitions *parts)
{
return true;
}
/*
* hook called after upgrade() or install() has finished setting
* up the target disk but immediately before the user is given the
* ``disks are now set up'' message.
*/
int
md_post_newfs(struct install_partition_desc *install)
{
return 0;
}
int
md_post_extract(struct install_partition_desc *install, bool upgrade)
{
return 0;
}
void
md_cleanup_install(struct install_partition_desc *install)
{
#ifndef DEBUG
enable_rc_conf();
#endif
}
int
md_pre_update(struct install_partition_desc *install)
{
return 1;
}
/* Upgrade support */
int
md_update(struct install_partition_desc *install)
{
md_post_newfs(install);
return 1;
}
int
md_check_mbr(struct disk_partitions *parts, mbr_info_t *mbri, bool quiet)
{
return 2;
}
bool
md_parts_use_wholedisk(struct disk_partitions *parts)
{
return parts_use_wholedisk(parts, 0, NULL);
}
int
md_pre_mount(struct install_partition_desc *install, size_t ndx)
{
return 0;
}
/* returns false if no write-back of parts is required */
bool
md_mbr_update_check(struct disk_partitions *parts, mbr_info_t *mbri)
{
return false;
}
#ifdef HAVE_GPT
/*
* New GPT partitions have been written, update bootloader or remember
* data until needed in md_post_newfs
*/
bool
md_gpt_post_write(struct disk_partitions *parts, part_id root_id,
bool root_is_new, part_id efi_id, bool efi_is_new)
{
return true;
}
#endif
-68
View File
@@ -1,68 +0,0 @@
/* $NetBSD: md.h,v 1.3 2019/10/02 11:16:01 maya Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Written by Philip A. Nelson for Piermont Information Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* md.h -- Machine specific definitions for the bebox */
/* bebox uses the mbr code. */
#include "mbr.h"
/* constants and defines */
#define XNEEDMB 256 /* Extra megs for full X installation */
#define DEBNEEDMB 900 /* Extra megs for debug sets */
/*
* Default filesets to fetch and install during installation
* or upgrade. The standard sets are:
* base etc comp games man misc rescue tests text xbase xcomp xetc xfont xserver
*/
#define SET_KERNEL_1_NAME "kern-GENERIC"
/*
* Machine-specific command to write a new label to a disk.
* For example, bebox uses "/sbin/disklabel -w -r", just like bebox
* miniroot scripts, though this may leave a bogus incore label.
* Sun ports should probably use DISKLABEL_CMD "/sbin/disklabel -w"
* to get incore to ondisk inode translation for the Sun proms.
* If not defined, we assume the port does not support disklabels and
* hand-edited disklabel will NOT be written by MI code.
*
* On bebox, do what the 1.2 install scripts did.
*/
#define DISKLABEL_CMD "disklabel -w -r"
@@ -1,36 +0,0 @@
/* $NetBSD: menus.md.en,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Written by Philip A. Nelson for Piermont Information Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* Menu definitions for sysinst. bebox version, machine dependent. */
@@ -1,36 +0,0 @@
/* $NetBSD: menus.md.es,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Written by Philip A. Nelson for Piermont Information Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* Menu definitions for sysinst. bebox version, machine dependent. */
@@ -1,36 +0,0 @@
/* $NetBSD: menus.md.fr,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Written by Philip A. Nelson for Piermont Information Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* Menu definitions for sysinst. bebox version, machine dependent. */
@@ -1,38 +0,0 @@
/* $NetBSD: menus.md.pl,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/* Based on english version: */
/* NetBSD: menus.md.en,v 1.14 2001/11/29 23:20:57 thorpej Exp */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Written by Philip A. Nelson for Piermont Information Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* Menu definitions for sysinst. bebox version, machine dependent. */
@@ -1,55 +0,0 @@
/* $NetBSD: msg.md.de,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Written by Philip A. Nelson for Piermont Information Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* MD Message catalog -- German, bebox version */
message md_hello
{
}
message md_may_remove_boot_medium
{Wenn Sie von einer Diskette gebootet haben, können Sie diese jetzt
entfernen.
}
message dobad144
{Installiere die Tabelle der defekten Blöcke ...
}
message dobootblks
{Installiere die Bootblöcke auf %s ...
}
message set_kernel_1
{Kernel (GENERIC)}
@@ -1,54 +0,0 @@
/* $NetBSD: msg.md.en,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Written by Philip A. Nelson for Piermont Information Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* MD Message catalog -- english, bebox version */
message md_hello
{
}
message md_may_remove_boot_medium
{If you booted from a floppy, you may now remove the disk.
}
message dobad144
{Installing the bad block table ...
}
message dobootblks
{Installing boot blocks on %s....
}
message set_kernel_1
{Kernel (GENERIC)}
@@ -1,54 +0,0 @@
/* $NetBSD: msg.md.es,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Written by Philip A. Nelson for Piermont Information Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* MD Message catalog -- spanish, bebox version */
message md_hello
{
}
message md_may_remove_boot_medium
{Si ha iniciado desde disquette, ahora debería retirar el disco.
}
message dobad144
{Instalando la tabla de bloques malos ...
}
message dobootblks
{Instalando bloques de arranque en %s....
}
message set_kernel_1
{Núcleo (GENERIC)}
@@ -1,54 +0,0 @@
/* $NetBSD: msg.md.fr,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Written by Philip A. Nelson for Piermont Information Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* MD Message catalog -- french, bebox version */
message md_hello
{
}
message md_may_remove_boot_medium
{Si vous avez démarré sur une disquette, vous pouvez maintenant la retirer.
}
message dobad144
{Installation de la table des blocs défectueux ...
}
message dobootblks
{Installation des blocs de démarrage sur %s ...
}
message set_kernel_1
{Kernel (GENERIC)}
@@ -1,56 +0,0 @@
/* $NetBSD: msg.md.pl,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/* Based on english version: */
/* NetBSD: msg.md.en,v 1.11 2001/04/12 03:48:13 briggs Exp */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Written by Philip A. Nelson for Piermont Information Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* MD Message catalog -- Polish, bebox version */
message md_hello
{
}
message md_may_remove_boot_medium
{Jesli uruchomiles komputer z dyskietki, mozesz ja teraz wyciagnac.
}
message dobad144
{Instalowanie tablicy zlych blokow ...
}
message dobootblks
{Instalowanie bootblokow na %s....
}
message set_kernel_1
{Kernel (GENERIC)}
@@ -1,8 +0,0 @@
# $NetBSD: Makefile,v 1.1 2014/07/26 19:30:44 dholland Exp $
#
# Makefile for cats
#
MD_OPTIONS= AOUT2ELF
.include "../../Makefile.inc"
-224
View File
@@ -1,224 +0,0 @@
/* $NetBSD: md.c,v 1.7 2026/09/03 02:12:15 gutteridge Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Based on code written by Philip A. Nelson for Piermont Information
* Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
/* md.c -- cats machine specific routines */
#include <stdio.h>
#include <curses.h>
#include <unistd.h>
#include <fcntl.h>
#include <util.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/param.h>
#include "defs.h"
#include "md.h"
#include "msg_defs.h"
#include "menu_defs.h"
void
md_init(void)
{
}
void
md_init_set_status(int flags)
{
(void)flags;
}
bool
md_get_info(struct install_partition_desc *install)
{
struct disklabel disklabel;
int fd;
char dev_name[100];
#if 0
static char bb[DEV_BSIZE];
struct filecore_bootblock *fcbb = (struct filecore_bootblock *)bb;
#endif
int offset = 0;
snprintf(dev_name, 100, "/dev/r%sc", pm->diskdev);
fd = open(dev_name, O_RDONLY, 0);
if (fd < 0) {
endwin();
fprintf(stderr, "Can't open %s\n", dev_name);
exit(1);
}
if (ioctl(fd, DIOCGDINFO, &disklabel) == -1) {
endwin();
fprintf(stderr, "Can't read disklabel on %s.\n", dev_name);
close(fd);
exit(1);
}
close(fd);
pm->dlcyl = disklabel.d_ncylinders;
pm->dlhead = disklabel.d_ntracks;
pm->dlsec = disklabel.d_nsectors;
pm->sectorsize = disklabel.d_secsize;
pm->dlcylsize = disklabel.d_secpercyl;
/*
* Compute whole disk size. Take max of (pm->dlcyl*pm->dlhead*pm->dlsec)
* and secperunit, just in case the disk is already labelled.
* (If our new label's RAW_PART size ends up smaller than the
* in-core RAW_PART size value, updating the label will fail.)
*/
pm->dlsize = pm->dlcyl*pm->dlhead*pm->dlsec;
if (disklabel.d_secperunit > pm->dlsize)
pm->dlsize = disklabel.d_secperunit;
pm->ptstart = offset;
/* endwin();
printf("pm->dlcyl=%d\n", pm->dlcyl);
printf("pm->dlhead=%d\n", pm->dlhead);
printf("pm->dlsec=%d\n", pm->dlsec);
printf("secsz=%d\n", pm->sectorsize);
printf("cylsz=%d\n", pm->dlcylsize);
printf("dlsz=%d\n", pm->dlsize);
printf("pstart=%d\n", pm->ptstart);
printf("pstart=%d\n", partsize);
printf("secpun=%d\n", disklabel.d_secperunit);
backtowin();*/
return true;
}
/*
* md back-end code for menu-driven BSD disklabel editor.
*/
int
md_make_bsd_partitions(struct install_partition_desc *install)
{
return make_bsd_partitions(install);
}
/*
* any additional partition validation
*/
bool
md_check_partitions(struct install_partition_desc *install)
{
return true;
}
/*
* hook called before writing new disklabel.
*/
bool
md_pre_disklabel(struct install_partition_desc *install,
struct disk_partitions *parts)
{
return true;
}
/*
* hook called after writing disklabel to new target disk.
*/
bool
md_post_disklabel(struct install_partition_desc *install,
struct disk_partitions *parts)
{
return true;
}
/*
* hook called after upgrade() or install() has finished setting
* up the target disk but immediately before the user is given the
* ``disks are now set up'' message.
*/
int
md_post_newfs(struct install_partition_desc *install)
{
return 0;
}
int
md_post_extract(struct install_partition_desc *install, bool upgrade)
{
return 0;
}
void
md_cleanup_install(struct install_partition_desc *install)
{
#ifndef DEBUG
enable_rc_conf();
#endif
}
int
md_pre_update(struct install_partition_desc *install)
{
return 1;
}
/* Upgrade support */
int
md_update(struct install_partition_desc *install)
{
md_post_newfs(install);
return 1;
}
int
md_pre_mount(struct install_partition_desc *install, size_t ndx)
{
return 0;
}
#ifdef HAVE_GPT
/*
* New GPT partitions have been written, update bootloader or remember
* data until needed in md_post_newfs
*/
bool
md_gpt_post_write(struct disk_partitions *parts, part_id root_id,
bool root_is_new, part_id efi_id, bool efi_is_new)
{
return true;
}
#endif
bool
md_parts_use_wholedisk(struct disk_partitions *parts)
{
return parts_use_wholedisk(parts, 0, NULL);
}
-63
View File
@@ -1,63 +0,0 @@
/* $NetBSD: md.h,v 1.4 2019/10/02 11:16:01 maya Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Based on code written by Philip A. Nelson for Piermont Information
* Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* md.h -- Machine specific definitions for the cats */
/* Constants and defines */
#define DEFROOTSIZE 80 /* Default root size */
#define DEFUSRSIZE 960 /* Default /usr size, if /home */
#define XNEEDMB 225 /* Extra megs for full X installation */
#define DEBNEEDMB 980 /* Extra megs for debug sets */
/*
* Default filesets to fetch and install during installation
* or upgrade. The standard sets are:
* base etc comp games man misc rescue tests text xbase xcomp xetc xfont xserver
*/
#define SET_KERNEL_1_NAME "kern-GENERIC"
#define SET_KERNEL_2_NAME "kern-GENERIC.ABLE"
/*
* Machine-specific command to write a new label to a disk.
* For example, cats uses "/sbin/disklabel -w -r", just like cats
* miniroot scripts, though this may leave a bogus incore label.
* Sun ports should probably use DISKLABEL_CMD "/sbin/disklabel -w"
* to get incore to ondisk inode translation for the Sun proms.
* If not defined, we assume the port does not support disklabels and
* hand-edited disklabel will NOT be written by MI code.
*/
#define DISKLABEL_CMD "disklabel -w -r"
@@ -1,37 +0,0 @@
/* $NetBSD: menus.md.en,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Based on code written by Philip A. Nelson for Piermont Information
* Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* cats machine dependent menus, english */
@@ -1,37 +0,0 @@
/* $NetBSD: menus.md.es,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Based on code written by Philip A. Nelson for Piermont Information
* Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* cats machine dependent menus, spanish */
@@ -1,37 +0,0 @@
/* $NetBSD: menus.md.fr,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Based on code written by Philip A. Nelson for Piermont Information
* Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* cats machine dependent menus, french */
@@ -1,38 +0,0 @@
/* $NetBSD: menus.md.pl,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/* Based on english version: */
/* NetBSD: menus.md.en,v 1.1 2002/02/11 13:50:18 skrll Exp */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Written by Philip A. Nelson for Piermont Information Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* cats machine dependent menus, Polish. */
@@ -1,58 +0,0 @@
/* $NetBSD: msg.md.de,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Based on code written by Philip A. Nelson for Piermont Information
* Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* cats machine dependent messages, German */
message md_hello
{
}
message md_may_remove_boot_medium
{
}
message dobootblks
{Installiere die Bootblöcke auf %s ...
}
message catsfspart
{Dies sind die NetBSD Partitionen auf %s (Größe und Offset in %s):
}
message set_kernel_1
{Kernel (GENERIC)}
message set_kernel_2
{Kernel (GENERIC.ABLE)}
@@ -1,58 +0,0 @@
/* $NetBSD: msg.md.en,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Based on code written by Philip A. Nelson for Piermont Information
* Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* cats machine dependent messages, english */
message md_hello
{
}
message md_may_remove_boot_medium
{
}
message dobootblks
{Installing boot blocks on %s....
}
message catsfspart
{We now have your NetBSD partitions on %s as follows (Size and Offset in %s):
}
message set_kernel_1
{Kernel (GENERIC)}
message set_kernel_2
{Kernel (GENERIC.ABLE)}
@@ -1,59 +0,0 @@
/* $NetBSD: msg.md.es,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Based on code written by Philip A. Nelson for Piermont Information
* Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* cats machine dependent messages, spanish */
message md_hello
{
}
message md_may_remove_boot_medium
{
}
message dobootblks
{Instalando bloques de arranque en %s...
}
message catsfspart
{Ahora tenemos nuestras particiones NetBSD en %s como sigue (Tamaño y
Compensación en %s):
}
message set_kernel_1
{Núcleo (GENERIC)}
message set_kernel_2
{Núcleo (GENERIC.ABLE)}
@@ -1,59 +0,0 @@
/* $NetBSD: msg.md.fr,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Based on code written by Philip A. Nelson for Piermont Information
* Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* cats machine dependent messages, french */
message md_hello
{
}
message md_may_remove_boot_medium
{
}
message dobootblks
{Installation des blocs de démarrage sur %s ...
}
message catsfspart
{Nous avons maintenant vos partitions NetBSD sur %s comme suit
(taille et Offset en %s) :
}
message set_kernel_1
{Kernel (GENERIC)}
message set_kernel_2
{Kernel (GENERIC.ABLE)}
@@ -1,59 +0,0 @@
/* $NetBSD: msg.md.pl,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/* Based on english version: */
/* NetBSD: msg.md.en,v 1.1 2002/02/11 13:50:18 skrll Exp */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Written by Philip A. Nelson for Piermont Information Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* cats machine dependent messages, Polish */
message md_hello
{
}
message md_may_remove_boot_medium
{
}
message dobootblks
{Instalowanie bootblokow na %s....
}
message catsfspart
{Twoje partycje NetBSD na %s wygladaja nastepujaco (Rozmiar i offset w %s):
}
message set_kernel_1
{Kernel (GENERIC)}
message set_kernel_2
{Kernel (GENERIC.ABLE)}
@@ -1,12 +0,0 @@
# $NetBSD: Makefile,v 1.2 2019/06/12 06:20:19 martin Exp $
#
# Makefile for cobalt
#
MENUS_MD= menus.md.${SYSINSTLANG}
MSG_MD= msg.md.${SYSINSTLANG} msg.mbr.${SYSINSTLANG}
NO_MBR=no
LANGUAGES= # no translations ready yet
.include "../../Makefile.inc"
-324
View File
@@ -1,324 +0,0 @@
/* $NetBSD: md.c,v 1.17 2026/03/17 20:55:41 andvar Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Based on code written by Philip A. Nelson for Piermont Information
* Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
/* md.c -- cobalt machine specific routines */
#include <sys/param.h>
#include <sys/sysctl.h>
#include <stdio.h>
#include <util.h>
#include <machine/cpu.h>
#include "defs.h"
#include "md.h"
#include "msg_defs.h"
#include "menu_defs.h"
/*
* Firmware recognizes only Linux Ext2 REV 0, so we have to have
* a Linux Ext2 fs to store our native bootloader.
*/
static int nobootfs = 0;
void
md_init(void)
{
}
void
md_init_set_status(int flags)
{
(void)flags;
}
bool
md_get_info(struct install_partition_desc *install)
{
int res;
if (pm->no_mbr || pm->no_part)
return true;
again:
if (pm->parts == NULL) {
const struct disk_partitioning_scheme *ps =
select_part_scheme(pm, NULL, true, NULL);
if (!ps)
return false;
struct disk_partitions *parts =
(*ps->create_new_for_disk)(pm->diskdev,
0, pm->dlsize, true, NULL);
if (!parts)
return false;
pm->parts = parts;
if (ps->size_limit > 0 && pm->dlsize > ps->size_limit)
pm->dlsize = ps->size_limit;
}
res = set_bios_geom_with_mbr_guess(pm->parts);
if (res == 0)
return false;
else if (res == 1)
return true;
pm->parts->pscheme->destroy_part_scheme(pm->parts);
pm->parts = NULL;
goto again;
}
/*
* md back-end code for menu-driven BSD disklabel editor.
*/
int
md_make_bsd_partitions(struct install_partition_desc *install)
{
return make_bsd_partitions(install);
}
/*
* any additional partition validation
*/
bool
md_check_partitions(struct install_partition_desc *install)
{
size_t part;
/* we need to find a boot partition, otherwise we can't write our
* bootloader. We make the assumption that the user hasn't done
* something stupid, like move it away from the MBR partition.
*/
for (part = 0; part < install->num; part++) {
if (install->infos[part].fs_type == PART_BOOT_TYPE)
return true;
}
msg_display(MSG_nobootpartdisklabel);
process_menu(MENU_ok, NULL);
return false;
}
/*
* hook called before writing new disklabel.
*/
bool
md_pre_disklabel(struct install_partition_desc *install,
struct disk_partitions *parts)
{
if (parts->parent == NULL)
return true; /* no outer partitions */
parts = parts->parent;
msg_display_subst(MSG_dofdisk, 3, parts->disk,
msg_string(parts->pscheme->name),
msg_string(parts->pscheme->short_name));
/* write edited "MBR" onto disk. */
if (!parts->pscheme->write_to_disk(parts)) {
msg_display(MSG_wmbrfail);
process_menu(MENU_ok, NULL);
return false;
}
return true;
}
/*
* hook called after writing disklabel to new target disk.
*/
bool
md_post_disklabel(struct install_partition_desc *install,
struct disk_partitions *parts)
{
return true;
}
/*
* hook called after upgrade() or install() has finished setting
* up the target disk but immediately before the user is given the
* ``disks are now set up'' message.
*/
int
md_post_newfs(struct install_partition_desc *install)
{
static const char *kernels[] = {
"vmlinux-nfsroot.gz",
"vmlinux.gz",
"vmlinux_RAQ.gz",
"vmlinux_raq-2800.gz"
};
static const char *bootfile = "boot.gz";
char bootdir[64];
unsigned int i;
if (!nobootfs) {
msg_fmt_display(msg_string(MSG_copybootloader), "%s",
pm->diskdev);
snprintf(bootdir, sizeof(bootdir), "%s/boot",
target_expand(PART_BOOT_MOUNT));
run_program(0, "/bin/mkdir -p %s", bootdir);
run_program(0, "/bin/cp /usr/mdec/boot %s", bootdir);
run_program(0, "/bin/rm -f %s/%s", bootdir, bootfile);
run_program(0, "/usr/bin/gzip -9 %s/boot", bootdir);
for (i = 0; i < __arraycount(kernels); i++)
run_program(0, "/bin/ln -fs %s %s/%s",
bootfile, bootdir, kernels[i]);
}
return 0;
}
int
md_post_extract(struct install_partition_desc *install, bool upgrade)
{
return 0;
}
void
md_cleanup_install(struct install_partition_desc *install)
{
#ifndef DEBUG
enable_rc_conf();
#endif
}
int
md_pre_update(struct install_partition_desc *install)
{
size_t i;
/*
* Verify the msdos partition exists and is big enough.
*/
for (i = 0; i < install->num; i++) {
if (install->infos[i].fs_type != PART_BOOT_TYPE)
continue;
if (install->infos[i].size/512 >= PART_BOOT_MIN)
break;
msg_display(MSG_boottoosmall);
msg_fmt_display_add(MSG_nobootpart, "%d", 0);
if (!ask_yesno(NULL))
return false;
nobootfs = 1;
break;
}
if (md_check_partitions(install) == 0)
nobootfs = 1;
return 1;
}
/* Upgrade support */
int
md_update(struct install_partition_desc *install)
{
md_post_newfs(install);
return 1;
}
int
md_check_mbr(struct disk_partitions *parts, mbr_info_t *mbri, bool quiet)
{
mbr_info_t *ext;
struct mbr_partition *part;
int i;
for (ext = mbri; ext; ext = ext->extended) {
part = ext->mbr.mbr_parts;
for (i = 0; i < MBR_PART_COUNT; part++, i++) {
if (part->mbrp_type == MBR_PTYPE_LNXEXT2) {
pm->bootstart = part->mbrp_start;
pm->bootsize = part->mbrp_size;
break;
}
}
}
if (pm->bootsize < (PART_BOOT_MIN / 512)) {
if (quiet)
return 0;
msg_display(MSG_boottoosmall);
return ask_reedit(parts);
}
if (pm->bootstart == 0 || pm->bootsize == 0) {
if (quiet)
return 0;
msg_display(MSG_nobootpart);
return ask_reedit(parts);
}
return 2;
}
bool
md_parts_use_wholedisk(struct disk_partitions *parts)
{
struct disk_part_info boot_part = {
.size = PART_BOOT / 512,
.fs_type = PART_BOOT_TYPE,
.fs_sub_type = MBR_PTYPE_LNXEXT2,
.last_mounted = PART_BOOT_MOUNT,
};
boot_part.nat_type = parts->pscheme->get_fs_part_type(
PT_EXT2, boot_part.fs_type, boot_part.fs_sub_type);
return parts_use_wholedisk(parts, 1, &boot_part);
}
int
md_pre_mount(struct install_partition_desc *install, size_t ndx)
{
return 0;
}
bool
md_mbr_update_check(struct disk_partitions *parts, mbr_info_t *mbri)
{
return false; /* no change, no need to write back */
}
#ifdef HAVE_GPT
bool
md_gpt_post_write(struct disk_partitions *parts, part_id root_id,
bool root_is_new, part_id efi_id, bool efi_is_new)
{
/* no GPT boot support, nothing needs to be done here */
return true;
}
#endif
-86
View File
@@ -1,86 +0,0 @@
/* $NetBSD: md.h,v 1.7 2022/06/16 14:03:38 tsutsui Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Written by Philip A. Nelson for Piermont Information Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* md.h -- Machine specific definitions for the cobalt */
#include <machine/cpu.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
/* cobalt uses the mbr code. */
#include "mbr.h"
/* boot partition size and type */
#define PART_BOOT (5 * 1024 * 1024) /* 5MB boot partition */
#define PART_BOOT_MIN (1 * 1024 * 1024) /* 1MB minimum */
#define PART_BOOT_TYPE FS_EX2FS
#define PART_BOOT_SUBT 1 /* use "old" ext2 */
#define PART_BOOT_MOUNT "/ext2"
/* default partition size */
#define DEFROOTSIZE 64 /* Default root size */
#define DEFSWAPSIZE 128 /* Default swap size */
#define DEFVARSIZE 64 /* Default /var size, if created */
#define DEFUSRSIZE 850 /* Default /usr size, if created */
/* Megs required for a full X installation. */
#define XNEEDMB 250
#define DEBNEEDMB 900 /* Extra megs for debug sets */
/* have support for booting from UFS2 */
#define HAVE_UFS2_BOOT
/*
* Default filesets to fetch and install during installation
* or upgrade. The standard sets are:
* base etc comp games man misc rescue tests text xbase xcomp xetc xfont xserver
*/
#define SET_KERNEL_1_NAME "kern-GENERIC"
#define MD_SETS_SELECTED SET_KERNEL_1, SET_SYSTEM, SET_X11_NOSERVERS
/*
* Machine-specific command to write a new label to a disk.
* For example, cobalt uses "/sbin/disklabel -w -r", just like i386
* miniroot scripts, though this may leave a bogus incore label.
* Sun ports should probably use DISKLABEL_CMD "/sbin/disklabel -w"
* to get incore to ondisk inode translation for the Sun proms.
* If not defined, we assume the port does not support disklabels and
* hand-edited disklabel will NOT be written by MI code.
*/
#define DISKLABEL_CMD "disklabel -w -r"
@@ -1,36 +0,0 @@
/* $NetBSD: menus.md.en,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Written by Philip A. Nelson for Piermont Information Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* Menu definitions for sysinst. cobalt version, machine dependent. */
@@ -1,80 +0,0 @@
/* $NetBSD: msg.md.en,v 1.1 2014/07/26 19:30:44 dholland Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
* All rights reserved.
*
* Written by Philip A. Nelson for Piermont Information Systems Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* MD Message catalog -- English, cobalt version */
message md_hello
{
}
message md_may_remove_boot_medium
{
}
message dobad144
{Installing the bad block table ...
}
message dobootblks
{Installing boot blocks on %s....
}
message pickdisk
{Choose disk: }
message partabovechs
{The NetBSD part of the disk lies outside of the range that the BIOS on
your machine can address. Booting from it may not be possible. Are you
sure you that you want to do this?
(Answering 'no' will take you back to the partition edit menu.)}
message nobootpart
{There is no Linux ext2 partition in the MBR partition table.}
message boottoosmall
{The Linux ext2 partition to install the native bootloader is too small.
It needs to be at least 1MB in size, however a size of at least 5MB is
recommended.}
message nobootpartdisklabel
{There is no boot partition in the disklabel. The boot partition should
match the boot partition you set up in the MBR partition table.}
message copybootloader
{Installing bootloader into the Linux ext2 partition on %s...
}
message set_kernel_1
{Kernel (GENERIC)}
@@ -1,8 +0,0 @@
# $NetBSD: Makefile,v 1.1 2014/07/26 19:56:30 dholland Exp $
#
# Makefile for dummy architecture
#
MENUS_MD=
.include "../../Makefile.inc"
Loaded 100 of 556 files, more files were not shown because too many files have changed in this diff. Show more