First scan the supplied package list for missing packages. Then install them all in one go rather than one at a time. Significantly improves rootfs build time
286 lines
6.6 KiB
JSON
286 lines
6.6 KiB
JSON
{
|
|
"ImageName" : "Ubuntu_21_04",
|
|
"Guest_SHA256Sums" : "http://cdimage.ubuntu.com/ubuntu-base/releases/21.04/release/SHA256SUMS",
|
|
"Guest_BaseURL" : "http://cdimage.ubuntu.com/ubuntu-base/releases/21.04/release/",
|
|
"Guest_Image" : "ubuntu-base-21.04-base-amd64.tar.gz",
|
|
|
|
"Host_SHA256Sums" : "https://cloud-images.ubuntu.com/releases/focal/release/SHA256SUMS",
|
|
"Host_BaseURL" : "https://cloud-images.ubuntu.com/releases/focal/release/",
|
|
"Host_Image" : "ubuntu-20.04-server-cloudimg-amd64.img",
|
|
"QEmu" : "qemu-system-x86_64",
|
|
|
|
"PKGInstallCMD_CMT": [
|
|
"The package command used to install packages"
|
|
],
|
|
|
|
"PKGInstallCMD" : "/root/mega_install_packages.sh ",
|
|
|
|
"PackagesToAdd_CMT": [
|
|
"Which package names to install",
|
|
"Package installation happens just after the `Commands_InChroot` step",
|
|
"Package installation will install packages one by one",
|
|
"Uses the PKGInstallCMD and iterates over the list individually"
|
|
],
|
|
|
|
"PackagesToAdd" : [
|
|
"sudo",
|
|
"rsync",
|
|
"apt-utils",
|
|
"lsb-release",
|
|
"libc-bin",
|
|
"libc6:i386",
|
|
"dbus",
|
|
"systemd",
|
|
"pulseaudio",
|
|
"libgles1",
|
|
"libgles2",
|
|
"libglx-mesa0",
|
|
"libgl1-mesa-dri",
|
|
"libgl1-mesa-glx",
|
|
"libglu1-mesa",
|
|
"mesa-utils",
|
|
"mesa-utils-extra",
|
|
"libunwind8",
|
|
"libsdl1.2debian",
|
|
"libsdl2-2.0-0",
|
|
"protobuf-compiler",
|
|
"libprotobuf-c1",
|
|
"libprotobuf-lite17",
|
|
"libopenal1",
|
|
"libjpeg8",
|
|
"libjpeg8:i386",
|
|
"libjpeg62",
|
|
"libjpeg62:i386",
|
|
"libspeex1",
|
|
"libspeex1:i386",
|
|
"libvorbisfile3",
|
|
"libvorbisfile3:i386",
|
|
"libgles1:i386",
|
|
"libgles2:i386",
|
|
"libglx-mesa0:i386",
|
|
"libgl1-mesa-dri:i386",
|
|
"libgl1-mesa-glx:i386",
|
|
"libglu1-mesa:i386",
|
|
"libunwind8:i386",
|
|
"libsdl1.2debian:i386",
|
|
"libsdl2-2.0-0:i386",
|
|
"libpulse0:i368",
|
|
"libasound2-plugins:i386",
|
|
"usbutils",
|
|
"pciutils",
|
|
"libglew2.1",
|
|
"libxcb1",
|
|
"libxcb-cursor0",
|
|
"libxcb-imdkit1",
|
|
"libxcb-xrm0",
|
|
"libxcb-composite0",
|
|
"libxcb-dri2-0",
|
|
"libxcb-dri3-0",
|
|
"libxcb-dpms0",
|
|
"libxcb-glx0",
|
|
"libxcb-shm0",
|
|
"libxcb-damage0",
|
|
"libxcb-shape0",
|
|
"libxcb-xinput0",
|
|
"libxcb-icccm4",
|
|
"libxcb-image0",
|
|
"libxcb-util1",
|
|
"libxcb-keysyms1",
|
|
"libxcb-xinerama0",
|
|
"libxcb-xkb1",
|
|
"libxcb-render0",
|
|
"libxkbcommon-x11-0",
|
|
"libxcb1:i386",
|
|
"libxcb-cursor0:i386",
|
|
"libxcb-imdkit1:i386",
|
|
"libxcb-xrm0:i386",
|
|
"libxcb-composite0:i386",
|
|
"libxcb-dri2-0:i386",
|
|
"libxcb-dri3-0:i386",
|
|
"libxcb-dpms0:i386",
|
|
"libxcb-glx0:i386",
|
|
"libxcb-shm0:i386",
|
|
"libxcb-damage0:i386",
|
|
"libxcb-shape0:i386",
|
|
"libxcb-xinput0:i386",
|
|
"libxcb-icccm4:i386",
|
|
"libxcb-image0:i386",
|
|
"libxcb-util1:i386",
|
|
"libxcb-keysyms1:i386",
|
|
"libxcb-xinerama0:i386",
|
|
"libxcb-xkb1:i386",
|
|
"libxcb-render0:i386",
|
|
"libxkbcommon-x11-0:i386",
|
|
"libwayland-client0:i386",
|
|
"libwayland-dev:i386",
|
|
"libwayland-egl-backend-dev:i386",
|
|
"libx11-dev:i386",
|
|
"libxext-dev:i386",
|
|
"libxdamage-dev:i386",
|
|
"libx11-xcb-dev:i386",
|
|
"libxcb-present0:i386",
|
|
"libxshmfence1:i386",
|
|
"libxxf86vm1:i386",
|
|
"libxrandr2:i386",
|
|
"libllvm11",
|
|
"libllvm12",
|
|
"libllvm11:i386",
|
|
"libllvm12:i386",
|
|
"libva2",
|
|
"libva2:i386",
|
|
"libva-x11-2",
|
|
"libva-x11-2:i386",
|
|
"libharfbuzz0b",
|
|
"libharfbuzz0b:i386",
|
|
"libvdpau1",
|
|
"libvdpau1:i386",
|
|
"mesa-vdpau-drivers",
|
|
"mesa-vdpau-drivers:i386",
|
|
"libfuse2",
|
|
"libfuse2:i386",
|
|
"libopenal1",
|
|
"libopenal1:i386",
|
|
"locales",
|
|
"language-pack-en-base",
|
|
"mangohud",
|
|
"libnss3",
|
|
"renderdoc",
|
|
"libnspr4",
|
|
"python3",
|
|
"python3-apt",
|
|
"curl",
|
|
"xterm",
|
|
"zenity",
|
|
"xz-utils",
|
|
"xdg-desktop-portal",
|
|
"xdg-desktop-portal-gtk",
|
|
"wine64",
|
|
"wine32",
|
|
"vulkan-tools"
|
|
],
|
|
|
|
"CopyFiles_Stage0_CMT": [
|
|
"This stage copies files in to a temporary mount directory",
|
|
"This ties in to the Stage1 to allow you to copy files from git repo to rootfs",
|
|
"The filename here is the path relative to git repo base",
|
|
"File is copied over to temp folder with same name"
|
|
],
|
|
"CopyFiles_Stage0": [
|
|
"cross_x86",
|
|
"build_install_mesa.sh",
|
|
"mega_install_packages.sh",
|
|
"break_chroot.sh",
|
|
"unbreak_chroot.sh"
|
|
],
|
|
|
|
"CopyFiles_Stage1_CMT": [
|
|
"This copies the files from the stage0 mount location with to a location in the rootfs",
|
|
"First argument is the filename to copy from the temp folder",
|
|
"Second argument is the location inside the rootfs where to copy to"
|
|
],
|
|
|
|
"CopyFiles_Stage1": [
|
|
["cross_x86", "root/"],
|
|
["build_install_mesa.sh", "root/"],
|
|
["mega_install_packages.sh", "root/"],
|
|
["break_chroot.sh", "/"],
|
|
["unbreak_chroot.sh", "/"]
|
|
],
|
|
|
|
"Commands_Stage1_0_CMT": [
|
|
"This stage runs commands inside the qemu VM",
|
|
"Allows you to install packages that the VM requires and the rootfs doesn't"
|
|
],
|
|
"Commands_Stage1_0": [
|
|
"export DEBIAN_FRONTEND=noninteractive",
|
|
"apt-get update",
|
|
"apt-get install -y coreutils pigz"
|
|
],
|
|
|
|
"RemoveFiles_Stage1_CMT": [
|
|
"Removes files from the rootfs prior to chrooting",
|
|
"Some files are preconfiguring in the rootfs and need to be changed"
|
|
],
|
|
|
|
"RemoveFiles_Stage1": [
|
|
"/etc/hosts",
|
|
"/etc/resolv.conf"
|
|
],
|
|
|
|
"Commands_Stage1_CMT": [
|
|
"Executes commands in the VM prior to chrooting",
|
|
"Necessary to set up mounts that the rootfs needs"
|
|
],
|
|
|
|
"Commands_Stage1": [
|
|
"export ROOTFS=./RootFS",
|
|
"mount -t proc /proc $ROOTFS/proc/",
|
|
"mount --rbind --make-rslave /sys $ROOTFS/sys/",
|
|
"mount --rbind --make-rslave /dev $ROOTFS/dev/",
|
|
"mount --rbind --make-rslave /dev/pts $ROOTFS/dev/pts/"
|
|
],
|
|
|
|
"Commands_InChroot_CMT": [
|
|
"Executes commands inside the rootfs prior to installing packages",
|
|
"!!! After this step, packages are installed !!!"
|
|
],
|
|
|
|
"Commands_InChroot": [
|
|
"echo \"nameserver 8.8.8.8\" > /etc/resolv.conf",
|
|
"echo \"US/Eastern\" >/etc/timezone",
|
|
"ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime",
|
|
"chmod 1777 /tmp",
|
|
"export DEBIAN_FRONTEND=noninteractive",
|
|
"apt-get update",
|
|
"apt-get clean",
|
|
"dpkg --add-architecture i386",
|
|
"apt-get update",
|
|
"apt-get dist-upgrade -y"
|
|
],
|
|
|
|
"Commands_InChroot2_CMT": [
|
|
"Executes commands inside the rootfs immediately following package installation"
|
|
],
|
|
|
|
"Commands_InChroot2": [
|
|
"sh /root/build_install_mesa.sh",
|
|
"apt-get clean",
|
|
"rm -Rf /usr/local",
|
|
"ln -s . usr/local",
|
|
"sh ./break_chroot.sh"
|
|
],
|
|
|
|
"Commands_Stage2_CMT": [
|
|
"Executes commands in the VM after rootfs setup",
|
|
"Required to tear down state inside the rootfs"
|
|
],
|
|
|
|
"Commands_Stage2": [
|
|
"export ROOTFS=./RootFS",
|
|
"umount $ROOTFS/proc/",
|
|
"umount -R $ROOTFS/sys/",
|
|
"umount -R $ROOTFS/dev/pts/",
|
|
"umount -R $ROOTFS/dev/",
|
|
"rmdir $ROOTFS/proc",
|
|
"rmdir $ROOTFS/dev/pts",
|
|
"rmdir $ROOTFS/dev",
|
|
"rmdir $ROOTFS/sys",
|
|
"rm -Rf $ROOTFS/root/"
|
|
],
|
|
|
|
"RemoveFiles_Stage2": [
|
|
],
|
|
|
|
"RemoveDirs_Stage2": [
|
|
],
|
|
|
|
"Commands_Stage3": [
|
|
],
|
|
|
|
"Commands_PreInstall": [
|
|
],
|
|
|
|
"BinariesToInstall": [
|
|
]
|
|
}
|