Skip to content

Commit

Permalink
chore: copy over sd-boot and sd-stub from tools
Browse files Browse the repository at this point in the history
Copy over sd-boot and sd-stub from tools, since they are sttaic EFI PE32
executables.

Signed-off-by: Noel Georgi <git@frezbo.dev>
  • Loading branch information
frezbo committed May 16, 2023
1 parent 813b3c3 commit 7958db1
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 160 deletions.
2 changes: 1 addition & 1 deletion Pkgfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
format: v1alpha2

vars:
TOOLS_IMAGE: ghcr.io/siderolabs/tools:v1.5.0-alpha.0-4-geedc294
TOOLS_IMAGE: ghcr.io/siderolabs/tools:v1.5.0-alpha.0-5-g271c4a6

# renovate: datasource=github-releases depName=containernetworking/plugins
cni_version: v1.3.0
Expand Down
9 changes: 4 additions & 5 deletions libinih/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ variant: scratch
shell: /toolchain/bin/bash
dependencies:
- stage: base
- stage: openssl
steps:
- sources:
- url: https://github.com/benhoyt/inih/archive/refs/tags/r{{ .libinih_version }}.tar.gz
destination: inih.tar.gz
sha256: "{{ .libinih_sha256 }}"
sha512: "{{ .libinih_sha512 }}"
env:
LD_LIBRARY_PATH: /toolchain/lib
prepare:
- |
tar -xzf inih.tar.gz --strip-components=1
Expand Down Expand Up @@ -45,13 +44,13 @@ steps:
-Dutf-8_bom=true \
-Dinline_comments=true \
-Duse_heap=false \
. output
. build
build:
- |
meson compile -j 1 -C output
meson compile -j 1 -C build
install:
- |
DESTDIR="/rootfs" meson install --no-rebuild -C output
DESTDIR="/rootfs" meson install --no-rebuild -C build
finalize:
- from: /rootfs
to: /
40 changes: 0 additions & 40 deletions sd-boot/patches/musl.patch

This file was deleted.

40 changes: 3 additions & 37 deletions sd-boot/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,13 @@ variant: scratch
shell: /toolchain/bin/bash
dependencies:
- stage: base
- image: "{{ .TOOLS_IMAGE }}"
steps:
- sources:
- url: https://github.com/systemd/systemd/archive/refs/tags/v{{ .systemd_version }}.tar.gz
destination: systemd.tar.gz
sha256: "{{ .systemd_sha256 }}"
sha512: "{{ .systemd_sha512 }}"
env:
LD_LIBRARY_PATH: /toolchain/lib
prepare:
- |
tar -xzf systemd.tar.gz --strip-components=1
ln -s /toolchain/bin/echo /toolchain/bin/getent
mkdir -p /usr/bin
ln -sf /toolchain/bin/env /usr/bin/env
ln -sf /toolchain/bin/python3 /toolchain/bin/python
pip3 install jinja2 ninja
patch -p1 < /pkg/patches/musl.patch
meson setup build \
--buildtype=release \
-Dmode=release \
-Dsbat-distro=talos \
-Dsbat-distro-summary="Talos Linux" \
-Dsbat-distro-url=https://github.com/siderolabs/pkgs/issues \
-Dman=false \
-Defi=true \
-Dgnu-efi=true \
-Defi-libdir=/toolchain/lib \
-Defi-includedir=/toolchain/include/efi \
-Dtests=false
build:
- |
ninja -j $(nproc) -C build systemd-boot
install:
- install:
- |
mkdir -p /rootfs
cp build/src/boot/efi/*.efi /rootfs
cp /toolchain/lib/systemd/boot/efi/*.efi /rootfs
finalize:
- from: /rootfs
to: /
40 changes: 0 additions & 40 deletions sd-stub/patches/musl.patch

This file was deleted.

40 changes: 3 additions & 37 deletions sd-stub/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,13 @@ variant: scratch
shell: /toolchain/bin/bash
dependencies:
- stage: base
- image: "{{ .TOOLS_IMAGE }}"
steps:
- sources:
- url: https://github.com/systemd/systemd/archive/refs/tags/v{{ .systemd_version }}.tar.gz
destination: systemd.tar.gz
sha256: "{{ .systemd_sha256 }}"
sha512: "{{ .systemd_sha512 }}"
env:
LD_LIBRARY_PATH: /toolchain/lib
prepare:
- |
tar -xzf systemd.tar.gz --strip-components=1
ln -s /toolchain/bin/echo /toolchain/bin/getent
mkdir -p /usr/bin
ln -sf /toolchain/bin/env /usr/bin/env
ln -sf /toolchain/bin/python3 /toolchain/bin/python
pip3 install jinja2 ninja
patch -p1 < /pkg/patches/musl.patch
meson setup build \
--buildtype=release \
-Dmode=release \
-Dsbat-distro=talos \
-Dsbat-distro-summary="Talos Linux" \
-Dsbat-distro-url=https://github.com/siderolabs/pkgs/issues \
-Dman=false \
-Defi=true \
-Dgnu-efi=true \
-Defi-libdir=/toolchain/lib \
-Defi-includedir=/toolchain/include/efi \
-Dtests=false
build:
- |
ninja -j $(nproc) -C build systemd-stub
install:
- install:
- |
mkdir -p /rootfs
cp build/src/boot/efi/*.efi.stub /rootfs
cp /toolchain/lib/systemd/boot/efi/*.efi.stub /rootfs
finalize:
- from: /rootfs
to: /

0 comments on commit 7958db1

Please sign in to comment.