Skip to content

Commit 7697dc7

Browse files
committed
Import MNT build from josch
1 parent 1bfb5d5 commit 7697dc7

File tree

11 files changed

+90
-35
lines changed

11 files changed

+90
-35
lines changed

.github/workflows/test-build.yml

Lines changed: 16 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -44,21 +44,11 @@ jobs:
4444
fail-fast: false
4545
matrix:
4646
host_release:
47-
- bookworm
4847
- trixie
4948
extra_classes:
50-
- ""
51-
- "GRML_GHACI_CLOUD"
49+
- "REFORM"
5250
arch:
53-
- amd64
5451
- arm64
55-
exclude:
56-
- host_release: bookworm
57-
extra_classes: "GRML_GHACI_CLOUD"
58-
- arch: arm64
59-
host_release: bookworm
60-
- arch: arm64
61-
extra_classes: "GRML_GHACI_CLOUD"
6252

6353
runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
6454
steps:
@@ -81,19 +71,19 @@ jobs:
8171
path: |
8272
results-initial/*
8373
84-
- run: ./test/gha-build-iso.sh build-only-twice
85-
name: "Repack ISO twice on ${{matrix.host_release}} ${{matrix.arch}}${{matrix.extra_classes && format(' with {0}', matrix.extra_classes) || ''}}"
86-
env:
87-
HOST_RELEASE: ${{matrix.host_release}}
88-
EXTRA_CLASSES: ${{matrix.extra_classes}}
89-
ARCH: ${{matrix.arch}}
74+
# - run: ./test/gha-build-iso.sh build-only-twice
75+
# name: "Repack ISO twice on ${{matrix.host_release}} ${{matrix.arch}}${{matrix.extra_classes && format(' with {0}', matrix.extra_classes) || ''}}"
76+
# env:
77+
# HOST_RELEASE: ${{matrix.host_release}}
78+
# EXTRA_CLASSES: ${{matrix.extra_classes}}
79+
# ARCH: ${{matrix.arch}}
9080

91-
- name: Archive repacked ISO
92-
if: always()
93-
uses: actions/upload-artifact@v4
94-
with:
95-
name: grml-live-build-result-repack-${{matrix.host_release}}-${{matrix.arch}}${{matrix.extra_classes && format('-{0}', matrix.extra_classes) || ''}}
96-
if-no-files-found: error
97-
retention-days: 15
98-
path: |
99-
results-build-only-second/*
81+
# - name: Archive repacked ISO
82+
# if: always()
83+
# uses: actions/upload-artifact@v4
84+
# with:
85+
# name: grml-live-build-result-repack-${{matrix.host_release}}-${{matrix.arch}}${{matrix.extra_classes && format('-{0}', matrix.extra_classes) || ''}}
86+
# if-no-files-found: error
87+
# retention-days: 15
88+
# path: |
89+
# 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
@@ -934,7 +934,7 @@ generate_build_info() {
934934
# }}}
935935

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

939939
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"
940940
EFI_ARGS="-eltorito-alt-boot -e boot/efi.img -no-emul-boot -isohybrid-gpt-basdat"
@@ -957,14 +957,20 @@ else
957957

958958
cap_timestamps "$BUILD_OUTPUT"
959959

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

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

0 commit comments

Comments
 (0)