2026-03-01 18:45:19 +00:00
# Corporate Network Deployment Guide (Air-Gap)
2026-03-01 18:39:21 +00:00
2026-03-01 18:45:19 +00:00
**Document ID:** DEPLOY-CORP-001-REV2
2026-03-01 18:39:21 +00:00
**Date:** 2026-03-01
2026-03-01 18:45:19 +00:00
**Build Name:** UT (Universität/Projekt)
2026-03-01 19:48:45 +00:00
**Target:** TQMa6UL on MBa6ULx
2026-03-01 18:45:19 +00:00
**Environment:** Air-gapped corporate network
2026-03-01 18:39:21 +00:00
---
## Overview
2026-03-01 18:45:19 +00:00
This guide describes deployment of the UT Yocto mirror in an air-gapped corporate network. The corporate system has no internet access and requires complete offline build capability.
2026-03-01 18:39:21 +00:00
2026-03-01 18:45:19 +00:00
**Prerequisites:**
- Software approval documentation received
- UT-mirror-package.tar.gz transferred securely
- Checksum verified
- Ubuntu 22.04 system ready (can use local Ubuntu mirror for apt)
2026-03-01 18:39:21 +00:00
---
## Pre-Deployment Checklist
2026-03-01 18:45:19 +00:00
- [ ] Software approval granted
- [ ] Mirror archive transferred to corporate network
- [ ] SHA256 checksum verified: `sha256sum -c *.sha256`
- [ ] Sufficient disk space (200GB+)
- [ ] Ubuntu 22.04 installed (can use local apt mirror)
2026-03-01 18:39:21 +00:00
- [ ] User has sudo privileges
2026-03-01 18:45:19 +00:00
- [ ] Target directory `/opt/UT-yocto` approved by IT
2026-03-01 18:39:21 +00:00
---
## Step 1: Extract Mirror Archive
```bash
# Create base directory
2026-03-01 18:45:19 +00:00
export UT_BASE=/opt/UT-yocto
sudo mkdir -p ${UT_BASE}
sudo chown $(whoami):$(whoami) ${UT_BASE}
2026-03-01 18:39:21 +00:00
# Extract mirror archive
2026-03-01 18:45:19 +00:00
cd ${UT_BASE}
tar xzf /path/to/transfer/UT-tqma6ul-yocto-scarthgap-*.tar.gz
2026-03-01 18:39:21 +00:00
# Verify structure
2026-03-01 18:45:19 +00:00
ls -la UT-mirror-package/
# Should show: sources/, premirror/, downloads/, licenses/, configs/
2026-03-01 18:39:21 +00:00
```
---
## Step 2: Install Build Dependencies
2026-03-01 18:45:19 +00:00
From corporate Ubuntu mirror (or pre-approved packages):
2026-03-01 18:39:21 +00:00
```bash
sudo apt update
sudo apt install -y \
2026-03-01 18:45:19 +00:00
git python3 jq bash grep gawk wget diffstat \
chrpath cpio texinfo gcc g++ make file tar \
bzip2 gzip xz-utils zstd lz4 patch perl \
python3-pexpect socat unzip rsync bc \
libsdl1.2-dev xterm
2026-03-01 18:39:21 +00:00
2026-03-01 18:45:19 +00:00
# Locale setup
2026-03-01 18:39:21 +00:00
sudo locale-gen en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
```
---
2026-03-01 18:45:19 +00:00
## Step 3: Setup Mirror Directories
2026-03-01 18:39:21 +00:00
```bash
2026-03-01 18:45:19 +00:00
# Create system mirror directories
sudo mkdir -p /srv/yocto/{premirror,downloads,sstate-cache}
sudo chown -R $(whoami):$(whoami) /srv/yocto
# Copy mirror contents
cd ${UT_BASE}/UT-mirror-package
2026-03-01 18:39:21 +00:00
2026-03-01 18:45:19 +00:00
# Copy premirror (git repos and tarballs)
cp -r premirror/* /srv/yocto/premirror/
2026-03-01 18:39:21 +00:00
2026-03-01 18:45:19 +00:00
# Copy downloads
cp -r downloads/* /srv/yocto/downloads/
2026-03-01 18:39:21 +00:00
2026-03-01 18:45:19 +00:00
# SState cache (optional, speeds up rebuilds)
cp -r sstate-cache/* /srv/yocto/sstate-cache/ 2>/dev/null || true
2026-03-01 18:39:21 +00:00
```
2026-03-01 18:45:19 +00:00
---
2026-03-01 18:39:21 +00:00
2026-03-01 18:45:19 +00:00
## Step 4: Configure Site Configuration
2026-03-01 18:39:21 +00:00
2026-03-01 18:45:19 +00:00
Create `~/.yocto/site.conf` for air-gap:
2026-03-01 18:39:21 +00:00
2026-03-01 18:45:19 +00:00
```bash
mkdir -p ~/.yocto
2026-03-01 18:39:21 +00:00
2026-03-01 18:45:19 +00:00
cat > ~/.yocto/site.conf <<'EOF'
# UT Project - Air-Gap Configuration
# Build: UT
# Target: TQMa6UL
# Date: 2026-03-01
2026-03-01 18:39:21 +00:00
2026-03-01 18:45:19 +00:00
# Mirror directories (local filesystem)
DL_DIR = "/srv/yocto/downloads"
SSTATE_DIR = "/srv/yocto/sstate-cache"
2026-03-01 18:39:21 +00:00
2026-03-01 18:45:19 +00:00
# Air-gap settings
2026-03-01 18:39:21 +00:00
BB_NO_NETWORK = "1"
2026-03-01 18:45:19 +00:00
BB_FETCH_PREMIRRORONLY = "1"
# Premirror configuration (local files only)
SOURCE_MIRROR_URL = "file:///srv/yocto/premirror/"
INHERIT += "own-mirrors"
2026-03-01 18:39:21 +00:00
PREMIRRORS:prepend = " \
2026-03-01 18:45:19 +00:00
git://.*/.* file:///srv/yocto/premirror/ \n \
ftp://.*/.* file:///srv/yocto/premirror/ \n \
http://.*/.* file:///srv/yocto/premirror/ \n \
https://.*/.* file:///srv/yocto/premirror/ \n \
2026-03-01 18:39:21 +00:00
"
2026-03-01 18:45:19 +00:00
# Parallelism (adjust to hardware)
2026-03-01 18:39:21 +00:00
BB_NUMBER_THREADS ?= "8"
PARALLEL_MAKE ?= "-j8"
2026-03-01 18:45:19 +00:00
# License compliance
2026-03-01 18:39:21 +00:00
COPY_LIC_MANIFEST = "1"
COPY_LIC_DIRS = "1"
2026-03-01 18:45:19 +00:00
INHERIT += "archiver"
ARCHIVER_MODE[src] = "original"
EOF
2026-03-01 18:39:21 +00:00
```
2026-03-01 18:45:19 +00:00
---
## Step 5: Initialize Build Environment
```bash
cd ${UT_BASE}/UT-mirror-package/sources/ci-meta-tq
# Verify submodules are present
ls -la sources/
# Set machine for TQMa6UL
2026-03-01 21:40:57 +00:00
export ACCEPT_FSL_EULA=1
2026-03-01 19:48:45 +00:00
export MACHINE=tqma6ul-multi-mba6ulx
2026-03-01 18:45:19 +00:00
# Initialize build (creates build_ut)
2026-03-01 19:48:45 +00:00
. ./setup-environment build_ut mainline
2026-03-01 18:45:19 +00:00
# Verify configuration
bitbake -e | grep "^MACHINE="
2026-03-01 19:48:45 +00:00
# Should show: MACHINE="tqma6ul-multi-mba6ulx"
2026-03-01 18:39:21 +00:00
```
---
2026-03-01 18:45:19 +00:00
## Step 6: Verify Air-Gap Build
2026-03-01 18:39:21 +00:00
2026-03-01 18:45:19 +00:00
### 6.1 Test Offline Build
2026-03-01 18:39:21 +00:00
```bash
2026-03-01 18:45:19 +00:00
# Ensure we're in build environment
cd ${UT_BASE}/UT-mirror-package/sources/ci-meta-tq
2026-03-01 21:40:57 +00:00
export ACCEPT_FSL_EULA=1
2026-03-01 19:48:45 +00:00
export MACHINE=tqma6ul-multi-mba6ulx
. ./setup-environment build_ut mainline
2026-03-01 18:39:21 +00:00
2026-03-01 18:45:19 +00:00
# Verify no network access is attempted
export BB_NO_NETWORK=1
2026-03-01 18:39:21 +00:00
2026-03-01 18:45:19 +00:00
# Start build (should complete without network)
bitbake tq-image-small-debug
2026-03-01 18:39:21 +00:00
```
2026-03-01 18:45:19 +00:00
**Expected:** Build completes using only local premirror sources.
2026-03-01 18:39:21 +00:00
2026-03-01 18:45:19 +00:00
### 6.2 Verify 2038 Compliance
2026-03-01 18:39:21 +00:00
```bash
2026-03-01 18:45:19 +00:00
# Check time_t size
echo '#include <time.h>' | \
${WORKDIR}/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi-gcc -x c - -dM -E | \
grep TIME_BITS
2026-03-01 18:39:21 +00:00
# Expected: #define __TIME_BITS 64
# Check kernel config
bitbake -e virtual/kernel | grep CONFIG_COMPAT_32BIT_TIME
# Expected: CONFIG_COMPAT_32BIT_TIME=y
```
---
2026-03-01 18:45:19 +00:00
## Step 7: Development Workflow
2026-03-01 18:39:21 +00:00
2026-03-01 18:45:19 +00:00
### Daily Build Commands
2026-03-01 18:39:21 +00:00
```bash
# Enter build environment
2026-03-01 18:45:19 +00:00
cd ${UT_BASE}/UT-mirror-package/sources/ci-meta-tq
2026-03-01 21:40:57 +00:00
export ACCEPT_FSL_EULA=1
2026-03-01 19:48:45 +00:00
export MACHINE=tqma6ul-multi-mba6ulx
. ./setup-environment build_ut mainline
2026-03-01 18:39:21 +00:00
2026-03-01 18:45:19 +00:00
# Build target image
bitbake tq-image-small-debug
2026-03-01 18:39:21 +00:00
2026-03-01 18:45:19 +00:00
# Deploy to target (SD card)
2026-03-01 18:39:21 +00:00
# See TQ documentation for deployment methods
```
2026-03-01 18:45:19 +00:00
### SDK Generation (for Application Development)
2026-03-01 18:39:21 +00:00
```bash
2026-03-01 18:45:19 +00:00
# Generate SDK for application developers
bitbake tq-image-small-debug -c populate_sdk
2026-03-01 18:39:21 +00:00
# Install SDK
2026-03-01 18:45:19 +00:00
${UT_BASE}/UT-mirror-package/sources/ci-meta-tq/build_ut/tmp/deploy/sdk/*.sh
2026-03-01 18:39:21 +00:00
2026-03-01 18:45:19 +00:00
# Source SDK in new terminal
2026-03-01 18:39:21 +00:00
source /opt/poky/.../environment-setup-arm-poky-linux-gnueabi
```
---
2026-03-01 18:45:19 +00:00
## Build Verification Checklist
2026-03-01 18:39:21 +00:00
2026-03-01 18:45:19 +00:00
- [ ] Air-gap build completes without network errors
- [ ] Image boots on TQMa6UL hardware
- [ ] 2038 compliance verified (64-bit time_t)
- [ ] License manifest generated
- [ ] All proprietary components reviewed
- [ ] SDK functional for application development
2026-03-01 18:39:21 +00:00
---
## Troubleshooting
2026-03-01 18:45:19 +00:00
### Issue: "Failed to fetch" errors
2026-03-01 18:39:21 +00:00
2026-03-01 18:45:19 +00:00
**Cause:** BitBake trying to access network
2026-03-01 18:39:21 +00:00
**Solution:**
```bash
2026-03-01 18:45:19 +00:00
# Verify settings
grep BB_NO_NETWORK ~/.yocto/site.conf
grep SOURCE_MIRROR_URL ~/.yocto/site.conf
2026-03-01 18:39:21 +00:00
2026-03-01 18:45:19 +00:00
# Should show:
# BB_NO_NETWORK = "1"
# SOURCE_MIRROR_URL = "file:///srv/yocto/premirror/"
2026-03-01 18:39:21 +00:00
```
2026-03-01 18:45:19 +00:00
### Issue: Missing files in premirror
2026-03-01 18:39:21 +00:00
2026-03-01 18:45:19 +00:00
**Cause:** Incomplete transfer
2026-03-01 18:39:21 +00:00
**Solution:**
```bash
2026-03-01 18:45:19 +00:00
# Re-verify checksum on source system
2026-03-01 18:39:21 +00:00
# Re-transfer missing files
```
### Issue: Permission denied
**Solution:**
```bash
2026-03-01 18:45:19 +00:00
sudo chown -R $(whoami):$(whoami) /opt/UT-yocto /srv/yocto
2026-03-01 18:39:21 +00:00
```
---
2026-03-01 18:45:19 +00:00
## Security & Compliance
2026-03-01 18:39:21 +00:00
2026-03-01 18:45:19 +00:00
1. **No Network Access: ** Build verified to complete offline
2. **Source Audit: ** All sources archived and traceable
3. **License Compliance: ** License manifest generated per build
2026-03-01 18:39:21 +00:00
4. **User Permissions: ** Build as regular user, not root
---
2026-03-01 18:45:19 +00:00
## Support & Documentation
2026-03-01 18:39:21 +00:00
2026-03-01 18:45:19 +00:00
- **TQ BSP Documentation:** Included in `sources/meta-tq/`
- **Yocto Manuals:** Included in `sources/poky/documentation/`
- **License Info:** `build_ut/tmp/deploy/licenses/`
2026-03-01 18:39:21 +00:00
---
2026-03-01 18:45:19 +00:00
**Document Version:** 2.0
2026-03-01 18:39:21 +00:00
**Author:** Siggi ⚙️
2026-03-01 18:45:19 +00:00
**Build:** UT
**Last Updated:** 2026-03-01