Skip to content

Commit b860f5f

Browse files
committed
upgrade Makefile to latest version
1 parent 7e15287 commit b860f5f

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

Makefile

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
.PHONY: get-deb clean-deb clean-images clean-tools clean install-dependencies
22

3+
SOURCE_FILE = images/source.xz
4+
SOURCE_URL = https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2024-10-28/2024-10-22-raspios-bookworm-arm64-lite.img.xz
5+
36
clean: clean-deb clean-images clean-tools
47
@echo "Deleted all build targets"
58

@@ -22,17 +25,22 @@ get-deb: clean-deb
2225

2326

2427
images/source.img:
25-
wget -O images/source.zip https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2022-01-28/2022-01-28-raspios-bullseye-armhf-lite.zip
26-
unzip images/source.zip -d images/
27-
rm images/source.zip
28-
mv images/2022-01-28-raspios-bullseye-armhf-lite.img images/source.img
28+
@echo "Checking if $(SOURCE_FILE) exists..."
29+
@if [ ! -f $(SOURCE_FILE) ]; then \
30+
echo "$(SOURCE_FILE) not found. Downloading..."; \
31+
wget -O $(SOURCE_FILE) $(SOURCE_URL); \
32+
else \
33+
echo "$(SOURCE_FILE) already exists. Skipping download."; \
34+
fi
35+
unxz -c $(SOURCE_FILE) > images/source.img
36+
rm $(SOURCE_FILE)
2937

3038
pimod:
31-
git clone --depth=1 https://github.com/Nature40/pimod.git -b v0.6.0
39+
git clone --depth=1 https://github.com/Nature40/pimod.git -b v0.6.1
3240

3341
install-dependencies:
3442
sudo apt-get update -y
35-
sudo apt-get install -y binfmt-support fdisk file kpartx qemu qemu-user-static unzip p7zip-full wget xz-utils units
43+
sudo apt-get install -y binfmt-support fdisk file kpartx qemu-utils qemu-user-static unzip p7zip-full wget xz-utils units
3644
$(MAKE) pimod
3745

3846
images/base.img:

0 commit comments

Comments
 (0)