Differences From
Artifact [64fc8029a6]:
8 8
9 9 ## scripts
10 10 arch contains a number of shell scripts. unlike the shell scripts in /global, the shell scripts in /arch are not part of the build process; they are simply developer tools, usually for generating syscall tables for new architectures. the output of the scripts is written directly to the appropriate target directory; these files should be added to the source tree and committed.
11 11
12 12 - `mktbl.posix.sh <target> <ABI>`: generates the C headers for a particular target based on the system_calls.h and error_table.h files in its directory. the ABI parameter controls which syscalls are included; the ABI is the second column in the kernel system calls table.
13 13 - `mktbl.linux.errno.sh <target> <ABI>`: generates the errno table for a given architecture and ABI. requires the kernel source tree to be installed on the host system.
14 14 - `mktbl.linux.syscall.sh <target> <ABI>`: generates the syscall table for a given architecture and ABI. requires the kernel source tree to be installed on the host system. note that some architectures like x86 have separate, architecture-specific tables. this script is not meant to be used with these architectures.
15 +
16 +## sources
17 +the arch directory also contains C sources for programs that need to be compiled *and* executed during the build process.
18 +
19 +- `typesize.c`: calculates type metadata for the system it is compiled on, producing macros needed for the creation of `<k/type.h>` (mod/kcore/type.h.m).