Bootstrap::SysrootWorkspace
Rootfs workspace helpers anchored on the .bq2-rootfs marker.
Environment names (namespace):
- host: used for initial invocation and building the workspace
- seed: outer rootfs used for building the tools into /opt/sysroot to build the bq2 rootfs
- bq2: the final inner rootfs as /
Stable path references:
- host_workdir: directory on host used to store all of the working files (host: <host_workdir>)
- seed_rootfs_path: directory containing the outer rootfs (host: <host_workdir>/seed-rootfs, outer rootfs: /).
- sysroot_path: directory to target the initial tool build (host: <host_workdir>/seed-rootfs/opt/sysroot, outer rootfs: /opt/sysroot)
- bq2_rootfs_path: directory that contains .bq2-rootfs and the inner rootfs (host: <host_workdir>/seed-rootfs/bq2-rootfs, outer rootfs: /bq2-rootfs, inner rootfs: /).
- workspace_path: directory that contains the workspace root (host: <host_workdir>/seed-rootfs/bq2-rootfs/workspace, outer rootfs: /bq2-rootfs/workspace, inner rootfs: /workspace).
- log_path: /var/lib under in the inner rootfs (host <host_workdir>/seed-rootfs/bq2-rootfs/var/lib, outer rootfs: /bq2-rootfs/var/lib, inner rootfs: /var/lib).
To simplify coordination of path changes from namespace changes, this class should be used instead of SysrootNamespace directly.
Constants
BQ2_DIR_NAME = "bq2-rootfs"
DEFAULT_HOST_WORKDIR = "data/sysroot"
LOG_DIR_NAME = "var/lib"
PROBE_PATHS_FOR_MARKER = [{namespace: Namespace::Host, path: Path["#{DEFAULT_HOST_WORKDIR}/#{SEED_DIR_NAME}/#{BQ2_DIR_NAME}/#{ROOTFS_MARKER_NAME}"]}, {namespace: Namespace::Seed, path: Path["/#{BQ2_DIR_NAME}/#{ROOTFS_MARKER_NAME}"]}, {namespace: Namespace::BQ2, path: Path["/#{ROOTFS_MARKER_NAME}"]}]
ROOTFS_MARKER_NAME = ".bq2-rootfs"
SEED_DIR_NAME = "seed-rootfs"
SYSROOT_DIR_NAME = "opt/sysroot"
WORKSPACE_DIR_NAME = "workspace"
Constructors
Class methods
Instance methods
bq2_rootfs_path
Sourceenter_bq2_rootfs_namespace
Enter the bq2 rootfs namespace, ensuring the sysroot toolchain is bound in.
Enter the requested namespace by label, if needed.
enter_seed_rootfs_namespace
Enter the seed rootfs namespace and apply any configured bind mounts.
extra_binds
Sourcehost_workdir
Sourcelog_path
Sourcemarker_path
Sourcenamespace
Sourcenamespace=(namespace : Namespace)
Sourceseed_rootfs_path
Sourcesysroot_path
Sourceworkspace_path
Source