diff --git a/.obs/dockerfile/seedimage/Dockerfile b/.obs/dockerfile/seedimage/Dockerfile index a0af240ac..45ea7dbfc 100644 --- a/.obs/dockerfile/seedimage/Dockerfile +++ b/.obs/dockerfile/seedimage/Dockerfile @@ -10,7 +10,7 @@ ARG SLE_VERSION FROM suse/sle15:$SLE_VERSION as BASE RUN mkdir -p /installroot && \ - zypper --gpg-auto-import-keys --installroot /installroot in -y --no-recommends elemental-toolkit elemental-httpfy xorriso curl coreutils ca-certificates ca-certificates-mozilla gptfdisk squashfs util-linux dosfstools mtools e2fsprogs grub2 + zypper --gpg-auto-import-keys --installroot /installroot in -y --no-recommends elemental-toolkit elemental-httpfy elemental-seedimage-hooks xorriso curl coreutils ca-certificates ca-certificates-mozilla gptfdisk squashfs util-linux dosfstools mtools e2fsprogs grub2 FROM scratch as SEEDIMAGE_BUILDER diff --git a/.obs/specfile/elemental-operator.spec b/.obs/specfile/elemental-operator.spec index 9eedc8829..ad76e77a6 100644 --- a/.obs/specfile/elemental-operator.spec +++ b/.obs/specfile/elemental-operator.spec @@ -50,6 +50,9 @@ BuildRequires: compiler(go-compiler) >= 1.20 BuildRoot: %{_tmppath}/%{name}-%{version}-build +%define systemdir /system +%define oemdir %{systemdir}/oem + %package -n elemental-register Summary: The registration client @@ -75,6 +78,12 @@ Summary: Simple http server %description -n elemental-httpfy httpfy starts a simple http server, serving files from the current dir. +%package -n elemental-seedimage-hooks +Summary: Hooks used in SeedImage builder + +%description -n elemental-seedimage-hooks +Hooks used in SeedImage builder to copy firmware when building disk-images. + %prep %setup -q -n %{name}-%{version} cp %{S:1} . @@ -116,6 +125,9 @@ make httpfy %{__install} -m 755 build/elemental-support %{buildroot}%{_sbindir} %{__install} -m 755 build/elemental-httpfy %{buildroot}%{_sbindir} +# hooks +%{__install} -m 755 hooks/*.yaml %{buildroot}%{oemdir} + %files %defattr(-,root,root,-) %license LICENSE @@ -137,4 +149,11 @@ make httpfy %license LICENSE %{_sbindir}/elemental-httpfy +%files -n elemental-seedimage-hooks +%defattr(-,root,root,-) +%license LICENSE +%dir %{systemdir} +%dir %{oemdir} +%{oemdir}/* + %changelog diff --git a/hooks/01_rpi-firmware.yaml b/hooks/01_rpi-firmware.yaml new file mode 100644 index 000000000..22015c0b2 --- /dev/null +++ b/hooks/01_rpi-firmware.yaml @@ -0,0 +1,6 @@ +name: "Raspberry Pi post disk hook" +stages: + after-disk: + - name: "Copy firmware to EFI partition" + commands: + - cp -r /iso/build/recovery.img.root/boot/vc/* /iso/build/efi/