commit
174641b71c
@ -65,6 +65,12 @@ DROPBEAR_SOURCE_URL=http://matt.ucc.asn.au/dropbear/releases/dropbear-2017.75.ta
|
|||||||
#
|
#
|
||||||
FELIX_SOURCE_URL=http://archive.apache.org/dist/felix/org.apache.felix.main.distribution-5.6.8.tar.gz
|
FELIX_SOURCE_URL=http://archive.apache.org/dist/felix/org.apache.felix.main.distribution-5.6.8.tar.gz
|
||||||
|
|
||||||
|
# You can find the latest fio source bundles here:
|
||||||
|
#
|
||||||
|
# https://github.com/axboe/fio/releases
|
||||||
|
#
|
||||||
|
FIO_SOURCE_URL=https://github.com/axboe/fio/archive/fio-3.2.tar.gz
|
||||||
|
|
||||||
# You need to manually download Oracle's JRE or JDK and set the property with
|
# You need to manually download Oracle's JRE or JDK and set the property with
|
||||||
# the absolute path to the downloaded archive. Example:
|
# the absolute path to the downloaded archive. Example:
|
||||||
#
|
#
|
||||||
@ -221,6 +227,7 @@ COPY_SOURCE_ISO=true
|
|||||||
# dhcp - DHCP and DNS functionality.
|
# dhcp - DHCP and DNS functionality.
|
||||||
# dropbear - SSH server and client.
|
# dropbear - SSH server and client.
|
||||||
# felix - Apache Felix OSGi framework.
|
# felix - Apache Felix OSGi framework.
|
||||||
|
# fio - I/O load generator.
|
||||||
# java - installs Oracle's JRE or JDK. Manual preparations are required.
|
# java - installs Oracle's JRE or JDK. Manual preparations are required.
|
||||||
# kbd - keyboard utilities
|
# kbd - keyboard utilities
|
||||||
# links - text browser for the web.
|
# links - text browser for the web.
|
||||||
|
@ -45,6 +45,10 @@ Currently available overlay bundles:
|
|||||||
|
|
||||||
This overlay bundle requires JRE or JDK.
|
This overlay bundle requires JRE or JDK.
|
||||||
|
|
||||||
|
* fio - I/O load generator that can simulate a wide variety of workloads
|
||||||
|
on RAM or disks. fio is essential for troubleshooting data
|
||||||
|
bottlenecks.
|
||||||
|
|
||||||
* JRE / JDK - Oracle's JRE or JDK. Requires ~366MB additional space for JDK.
|
* JRE / JDK - Oracle's JRE or JDK. Requires ~366MB additional space for JDK.
|
||||||
This overlay bundle requires some manual preparation steps. Refer
|
This overlay bundle requires some manual preparation steps. Refer
|
||||||
to the "JAVA_ARCHIVE" property in the ".config" file for more
|
to the "JAVA_ARCHIVE" property in the ".config" file for more
|
||||||
|
41
src/minimal_overlay/bundles/fio/01_get.sh
Executable file
41
src/minimal_overlay/bundles/fio/01_get.sh
Executable file
@ -0,0 +1,41 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
SRC_DIR=$(pwd)
|
||||||
|
|
||||||
|
. ../../common.sh
|
||||||
|
|
||||||
|
# Grab everything after the '=' character.
|
||||||
|
DOWNLOAD_URL=$(grep -i FIO_SOURCE_URL $MAIN_SRC_DIR/.config | cut -f2 -d'=')
|
||||||
|
|
||||||
|
# Grab everything after the last '/' character.
|
||||||
|
ARCHIVE_FILE=${DOWNLOAD_URL##*/}
|
||||||
|
|
||||||
|
# Read the 'USE_LOCAL_SOURCE' property from '.config'
|
||||||
|
USE_LOCAL_SOURCE="$(grep -i USE_LOCAL_SOURCE $MAIN_SRC_DIR/.config | cut -f2 -d'=')"
|
||||||
|
|
||||||
|
if [ "$USE_LOCAL_SOURCE" = "true" -a ! -f $MAIN_SRC_DIR/source/overlay/$ARCHIVE_FILE ] ; then
|
||||||
|
echo "Source bundle $MAIN_SRC_DIR/source/overlay/$ARCHIVE_FILE is missing and will be downloaded."
|
||||||
|
USE_LOCAL_SOURCE="false"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd $MAIN_SRC_DIR/source/overlay
|
||||||
|
|
||||||
|
if [ ! "$USE_LOCAL_SOURCE" = "true" ] ; then
|
||||||
|
# Downloading fio source bundle file. The '-c' option allows the download to resume.
|
||||||
|
echo "Downloading fio source bundle from $DOWNLOAD_URL"
|
||||||
|
wget -c $DOWNLOAD_URL
|
||||||
|
else
|
||||||
|
echo "Using local fio source bundle $MAIN_SRC_DIR/source/overlay/$ARCHIVE_FILE"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Delete folder with previously extracted fio.
|
||||||
|
echo "Removing fio work area. This may take a while..."
|
||||||
|
rm -rf $WORK_DIR/overlay/fio
|
||||||
|
mkdir $WORK_DIR/overlay/fio
|
||||||
|
|
||||||
|
# Extract fio to folder 'work/overlay/fio'.
|
||||||
|
# Full path will be something like 'work/overlay/fio/fio-3.2'.
|
||||||
|
tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/fio
|
||||||
|
|
||||||
|
cd $SRC_DIR
|
||||||
|
|
38
src/minimal_overlay/bundles/fio/02_build.sh
Executable file
38
src/minimal_overlay/bundles/fio/02_build.sh
Executable file
@ -0,0 +1,38 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
SRC_DIR=$(pwd)
|
||||||
|
|
||||||
|
. ../../common.sh
|
||||||
|
|
||||||
|
cd $WORK_DIR/overlay/fio
|
||||||
|
|
||||||
|
DESTDIR="$PWD/fio_installed"
|
||||||
|
|
||||||
|
# Change to the fio source directory which ls finds, e.g. 'fio-3.2'.
|
||||||
|
cd $(ls -d fio-*)
|
||||||
|
|
||||||
|
echo "Preparing fio work area. This may take a while..."
|
||||||
|
make -j $NUM_JOBS clean
|
||||||
|
|
||||||
|
rm -rf $DESTDIR
|
||||||
|
|
||||||
|
echo "Configuring fio..."
|
||||||
|
CFLAGS="$CFLAGS" ./configure \
|
||||||
|
--prefix=/usr
|
||||||
|
|
||||||
|
echo "Building fio..."
|
||||||
|
make -j $NUM_JOBS
|
||||||
|
|
||||||
|
echo "Installing fio..."
|
||||||
|
make -j $NUM_JOBS install DESTDIR=$DESTDIR
|
||||||
|
|
||||||
|
echo "Reducing fio size..."
|
||||||
|
strip -g $DESTDIR/usr/bin/*
|
||||||
|
|
||||||
|
ROOTFS="$WORK_DIR/src/minimal_overlay/rootfs"
|
||||||
|
|
||||||
|
cp -r $DESTDIR/* $ROOTFS
|
||||||
|
|
||||||
|
echo "fio has been installed."
|
||||||
|
|
||||||
|
cd $SRC_DIR
|
9
src/minimal_overlay/bundles/fio/bundle.sh
Executable file
9
src/minimal_overlay/bundles/fio/bundle.sh
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
SRC_DIR=$(pwd)
|
||||||
|
|
||||||
|
./01_get.sh
|
||||||
|
./02_build.sh
|
||||||
|
|
||||||
|
cd $SRC_DIR
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user