Skip to content
This repository has been archived by the owner on Dec 31, 2021. It is now read-only.

Commit

Permalink
alpine: build and install asrockrack bios kernel module
Browse files Browse the repository at this point in the history
This kernel module is required by the BIOSControl utility
which is to be used to get/set biosconfiguration on Asrockrack hardware

Add BIOSControl utility into git lfs

Signed-off-by: Joel Rebello <jrebello@packet.com>
  • Loading branch information
joelrebel authored and ScottGarman committed Oct 7, 2021
1 parent 8f09258 commit c175d4c
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
docker/lfs/* filter=lfs diff=lfs merge=lfs -text
installer/alpine/assets-*/* filter=lfs diff=lfs merge=lfs -text
installer/alpine/eclypsiumdriver-alpine-* filter=lfs diff=lfs merge=lfs -text
installer/alpine/BIOSControl_v1.0.3.zip filter=lfs diff=lfs merge=lfs -text
3 changes: 3 additions & 0 deletions installer/alpine/BIOSControl_v1.0.3.zip
Git LFS file not shown
18 changes: 18 additions & 0 deletions installer/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ RUN true && \
coreutils \
linux-headers \
sudo \
unzip \
&& \
adduser -G abuild -g "Alpine Package Builder" -s /bin/ash -D builder && \
echo "builder ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \
Expand Down Expand Up @@ -89,6 +90,23 @@ RUN echo "${ECLYPSIUM_DRIVER_SHA512} ${ECLYPSIUM_DRIVER_FILENAME}" | sha512sum
sudo apk add --no-scripts --no-cache --update --upgrade --cache-dir /tmp/non-persisted-apk-cache-dir \
/home/builder/packages/non-free/x86_64/eclypsium*.apk

# Build and install the ASRR BIOS utility and kernel module
ARG ASRR_BIOS_DRIVER_VERSION=1.0
ARG ASRR_BIOS_DRIVER_SHA512=5dbb458dd105d872f61f0256ec1a57c5de922328a23cd42e636b35c5bbda7e1e1d957b271de76b49345c35a55a97845842de106aea61f930ac440ad6e21f344a
ARG ASRR_BIOS_DRIVER_FILENAME="BIOSControl_v1.0.3.zip"

COPY ${ASRR_BIOS_DRIVER_FILENAME} /home/builder/
RUN echo "${ASRR_BIOS_DRIVER_SHA512} ${ASRR_BIOS_DRIVER_FILENAME}" | sha512sum -c && \
unzip ${ASRR_BIOS_DRIVER_FILENAME} && \
# def for 5.x kernel build
echo '#define LINUX_VERSION_500 0' > driver/ver.h && \
# build module
make -C /lib/modules/${KERNEL}-${PKGREL}-${FLAVOR}/build M=/home/builder/driver && \
# install module
sudo install -D -m 600 driver/asrdev.ko /lib/modules/${KERNEL}-${PKGREL}-${FLAVOR}/extra/ && \
# clean up
rm -rf /home/builder/BIOSControl /home/builder/driver /home/builder/ReadMe.txt

# Remove built and installed packages, these never get installed at runtime
RUN rm -rf /home/builder/packages/*

Expand Down
5 changes: 5 additions & 0 deletions installer/alpine/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ set -o errexit -o nounset -o pipefail -o xtrace
[[ $(uname -m) == aarch64 ]] && echo "aarch64 isn't _really_ tested/supported yet" && exit 1

build_initramfs() {
# Asrockrack kernel module
cat >/etc/mkinitfs/features.d/asrockrack.modules <<-EOF
extra/asrdev.ko
EOF

# Eclypsium driver and supporting modules (IPMI)
cat >/etc/mkinitfs/features.d/eclypsium.modules <<-EOF
extra/eclypsiumdriver.ko
Expand Down

0 comments on commit c175d4c

Please sign in to comment.