File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 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.
You can’t perform that action at this time.
0 commit comments