Skip to content

Commit cde32d3

Browse files
committed
add warning to patched boards and detect the host arch
1 parent abac2cc commit cde32d3

3 files changed

Lines changed: 31 additions & 4 deletions

File tree

.github/workflows/build-image.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ jobs:
2626
uses: actions/checkout@v4
2727

2828
- name: run build
29-
run: sudo DEBUG=1 ./build_complete.sh ${{ matrix.board }} compress_img=1 quiet=1
29+
run: |
30+
sudo apt-get update
31+
sudo apt-get upgrade -y
32+
sudo DEBUG=1 ./build_complete.sh ${{ matrix.board }} compress_img=1 quiet=1
3033
3134
- name: upload img
3235
uses: actions/upload-artifact@v4

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,15 @@ Any writes to the squashfs will persist, but they will not be compressed when sa
165165

166166
On the regular XFCE4 image, this brings the rootfs size down to 1.2GB from 3.5GB.
167167

168+
#### I can't connect to some wifi networks.
169+
You may have to run these commands in order to connect to certain networks:
170+
```
171+
$ nmcli connection edit <your connection name>
172+
> set 802-11-wireless-security.pmf disable
173+
> save
174+
> activate
175+
```
176+
168177
## Copyright:
169178
Shimboot is licensed under the [GNU GPL v3](https://www.gnu.org/licenses/gpl-3.0.txt). Unless otherwise indicated, all code has been written by me, [ading2210](https://github.com/ading2210).
170179

build_complete.sh

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,38 @@ data_dir="${args['data_dir']}"
3131
arch="${args['arch']-amd64}"
3232
release="${args['release']-bookworm}"
3333

34+
#a list of all arm board names
3435
arm_boards="
3536
corsola hana jacuzzi kukui strongbad nyan-big kevin bob
3637
veyron-speedy veyron-jerry veyron-minnie scarlet elm
3738
kukui peach-pi peach-pit stumpy daisy-spring
3839
"
39-
if grep -q "$board" <<< "$arm_boards"; then
40+
#a list of shims that have a patch for the sh1mmer vulnerability
41+
bad_boards="reef sand snappy pyro"
42+
if grep -q "$board" <<< "$arm_boards" > /dev/null; then
4043
print_info "automatically detected arm64 device name"
4144
arch="arm64"
4245
fi
46+
if grep -q "$board" <<< "$bad_boards" > /dev/null; then
47+
print_error "Warning: you are attempting to build Shimboot for a board which has a shim that includes a fix for the sh1mmer vulnerability. The resulting image will not boot if you are enrolled."
48+
read -p "Press [enter] to continue "
49+
fi
50+
51+
kernel_arch="$(uname -m)"
52+
host_arch="unknown"
53+
if [ "$kernel_arch" = "x86_64" ]; then
54+
host_arch="amd64"
55+
elif [ "$kernel_arch" = "aarch64" ]; then
56+
host_arch="arm64"
57+
fi
4358

4459
needed_deps="wget python3 unzip zip git debootstrap cpio binwalk pcregrep cgpt mkfs.ext4 mkfs.ext2 fdisk depmod findmnt lz4 pv"
4560
if [ "$(check_deps "$needed_deps")" ]; then
4661
#install deps automatically on debian and ubuntu
4762
if [ -f "/etc/debian_version" ]; then
4863
print_title "attempting to install build deps"
49-
apt-get install wget python3-all unzip zip debootstrap cpio binwalk pcregrep cgpt kmod pv lz4 -y
50-
if [ "$arch" = "arm64" ]; then
64+
apt-get install wget python3 unzip zip debootstrap cpio binwalk pcregrep cgpt kmod pv lz4 -y
65+
if [ "$arch" != "$host_arch" ]; then
5166
apt-get install qemu-user-static binfmt-support -y
5267
fi
5368
fi

0 commit comments

Comments
 (0)