-From c9949f83c08bc6a686068a9a90883cda3fa4bc1c Mon Sep 17 00:00:00 2001
+From ab02679f7d59f1b2d45baee24ccb491f0b6568ea Mon Sep 17 00:00:00 2001
From: Jackie Huang <jackie.huang@windriver.com>
Date: Tue, 1 Aug 2023 13:49:38 +0800
Subject: [PATCH 1/9] Add image yaml files for arm64
-From 12f147bd9367649d3704a7abd6c520ce3124d340 Mon Sep 17 00:00:00 2001
+From 6fa794a9ab036a20ab3b0441121c69c52ab78d26 Mon Sep 17 00:00:00 2001
From: Jackie Huang <jackie.huang@windriver.com>
Date: Tue, 1 Aug 2023 17:49:30 +0800
Subject: [PATCH 2/9] stx-init-env: add support arch specific dockerfile
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/stx-init-env b/stx-init-env
-index b9fa668..6f1a989 100755
+index edf66cf..8267630 100755
--- a/stx-init-env
+++ b/stx-init-env
-@@ -86,6 +86,12 @@ ASSUME_YES=0
+@@ -87,6 +87,12 @@ STX_START_OPTS=
COREUTILS_DOCKER_IMAGE="debian:bookworm-20240130-slim"
info() {
local tty_on tty_off
if [[ -t 2 ]] ; then
-@@ -718,14 +724,19 @@ if [[ -n "${BUILD_DOCKER_IMAGES}" ]] ; then
- docker_build_args+=("--no-cache")
- fi
+@@ -727,15 +733,20 @@ if [[ -n "${BUILD_DOCKER_IMAGES}" ]] ; then
for img in $BUILD_DOCKER_IMAGES; do
+ info "Starting to build image: $img:$DOCKER_TAG_LOCAL"
+
+ img_dockerfile=${img}.Dockerfile
+ if [[ -f $STX_TOOLS_DIR/stx/dockerfiles/${img}_${ARCH}.Dockerfile ]]; then
+ img_dockerfile=${img}_${ARCH}.Dockerfile
extra_build_args+=("--build-arg" "STX_MIRROR_URL=$STX_MIRROR_URL")
fi
fi
-- docker build "${docker_build_args[@]}" "${extra_build_args[@]}" -t $img:$DOCKER_TAG_LOCAL -f "$STX_TOOLS_DIR/"stx/dockerfiles/$img.Dockerfile "$STX_TOOLS_DIR" || exit 1
-+ docker build "${docker_build_args[@]}" "${extra_build_args[@]}" -t $img:$DOCKER_TAG_LOCAL -f "$STX_TOOLS_DIR/"stx/dockerfiles/${img_dockerfile} "$STX_TOOLS_DIR" || exit 1
- info "built image $img:$DOCKER_TAG_LOCAL"
- done
- fi
+
+- cmd="docker build "${docker_build_args[@]}" "${extra_build_args[@]}" -t $img:$DOCKER_TAG_LOCAL -f "$STX_TOOLS_DIR/"stx/dockerfiles/$img.Dockerfile "$STX_TOOLS_DIR""
++ cmd="docker build "${docker_build_args[@]}" "${extra_build_args[@]}" -t $img:$DOCKER_TAG_LOCAL -f "$STX_TOOLS_DIR/"stx/dockerfiles/${img_dockerfile} "$STX_TOOLS_DIR""
+ info "Running command: ${cmd}"
+ eval "$cmd" || exit 1
+
--
2.30.2
-From 9a2832b8269a5c4e6610dbb80b46a0368f7e898b Mon Sep 17 00:00:00 2001
+From 9b57113923342ce65c7230cb075cf09cf6c8ee09 Mon Sep 17 00:00:00 2001
From: Jackie Huang <jackie.huang@windriver.com>
Date: Tue, 1 Aug 2023 16:09:29 +0800
Subject: [PATCH 3/9] dockerfiles: add stx-lat-tool_arm64.Dockerfile
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Change-Id: Idd10ed519c97b44f1053ed30854dad6a0013052a
---
- stx/dockerfiles/stx-lat-tool_arm64.Dockerfile | 80 +++++++++++++++++++
- 1 file changed, 80 insertions(+)
+ stx/dockerfiles/stx-lat-tool_arm64.Dockerfile | 103 ++++++++++++++++++
+ 1 file changed, 103 insertions(+)
create mode 100644 stx/dockerfiles/stx-lat-tool_arm64.Dockerfile
diff --git a/stx/dockerfiles/stx-lat-tool_arm64.Dockerfile b/stx/dockerfiles/stx-lat-tool_arm64.Dockerfile
new file mode 100644
-index 0000000..6b249c2
+index 0000000..24e72b1
--- /dev/null
+++ b/stx/dockerfiles/stx-lat-tool_arm64.Dockerfile
-@@ -0,0 +1,80 @@
+@@ -0,0 +1,103 @@
+# Copyright (c) 2023 Wind River Systems, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+
+# Install necessary packages
+RUN apt-get -y update && apt-get --no-install-recommends -y install \
-+ openssh-client \
-+ python3 \
-+ python3-pip \
-+ xz-utils \
-+ file \
-+ bzip2 \
-+ procps \
-+ tini \
-+ wget \
-+ locales-all \
-+ python3-yaml \
-+ rsync \
-+ cpio \
-+ vim \
++ bzip2 \
++ coreutils \
++ cpio \
++ file \
++ locales-all \
++ openssh-client \
++ procps \
++ python3 \
++ python3-pip \
++ python3-yaml \
++ rsync \
++ tini \
++ util-linux \
++ vim \
++ wget \
++ xz-utils \
+ && \
+ apt-get clean && \
-+ rm -rf /var/lib/apt/lists/* && \
+ mkdir -p /opt/LAT/SDK && \
+ pip3 install pycryptodomex requests_toolbelt
+
++# Packages for pre-patched iso creation support
++RUN apt-get -y install \
++ bubblewrap \
++ debos \
++ dosfstools \
++ gir1.2-ostree-1.0 \
++ git \
++ isomd5sum \
++ mmdebstrap \
++ p7zip-full \
++ python3-apt \
++ python3-gi \
++ python3-gi-cairo \
++ python3-systemd \
++ reprepro \
++ syslinux-utils \
++ xfsprogs \
++ && \
++ apt-get clean && \
++ rm -rf /var/lib/apt/lists/* && \
++ pip3 install git+https://opendev.org/starlingx/apt-ostree@master
++
+# Insert pubkey of the package repository
+COPY stx/toCOPY/builder/pubkey.rsa /opt/LAT/
+
+RUN chmod 0644 /etc/vim/vimrc.local
+
+ENTRYPOINT ["/usr/bin/tini", "--"]
-+CMD ["/opt/LAT/lat/latd"]
++CMD ["ionice", "-c", "3", "nice", "-n", "15", "/opt/LAT/lat/latd"]
--
2.30.2
-From 477fe86fda3b6980e6ebf7e2f2754a83fb9e4aa1 Mon Sep 17 00:00:00 2001
+From 419b2552a692631909b2b3d2c35a65153f1e34cc Mon Sep 17 00:00:00 2001
From: Jackie Huang <jackie.huang@windriver.com>
Date: Tue, 1 Aug 2023 17:38:05 +0800
Subject: [PATCH 4/9] pkgbuilder: add support for arm64
1 file changed, 4 insertions(+)
diff --git a/stx/toCOPY/pkgbuilder/app.py b/stx/toCOPY/pkgbuilder/app.py
-index da24eb7..2ed13d1 100644
+index 7c40fb3..beb906c 100644
--- a/stx/toCOPY/pkgbuilder/app.py
+++ b/stx/toCOPY/pkgbuilder/app.py
-@@ -18,9 +18,13 @@ from flask import Flask
- from flask import jsonify
+@@ -19,9 +19,13 @@ from flask import jsonify
from flask import request
import logging
+ import utils
+import platform
STX_DISTRO = 'bullseye'
-From 14fa67797b13e986619a11d9b09524fe759dbf54 Mon Sep 17 00:00:00 2001
+From 30f035c21ddae7f9b1b1c46970454de426d1d21c Mon Sep 17 00:00:00 2001
From: Jackie Huang <jackie.huang@windriver.com>
Date: Tue, 1 Aug 2023 11:39:33 +0800
Subject: [PATCH 5/9] Add packages list for arm64
-From 3c8b68f7df132ee1de4a06290a29d12bc29d8051 Mon Sep 17 00:00:00 2001
+From 72c6f242603686f5fb0e60dcae624c253b3d7ef5 Mon Sep 17 00:00:00 2001
From: Jackie Huang <jackie.huang@windriver.com>
Date: Tue, 17 Oct 2023 14:45:02 +0800
Subject: [PATCH 6/9] WA - Workaround for missing README file
1 file changed, 3 insertions(+)
diff --git a/stx/dockerfiles/stx-lat-tool_arm64.Dockerfile b/stx/dockerfiles/stx-lat-tool_arm64.Dockerfile
-index 6b249c2..9a8b3f8 100644
+index 24e72b1..b06037f 100644
--- a/stx/dockerfiles/stx-lat-tool_arm64.Dockerfile
+++ b/stx/dockerfiles/stx-lat-tool_arm64.Dockerfile
-@@ -72,6 +72,9 @@ RUN sed -i 's/linux-image-arm64/linux-image-stx-arm64/g' /opt/LAT/SDK/sysroots/a
+@@ -95,6 +95,9 @@ RUN sed -i 's/linux-image-arm64/linux-image-stx-arm64/g' /opt/LAT/SDK/sysroots/a
RUN sed -i 's/Wind River Linux Graphics development .* ostree/StarlingX ostree/g' /opt/LAT/SDK/sysroots/cortexa57-wrs-linux/boot/efi/EFI/BOOT/grub.cfg
-From 5d8dca4341f166498af2c314d9fd89564ae5fa35 Mon Sep 17 00:00:00 2001
+From 282a1d6c06d5cf6560606410d56064c101e98043 Mon Sep 17 00:00:00 2001
From: Jackie Huang <jackie.huang@windriver.com>
Date: Tue, 17 Oct 2023 15:11:34 +0800
Subject: [PATCH 7/9] WA - lat: update the LAT path
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/stx/dockerfiles/stx-lat-tool_arm64.Dockerfile b/stx/dockerfiles/stx-lat-tool_arm64.Dockerfile
-index 9a8b3f8..a1521f6 100644
+index b06037f..4639808 100644
--- a/stx/dockerfiles/stx-lat-tool_arm64.Dockerfile
+++ b/stx/dockerfiles/stx-lat-tool_arm64.Dockerfile
@@ -17,7 +17,8 @@ FROM debian:bullseye
-From 8410a1ac80e2f40057583c10d287016afaed5f0f Mon Sep 17 00:00:00 2001
+From 4ca7274f75e2f19ba5b9424d221dc06867fdef3b Mon Sep 17 00:00:00 2001
From: Jackie Huang <jackie.huang@windriver.com>
Date: Wed, 28 Feb 2024 22:22:55 +0800
Subject: [PATCH 8/9] WA - builder: remove STX_MIRROR_UTL
-From 5f29e7ac97eeb0cfe3930a3e0b9f0955aad1c40e Mon Sep 17 00:00:00 2001
+From fb4d98c1634a382dde80874865f099d6579d934c Mon Sep 17 00:00:00 2001
From: Jackie Huang <jackie.huang@windriver.com>
Date: Tue, 17 Oct 2023 14:50:47 +0800
Subject: [PATCH 9/9] WA - pkgbuilder: remove STX_MIRROR_URL