Commit 828ee037 authored by Andrey Filippov's avatar Andrey Filippov

Add .107 config baselines and enforce local.conf override for stage1

parent fe2e24af
Pipeline #3692 canceled with stages
...@@ -61,6 +61,13 @@ Bootstrap workspace in developer mode: ...@@ -61,6 +61,13 @@ Bootstrap workspace in developer mode:
./scripts/verify_ssh_remotes.sh ./scripts/verify_ssh_remotes.sh
``` ```
Use known-good `.107` local.conf by default during stage-1 builds:
```bash
./scripts/build_stage1.sh
./scripts/compare_localconf_with_107.sh
```
## References ## References
- Main upstream repository: `git@git.elphel.com:Elphel/elphel393.git` (`warrior` branch) - Main upstream repository: `git@git.elphel.com:Elphel/elphel393.git` (`warrior` branch)
......
# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
POKY_BBLAYERS_CONF_VERSION = "2"
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS ?= " \
/home/elphel/git/elphel393/poky/meta \
/home/elphel/git/elphel393/poky/meta-poky \
/home/elphel/git/elphel393/poky/meta-yocto-bsp \
"
BBLAYERS = " \
/home/elphel/git/elphel393/poky/meta \
/home/elphel/git/elphel393/poky/meta-poky \
/home/elphel/git/elphel393/poky/meta-yocto-bsp \
/home/elphel/git/elphel393/meta/meta-ezynq \
/home/elphel/git/elphel393/meta/meta-elphel393 \
/home/elphel/git/elphel393/meta/meta-xilinx/meta-xilinx-bsp \
/home/elphel/git/elphel393/meta/meta-openembedded/meta-oe \
/home/elphel/git/elphel393/meta/meta-openembedded/meta-python \
/home/elphel/git/elphel393/meta/meta-openembedded/meta-networking \
/home/elphel/git/elphel393/meta/meta-openembedded/meta-webserver \
"
This diff is collapsed.
...@@ -4,6 +4,26 @@ set -euo pipefail ...@@ -4,6 +4,26 @@ set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)" REPO_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
WORKSPACE="${REPO_ROOT}/workspace" WORKSPACE="${REPO_ROOT}/workspace"
REF_DIR="${REPO_ROOT}/docs/reference/107"
USE_107_LOCALCONF="${USE_107_LOCALCONF:-1}"
copy_localconf_107() {
local src="${REF_DIR}/local.conf"
local dst="${WORKSPACE}/poky/build/conf/local.conf"
if [[ ! -f "${src}" ]]; then
echo "WARN: ${src} missing, skipping .107 local.conf override" >&2
return 0
fi
if [[ ! -f "${dst}" ]]; then
echo "WARN: ${dst} missing, cannot apply .107 local.conf yet" >&2
return 0
fi
cp -f "${dst}" "${dst}.before_107" || true
cp -f "${src}" "${dst}"
echo "Applied .107 local.conf -> ${dst}"
}
if [[ ! -x "${WORKSPACE}/setup.py" ]]; then if [[ ! -x "${WORKSPACE}/setup.py" ]]; then
echo "ERROR: ${WORKSPACE}/setup.py not found or not executable." >&2 echo "ERROR: ${WORKSPACE}/setup.py not found or not executable." >&2
...@@ -19,11 +39,22 @@ fi ...@@ -19,11 +39,22 @@ fi
TARGETS_STR="${TARGETS[*]}" TARGETS_STR="${TARGETS[*]}"
# Step 1: setup and generate config in workspace.
"${SCRIPT_DIR}/run_docker.sh" bash -lc " "${SCRIPT_DIR}/run_docker.sh" bash -lc "
set -e set -e
cd /work/elphel393 cd /work/elphel393
./setup.py ./setup.py
cd poky "
# Step 2: enforce known-good local.conf from .107 when requested.
if [[ "${USE_107_LOCALCONF}" == "1" ]]; then
copy_localconf_107
fi
# Step 3: build targets.
"${SCRIPT_DIR}/run_docker.sh" bash -lc "
set -e
cd /work/elphel393/poky
set +u set +u
. ./oe-init-build-env build . ./oe-init-build-env build
set -u set -u
......
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
WORKSPACE="${REPO_ROOT}/workspace"
REF="${REPO_ROOT}/docs/reference/107/local.conf"
DST="${WORKSPACE}/poky/build/conf/local.conf"
if [[ ! -f "${REF}" ]]; then
echo "ERROR: reference local.conf not found: ${REF}" >&2
exit 1
fi
if [[ ! -f "${DST}" ]]; then
echo "ERROR: workspace local.conf not found: ${DST}" >&2
exit 1
fi
echo "Reference: ${REF}"
echo "Workspace: ${DST}"
echo
sha256sum "${REF}" "${DST}"
echo
if diff -u "${REF}" "${DST}"; then
echo "local.conf matches .107 reference"
else
echo "local.conf differs from .107 reference"
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment