2020-01-30 19:32:24 +03:00
|
|
|
#!/usr/bin/env python3
|
2017-09-05 05:11:54 +03:00
|
|
|
#
|
|
|
|
# Ubuntu i386 image
|
|
|
|
#
|
|
|
|
# Copyright 2017 Red Hat Inc.
|
|
|
|
#
|
|
|
|
# Authors:
|
|
|
|
# Fam Zheng <famz@redhat.com>
|
|
|
|
#
|
|
|
|
# This code is licensed under the GPL version 2 or later. See
|
|
|
|
# the COPYING file in the top-level directory.
|
|
|
|
#
|
|
|
|
|
|
|
|
import sys
|
|
|
|
import basevm
|
2020-07-01 16:56:20 +03:00
|
|
|
import ubuntuvm
|
2017-09-05 05:11:54 +03:00
|
|
|
|
2020-07-01 16:56:20 +03:00
|
|
|
DEFAULT_CONFIG = {
|
|
|
|
'install_cmds' : "apt-get update,"\
|
|
|
|
"apt-get build-dep -y qemu,"\
|
2020-08-13 16:58:50 +03:00
|
|
|
"apt-get install -y libfdt-dev language-pack-en ninja-build",
|
2020-07-01 16:56:20 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
class UbuntuX86VM(ubuntuvm.UbuntuVM):
|
2017-09-05 05:11:54 +03:00
|
|
|
name = "ubuntu.i386"
|
2018-10-13 03:40:30 +03:00
|
|
|
arch = "i386"
|
2020-07-01 16:56:20 +03:00
|
|
|
image_link="https://cloud-images.ubuntu.com/releases/bionic/"\
|
|
|
|
"release-20191114/ubuntu-18.04-server-cloudimg-i386.img"
|
|
|
|
image_sha256="28969840626d1ea80bb249c08eef1a4533e8904aa51a327b40f37ac4b4ff04ef"
|
2017-09-05 05:11:54 +03:00
|
|
|
BUILD_SCRIPT = """
|
|
|
|
set -e;
|
|
|
|
cd $(mktemp -d);
|
|
|
|
sudo chmod a+r /dev/vdb;
|
|
|
|
tar -xf /dev/vdb;
|
|
|
|
./configure {configure_opts};
|
2019-01-21 19:48:15 +03:00
|
|
|
make --output-sync {target} -j{jobs} {verbose};
|
2017-09-05 05:11:54 +03:00
|
|
|
"""
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
2020-07-01 16:56:20 +03:00
|
|
|
sys.exit(basevm.main(UbuntuX86VM, DEFAULT_CONFIG))
|