Skip to content

Commit 4b6a612

Browse files
committed
Add 3.20 toltec support
* Base on mmcblk2 fix * Ensure home is mounted * Use bootstrap with updated wget
1 parent 8d9e51c commit 4b6a612

3 files changed

Lines changed: 11 additions & 6 deletions

File tree

.github/workflows/docker-image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
- version: '3.8.2.1965'
6060
target: qemu-toltec
6161
- version: '3.20.0.92'
62-
target: qemu-base
62+
target: qemu-toltec
6363

6464
steps:
6565
- name: Set up Docker Buildx

Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,15 @@ CMD run_vm -nographic
109109

110110
FROM qemu-base AS qemu-toltec
111111

112+
# Install toltec:
113+
# * Firsts make sure the time is synced, so https works correctly.
114+
# * Next, make sure home is mounted, as xochitl does it since they introduced encrypted data.
115+
# * Finally, download and run the bootstrap script.
112116
RUN run_vm -serial null -daemonize && \
113117
wait_ssh && \
114118
in_vm 'while ! timedatectl status | grep "synchronized: yes"; do sleep 1; done' && \
115-
in_vm wget https://raw.githubusercontent.com/toltec-dev/toltec/testing/scripts/bootstrap/bootstrap && \
119+
in_vm 'systemctl is-active home.mount || mount /dev/mmcblk2p4 /home' && \
120+
in_vm wget https://raw.githubusercontent.com/timower/toltec/refs/heads/feat/wget-update/scripts/bootstrap/bootstrap && \
116121
in_vm env bash bootstrap --force && \
117122
save_vm
118123

make_rootfs.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ FW_VERSION=${2:-""}
77

88
# Extract major.minor version for comparison
99
get_version_parts() {
10-
echo "$1" | cut -d '.' -f 1,2
10+
echo "$1" | cut -d '.' -f 1,2
1111
}
1212

1313
# Check if firmware version is >= 3.12
@@ -54,14 +54,14 @@ GFS
5454

5555
# Handle dhcpcd.service modification for firmware versions < 3.12
5656
if ! should_skip_dhcpcd; then
57-
echo "Modifying dhcpcd.service for firmware version $FW_VERSION"
58-
guestfish --rw --add rootfs.qcow2 <<DHCPCD_GFS
57+
echo "Modifying dhcpcd.service for firmware version $FW_VERSION"
58+
guestfish --rw --add rootfs.qcow2 <<DHCPCD_GFS
5959
run
6060
mount /dev/sda2 /
6161
download /lib/systemd/system/dhcpcd.service /tmp/dhcpcd.service
6262
! sed -i 's/wlan/eth/' /tmp/dhcpcd.service
6363
upload /tmp/dhcpcd.service /lib/systemd/system/dhcpcd.service
6464
DHCPCD_GFS
6565
else
66-
echo "Skipping dhcpcd.service modification for firmware version $FW_VERSION (>= 3.12)"
66+
echo "Skipping dhcpcd.service modification for firmware version $FW_VERSION (>= 3.12)"
6767
fi

0 commit comments

Comments
 (0)