The entry linux
The process linux: a shell of Linux in a terminal window .
It reads a Linux kernel and an initial archive from its private store, boots the kernel in a guest with the machine of modus:contract/guest_os, and joins the serial port of the guest to its terminal: the lines of the guest are the lines of the terminal, and the keys of the terminal are the bytes that the guest reads. An idle guest waits for a key, or for the next tick of its timer in the time of the machine.
Start: from the start menu, or start("linux") in the console. The root service starts its terminal with it.
Grants: Terminal, the console of the guest; Store, the private store linux with the objects kernel and initial_archive.
What a reader sees: a terminal window with the messages of Linux, then a shell. On the log: "linux: boots the kernel of ...", one line "linux: guest: <line>" for each line of the guest, and at the end "linux: the guest halted after N exits: the process ends" when the guest runs poweroff.
linux module with an entry
- Hash
0df078aced9b4fa9ec266c6217c53827b4440bd7cfef74cee32d0f27ccc62d1d- Size
147456 bytes- Exports
0- Imports
0- Imported by
0- License
- MIT
The process linux: a shell of Linux in a terminal window
| Fact | Value |
|---|---|
| Kind | Modules with an entry |
| Source | src/modules/system/linux |
| Boot image | yes: in the boot image, 147456 bytes in this build |
| Build settings | none: the defaults of the source |
| Imports | none |
| Imported by | none |
Neighbours
It imports no module, and no module imports it. The module graph shows it with the other modules that have no edge.
Exports
| Export | What it does |
|---|---|
entry() |
entry
entry()
- Form
- The entry of the module: one parameter, an address, fixed by the contract.
src/modules/system/linux/main.odin:221
Read from the source of the module, as the build reads it to describe the exports (tools/modustool/build/describe.odin).
What the root service gives it
| What | Value | As the root service says |
|---|---|---|
| Grants | A shell of Linux in a guest:
| |
| Other terms of its start grant set | store_blocks = 8192 | |
| Budget that it asks for |
| The memory of the guest, the nested page table of the guest and the buffers of this process; this process and its guest process, and one thread. |
The start grant set is read from start_grant_sets in src/modules/system/root/start_grant_sets.odin. The stated budget is read from the constant MODULE_BUDGET of the source of the module (its line); the build adds the counted parts and writes the sum in the module (tools/modustool/build/budget_count.odin); the root service accepts it up to the largest budget of a process, and adds the limits of processor time and of log records (src/modules/system/root/budgets.odin).
