Sed spaghetti
This commit is contained in:
		
							parent
							
								
									8a36467e8d
								
							
						
					
					
						commit
						9d6fbe48e8
					
				
					 1 changed files with 22 additions and 3 deletions
				
			
		
							
								
								
									
										25
									
								
								makefile
									
										
									
									
									
								
							
							
						
						
									
										25
									
								
								makefile
									
										
									
									
									
								
							| 
						 | 
					@ -28,6 +28,7 @@ mount: $(raw) umount
 | 
				
			||||||
	sudo mount /dev/loop1337p2 ./rootfs
 | 
						sudo mount /dev/loop1337p2 ./rootfs
 | 
				
			||||||
	sudo mount /dev/loop1337p1 ./boot
 | 
						sudo mount /dev/loop1337p1 ./boot
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Armbian signing keys
 | 
				
			||||||
get-keys:
 | 
					get-keys:
 | 
				
			||||||
	gpg --recv-keys DF00FAF1C577104B50BF1D0093D6889F9F0E78D5
 | 
						gpg --recv-keys DF00FAF1C577104B50BF1D0093D6889F9F0E78D5
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -36,11 +37,29 @@ umount:
 | 
				
			||||||
	-sudo umount -f ./boot
 | 
						-sudo umount -f ./boot
 | 
				
			||||||
	-sudo losetup -d /dev/loop1337
 | 
						-sudo losetup -d /dev/loop1337
 | 
				
			||||||
 | 
					
 | 
				
			||||||
create-image:
 | 
					uboot: mount
 | 
				
			||||||
	sudo dd if=/dev/loop1337 of=armbian.img bs=1M
 | 
						sudo cp boot/u-boot-s905x-s912 boot/u-boot.ext
 | 
				
			||||||
	sudo chown $(USER):$(USER) armbian.img
 | 
					
 | 
				
			||||||
 | 
					# Replace ^FDT with ^#FDT in boot/extlinux/extlinux.conf
 | 
				
			||||||
 | 
					# Uncomment "#FDT /dtb/amlogic/meson-gxl-s905x-p212.dtb"
 | 
				
			||||||
 | 
					extlinux: uboot
 | 
				
			||||||
 | 
						sudo sed -i 's/^FDT/#FDT/' boot/extlinux/extlinux.conf
 | 
				
			||||||
 | 
						sudo sed -i 's/^#FDT \/dtb\/amlogic\/meson-gxl-s905x-p212.dtb/FDT \/dtb\/amlogic\/meson-gxl-s905x-p212.dtb/' boot/extlinux/extlinux.conf
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					armbian.img.zst: extlinux
 | 
				
			||||||
 | 
						sudo dd if=/dev/loop1337 bs=1M | zstd -10 -fo $@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					build: armbian.img.zst
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					sign: armbian.img.zst
 | 
				
			||||||
 | 
						minisign -Sm $<
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Imbus personal key
 | 
				
			||||||
 | 
					verify:
 | 
				
			||||||
 | 
						minisign -Vm armbian.img.zst -P RWRzPhin2brRy61x/adSOnFyhdWRkC0i37VJrOrFjMy6M073Mdu7gZXO
 | 
				
			||||||
 | 
					
 | 
				
			||||||
clean: umount
 | 
					clean: umount
 | 
				
			||||||
	rm -f $(image) $(raw) $(image).asc $(readme) $(sig) $(sums) armbian.img *.txt *.sha
 | 
						rm -f $(image) $(raw) $(image).asc $(readme) $(sig) $(sums) armbian.img *.txt *.sha
 | 
				
			||||||
 | 
						rm -f armbian.img.zst armbian.img.zst.minisig
 | 
				
			||||||
	-rmdir ./rootfs
 | 
						-rmdir ./rootfs
 | 
				
			||||||
	-rmdir ./boot
 | 
						-rmdir ./boot
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue