summaryrefslogtreecommitdiff
path: root/iso64
blob: 2dd93c78e4fb15211a632cb504e8315ddd61aff3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env bash

# Vasile needs root privileges and a proper kernel to run

kernelconfig
checkroot

makeisox64 () {
	# ISO layout
	mkdir -p "$coremntx64"
	mkdir -p "$isobootx64"
	mkdir -p "$isoefibootx64"
	# Mount && Sync squashed core (Kogaion stage4) into live environment
	mount -t squashfs "$chrootx64" "$coremntx64"
	rsync -aHAXr --progress "$coremntx64/" "$livedirx64/"
	# Put our kernel and initramfs in place
	cp -avx ""$livedirx64"/boot/"$kernelnamex64"" ""$isonamex64"/boot/"$releasename""
	cp -avx ""$livedirx64"/boot/"$ramfsnamex64"" ""$isonamex64"/boot/"$releasename".igz"
	# Checksum the kernel && initramfs
	sha256sum ""$isonamex64"/boot/"$releasename"" | tee ""$isonamex64"/boot/"$releasename".sha256"
	sha256sum ""$isonamex64"/boot/"$releasename.igz"" | tee ""$isonamex64"/boot/"$releasename".igz.sha256"
	# Squash live environment
	mksquashfs "$livedirx64" ""$livedirx64".squashfs" -b 1048576 -comp xz -Xdict-size 100%
	# Checksum the live environment
	sha256sum ""$livedirx64".squashfs" | tee ""$livedirx64".squashfs.sha256"
	# Remove live environment directory (we have it squashed now, no longer needed)
	rm -rf "$livedirx64"
	# Enable liveboot
	touch "$livedirx64"
	# Umount squashed core (Kogaion stage4)
	umount "$coremntx64"
}

main () {
	chrootchecksumx64
	makeisox64
}

main