Skip to content

Commit

Permalink
Merge branch 'master' into fix-ubuntu-20-non-hwe
Browse files Browse the repository at this point in the history
  • Loading branch information
mauromorales authored Oct 19, 2023
2 parents 4fc7be7 + 60b59da commit 642b1a9
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
16 changes: 8 additions & 8 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -431,11 +431,17 @@ base-image:
END


IF [ -e "/usr/bin/dracut" ]
RUN --no-cache kernel=$(ls /lib/modules | head -n1) && depmod -a "${kernel}"

IF [ -f "/usr/bin/dracut" ]
# Regenerate initrd if necessary
RUN --no-cache kernel=$(ls /lib/modules | head -n1) && depmod -a "${kernel}"
RUN --no-cache kernel=$(ls /lib/modules | head -n1) && dracut -f "/boot/initrd-${kernel}" "${kernel}" && ln -sf "initrd-${kernel}" /boot/initrd
END

IF [ -f "/sbin/mkinitfs" ]
# Proper config files with immucore and custom initrd should already be in there installled by framework
RUN --no-cache kernel=$(ls /lib/modules | head -n1) && mkinitfs -o /boot/initrd $kernel
END
END

# Set /boot/vmlinuz pointing to our kernel so kairos-agent can use it
Expand All @@ -444,12 +450,6 @@ base-image:
RUN rm -rf /boot/initramfs-*
END

# Cleanup for alpine as this gets installed as a side-effect
# we already provide a /boot/initrd with the luet package
IF [ -e "/boot/initramfs-lts" ]
RUN rm /boot/initramfs-lts
END

IF [ ! -e "/boot/vmlinuz" ]
IF [ -e "/boot/vmlinuz-lts" ]
# Alpine provides the kernel under this name
Expand Down
14 changes: 3 additions & 11 deletions framework-profile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,22 +80,14 @@ flavors:
- common-packages
- kairos-toolchain
- openrc
- alpine-init
alpine-arm-rpi:
- common-packages
- kairos-toolchain
- openrc
- alpine-init-rpi
# See https://github.com/kairos-io/packages/pull/67 for rationale
alpine-init:
packages:
- distro-kernel/alpine
alpine-init-rpi:
packages:
- distro-kernel/alpine-rpi
openrc:
packages:
- init-svc/openrc
- initrd/alpine
systemd-base:
packages:
- init-svc/systemd
Expand Down Expand Up @@ -147,9 +139,9 @@ repositories:
priority: 2
urls:
- "quay.io/kairos/packages"
reference: 20231018075943-repository.yaml
reference: 20231019093159-repository.yaml
- !!merge <<: *kairos
arch: arm64
urls:
- "quay.io/kairos/packages-arm64"
reference: 20231018075844-repository.yaml
reference: 20231019092540-repository.yaml
8 changes: 8 additions & 0 deletions images/Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,18 @@ RUN apk --no-cache add \
coreutils \
cryptsetup \
curl \
device-mapper-udev \
dbus \
dmidecode \
dosfstools \
e2fsprogs \
e2fsprogs-extra \
efibootmgr \
eudev \
eudev-hwids \
fail2ban \
findutils \
findmnt \
gawk \
gcompat \
gettext \
Expand Down Expand Up @@ -76,6 +79,7 @@ RUN apk --no-cache add \
rbd-nbd \
rng-tools \
rsync \
sgdisk \
smartmontools \
squashfs-tools \
strace \
Expand All @@ -88,6 +92,7 @@ RUN apk --no-cache add \
wireguard-tools \
wpa_supplicant \
xfsprogs \
xfsprogs-extra \
xz

###############################################################
Expand All @@ -100,12 +105,15 @@ RUN apk --no-cache add \
bonding \
bridge \
rbd-nbd
RUN apk --no-cache add linux-lts --no-scripts

FROM common as rpicommon
COPY rpi/config.txt /boot/config.txt

FROM rpicommon AS rpi3
RUN apk --no-cache add linux-rpi --no-scripts # use --no-scripts to avoid building initramfs
FROM rpicommon AS rpi4
RUN apk --no-cache add linux-rpi4 --no-scripts # use --no-scripts to avoid building initramfs


###############################################################
Expand Down

0 comments on commit 642b1a9

Please sign in to comment.