Skip to content

Commit f116b7f

Browse files
committed
Import MNT build from josch
1 parent 522539d commit f116b7f

File tree

11 files changed

+91
-27
lines changed

11 files changed

+91
-27
lines changed

.github/workflows/test-build.yml

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,11 @@ jobs:
4545
matrix:
4646
host_release:
4747
- forky
48+
- bookworm
4849
- trixie
4950
extra_classes:
50-
- ""
51-
- "GRML_GHACI_CLOUD"
51+
- "REFORM"
5252
arch:
53-
- amd64
5453
- arm64
5554

5655
runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
@@ -74,19 +73,19 @@ jobs:
7473
path: |
7574
results-initial/*
7675
77-
- run: ./test/gha-build-iso.sh build-only-twice
78-
name: "Repack ISO twice on ${{matrix.host_release}} ${{matrix.arch}}${{matrix.extra_classes && format(' with {0}', matrix.extra_classes) || ''}}"
79-
env:
80-
HOST_RELEASE: ${{matrix.host_release}}
81-
EXTRA_CLASSES: ${{matrix.extra_classes}}
82-
ARCH: ${{matrix.arch}}
76+
# - run: ./test/gha-build-iso.sh build-only-twice
77+
# name: "Repack ISO twice on ${{matrix.host_release}} ${{matrix.arch}}${{matrix.extra_classes && format(' with {0}', matrix.extra_classes) || ''}}"
78+
# env:
79+
# HOST_RELEASE: ${{matrix.host_release}}
80+
# EXTRA_CLASSES: ${{matrix.extra_classes}}
81+
# ARCH: ${{matrix.arch}}
8382

84-
- name: Archive repacked ISO
85-
if: always()
86-
uses: actions/upload-artifact@v4
87-
with:
88-
name: grml-live-build-result-repack-${{matrix.host_release}}-${{matrix.arch}}${{matrix.extra_classes && format('-{0}', matrix.extra_classes) || ''}}
89-
if-no-files-found: error
90-
retention-days: 15
91-
path: |
92-
results-build-only-second/*
83+
# - name: Archive repacked ISO
84+
# if: always()
85+
# uses: actions/upload-artifact@v4
86+
# with:
87+
# name: grml-live-build-result-repack-${{matrix.host_release}}-${{matrix.arch}}${{matrix.extra_classes && format('-{0}', matrix.extra_classes) || ''}}
88+
# if-no-files-found: error
89+
# retention-days: 15
90+
# path: |
91+
# results-build-only-second/*

build-driver/build.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,8 @@ def install_debian_dependencies():
292292
git ,
293293
curl ,
294294
dosfstools ,
295+
e2fsprogs ,
296+
fdisk ,
295297
jo ,
296298
mmdebstrap ,
297299
moreutils ,
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Section "Device"
2+
Identifier "eDP-1"
3+
Driver "modesetting"
4+
Option "kmsdev" "/dev/dri/card0"
5+
Option "AccelMethod" "glamor"
6+
Option "Atomic" "On"
7+
EndSection
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Package: *
2+
Pin: origin "reform.debian.net"
3+
Pin-Priority: 999

config/files/REFORM/etc/apt/sources.list.d/.gitkeep

Whitespace-only changes.

config/hooks/REFORM/updatebase

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
set -u
4+
set -e
5+
6+
# shellcheck source=/dev/null
7+
. "$GRML_LIVE_CONFIG"
8+
9+
# FAI sets $target, but shellcheck does not know that.
10+
target=${target:?}
11+
12+
mkdir -p "$GRML_FAI_CONFIG"/files/REFORM/etc/apt/sources.list.d/
13+
/usr/lib/apt/apt-helper \
14+
download-file \
15+
https://reform.debian.net/reform_trixie.sources \
16+
"$GRML_FAI_CONFIG"/files/REFORM/etc/apt/sources.list.d/reform_trixie.sources \
17+
"SHA1:3d453dbf355beebf494ce6f61d2110b98e92fcf5"
18+
19+
# install all apt related files
20+
fcopy -M -i -B -v -r /etc/apt
21+
fcopy -M -i -B -v -r /usr/share/keyrings

config/package_config/REFORM

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
PACKAGES skip
2+
linux-image-arm64
3+
4+
PACKAGES install
5+
reform-tools
6+
linux-image-mnt-reform-arm64
7+
linux-headers-mnt-reform-arm64
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
set -eu
3+
fcopy -M -v /etc/X11/xorg.conf.d/etnaviv.conf

etc/grml/grml-live.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,5 +128,6 @@
128128

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

132133
## END OF FILE #################################################################

grml-live

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,7 @@ generate_build_info() {
931931
# }}}
932932

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

936936
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"
937937
EFI_ARGS="-eltorito-alt-boot -e boot/efi.img -no-emul-boot -isohybrid-gpt-basdat"
@@ -954,14 +954,20 @@ else
954954

955955
cap_timestamps "$BUILD_OUTPUT"
956956

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

966972
# do not continue on errors, otherwise we might generate/overwrite the ISO with dd if=... stuff
967973
if [ "$RC" != 0 ] ; then

0 commit comments

Comments
 (0)