summaryrefslogtreecommitdiff
path: root/imagebuild
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-05-25 22:30:12 +0000
committerGerrit Code Review <review@openstack.org>2017-05-25 22:30:12 +0000
commit7dbe9b5bedfe1eca8dd0f0218a186c5b7ebee85d (patch)
treea399ae0678423922a66dc94e9faf44a8b6da7bb0 /imagebuild
parent73a884fc41c3d28f56006db6f186bcdb1c2c97df (diff)
parent6950e6030d9f439c981b574da93e965c0c90cdc8 (diff)
downloadironic-python-agent-7dbe9b5bedfe1eca8dd0f0218a186c5b7ebee85d.tar.gz
Merge "Add option for building IPMItool into TinyIPA"
Diffstat (limited to 'imagebuild')
-rw-r--r--imagebuild/tinyipa/.gitignore1
-rwxr-xr-ximagebuild/tinyipa/build-tinyipa.sh14
-rwxr-xr-ximagebuild/tinyipa/finalise-tinyipa.sh7
3 files changed, 20 insertions, 2 deletions
diff --git a/imagebuild/tinyipa/.gitignore b/imagebuild/tinyipa/.gitignore
index cd28c77a..1e6b193f 100644
--- a/imagebuild/tinyipa/.gitignore
+++ b/imagebuild/tinyipa/.gitignore
@@ -5,6 +5,7 @@ tinyipabuild
tinyipafinal
*.vmlinuz
vmlinuz64
+*.sha256
*.iso
*.tcz*
squashfs-root
diff --git a/imagebuild/tinyipa/build-tinyipa.sh b/imagebuild/tinyipa/build-tinyipa.sh
index 099aa746..9ceda434 100755
--- a/imagebuild/tinyipa/build-tinyipa.sh
+++ b/imagebuild/tinyipa/build-tinyipa.sh
@@ -7,6 +7,7 @@ BUILDDIR="$WORKDIR/tinyipabuild"
BUILD_AND_INSTALL_TINYIPA=${BUILD_AND_INSTALL_TINYIPA:-false}
TINYCORE_MIRROR_URL=${TINYCORE_MIRROR_URL:-}
TINYIPA_REQUIRE_BIOSDEVNAME=${TINYIPA_REQUIRE_BIOSDEVNAME:-false}
+TINYIPA_REQUIRE_IPMITOOL=${TINYIPA_REQUIRE_IPMITOOL:-true}
CHROOT_PATH="/tmp/overides:/usr/local/sbin:/usr/local/bin:/apps/bin:/usr/sbin:/usr/bin:/sbin:/bin"
CHROOT_CMD="sudo chroot $BUILDDIR /usr/bin/env -i PATH=$CHROOT_PATH http_proxy=$http_proxy https_proxy=$https_proxy no_proxy=$no_proxy"
@@ -58,12 +59,15 @@ sudo sh -c "echo $TINYCORE_MIRROR_URL > $BUILDDIR/opt/tcemirror"
# Download get-pip into ramdisk
( cd "$BUILDDIR/tmp" && wget https://bootstrap.pypa.io/get-pip.py )
-# Download TGT, Qemu-utils, and Biosdevname source
+# Download TGT, Qemu-utils, Biosdevname and IPMItool source
clone_and_checkout "https://github.com/fujita/tgt.git" "${BUILDDIR}/tmp/tgt" "v1.0.62"
clone_and_checkout "https://github.com/qemu/qemu.git" "${BUILDDIR}/tmp/qemu" "v2.5.0"
if $TINYIPA_REQUIRE_BIOSDEVNAME; then
wget -N -O - https://linux.dell.com/biosdevname/biosdevname-0.7.2/biosdevname-0.7.2.tar.gz | tar -xz -C "${BUILDDIR}/tmp" -f -
fi
+if $TINYIPA_REQUIRE_IPMITOOL; then
+ wget -N -O - https://sourceforge.net/projects/ipmitool/files/ipmitool/1.8.18/ipmitool-1.8.18.tar.gz/download | tar -xz -C "${BUILDDIR}/tmp" -f -
+fi
# Create directory for python local mirror
mkdir -p "$BUILDDIR/tmp/localpip"
@@ -115,7 +119,6 @@ rm -rf $WORKDIR/build_files/qemu-utils.tcz
$CHROOT_CMD /bin/sh -c "cd /tmp/qemu && ./configure --disable-system --disable-user --disable-linux-user --disable-bsd-user --disable-guest-agent --disable-blobs && make && make install DESTDIR=/tmp/qemu-utils"
find $BUILDDIR/tmp/qemu-utils/ -type f -executable | xargs file | awk -F ':' '/ELF/ {print $1}' | sudo xargs strip
cd $WORKDIR/build_files && mksquashfs $BUILDDIR/tmp/qemu-utils qemu-utils.tcz && md5sum qemu-utils.tcz > qemu-utils.tcz.md5.txt
-
# Create qemu-utils.tcz.dep
echo "glib2.tcz" > qemu-utils.tcz.dep
@@ -126,3 +129,10 @@ if $TINYIPA_REQUIRE_BIOSDEVNAME; then
find $BUILDDIR/tmp/biosdevname-installed/ -type f -executable | xargs file | awk -F ':' '/ELF/ {print $1}' | sudo xargs strip
cd $WORKDIR/build_files && mksquashfs $BUILDDIR/tmp/biosdevname-installed biosdevname.tcz && md5sum biosdevname.tcz > biosdevname.tcz.md5.txt
fi
+
+if $TINYIPA_REQUIRE_IPMITOOL; then
+ rm -rf $WORKDIR/build_files/ipmitool.tcz
+ $CHROOT_CMD /bin/sh -c "cd /tmp/ipmitool-* && ./configure && make && make install DESTDIR=/tmp/ipmitool"
+ find $BUILDDIR/tmp/ipmitool/ -type f -executable | xargs file | awk -F ':' '/ELF/ {print $1}' | sudo xargs strip
+ cd $WORKDIR/build_files && mksquashfs $BUILDDIR/tmp/ipmitool ipmitool.tcz && md5sum ipmitool.tcz > ipmitool.tcz.md5.txt
+fi
diff --git a/imagebuild/tinyipa/finalise-tinyipa.sh b/imagebuild/tinyipa/finalise-tinyipa.sh
index 5971cf92..4d1419d6 100755
--- a/imagebuild/tinyipa/finalise-tinyipa.sh
+++ b/imagebuild/tinyipa/finalise-tinyipa.sh
@@ -11,6 +11,7 @@ ENABLE_SSH=${ENABLE_SSH:-false}
SSH_PUBLIC_KEY=${SSH_PUBLIC_KEY:-}
PYOPTIMIZE_TINYIPA=${PYOPTIMIZE_TINYIPA:-true}
TINYIPA_REQUIRE_BIOSDEVNAME=${TINYIPA_REQUIRE_BIOSDEVNAME:-false}
+TINYIPA_REQUIRE_IPMITOOL=${TINYIPA_REQUIRE_IPMITOOL:-true}
TC=1001
STAFF=50
@@ -90,6 +91,9 @@ cp $WORKDIR/build_files/qemu-utils.* $FINALDIR/tmp/builtin/optional
if $TINYIPA_REQUIRE_BIOSDEVNAME; then
cp $WORKDIR/build_files/biosdevname.* $FINALDIR/tmp/builtin/optional
fi
+if $TINYIPA_REQUIRE_IPMITOOL; then
+ cp $WORKDIR/build_files/ipmitool.* $FINALDIR/tmp/builtin/optional
+fi
# Mount /proc for chroot commands
sudo mount --bind /proc $FINALDIR/proc
@@ -130,6 +134,9 @@ $TC_CHROOT_CMD tce-load -ic /tmp/builtin/optional/qemu-utils.tcz
if $TINYIPA_REQUIRE_BIOSDEVNAME; then
$TC_CHROOT_CMD tce-load -ic /tmp/builtin/optional/biosdevname.tcz
fi
+if $TINYIPA_REQUIRE_IPMITOOL; then
+ $TC_CHROOT_CMD tce-load -ic /tmp/builtin/optional/ipmitool.tcz
+fi
# Ensure tinyipa picks up installed kernel modules
$CHROOT_CMD depmod -a `$WORKDIR/build_files/fakeuname -r`