-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A specialized version of the installer that performs EVE-OS installation and checkes if it works properly. - Added mkverification container (pkg/mkverification-raw-efi) that installs EVE and verifies that EVE is working properly with the underlying hardware. - Added pkg/verification container image which is a copy of pkg/eve image, and is used to change the config partition of EVE. - Changed tools/parse-pkgs.sh and added tools/makeverification.sh which was necessary to support the new rule in the Makefile that generates the verification image The verify script performs the following tests: - Checks if all drivers for each component of the edge device is present and working - Runs FIO in each of the storage device of the edge device - Configures each of the network interface with dhcp and statically and tests internet connectivity Signed-off-by: Ioannis Sfakianakis <ioannis@zededa.com>
- Loading branch information
1 parent
856a253
commit d703427
Showing
19 changed files
with
1,961 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,8 +21,8 @@ sudo | |
tini | ||
fio | ||
sysstat | ||
iw | ||
hwinfo | ||
iw | ||
i2c-tools-dev | ||
qemu-system-x86_64 | ||
qemu | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
# This mkverification-raw-efi produces the raw EFI partition for EVE, | ||
# including the files in efi-files in the image. This includes: | ||
# | ||
# /EFI/BOOT/grub.cfg - Chainloads main bootloader | ||
# /UsbInvocationScript.txt - Enables USB boot on Dell 3000 series | ||
# | ||
# The image of mkverification-raw-efi tests the compatibility of the underlying | ||
# hardware with EVE-OS. If the verification procedure is successful, EVE-OS | ||
# will operate without problems with the edge device that is being verified | ||
FROM lfedge/eve-alpine:c114cf1d3ea51534f061f9aa949beb6ac5c12fb3 AS build | ||
SHELL ["/bin/ash", "-eo", "pipefail", "-c"] | ||
|
||
ENV BUILD_PKGS mkinitfs grep patch make coreutils musl-dev gcc g++ perl \ | ||
autoconf automake libtool file bsd-compat-headers libc-dev \ | ||
util-linux-dev flex linux-headers glib-dev libxrandr-dev zlib-dev \ | ||
libusb-dev kmod-dev curl eudev-dev libdrm-dev i2c-tools-dev hwinfo \ | ||
binutils-dev libaio-dev zlib-static libvncserver-dev python3 pixman-dev \ | ||
py3-setuptools bash perl cmake m4 pkgconf autoconf-archive tpm2-tss-dev | ||
ENV PKGS mtools dosfstools libarchive-tools sgdisk e2fsprogs util-linux \ | ||
squashfs-tools coreutils tar dmidecode smartmontools libaio libaio-dev \ | ||
perl glib zlib libusb curl xz pciutils usbutils hdparm util-linux \ | ||
wireless-tools libxrandr eudev-libs libusb sudo fio iperf3 sysstat \ | ||
lm-sensors acpi iw libdrm hwinfo dhclient dmidecode smartmontools \ | ||
pciutils libgcc pixman glib libvncserver musl-utils dhclient \ | ||
qemu-system-x86_64 tpm2-tss-dev tpm2-tss-esys tpm2-tss-fapi tpm2-tss-rc \ | ||
tpm2-tss-sys tpm2-tss-tctildr tpm2-abrmd | ||
RUN eve-alpine-deploy.sh | ||
|
||
WORKDIR /out | ||
RUN echo "mtools_skip_check=1" >> etc/mtools.conf; \ | ||
mkdir -p efifs parts root bits config persist opt/pillar opt/debug \ | ||
lib/modules run sys | ||
|
||
ADD https://www.ddcutil.com/tarballs/ddcutil-1.2.2.tar.gz /out/ddcutil-1.2.2.tar.gz | ||
ADD http://sources.buildroot.net/edid-decode/edid-decode-188950472c19492547e298b27f9da0d72cf826df.tar.gz /out/edid-decode-188950472c19492547e298b27f9da0d72cf826df.tar.gz | ||
ADD https://github.com/linuxhw/build-stuff/releases/download/1.6/hw-probe-1.6-AI.tar.gz /out/hw-probe-1.6-AI.tar.gz | ||
ADD https://cloud-images.ubuntu.com/minimal/releases/jammy/release/ubuntu-22.04-minimal-cloudimg-amd64.img /out/ubuntu-22.04-minimal-cloudimg-amd64.img | ||
ADD https://github.com/tpm2-software/tpm2-tools/archive/5.2.tar.gz /out/5.2.tar.gz | ||
|
||
COPY make-raw verify grub.cfg.in UsbInvocationScript.txt ./ | ||
|
||
RUN tar -xf hw-probe-1.6-AI.tar.gz \ | ||
&& tar -xf ddcutil-1.2.2.tar.gz \ | ||
&& tar -xf edid-decode-188950472c19492547e298b27f9da0d72cf826df.tar.gz \ | ||
&& tar -xf 5.2.tar.gz \ | ||
&& rm -rf hw-probe-1.6-AI.tar.gz ddcutil-1.2.2.tar.gz 5.2.tar.gz \ | ||
edid-decode-188950472c19492547e298b27f9da0d72cf826df.tar.gz | ||
WORKDIR /out/edid-decode-188950472c19492547e298b27f9da0d72cf826df | ||
RUN make \ | ||
&& find . -type f | perl -lne "print if -B and -x" | xargs strip \ | ||
&& install -m 0755 edid-decode /out/usr/bin | ||
WORKDIR /out/ddcutil-1.2.2 | ||
RUN ./configure --prefix=/out/usr \ | ||
&& make \ | ||
&& find . -type f | perl -lne "print if -B and -x" | xargs strip \ | ||
&& make install | ||
WORKDIR /out/hw-probe-1.6-AI | ||
RUN install -m 755 hw-probe.pl /out/usr/bin/hw-probe \ | ||
&& sed -i "s/root\/HW_PROBE/tmp\/HW_PROBE/" /out/usr/bin/hw-probe | ||
WORKDIR /out/tpm2-tools-5.2 | ||
RUN ./bootstrap \ | ||
&& ./configure --prefix=/out/usr \ | ||
&& make -j"$(nproc)" \ | ||
&& make install | ||
# Before changing something here please take a look into the | ||
# images/rootfs.yml.in onboot section: the verification should | ||
# precede the storage-init container. | ||
# | ||
# now lets create an edge container | ||
# FIXME: 003-installer? why not linuxkit build? | ||
WORKDIR /eco/media/root-rw/root/containers/onboot/003-installer | ||
COPY runtime.json config.json ./ | ||
RUN mv /out rootfs | ||
# hadolint ignore=DL3003 | ||
RUN (cd /eco && find . -xdev | grep -v verification.img | sort | cpio --quiet -o -H newc) | gzip > rootfs/verification.img | ||
RUN mv rootfs /out | ||
|
||
# bootstrap Alpine's initrd | ||
WORKDIR / | ||
COPY initramfs-init.patch /tmp/ | ||
RUN patch -p1 < /tmp/initramfs-init.patch; \ | ||
echo /bin/grep >> /etc/mkinitfs/features.d/base.files; \ | ||
mkinitfs -n -o /out/initrd.img | ||
|
||
FROM scratch | ||
SHELL ["/bin/ash", "-eo", "pipefail", "-c"] | ||
|
||
COPY --from=build /out/ / | ||
|
||
ENTRYPOINT [ "/make-raw" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
usb_disable_secure_boot noreset; | ||
usb_one_time_boot usb nolog; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
org: lfedge | ||
image: mkverification-raw-efi | ||
config: | ||
binds: | ||
- /dev:/dev |
Oops, something went wrong.