summaryrefslogtreecommitdiff
path: root/iso32
blob: 339601c15b0f058e76dfd093b5c8e947440a37b4 (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
#!/usr/bin/env bash

# Vasile needs root privileges and a proper kernel to run

kernelconfig
checkroot

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

main () {
	chrootchecksumx86
	makeisox86
}

main