1 From 9a2832b8269a5c4e6610dbb80b46a0368f7e898b Mon Sep 17 00:00:00 2001
2 From: Jackie Huang <jackie.huang@windriver.com>
3 Date: Tue, 1 Aug 2023 16:09:29 +0800
4 Subject: [PATCH 3/9] dockerfiles: add stx-lat-tool_arm64.Dockerfile
6 Add stx-lat-tool_arm64.Dockerfile from stx-lat-tool.Dockerfile
7 and made the following adjustments:
9 * corei7-64 -> cortexa57
13 PASS: run ./stx-init-env --rebuild on x86-64 host
14 PASS: run ./stx-init-env --rebuild on arm64 host
15 PASS: build-pkgs on x86-64 host
16 PASS: build-image on x86-64 host
17 PASS: build-pkgs on arm64 host
18 PASS: build-image on arm64 host
19 PASS: Deploy AIO-SX on x86-64 target
20 PASS: Deploy AIO-SX on arm64 target
21 PASS: Deploy AIO-DX on x86-64 target
22 PASS: Deploy AIO-DX on arm64 target
27 Depends-On: https://review.opendev.org/c/starlingx/tools/+/890268
29 Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
30 Change-Id: Idd10ed519c97b44f1053ed30854dad6a0013052a
32 stx/dockerfiles/stx-lat-tool_arm64.Dockerfile | 80 +++++++++++++++++++
33 1 file changed, 80 insertions(+)
34 create mode 100644 stx/dockerfiles/stx-lat-tool_arm64.Dockerfile
36 diff --git a/stx/dockerfiles/stx-lat-tool_arm64.Dockerfile b/stx/dockerfiles/stx-lat-tool_arm64.Dockerfile
38 index 0000000..6b249c2
40 +++ b/stx/dockerfiles/stx-lat-tool_arm64.Dockerfile
42 +# Copyright (c) 2023 Wind River Systems, Inc.
44 +# Licensed under the Apache License, Version 2.0 (the "License");
45 +# you may not use this file except in compliance with the License.
46 +# You may obtain a copy of the License at
48 +# http://www.apache.org/licenses/LICENSE-2.0
50 +# Unless required by applicable law or agreed to in writing, software
51 +# distributed under the License is distributed on an "AS IS" BASIS,
52 +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
53 +# See the License for the specific language governing permissions and
54 +# limitations under the License.
58 +MAINTAINER Jackie Huang <jackie.huang@windriver.com>
60 +ARG STX_MIRROR_URL=https://mirror.starlingx.windriver.com/mirror
61 +ARG LAT_BINARY_RESOURCE_PATH=${STX_MIRROR_URL}/lat-sdk/lat-sdk-20231206
63 +# Update certificates
64 +RUN apt-get -y update && apt-get -y install --no-install-recommends ca-certificates && update-ca-certificates
66 +# Install necessary packages
67 +RUN apt-get -y update && apt-get --no-install-recommends -y install \
84 + rm -rf /var/lib/apt/lists/* && \
85 + mkdir -p /opt/LAT/SDK && \
86 + pip3 install pycryptodomex requests_toolbelt
88 +# Insert pubkey of the package repository
89 +COPY stx/toCOPY/builder/pubkey.rsa /opt/LAT/
91 +# Prepare executables
92 +COPY stx/toCOPY/lat-tool/lat/ /opt/LAT/lat
94 +# Fix the hardcoded env_script name in the lat-sdk for arm64
95 +# For x86_64, it's environment-setup-corei7-64-wrs-linux
96 +# For arm64, it's environment-setup-cortexa57-wrs-linux
97 +RUN sed -i 's/corei7-64/cortexa57/' /opt/LAT/lat/latd
99 +# Download & install LAT SDK.
100 +RUN wget --quiet ${LAT_BINARY_RESOURCE_PATH}/lat-sdk.sh --output-document=/opt/LAT/AppSDK.sh && \
101 + chmod +x /opt/LAT/AppSDK.sh && \
102 + /opt/LAT/AppSDK.sh -d /opt/LAT/SDK -y && \
103 + rm -f /opt/LAT/AppSDK.sh
105 +# Fix: Use Debian CDN address for geo-frendly servers
106 +RUN sed -i 's/ftp.cn.debian.org/deb.debian.org/g' /opt/LAT/SDK/sysroots/aarch64-wrlinuxsdk-linux/usr/lib/python3.11/site-packages/genimage/debian_constant.py
108 +# Fix: Align DEFAULT_INITRD_NAME with our custom names
109 +RUN sed -i 's/debian-initramfs-ostree-image/starlingx-initramfs-ostree-image/g' /opt/LAT/SDK/sysroots/aarch64-wrlinuxsdk-linux/usr/lib/python3.11/site-packages/genimage/debian_constant.py
111 +# Fix: Align kernel with custom starlingx kernel
112 +RUN sed -i 's/linux-image-arm64/linux-image-stx-arm64/g' /opt/LAT/SDK/sysroots/aarch64-wrlinuxsdk-linux/usr/lib/python3.11/site-packages/genimage/debian_constant.py
114 +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
117 +COPY stx/toCOPY/common/vimrc.local /etc/vim/vimrc.local
118 +RUN chmod 0644 /etc/vim/vimrc.local
120 +ENTRYPOINT ["/usr/bin/tini", "--"]
121 +CMD ["/opt/LAT/lat/latd"]