diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml index 55588f629..1f5d3c915 100644 --- a/.github/workflows/test-build.yml +++ b/.github/workflows/test-build.yml @@ -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' }} @@ -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/* diff --git a/build-driver/build.py b/build-driver/build.py index 3d5bf611f..b3eba49fb 100755 --- a/build-driver/build.py +++ b/build-driver/build.py @@ -292,6 +292,8 @@ def install_debian_dependencies(): git , curl , dosfstools , + e2fsprogs , + fdisk , jo , mmdebstrap , moreutils , diff --git a/config/files/REFORM/etc/X11/xorg.conf.d/etnaviv.conf b/config/files/REFORM/etc/X11/xorg.conf.d/etnaviv.conf new file mode 100644 index 000000000..13515cec9 --- /dev/null +++ b/config/files/REFORM/etc/X11/xorg.conf.d/etnaviv.conf @@ -0,0 +1,7 @@ +Section "Device" + Identifier "eDP-1" + Driver "modesetting" + Option "kmsdev" "/dev/dri/card0" + Option "AccelMethod" "glamor" + Option "Atomic" "On" +EndSection diff --git a/config/files/REFORM/etc/apt/preferences.d/reform.pref b/config/files/REFORM/etc/apt/preferences.d/reform.pref new file mode 100644 index 000000000..635565d9b --- /dev/null +++ b/config/files/REFORM/etc/apt/preferences.d/reform.pref @@ -0,0 +1,3 @@ +Package: * +Pin: origin "reform.debian.net" +Pin-Priority: 999 diff --git a/config/files/REFORM/etc/apt/sources.list.d/.gitkeep b/config/files/REFORM/etc/apt/sources.list.d/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/config/hooks/REFORM/updatebase b/config/hooks/REFORM/updatebase new file mode 100755 index 000000000..41a2371d3 --- /dev/null +++ b/config/hooks/REFORM/updatebase @@ -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 diff --git a/config/package_config/REFORM b/config/package_config/REFORM new file mode 100644 index 000000000..358d8cc77 --- /dev/null +++ b/config/package_config/REFORM @@ -0,0 +1,7 @@ +PACKAGES skip +linux-image-arm64 + +PACKAGES install +reform-tools +linux-image-mnt-reform-arm64 +linux-headers-mnt-reform-arm64 diff --git a/config/scripts/REFORM/fcopy-etnaviv b/config/scripts/REFORM/fcopy-etnaviv new file mode 100755 index 000000000..d73926386 --- /dev/null +++ b/config/scripts/REFORM/fcopy-etnaviv @@ -0,0 +1,3 @@ +#!/bin/sh +set -eu +fcopy -M -v /etc/X11/xorg.conf.d/etnaviv.conf diff --git a/etc/grml/grml-live.conf b/etc/grml/grml-live.conf index a577512ab..6348b89cd 100644 --- a/etc/grml/grml-live.conf +++ b/etc/grml/grml-live.conf @@ -114,5 +114,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 ################################################################# diff --git a/grml-live b/grml-live index 6c1b390a7..f84c672f6 100755 --- a/grml-live +++ b/grml-live @@ -934,7 +934,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" EFI_ARGS="-eltorito-alt-boot -e boot/efi.img -no-emul-boot -isohybrid-gpt-basdat" @@ -960,14 +960,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 diff --git a/test/gha-build-iso.sh b/test/gha-build-iso.sh index 1ff54dd23..8cd0c078a 100755 --- a/test/gha-build-iso.sh +++ b/test/gha-build-iso.sh @@ -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}" }