Use it to disable building unnecessary components on ARM and ARM64.
Remove the manual checks.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
You need to implement a few bash functions in the component script file:
+* component_skip
+return 0 if the component should be skipped, 1 if it should be enabled.
+It can be used to skip some components on platforms where they are not
+used, for example pvgrub on ARM.
+
* component_check_package
passes a list of build dependencies to check-package
#!/usr/bin/env bash
+function grub_skip() {
+ if [[ $RAISIN_ARCH != "x86_64" && $RAISIN_ARCH != "x86_32" ]]
+ then
+ return 0
+ else
+ return 1
+ fi
+}
+
function grub_check_package() {
local DEP_Debian_common="build-essential tar autoconf bison flex"
local DEP_Debian_x86_32="$DEP_Debian_common"
local DEP_CentOS_x86_32="$DEP_Fedora_x86_32"
local DEP_CentOS_x86_64="$DEP_Fedora_x86_64"
-
- if [[ $RAISIN_ARCH != "x86_64" && $RAISIN_ARCH != "x86_32" ]]
- then
- verbose_echo grub is only supported on x86_32 and x86_64
- return
- fi
verbose_echo Checking Grub dependencies
eval check-package \$DEP_"$DISTRO"_"$RAISIN_ARCH"
}
function grub_build() {
- if [[ $RAISIN_ARCH != "x86_64" && $RAISIN_ARCH != "x86_32" ]]
- then
- verbose_echo grub is only supported on x86_32 and x86_64
- return
- fi
-
cd "$BASEDIR"
rm -f memdisk.tar
tar cf memdisk.tar -C data grub.cfg
#!/usr/bin/env bash
+function libvirt_skip() {
+ return 1
+}
+
function libvirt_check_package() {
local DEP_Debian_common="build-essential libtool autoconf autopoint \
xsltproc libxml2-utils pkg-config python-dev \
#!/usr/bin/env bash
+function linux_skip() {
+ return 1
+}
+
function linux_check_package() {
local DEP_Debian_common="build-essential bc openssl"
local DEP_Debian_x86_32="$DEP_Debian_common"
#!/usr/bin/env bash
+function ovmf_skip() {
+ if [[ $RAISIN_ARCH != "x86_64" && $RAISIN_ARCH != "x86_32" ]]
+ then
+ return 0
+ else
+ return 1
+ fi
+}
+
function ovmf_check_package() {
local DEP_Debian_common="build-essential nasm uuid-dev python iasl"
local DEP_Debian_x86_32="$DEP_Debian_common"
local DEP_Fedora_x86_32="$DEP_Fedora_common"
local DEP_Fedora_x86_64="$DEP_Fedora_common"
-
- if [[ $RAISIN_ARCH != "x86_64" ]]
- then
- verbose_echo ovmf is only supported on x86_64
- return
- fi
verbose_echo Checking OVMF dependencies
eval check-package \$DEP_"$DISTRO"_"$RAISIN_ARCH"
}
function ovmf_build() {
- if [[ $RAISIN_ARCH != "x86_64" ]]
- then
- verbose_echo ovmf is only supported on x86_64
- return
- fi
-
cd "$BASEDIR"
git-checkout $OVMF_URL $OVMF_REVISION ovmf-dir
cd ovmf-dir
#!/usr/bin/env bash
+function qemu_skip() {
+ return 1
+}
+
function qemu_check_package() {
local DEP_Debian_common="build-essential libglib2.0-dev libpixman-1-dev"
local DEP_Debian_x86_32="$DEP_Debian_common"
#!/usr/bin/env bash
+function qemu_traditional_skip() {
+ if [[ $RAISIN_ARCH != "x86_64" && $RAISIN_ARCH != "x86_32" ]]
+ then
+ return 0
+ else
+ return 1
+ fi
+}
+
function qemu_traditional_check_package() {
local DEP_Debian_common="build-essential zlib1g-dev pciutils-dev pkg-config \
libncurses5-dev"
local DEP_Fedora_x86_32="$DEP_Fedora_common"
local DEP_Fedora_x86_64="$DEP_Fedora_common"
- if [[ $RAISIN_ARCH != "x86_64" && $RAISIN_ARCH != "x86_32" ]]
- then
- verbose_echo qemu_traditional is only supported on x86_32 and x86_64
- return
- fi
-
verbose_echo Checking QEMU dependencies
eval check-package \$DEP_"$DISTRO"_"$RAISIN_ARCH"
}
function qemu_traditional_build() {
- if [[ $RAISIN_ARCH != "x86_64" && $RAISIN_ARCH != "x86_32" ]]
- then
- verbose_echo qemu_traditional is only supported on x86_32 and x86_64
- return
- fi
-
cd "$BASEDIR"
git-checkout $QEMU_TRADITIONAL_URL $QEMU_TRADITIONAL_REVISION qemu_traditional-dir
cd qemu_traditional-dir
#!/usr/bin/env bash
+function seabios_skip() {
+ if [[ $RAISIN_ARCH != "x86_64" && $RAISIN_ARCH != "x86_32" ]]
+ then
+ return 0
+ else
+ return 1
+ fi
+}
+
function seabios_check_package() {
local DEP_Debian_common="build-essential iasl"
local DEP_Debian_x86_32="$DEP_Debian_common"
local DEP_Fedora_x86_32="$DEP_Fedora_common"
local DEP_Fedora_x86_64="$DEP_Fedora_common"
-
- if [[ $RAISIN_ARCH != "x86_64" && $RAISIN_ARCH != "x86_32" ]]
- then
- verbose_echo seabios is only supported on x86_32 and x86_64
- return
- fi
verbose_echo Checking SeaBIOS dependencies
eval check-package \$DEP_"$DISTRO"_"$RAISIN_ARCH"
}
function seabios_build() {
- if [[ $RAISIN_ARCH != "x86_64" && $RAISIN_ARCH != "x86_32" ]]
- then
- verbose_echo seabios is only supported on x86_32 and x86_64
- return
- fi
-
cd "$BASEDIR"
git-checkout $SEABIOS_URL $SEABIOS_REVISION seabios-dir
cd seabios-dir
#!/usr/bin/env bash
+function xen_skip() {
+ return 1
+}
+
function xen_check_package() {
local DEP_Debian_common="build-essential python-dev gettext uuid-dev \
libncurses5-dev libyajl-dev libaio-dev pkg-config libglib2.0-dev \
break
fi
done
- if ! $found
+ if ! $found || "$component"_skip
then
verbose_echo "$component" is disabled
continue