diff --git a/imagebuild/tinyipa/build-tinyipa.sh b/imagebuild/tinyipa/build-tinyipa.sh index f2f8da659..3dacb931c 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" 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" +clone_and_checkout "https://github.com/jirka-h/haveged.git" "${BUILDDIR}/tmp/haveged" "1.9.4" 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 @@ -180,6 +181,12 @@ $CHROOT_CMD /bin/sh -c "cd /tmp/lshw && touch src/lshw.1 && echo install: > src/ 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 haveged +rm -rf $WORKDIR/build_files/haveged.tcz +$CHROOT_CMD /bin/sh -c "cd /tmp/haveged && ./configure && make && make install DESTDIR=/tmp/haveged-installed" +find $BUILDDIR/tmp/haveged-installed/ -type f -executable | xargs file | awk -F ':' '/ELF/ {print $1}' | sudo xargs strip +cd $WORKDIR/build_files && mksquashfs $BUILDDIR/tmp/haveged-installed haveged.tcz && md5sum haveged.tcz > haveged.tcz.md5.txt + # Build biosdevname if $TINYIPA_REQUIRE_BIOSDEVNAME; then rm -rf $WORKDIR/build_files/biosdevname.tcz diff --git a/imagebuild/tinyipa/build_files/bootlocal.sh b/imagebuild/tinyipa/build_files/bootlocal.sh index 0fcf0b4f7..1d8102dad 100755 --- a/imagebuild/tinyipa/build_files/bootlocal.sh +++ b/imagebuild/tinyipa/build_files/bootlocal.sh @@ -10,11 +10,17 @@ date export HOME=/root # Start SSHd -if [ -f /usr/local/etc/init.d/openssh ]; then +if [ -x /usr/local/etc/init.d/openssh ]; then echo "Starting OpenSSH server:" /usr/local/etc/init.d/openssh start fi +# Start haveged +if [ -x /usr/local/sbin/haveged ]; then + echo "Starting haveged entropy daemon:" + /usr/local/sbin/haveged +fi + # Maybe save some RAM? #rm -rf /tmp/builtin diff --git a/imagebuild/tinyipa/finalise-tinyipa.sh b/imagebuild/tinyipa/finalise-tinyipa.sh index d8f967d47..714b8c774 100755 --- a/imagebuild/tinyipa/finalise-tinyipa.sh +++ b/imagebuild/tinyipa/finalise-tinyipa.sh @@ -76,6 +76,7 @@ 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 +cp $WORKDIR/build_files/haveged.* $FINALDIR/tmp/builtin/optional if $TINYIPA_REQUIRE_BIOSDEVNAME; then cp $WORKDIR/build_files/biosdevname.* $FINALDIR/tmp/builtin/optional @@ -125,6 +126,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 +$TC_CHROOT_CMD tce-load -ic /tmp/builtin/optional/haveged.tcz if $TINYIPA_REQUIRE_BIOSDEVNAME; then $TC_CHROOT_CMD tce-load -ic /tmp/builtin/optional/biosdevname.tcz fi