It is recommended to keep the source code tree and build process within the Linux host's own filesystem, copying only the final product to the shared directory. This preserves the symbolic links and permission semantics required for the build, and prevents accidental clearing of the delivery directory on the host during cleanup of the build tree.
First verify the round-trip read and write of the shared directory.
Create an empty directory on the host machine and add it to the virtual machine's "Shared Folder" settings, naming it for example BuildOut. To enable write-back from the guest, uncheck the "Read-only" option. The Linux guest requires the Guest Additions package compatible with the current VirtualBox version and vboxsf support. After enabling automatic mounting, run findmnt -t vboxsf and read the actual mount point from the output; do not assume the directory is named /media/sf_BuildOut.
If the directory is not mounted at all, check Guest Additions and shared folder name; if it is mounted but lacks permissions, verify mount options and the current user's vboxsf group membership. After adjusting group membership, you must log in again. First, write a small, unrelated text file from the guest, then verify on the host.
Acceptance and Delivery Documentation
Select the actual firmware file and its corresponding checksum file under the bin/targets directory of the target, and copy them to the shared directory that has just been verified. Both the target and host compute the SHA-256 hash of the same file; the two hashes must be identical. After copying, retain the original file on the target until the host reads back a successful checksum verification. If the shared directory becomes abnormal, offload the shared directory and preserve the build tree; after repair, only re-copy the files are needed, no recompilation is required.
Reference
Related guide · Verify an OpenWrt image with the release signature and SHA-256 checksum
Comments