Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 17 additions & 18 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,11 @@ jobs:
matrix:
host_release:
- forky
- bookworm
- trixie
extra_classes:
- ""
- "GRML_GHACI_CLOUD"
- "REFORM"
arch:
- amd64
- arm64

runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
Expand All @@ -74,19 +73,19 @@ jobs:
path: |
results-initial/*

- run: ./test/gha-build-iso.sh build-only-twice
name: "Repack ISO twice on ${{matrix.host_release}} ${{matrix.arch}}${{matrix.extra_classes && format(' with {0}', matrix.extra_classes) || ''}}"
env:
HOST_RELEASE: ${{matrix.host_release}}
EXTRA_CLASSES: ${{matrix.extra_classes}}
ARCH: ${{matrix.arch}}
# - run: ./test/gha-build-iso.sh build-only-twice
# name: "Repack ISO twice on ${{matrix.host_release}} ${{matrix.arch}}${{matrix.extra_classes && format(' with {0}', matrix.extra_classes) || ''}}"
# env:
# HOST_RELEASE: ${{matrix.host_release}}
# EXTRA_CLASSES: ${{matrix.extra_classes}}
# ARCH: ${{matrix.arch}}

- name: Archive repacked ISO
if: always()
uses: actions/upload-artifact@v4
with:
name: grml-live-build-result-repack-${{matrix.host_release}}-${{matrix.arch}}${{matrix.extra_classes && format('-{0}', matrix.extra_classes) || ''}}
if-no-files-found: error
retention-days: 15
path: |
results-build-only-second/*
# - name: Archive repacked ISO
# if: always()
# uses: actions/upload-artifact@v4
# with:
# name: grml-live-build-result-repack-${{matrix.host_release}}-${{matrix.arch}}${{matrix.extra_classes && format('-{0}', matrix.extra_classes) || ''}}
# if-no-files-found: error
# retention-days: 15
# path: |
# results-build-only-second/*
2 changes: 2 additions & 0 deletions build-driver/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,8 @@ def install_debian_dependencies():
git ,
curl ,
dosfstools ,
e2fsprogs ,
fdisk ,
jo ,
mmdebstrap ,
moreutils ,
Expand Down
7 changes: 7 additions & 0 deletions config/files/REFORM/etc/X11/xorg.conf.d/etnaviv.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Section "Device"
Identifier "eDP-1"
Driver "modesetting"
Option "kmsdev" "/dev/dri/card0"
Option "AccelMethod" "glamor"
Option "Atomic" "On"
EndSection
3 changes: 3 additions & 0 deletions config/files/REFORM/etc/apt/preferences.d/reform.pref
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Package: *
Pin: origin "reform.debian.net"
Pin-Priority: 999
Empty file.
21 changes: 21 additions & 0 deletions config/hooks/REFORM/updatebase
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

set -u
set -e

# shellcheck source=/dev/null
. "$GRML_LIVE_CONFIG"

# FAI sets $target, but shellcheck does not know that.
target=${target:?}

mkdir -p "$GRML_FAI_CONFIG"/files/REFORM/etc/apt/sources.list.d/
/usr/lib/apt/apt-helper \
download-file \
https://reform.debian.net/reform_trixie.sources \
"$GRML_FAI_CONFIG"/files/REFORM/etc/apt/sources.list.d/reform_trixie.sources \
"SHA1:3d453dbf355beebf494ce6f61d2110b98e92fcf5"

# install all apt related files
fcopy -M -i -B -v -r /etc/apt
fcopy -M -i -B -v -r /usr/share/keyrings
7 changes: 7 additions & 0 deletions config/package_config/REFORM
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
PACKAGES skip
linux-image-arm64

PACKAGES install
reform-tools
linux-image-mnt-reform-arm64
linux-headers-mnt-reform-arm64
3 changes: 3 additions & 0 deletions config/scripts/REFORM/fcopy-etnaviv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
set -eu
fcopy -M -v /etc/X11/xorg.conf.d/etnaviv.conf
1 change: 1 addition & 0 deletions etc/grml/grml-live.conf
Original file line number Diff line number Diff line change
Expand Up @@ -128,5 +128,6 @@

# Do you want to add any additional bootoptions that should be used by default?
# DEFAULT_BOOTOPTIONS="ssh=secret"
DEFAULT_BOOTOPTIONS="cryptomgr.notests fbcon=font:TER16x32 console=tty1 no_console_suspend"

## END OF FILE #################################################################
24 changes: 15 additions & 9 deletions grml-live
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,7 @@ generate_build_info() {
# }}}

# ISO_OUTPUT - iso build {{{
[ -n "$ISO_NAME" ] || ISO_NAME="${GRML_NAME}_${VERSION}.iso"
[ -n "$ISO_NAME" ] || ISO_NAME="${GRML_NAME}_${VERSION}.img"

BOOT_ARGS="-no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -isohybrid-mbr ${CHROOT_OUTPUT}/usr/lib/ISOLINUX/isohdpfx.bin"
EFI_ARGS="-eltorito-alt-boot -e boot/efi.img -no-emul-boot -isohybrid-gpt-basdat"
Expand All @@ -954,14 +954,20 @@ else

cap_timestamps "$BUILD_OUTPUT"

log "$XORRISO_BINARY -as mkisofs -V '${GRML_NAME} ${VERSION}' -publisher 'grml-live | grml.org' -l -r -J $BOOT_ARGS $EFI_ARGS -o ${ISO_OUTPUT}/${ISO_NAME} ."
einfo "Generating ISO file..."
touch -d @"$SOURCE_DATE_EPOCH" "$BUILD_OUTPUT"/
# shellcheck disable=SC2086 # BOOT_ARGS and EFI_ARGS need splitting
"$XORRISO_BINARY" -as mkisofs -V "${GRML_NAME} ${VERSION}" -publisher 'grml-live | grml.org' \
-l -r -J $BOOT_ARGS $EFI_ARGS \
-o "${ISO_OUTPUT}/${ISO_NAME}" "$BUILD_OUTPUT"/ ; RC=$?
eend $RC
einfo "Generating ext4 disk image..."
/sbin/mke2fs -q -F -o Linux -E offset=16777216 -T ext4 -b 4096 -d "$BUILD_OUTPUT"/ "${ISO_OUTPUT}/${ISO_NAME}" 260000
eend $?
einfo "Resizing disk image to make space for MBR..."
truncate --size=+512 "${ISO_OUTPUT}/${ISO_NAME}"
eend $?
einfo "Making MBR ..."
MBRTMP=$(mktemp)
echo 'label: dos
start=32768, size=2080000, type=83' > "$MBRTMP"
cat "$MBRTMP"
/sbin/sfdisk "${ISO_OUTPUT}/${ISO_NAME}" < "$MBRTMP"
eend $?
rm -f "$MBRTMP"

# do not continue on errors, otherwise we might generate/overwrite the ISO with dd if=... stuff
if [ "$RC" != 0 ] ; then
Expand Down
15 changes: 15 additions & 0 deletions test/gha-build-iso.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,22 @@ run_build() {
&& git config --global --add safe.directory /source \
&& /source/build-driver/build /source ${build_mode} /source/${config_filename} ghaci $ARCH testing"

/usr/lib/apt/apt-helper \
download-file \
https://source.mnt.re/reform/reform-boundary-uboot/-/jobs/artifacts/2024-07-19/raw/imx8mq-mnt-reform2-flash.bin?job=build \
flash.bin \
"SHA1:60ecf649038ebd92bfb6676bdf746daa30825dbf"

sudo chmod -R a+rX results
sudo chmod -R a+rwX results/grml_isos

( set -e ; cd results &&
name=$(echo ./grml_isos/*.iso)
imgname=${name//.iso/.img}
dd if=../flash.bin of="${name}" oseek=66 bs=512 conv=notrunc
mv "${name}" "${imgname}"
)
rm flash.bin
sudo mv results "${results_directory}"
}

Expand Down