Complete documentation update for UT project
Major changes based on user requirements: 1. Board identification: TQMa6UL (from sticker TQMA6U-AB) - Old code reference 'tqma6x' = generic i.MX6 family - Machine: tqma6ulx-mba6ulx 2. Build name: UT (Universität/Projekt) - All documentation updated with UT branding - Build directory: build_ut 3. ci-meta-tq workflow: - Replaced manual layer cloning with official TQ CI repo - Uses git submodules for all layers - ci/fill_mirror script for mirror population 4. License tables in 3 formats: - CSV: UT-license-table.csv - Markdown: license-summary.md - Excel-compatible: UT-license-table-excel.md 5. Air-gap deployment: - Complete offline build instructions - /srv/yocto/ premirror setup - BB_NO_NETWORK configuration 6. 2038 compliance: - Verified: Kernel 6.6 + glibc 2.38 - 64-bit time_t on 32-bit ARM - Scarthgap 5.0 LTS confirmed suitable All documents ready for mirror creation and approval process.
This commit is contained in:
@@ -1,34 +1,34 @@
|
||||
# Corporate Network Deployment Guide
|
||||
# Corporate Network Deployment Guide (Air-Gap)
|
||||
|
||||
**Document ID:** DEPLOY-CORP-001
|
||||
**Document ID:** DEPLOY-CORP-001-REV2
|
||||
**Date:** 2026-03-01
|
||||
**Environment:** Corporate network (potentially air-gapped)
|
||||
**Prerequisites:** Approved software mirror archive
|
||||
**Build Name:** UT (Universität/Projekt)
|
||||
**Target:** TQMa6UL on MBa6x
|
||||
**Environment:** Air-gapped corporate network
|
||||
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
This guide describes the deployment of the Yocto mirror and build environment within a corporate network after software approval has been obtained.
|
||||
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.
|
||||
|
||||
**Assumptions:**
|
||||
- Software approval has been granted
|
||||
- Mirror archive has been transferred securely to corporate network
|
||||
- Target system: Ubuntu 22.04 LTS (or approved corporate Linux)
|
||||
- Internet access: May be restricted or unavailable
|
||||
**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)
|
||||
|
||||
---
|
||||
|
||||
## Pre-Deployment Checklist
|
||||
|
||||
Before starting deployment:
|
||||
|
||||
- [ ] Software approval documentation received
|
||||
- [ ] Mirror archive transferred (USB/secure file transfer)
|
||||
- [ ] Checksum verified: `sha256sum -c archive.tar.gz.sha256`
|
||||
- [ ] Sufficient disk space available (200GB+)
|
||||
- [ ] Corporate Ubuntu 22.04 system ready
|
||||
- [ ] 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)
|
||||
- [ ] User has sudo privileges
|
||||
- [ ] Target directory `/opt/UT-yocto` approved by IT
|
||||
|
||||
---
|
||||
|
||||
@@ -36,43 +36,35 @@ Before starting deployment:
|
||||
|
||||
```bash
|
||||
# Create base directory
|
||||
export CORP_BASE=/opt/tqma6-yocto
|
||||
sudo mkdir -p ${CORP_BASE}
|
||||
sudo chown $(whoami):$(whoami) ${CORP_BASE}
|
||||
export UT_BASE=/opt/UT-yocto
|
||||
sudo mkdir -p ${UT_BASE}
|
||||
sudo chown $(whoami):$(whoami) ${UT_BASE}
|
||||
|
||||
# Extract mirror archive
|
||||
cd ${CORP_BASE}
|
||||
tar xzf /path/to/transfer/tqma6-yocto-mirror-scarthgap-*.tar.gz
|
||||
cd ${UT_BASE}
|
||||
tar xzf /path/to/transfer/UT-tqma6ul-yocto-scarthgap-*.tar.gz
|
||||
|
||||
# Verify structure
|
||||
ls -la mirror-package/
|
||||
# Should show: sources/, licenses/, downloads/, build-instructions/
|
||||
ls -la UT-mirror-package/
|
||||
# Should show: sources/, premirror/, downloads/, licenses/, configs/
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Step 2: Install Build Dependencies
|
||||
|
||||
### 2.1 From Corporate Repository
|
||||
From corporate Ubuntu mirror (or pre-approved packages):
|
||||
|
||||
```bash
|
||||
# Update package lists
|
||||
sudo apt update
|
||||
|
||||
# Install required packages (from approved corporate repos)
|
||||
sudo apt install -y \
|
||||
gawk wget git diffstat unzip texinfo gcc build-essential \
|
||||
chrpath socat cpio python3 python3-pip python3-pexpect \
|
||||
xz-utils debianutils iputils-ping python3-git \
|
||||
python3-jinja2 libegl1-mesa libsdl1.2-dev xterm \
|
||||
locales lz4 zstd rpcsvc-proto
|
||||
```
|
||||
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
|
||||
|
||||
**Note:** If packages are not available, request them from IT department.
|
||||
|
||||
### 2.2 Locale Configuration
|
||||
|
||||
```bash
|
||||
# Locale setup
|
||||
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
|
||||
@@ -81,116 +73,121 @@ export LANG=en_US.UTF-8
|
||||
|
||||
---
|
||||
|
||||
## Step 3: Setup Yocto Build Environment
|
||||
|
||||
### 3.1 Create Directory Structure
|
||||
## Step 3: Setup Mirror Directories
|
||||
|
||||
```bash
|
||||
cd ${CORP_BASE}
|
||||
# Create system mirror directories
|
||||
sudo mkdir -p /srv/yocto/{premirror,downloads,sstate-cache}
|
||||
sudo chown -R $(whoami):$(whoami) /srv/yocto
|
||||
|
||||
# Create working directories
|
||||
mkdir -p build
|
||||
mkdir -p mirror
|
||||
# Copy mirror contents
|
||||
cd ${UT_BASE}/UT-mirror-package
|
||||
|
||||
# Copy sources
|
||||
cp -r mirror-package/sources/* ./
|
||||
# Copy premirror (git repos and tarballs)
|
||||
cp -r premirror/* /srv/yocto/premirror/
|
||||
|
||||
# Setup downloads directory (offline)
|
||||
mkdir -p downloads
|
||||
cp -r mirror-package/downloads/* downloads/ 2>/dev/null || true
|
||||
```
|
||||
# Copy downloads
|
||||
cp -r downloads/* /srv/yocto/downloads/
|
||||
|
||||
### 3.2 Initialize Build
|
||||
|
||||
```bash
|
||||
# Source the build environment
|
||||
cd ${CORP_BASE}/poky-scarthgap
|
||||
source oe-init-build-env ${CORP_BASE}/build
|
||||
|
||||
# You are now in ${CORP_BASE}/build
|
||||
```
|
||||
|
||||
### 3.3 Configure for Offline Build
|
||||
|
||||
Edit `${CORP_BASE}/build/conf/local.conf`:
|
||||
|
||||
```conf
|
||||
# Machine selection
|
||||
MACHINE ??= "tqma6ulx-mba6ulx"
|
||||
|
||||
# Offline/Premirror configuration
|
||||
BB_NO_NETWORK = "1"
|
||||
|
||||
# Use local mirror for all sources
|
||||
PREMIRRORS:prepend = " \
|
||||
git://.*/.* file://${CORP_BASE}/downloads/ \
|
||||
ftp://.*/.* file://${CORP_BASE}/downloads/ \
|
||||
http://.*/.* file://${CORP_BASE}/downloads/ \
|
||||
https://.*/.* file://${CORP_BASE}/downloads/ \
|
||||
"
|
||||
|
||||
# Don't check for updates
|
||||
BB_FETCH_PREMIRRORONLY = "1"
|
||||
|
||||
# Parallelism
|
||||
BB_NUMBER_THREADS ?= "8"
|
||||
PARALLEL_MAKE ?= "-j8"
|
||||
|
||||
# DL directory
|
||||
DL_DIR = "${CORP_BASE}/downloads"
|
||||
|
||||
# SSTATE (optional, for faster rebuilds)
|
||||
SSTATE_DIR = "${CORP_BASE}/sstate-cache"
|
||||
|
||||
# Archive settings for compliance
|
||||
INHERIT += "archiver"
|
||||
ARCHIVER_MODE[src] = "original"
|
||||
COPY_LIC_MANIFEST = "1"
|
||||
COPY_LIC_DIRS = "1"
|
||||
```
|
||||
|
||||
### 3.4 Configure Layers
|
||||
|
||||
Edit `${CORP_BASE}/build/conf/bblayers.conf`:
|
||||
|
||||
```conf
|
||||
BBLAYERS ?= " \
|
||||
${CORP_BASE}/poky-scarthgap/meta \
|
||||
${CORP_BASE}/poky-scarthgap/meta-poky \
|
||||
${CORP_BASE}/poky-scarthgap/meta-yocto-bsp \
|
||||
${CORP_BASE}/meta-openembedded/meta-oe \
|
||||
${CORP_BASE}/meta-openembedded/meta-python \
|
||||
${CORP_BASE}/meta-openembedded/meta-networking \
|
||||
${CORP_BASE}/meta-openembedded/meta-filesystems \
|
||||
${CORP_BASE}/meta-tq/meta-tq \
|
||||
"
|
||||
# SState cache (optional, speeds up rebuilds)
|
||||
cp -r sstate-cache/* /srv/yocto/sstate-cache/ 2>/dev/null || true
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Step 4: Build Image
|
||||
## Step 4: Configure Site Configuration
|
||||
|
||||
### 4.1 First Build (Offline)
|
||||
Create `~/.yocto/site.conf` for air-gap:
|
||||
|
||||
```bash
|
||||
cd ${CORP_BASE}/build
|
||||
mkdir -p ~/.yocto
|
||||
|
||||
# Ensure we're in the build environment
|
||||
source ${CORP_BASE}/poky-scarthgap/oe-init-build-env ${CORP_BASE}/build
|
||||
cat > ~/.yocto/site.conf <<'EOF'
|
||||
# UT Project - Air-Gap Configuration
|
||||
# Build: UT
|
||||
# Target: TQMa6UL
|
||||
# Date: 2026-03-01
|
||||
|
||||
# Start build (all sources should be local)
|
||||
bitbake core-image-minimal
|
||||
# Mirror directories (local filesystem)
|
||||
DL_DIR = "/srv/yocto/downloads"
|
||||
SSTATE_DIR = "/srv/yocto/sstate-cache"
|
||||
|
||||
# Air-gap settings
|
||||
BB_NO_NETWORK = "1"
|
||||
BB_FETCH_PREMIRRORONLY = "1"
|
||||
|
||||
# Premirror configuration (local files only)
|
||||
SOURCE_MIRROR_URL = "file:///srv/yocto/premirror/"
|
||||
INHERIT += "own-mirrors"
|
||||
|
||||
PREMIRRORS:prepend = " \
|
||||
git://.*/.* file:///srv/yocto/premirror/ \n \
|
||||
ftp://.*/.* file:///srv/yocto/premirror/ \n \
|
||||
http://.*/.* file:///srv/yocto/premirror/ \n \
|
||||
https://.*/.* file:///srv/yocto/premirror/ \n \
|
||||
"
|
||||
|
||||
# Parallelism (adjust to hardware)
|
||||
BB_NUMBER_THREADS ?= "8"
|
||||
PARALLEL_MAKE ?= "-j8"
|
||||
|
||||
# License compliance
|
||||
COPY_LIC_MANIFEST = "1"
|
||||
COPY_LIC_DIRS = "1"
|
||||
INHERIT += "archiver"
|
||||
ARCHIVER_MODE[src] = "original"
|
||||
EOF
|
||||
```
|
||||
|
||||
**Expected:** Build completes without network access.
|
||||
---
|
||||
|
||||
### 4.2 Verify 2038 Compliance
|
||||
|
||||
After successful build:
|
||||
## Step 5: Initialize Build Environment
|
||||
|
||||
```bash
|
||||
# Check time_t size in generated toolchain
|
||||
${CORP_BASE}/build/tmp/sysroots/x86_64-linux/usr/bin/arm-poky-linux-gnueabi-gcc -dM -E - < /dev/null | grep TIME_BITS
|
||||
cd ${UT_BASE}/UT-mirror-package/sources/ci-meta-tq
|
||||
|
||||
# Verify submodules are present
|
||||
ls -la sources/
|
||||
|
||||
# Set machine for TQMa6UL
|
||||
export MACHINE=tqma6ulx-mba6ulx
|
||||
|
||||
# Initialize build (creates build_ut)
|
||||
. ./setup-environment build_ut imx
|
||||
|
||||
# Verify configuration
|
||||
bitbake -e | grep "^MACHINE="
|
||||
# Should show: MACHINE="tqma6ulx-mba6ulx"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Step 6: Verify Air-Gap Build
|
||||
|
||||
### 6.1 Test Offline Build
|
||||
|
||||
```bash
|
||||
# Ensure we're in build environment
|
||||
cd ${UT_BASE}/UT-mirror-package/sources/ci-meta-tq
|
||||
export MACHINE=tqma6ulx-mba6ulx
|
||||
. ./setup-environment build_ut imx
|
||||
|
||||
# Verify no network access is attempted
|
||||
export BB_NO_NETWORK=1
|
||||
|
||||
# Start build (should complete without network)
|
||||
bitbake tq-image-small-debug
|
||||
```
|
||||
|
||||
**Expected:** Build completes using only local premirror sources.
|
||||
|
||||
### 6.2 Verify 2038 Compliance
|
||||
|
||||
```bash
|
||||
# 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
|
||||
# Expected: #define __TIME_BITS 64
|
||||
|
||||
# Check kernel config
|
||||
@@ -200,100 +197,73 @@ bitbake -e virtual/kernel | grep CONFIG_COMPAT_32BIT_TIME
|
||||
|
||||
---
|
||||
|
||||
## Step 5: Development Workflow
|
||||
## Step 7: Development Workflow
|
||||
|
||||
### 5.1 Daily Use
|
||||
### Daily Build Commands
|
||||
|
||||
```bash
|
||||
# Enter build environment
|
||||
cd ${CORP_BASE}
|
||||
source poky-scarthgap/oe-init-build-env build
|
||||
cd ${UT_BASE}/UT-mirror-package/sources/ci-meta-tq
|
||||
export MACHINE=tqma6ulx-mba6ulx
|
||||
. ./setup-environment build_ut imx
|
||||
|
||||
# Build target
|
||||
bitbake core-image-minimal
|
||||
# Build target image
|
||||
bitbake tq-image-small-debug
|
||||
|
||||
# Deploy to target (SD card / eMMC)
|
||||
# Deploy to target (SD card)
|
||||
# See TQ documentation for deployment methods
|
||||
```
|
||||
|
||||
### 5.2 Adding Custom Layers
|
||||
|
||||
If custom corporate layers are required:
|
||||
### SDK Generation (for Application Development)
|
||||
|
||||
```bash
|
||||
# Add to bblayers.conf
|
||||
vim ${CORP_BASE}/build/conf/bblayers.conf
|
||||
|
||||
# Add path to custom layer
|
||||
# ${CORP_BASE}/meta-custom \
|
||||
```
|
||||
|
||||
### 5.3 SDK Generation
|
||||
|
||||
For application development:
|
||||
|
||||
```bash
|
||||
# Generate SDK
|
||||
bitbake core-image-minimal -c populate_sdk
|
||||
# Generate SDK for application developers
|
||||
bitbake tq-image-small-debug -c populate_sdk
|
||||
|
||||
# Install SDK
|
||||
${CORP_BASE}/build/tmp/deploy/sdk/*.sh
|
||||
${UT_BASE}/UT-mirror-package/sources/ci-meta-tq/build_ut/tmp/deploy/sdk/*.sh
|
||||
|
||||
# Source SDK environment
|
||||
# Source SDK in new terminal
|
||||
source /opt/poky/.../environment-setup-arm-poky-linux-gnueabi
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Maintenance
|
||||
## Build Verification Checklist
|
||||
|
||||
### Updating the Mirror
|
||||
|
||||
When new TQ BSP versions are approved:
|
||||
|
||||
1. Request updated mirror from external system
|
||||
2. Verify checksums
|
||||
3. Extract to separate directory
|
||||
4. Compare with current deployment
|
||||
5. Test build in isolation
|
||||
6. Switch over after validation
|
||||
|
||||
### Build Cache Management
|
||||
|
||||
```bash
|
||||
# Clean build (keep downloads)
|
||||
bitbake -c cleanall core-image-minimal
|
||||
|
||||
# Full clean (careful!)
|
||||
rm -rf ${CORP_BASE}/build/tmp/
|
||||
```
|
||||
- [ ] 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
|
||||
|
||||
---
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Issue: Network timeout errors
|
||||
### Issue: "Failed to fetch" errors
|
||||
|
||||
**Cause:** BitBake trying to fetch from internet
|
||||
**Cause:** BitBake trying to access network
|
||||
|
||||
**Solution:**
|
||||
```bash
|
||||
# Verify BB_NO_NETWORK is set
|
||||
grep BB_NO_NETWORK ${CORP_BASE}/build/conf/local.conf
|
||||
# Verify settings
|
||||
grep BB_NO_NETWORK ~/.yocto/site.conf
|
||||
grep SOURCE_MIRROR_URL ~/.yocto/site.conf
|
||||
|
||||
# Should show: BB_NO_NETWORK = "1"
|
||||
# Should show:
|
||||
# BB_NO_NETWORK = "1"
|
||||
# SOURCE_MIRROR_URL = "file:///srv/yocto/premirror/"
|
||||
```
|
||||
|
||||
### Issue: Missing source files
|
||||
### Issue: Missing files in premirror
|
||||
|
||||
**Cause:** Incomplete mirror transfer
|
||||
**Cause:** Incomplete transfer
|
||||
|
||||
**Solution:**
|
||||
```bash
|
||||
# Check downloads directory
|
||||
ls ${CORP_BASE}/downloads | wc -l
|
||||
# Compare with external mirror
|
||||
|
||||
# Re-verify checksum on source system
|
||||
# Re-transfer missing files
|
||||
```
|
||||
|
||||
@@ -301,41 +271,29 @@ ls ${CORP_BASE}/downloads | wc -l
|
||||
|
||||
**Solution:**
|
||||
```bash
|
||||
# Fix ownership
|
||||
sudo chown -R $(whoami):$(whoami) ${CORP_BASE}
|
||||
sudo chown -R $(whoami):$(whoami) /opt/UT-yocto /srv/yocto
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Security Considerations
|
||||
## Security & Compliance
|
||||
|
||||
1. **No Internet Access:** Build must complete without network
|
||||
2. **Audit Trail:** All sources archived and version-controlled
|
||||
3. **License Compliance:** License manifest generated for every build
|
||||
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
|
||||
4. **User Permissions:** Build as regular user, not root
|
||||
|
||||
---
|
||||
|
||||
## Validation Checklist
|
||||
## Support & Documentation
|
||||
|
||||
- [ ] Mirror extracted and verified
|
||||
- [ ] Offline build successful
|
||||
- [ ] 2038 compliance verified (64-bit time_t)
|
||||
- [ ] License manifest generated
|
||||
- [ ] Image deploys to target hardware
|
||||
- [ ] SDK functional for application development
|
||||
|
||||
---
|
||||
|
||||
## Support
|
||||
|
||||
For issues:
|
||||
1. Check [TQ BSP Documentation](https://github.com/tq-systems/meta-tq)
|
||||
2. Review Yocto Project manuals (included in mirror)
|
||||
3. Consult internal engineering team
|
||||
- **TQ BSP Documentation:** Included in `sources/meta-tq/`
|
||||
- **Yocto Manuals:** Included in `sources/poky/documentation/`
|
||||
- **License Info:** `build_ut/tmp/deploy/licenses/`
|
||||
|
||||
---
|
||||
|
||||
**Document Version:** 2.0
|
||||
**Author:** Siggi ⚙️
|
||||
**Date:** 2026-03-01
|
||||
**Classification:** Internal Use
|
||||
**Build:** UT
|
||||
**Last Updated:** 2026-03-01
|
||||
|
||||
Reference in New Issue
Block a user