initial
This commit is contained in:
commit
67a8a700a3
1 changed files with 46 additions and 0 deletions
46
makefile
Normal file
46
makefile
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
rel := https://k-space.ee.armbian.com/archive/aml-s9xx-box/archive/Armbian_23.11.1_Aml-s9xx-box_bookworm_current_6.1.63.img.xz
|
||||||
|
readme := https://k-space.ee.armbian.com/archive/aml-s9xx-box/archive/Armbian_23.11.1_Aml-s9xx-box_bookworm_current_6.1.63.img.txt
|
||||||
|
sig := https://k-space.ee.armbian.com/archive/aml-s9xx-box/archive/Armbian_23.11.1_Aml-s9xx-box_bookworm_current_6.1.63.img.xz.asc
|
||||||
|
sums := https://k-space.ee.armbian.com/archive/aml-s9xx-box/archive/Armbian_23.11.1_Aml-s9xx-box_bookworm_current_6.1.63.img.xz.sha
|
||||||
|
|
||||||
|
image := $(shell echo $(rel) | sed 's/.*\///')
|
||||||
|
raw := $(shell echo $(image) | sed 's/\.xz//')
|
||||||
|
|
||||||
|
$(image):
|
||||||
|
curl -O $(readme)
|
||||||
|
curl -O $(sig)
|
||||||
|
curl -O $(sums)
|
||||||
|
curl -O $(rel)
|
||||||
|
|
||||||
|
verify: $(image) $(image).asc
|
||||||
|
gpg --verify $(image).asc $(image)
|
||||||
|
|
||||||
|
$(raw): $(image)
|
||||||
|
xz -dk $(image)
|
||||||
|
|
||||||
|
mount: $(raw) umount
|
||||||
|
mkdir -p ./rootfs
|
||||||
|
mkdir -p ./boot
|
||||||
|
chmod 777 ./rootfs
|
||||||
|
chmod 777 ./boot
|
||||||
|
sudo losetup /dev/loop1337 $(raw)
|
||||||
|
sudo partprobe /dev/loop1337
|
||||||
|
sudo mount /dev/loop1337p2 ./rootfs
|
||||||
|
sudo mount /dev/loop1337p1 ./boot
|
||||||
|
|
||||||
|
get-keys:
|
||||||
|
gpg --recv-keys DF00FAF1C577104B50BF1D0093D6889F9F0E78D5
|
||||||
|
|
||||||
|
umount:
|
||||||
|
-sudo umount -f ./rootfs
|
||||||
|
-sudo umount -f ./boot
|
||||||
|
-sudo losetup -d /dev/loop1337
|
||||||
|
|
||||||
|
create-image:
|
||||||
|
sudo dd if=/dev/loop1337 of=armbian.img bs=1M
|
||||||
|
sudo chown $(USER):$(USER) armbian.img
|
||||||
|
|
||||||
|
clean: umount
|
||||||
|
rm -f $(image) $(raw) $(image).asc $(readme) $(sig) $(sums) armbian.img *.txt *.sha
|
||||||
|
-rmdir ./rootfs
|
||||||
|
-rmdir ./boot
|
Loading…
Reference in a new issue