4.2. Final Checks
Before building packages, verify that the environment is loaded, the target partition is mounted where expected, and the directory and compatibility-link layout actually matches policy.
Section 3.2 defined the build variables, section 3.3 defined the target directory and link layout, and section 4.1 staged source archives. This section is the last consistency check before package build steps begin.
What Should Be True Right Now
At this point, all of the following should already be true:
- The build shell has sourced the appropriate environment file (
sh,zsh, orfishvariant). - The target root partition is mounted at
LBI_ROOT. - The intended top-level directories under the mounted target tree exist.
- Compatibility links (
/bin,/sbin,/lib,/home,/root, and/usr/*links) were created according to section 3.3.
If any item in that list is uncertain, treat it as a blocker and resolve it before continuing.
Variable Verification Checklist
Confirm that the build shell currently exposes the expected values for at least these variables:
LBI_ROOTLBI_SOURCESLBI_TOOLSLBI_BOOTLBI_ESP_MOUNTLBI_ARCHLBI_TARGET
Also confirm that optional tuning variables are either deliberately set or intentionally empty (LWI_MAKE_FLAGS, LWI_CFLAGS, LWI_CXXFLAGS, LBI_CUSTOM_LDFLAGS).
The practical rule is simple: if a variable value surprises you now, it will surprise you more during a failed configure or install phase.
Mount Verification Checklist
Confirm that the filesystem mounted at LBI_ROOT is the target partition and not the host root. If this is wrong, any “successful” directory or install action is writing into the wrong tree.
Also confirm that any chosen boot/ESP mount paths are present and match your intended boot layout policy from chapter 3.
Directory and Link Verification Checklist
Confirm that the primary directories from section 3.1/3.3 exist inside the mounted target tree, including at least:
/system/configuration/system/binaries/system/systembinaries/system/libraries/system/headers/system/share/system/documentation/system/tools
Then confirm that compatibility links exist and resolve to the intended targets, including:
/bin -> /system/binaries/sbin -> /system/systembinaries/lib -> /system/libraries/home -> /system/users/root -> /system/charlie/usr/bin -> ../system/binaries/usr/sbin -> ../system/systembinaries/usr/lib -> ../system/libraries/usr/include -> ../system/headers/usr/share -> ../system/share/system/lib -> libraries
If these links are missing or point somewhere unexpected, correct them before package installation begins.
Readiness Outcome
When variables, mount state, directories, and compatibility links are all verified, chapter 5 can proceed on a stable base.
If one of these checks fails, pause and fix the layout first. Continuing anyway only converts a clear setup issue into a noisier and less enjoyable build failure later.