Commit 8c697664 authored by Andrey Filippov's avatar Andrey Filippov

Fix Stage-1 Docker bootstrap and add persistent build log

parent 828ee037
Pipeline #3693 canceled with stages
...@@ -13,6 +13,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ ...@@ -13,6 +13,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
locales \ locales \
tzdata \ tzdata \
sudo \ sudo \
openssh-client \
git \ git \
rsync \ rsync \
gawk \ gawk \
......
...@@ -18,6 +18,7 @@ services: ...@@ -18,6 +18,7 @@ services:
stdin_open: true stdin_open: true
volumes: volumes:
- ../workspace:/work/elphel393 - ../workspace:/work/elphel393
- ../cache/downloads:/work/elphel393/poky/build/downloads - ../cache/downloads:/cache/downloads
- ../cache/sstate-cache:/work/elphel393/poky/build/sstate-cache - ../cache/sstate-cache:/cache/sstate-cache
- ../cache/ccache:/home/${USER_NAME:-builder}/.ccache - ../cache/ccache:/home/${USER_NAME:-builder}/.ccache
- ${HOME}/.ssh:/home/${USER_NAME:-builder}/.ssh
...@@ -6,6 +6,16 @@ REPO_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)" ...@@ -6,6 +6,16 @@ REPO_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
WORKSPACE="${REPO_ROOT}/workspace" WORKSPACE="${REPO_ROOT}/workspace"
REF_DIR="${REPO_ROOT}/docs/reference/107" REF_DIR="${REPO_ROOT}/docs/reference/107"
USE_107_LOCALCONF="${USE_107_LOCALCONF:-1}" USE_107_LOCALCONF="${USE_107_LOCALCONF:-1}"
LOG_DIR="${REPO_ROOT}/logs"
LOG_TS="$(date +%Y%m%d_%H%M%S)"
LOG_FILE="${LOG_DIR}/build_stage1_${LOG_TS}.log"
LATEST_LOG="${LOG_DIR}/build_stage1_latest.log"
mkdir -p "${LOG_DIR}"
ln -sfn "$(basename "${LOG_FILE}")" "${LATEST_LOG}"
exec > >(tee -a "${LOG_FILE}") 2>&1
echo "Stage1 log: ${LOG_FILE}"
echo "Latest log symlink: ${LATEST_LOG}"
copy_localconf_107() { copy_localconf_107() {
local src="${REF_DIR}/local.conf" local src="${REF_DIR}/local.conf"
...@@ -43,6 +53,11 @@ TARGETS_STR="${TARGETS[*]}" ...@@ -43,6 +53,11 @@ TARGETS_STR="${TARGETS[*]}"
"${SCRIPT_DIR}/run_docker.sh" bash -lc " "${SCRIPT_DIR}/run_docker.sh" bash -lc "
set -e set -e
cd /work/elphel393 cd /work/elphel393
mkdir -p \"\${HOME}/.ssh\"
chmod 700 \"\${HOME}/.ssh\"
touch \"\${HOME}/.ssh/known_hosts\"
chmod 600 \"\${HOME}/.ssh/known_hosts\"
ssh-keyscan -H git.elphel.com >> \"\${HOME}/.ssh/known_hosts\" 2>/dev/null || true
./setup.py ./setup.py
" "
...@@ -58,5 +73,7 @@ cd /work/elphel393/poky ...@@ -58,5 +73,7 @@ cd /work/elphel393/poky
set +u set +u
. ./oe-init-build-env build . ./oe-init-build-env build
set -u set -u
export DL_DIR=/cache/downloads
export SSTATE_DIR=/cache/sstate-cache
bitbake ${TARGETS_STR} bitbake ${TARGETS_STR}
" "
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