Merge pull request #1 from ivandavidov/master

update
This commit is contained in:
Michael McMahon 2017-11-16 10:47:35 -05:00 committed by GitHub
commit c6ad3b8e7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 197 additions and 0 deletions

View File

@ -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
# 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
# the absolute path to the downloaded archive. Example:
#
@ -84,6 +90,12 @@ KBD_SOURCE_URL=https://www.kernel.org/pub/linux/utils/kbd/kbd-2.0.4.tar.gz
#
KEXEC_TOOLS_SOURCE_URL=http://kernel.org/pub/linux/utils/kernel/kexec/kexec-tools-2.0.15.tar.xz
# You can find the latest libevent archives here:
#
# https://github.com/libevent/libevent/releases/
#
LIBEVENT_SOURCE_URL=https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz
# You can find the latest Links source bundles here:
#
# http://links.twibright.com
@ -221,8 +233,10 @@ COPY_SOURCE_ISO=true
# dhcp - DHCP and DNS functionality.
# dropbear - SSH server and client.
# felix - Apache Felix OSGi framework.
# fio - I/O load generator.
# java - installs Oracle's JRE or JDK. Manual preparations are required.
# kbd - keyboard utilities
# libevent - event notification library.
# links - text browser for the web.
# lua - scripting language.
# mll_utils - set of executable utilities (mll-*).

View File

@ -45,6 +45,10 @@ Currently available overlay bundles:
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.
This overlay bundle requires some manual preparation steps. Refer
to the "JAVA_ARCHIVE" property in the ".config" file for more
@ -57,6 +61,10 @@ Currently available overlay bundles:
loadkeys de
* libevent - event notification library API provides a mechanism to execute a
callback function when a specific event occurs on a file
descriptor or after a timeout has been reached.
* Links - Text based browser. Requires ~1MB additional space. Use the
"links" command to activate the browser.

View 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

View 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

View File

@ -0,0 +1,9 @@
#!/bin/bash
SRC_DIR=$(pwd)
./01_get.sh
./02_build.sh
cd $SRC_DIR

View File

@ -0,0 +1,41 @@
#!/bin/bash
SRC_DIR=$(pwd)
. ../../common.sh
# Grab everything after the '=' character.
DOWNLOAD_URL=$(grep -i LIBEVENT_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 libevent source bundle file. The '-c' option allows the download to resume.
echo "Downloading libevent source bundle from $DOWNLOAD_URL"
wget -c $DOWNLOAD_URL
else
echo "Using local libevent source bundle $MAIN_SRC_DIR/source/overlay/$ARCHIVE_FILE"
fi
# Delete folder with previously extracted libevent.
echo "Removing libevent work area. This may take a while..."
rm -rf $WORK_DIR/overlay/libevent
mkdir $WORK_DIR/overlay/libevent
# Extract libevent to folder 'work/overlay/libevent'.
# Full path will be something like 'work/overlay/libevent/libevent-2.1.8-stable'.
tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/libevent
cd $SRC_DIR

View File

@ -0,0 +1,37 @@
#!/bin/bash
SRC_DIR=$(pwd)
. ../../common.sh
cd $WORK_DIR/overlay/libevent
DESTDIR="$PWD/libevent_installed"
# Change to the libevent source directory which ls finds, e.g. 'libevent-2.1.8-stable'.
cd $(ls -d libevent-*)
echo "Preparing libevent work area. This may take a while..."
make -j $NUM_JOBS clean
rm -rf $DESTDIR
echo "Configuring libevent..."
CFLAGS="$CFLAGS" ./configure
echo "Building libevent..."
make -j $NUM_JOBS
echo "Installing libevent..."
make -j $NUM_JOBS install DESTDIR=$DESTDIR
echo "Reducing libevent size..."
strip -g $DESTDIR/usr/bin/*
ROOTFS="$WORK_DIR/src/minimal_overlay/rootfs"
cp -r $DESTDIR/usr/local/* $ROOTFS
echo "libevent has been installed."
cd $SRC_DIR

View File

@ -0,0 +1,9 @@
#!/bin/bash
SRC_DIR=$(pwd)
./01_get.sh
./02_build.sh
cd $SRC_DIR