summaryrefslogtreecommitdiff
path: root/iso32
blob: cd01cf84d6cbef6c3fd2928964b8a419002eef7a (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/env bash

# Vasile needs root privileges and a proper kernel to run

kernelconfig
checkroot

makeisox86 () {
	# create live iso layout
	mkdir -p "$isostagingdirx86"
	mkdir -p "$isobootdirx86"
	mkdir -p "$isoliveosdirx86"
	mkdir -p "$isosupersquashdirx86"
	# mount && copy our core stage 4 image
	mount -t squashfs "$chrootx86" "$isostagingdirx86"
	rsync -aHAXr --progress "$isostagingx86/" "$isosyncdirx86/"
	cp -avx ""$isosyncdirx86"/boot/"$isokernelnamex86"" ""$isorootdirx86"/boot/vmlinuz"
	sha256sum ""$isorootdirx86"/boot/vmlinuz" | tee ""$isorootdirx86"/boot/vmlinuz.sha256"
	# configure portage && give up control for package / desktop environment installation
	isostartx86
	isooverlaysx86
	isobuildsystemx86
	isochrootx86
	isostopx86
	# squash live environment
	mksquashfs "$isosyncdirx86" ""$isosyncdirx86".img" -b 1048576 -comp xz -Xdict-size 100%
	sha256sum ""$isosyncdirx86".img" | tee ""$isosyncdirx86".img.sha256"
	# move our squashed live environment on place
	mv ""$isosyncdirx86".img"  "$isosupersquashdirx86"
	# squash it again to be detected by dmsquash-live
	mksquashfs "$isosupersquashdirx86" "squashfs.img"
	# and again, move our double squashed live environment on place
	mv "squashfs.img" "$isoliveosdirx86"
}

bootcorex86 () {
	# configure live bootloader
	git clone https://gitlab.com/rogentos/boot-core.git "$bootcorepath"
	cp -avx "$bootcorefiles" "$isorootdirx86"
}

cleanupisox86 () {
	rm -rf "$isosyncdirx86"
	rm -rf "$bootcorepath"
	umount "$isostagingdirx86"
}

main () {
	chrootchecksumx86
	makeisox86
	bootcorex86
	cleanupisox86
}

main