diff options
author | Zuul <zuul@review.openstack.org> | 2018-02-01 00:00:31 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2018-02-01 00:00:31 +0000 |
commit | 7dfd44dc13429dbd9e3960e60dd46a1b7f3fee3d (patch) | |
tree | 6be264263a09274cbfd7a4d45485fb71992320c2 /imagebuild | |
parent | 7a434e5971c78c14793424e75f45fa32e7c3ea22 (diff) | |
parent | 2877fc53d409e950a685a4bd31ac37b4865981a9 (diff) | |
download | ironic-python-agent-7dfd44dc13429dbd9e3960e60dd46a1b7f3fee3d.tar.gz |
Merge "Use lshw in place of dmidecode for the default hardware manager"
Diffstat (limited to 'imagebuild')
-rwxr-xr-x | imagebuild/tinyipa/build-tinyipa.sh | 8 | ||||
-rwxr-xr-x | imagebuild/tinyipa/finalise-tinyipa.sh | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/imagebuild/tinyipa/build-tinyipa.sh b/imagebuild/tinyipa/build-tinyipa.sh index 40e26bb7..1112e1ed 100755 --- a/imagebuild/tinyipa/build-tinyipa.sh +++ b/imagebuild/tinyipa/build-tinyipa.sh @@ -62,6 +62,7 @@ sudo sh -c "echo $TINYCORE_MIRROR_URL > $BUILDDIR/opt/tcemirror" # 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" +clone_and_checkout "https://github.com/lyonel/lshw.git" "${BUILDDIR}/tmp/lshw" "B.02.18" 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 @@ -137,6 +138,13 @@ cd $WORKDIR/build_files && mksquashfs $BUILDDIR/tmp/qemu-utils qemu-utils.tcz && # Create qemu-utils.tcz.dep echo "glib2.tcz" > qemu-utils.tcz.dep +# Build lshw +rm -rf $WORKDIR/build_files/lshw.tcz +# NOTE(mjturek): We touch src/lshw.1 and clear src/po/Makefile to avoid building the man pages, as they aren't used and require large dependencies to build. +$CHROOT_CMD /bin/sh -c "cd /tmp/lshw && touch src/lshw.1 && echo install: > src/po/Makefile && make && make install DESTDIR=/tmp/lshw-installed" +find $BUILDDIR/tmp/lshw-installed/ -type f -executable | xargs file | awk -F ':' '/ELF/ {print $1}' | sudo xargs strip +cd $WORKDIR/build_files && mksquashfs $BUILDDIR/tmp/lshw-installed lshw.tcz && md5sum lshw.tcz > lshw.tcz.md5.txt + # Build biosdevname if $TINYIPA_REQUIRE_BIOSDEVNAME; then rm -rf $WORKDIR/build_files/biosdevname.tcz diff --git a/imagebuild/tinyipa/finalise-tinyipa.sh b/imagebuild/tinyipa/finalise-tinyipa.sh index 3a1a115d..ed24ba4b 100755 --- a/imagebuild/tinyipa/finalise-tinyipa.sh +++ b/imagebuild/tinyipa/finalise-tinyipa.sh @@ -76,6 +76,8 @@ cp -Rp "$BUILDDIR/tmp/wheels" "$FINALDIR/tmp/wheelhouse" cp $WORKDIR/build_files/tgt.* $FINALDIR/tmp/builtin/optional cp $WORKDIR/build_files/qemu-utils.* $FINALDIR/tmp/builtin/optional +cp $WORKDIR/build_files/lshw.* $FINALDIR/tmp/builtin/optional + if $TINYIPA_REQUIRE_BIOSDEVNAME; then cp $WORKDIR/build_files/biosdevname.* $FINALDIR/tmp/builtin/optional fi @@ -118,6 +120,7 @@ fi $TC_CHROOT_CMD tce-load -ic /tmp/builtin/optional/tgt.tcz $TC_CHROOT_CMD tce-load -ic /tmp/builtin/optional/qemu-utils.tcz +$TC_CHROOT_CMD tce-load -ic /tmp/builtin/optional/lshw.tcz if $TINYIPA_REQUIRE_BIOSDEVNAME; then $TC_CHROOT_CMD tce-load -ic /tmp/builtin/optional/biosdevname.tcz fi |