Skip to content

Commit 875b05b

Browse files
committed
CI: add Dockerfile and README for CI image setup
Add a CI Dockerfile to provide the required environment for generating efi.bin and dtb.bin. Set up the CI build environment and prepare required EFI artifacts. Signed-off-by: Nandini Matam <nandini.matam@oss.qualcomm.com>
1 parent 587548f commit 875b05b

2 files changed

Lines changed: 66 additions & 0 deletions

File tree

CI/Dockerfile.ci

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
FROM ubuntu:24.04
2+
3+
ARG USER_ID
4+
ARG GROUP_ID
5+
ARG USER_NAME
6+
7+
RUN if [ -n "$USER_ID" ] && [ -n "$GROUP_ID" ] && [ -n "$USER_NAME" ]; then \
8+
groupadd -g "$GROUP_ID" "$USER_NAME" && \
9+
useradd -m -u "$USER_ID" -g "$GROUP_ID" -d / "$USER_NAME" ; \
10+
fi
11+
12+
ENV ARCH=arm64
13+
ENV CROSS_COMPILE=aarch64-linux-gnu-
14+
15+
COPY generate_boot_bins.sh /usr/bin/
16+
COPY build.sh /usr/bin/
17+
COPY make_fitimage.sh /usr/bin/
18+
19+
RUN set -eux; \
20+
apt-get update; \
21+
apt-get install -y --no-install-recommends \
22+
ca-certificates \
23+
curl \
24+
git \
25+
binutils \
26+
python3 \
27+
locales \
28+
kmod \
29+
rsync \
30+
systemd-ukify \
31+
dosfstools \
32+
mtools \
33+
cpio \
34+
; \
35+
rm -rf /var/lib/apt/lists/*; \
36+
locale-gen en_US.UTF-8; \
37+
update-locale LANG=en_US.UTF-8; \
38+
\
39+
curl "https://android.googlesource.com/platform/system/tools/mkbootimg/+/refs/heads/android12-release/mkbootimg.py?format=TEXT" \
40+
| base64 --decode > /usr/bin/mkbootimg; \
41+
chmod +x /usr/bin/mkbootimg; \
42+
chmod 755 /usr/bin/generate_boot_bins.sh /usr/bin/build.sh /usr/bin/make_fitimage.sh; \
43+
\
44+
command -v ukify; \
45+
command -v mkfs.vfat; \
46+
command -v mcopy; \
47+
command -v rsync
48+
49+
# Fetch & unpack systemd-boot .deb
50+
ARG SYSTEMD_BOOT_DEB_URL="http://ports.ubuntu.com/pool/universe/s/systemd/systemd-boot-efi_255.4-1ubuntu8_arm64.deb"
51+
RUN set -eux; \
52+
mkdir -p /artifacts/systemd; \
53+
echo "Downloading systemd-boot from: ${SYSTEMD_BOOT_DEB_URL}"; \
54+
curl -fsSL "${SYSTEMD_BOOT_DEB_URL}" -o /artifacts/systemd-boot-efi.deb; \
55+
dpkg-deb -xv /artifacts/systemd-boot-efi.deb /artifacts/systemd; \
56+
test -d /artifacts/systemd/usr/lib/systemd/boot/efi
57+
58+
ENV LANG=en_US.UTF-8
59+
ENV LC_ALL=en_US.UTF-8

CI/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# kmake-image-packager
2+
3+
Docker image for packaging bootable kernel artifacts
4+
5+
**Outputs:** `efi.bin`, `dtb.img`, `boot.img`
6+
7+
This project focuses on generating bootable images from prebuilt kernel artifacts(kernel image and DTB) with an optional ramdisk.

0 commit comments

Comments
 (0)