Merge branch 'master' of https://github.com/ivandavidov/minimal into dialog

This commit is contained in:
bauen1 2017-11-16 20:31:38 +01:00
commit c4bc976267
No known key found for this signature in database
GPG Key ID: FF0AAF5E0812BA9C
32 changed files with 927 additions and 58 deletions

View File

@ -41,11 +41,17 @@ SYSLINUX_SOURCE_URL=http://kernel.org/pub/linux/utils/boot/syslinux/syslinux-6.0
# # # #
##################################################################### #####################################################################
# You can find the latest Links source bundles here: # You can find the latest Cloud Foundry CLI binary here:
# #
# http://links.twibright.com # http://github.com/cloudfoundry/cli
# #
LINKS_SOURCE_URL=http://links.twibright.com/download/links-2.14.tar.bz2 CLOUD_FOUNDRY_CLI_URL=http://cli.run.pivotal.io/stable?release=linux64-binary&source=github
# You can find the latest coreutils source bundles here:
#
# http://ftp.gnu.org/gnu/coreutils/
#
COREUTILS_SOURCE_URL=http://ftp.gnu.org/gnu/coreutils/coreutils-8.28.tar.xz
# You can find the latest Dropbear source bundles here: # You can find the latest Dropbear source bundles here:
# #
@ -59,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:
# #
@ -67,18 +79,53 @@ FELIX_SOURCE_URL=http://archive.apache.org/dist/felix/org.apache.felix.main.dist
#JAVA_ARCHIVE=/absolute/path/to/java.archive.tar.gz #JAVA_ARCHIVE=/absolute/path/to/java.archive.tar.gz
#JAVA_ARCHIVE=/home/ivan/Downloads/jdk-9_linux-x64_bin.tar.gz #JAVA_ARCHIVE=/home/ivan/Downloads/jdk-9_linux-x64_bin.tar.gz
# You can find the latest kbd source bundles here:
#
# http://www.kbd-project.org/
#
KBD_SOURCE_URL=https://www.kernel.org/pub/linux/utils/kbd/kbd-2.0.4.tar.gz
# You can find the latest kexec-tools source bundles here:
#
# https://www.kernel.org/pub/linux/utils/kernel/kexec/
#
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
#
LINKS_SOURCE_URL=http://links.twibright.com/download/links-2.14.tar.bz2
# You can find the latest Lua source bundes here: # You can find the latest Lua source bundes here:
# #
# https://www.lua.org/ftp/ # https://www.lua.org/ftp/
# #
LUA_SOURCE_URL=https://www.lua.org/ftp/lua-5.3.4.tar.gz LUA_SOURCE_URL=https://www.lua.org/ftp/lua-5.3.4.tar.gz
# You can find the latest nano source bundles here:
#
# https://nano-editor.org/download.php
#
NANO_SOURCE_URL=https://nano-editor.org/dist/v2.8/nano-2.8.7.tar.xz
# You can find the latest ncurses archives here: # You can find the latest ncurses archives here:
# #
# https://ftp.gnu.org/pub/gnu/ncurses/ # https://ftp.gnu.org/pub/gnu/ncurses/
# #
NCURSES_SOURCE_URL=https://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.0.tar.gz NCURSES_SOURCE_URL=https://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.0.tar.gz
# You can find the latest Open JDK archives here:
#
# http://jdk.java.net/9
#
OPENJDK_URL=http://download.java.net/java/GA/jdk9/9/binaries/jdk-9+181_linux-x64_bin.tar.gz
# You can find the latest static-get shell script here: # You can find the latest static-get shell script here:
# #
# http://s.minos.io/s # http://s.minos.io/s
@ -86,17 +133,11 @@ NCURSES_SOURCE_URL=https://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.0.tar.gz
# #
STATIC_GET_SOURCE_URL=http://s.minos.io/s STATIC_GET_SOURCE_URL=http://s.minos.io/s
# You can find the latest Cloud Foundry CLI binary here: # You can find the latest stress archives here:
# #
# http://github.com/cloudfoundry/cli # https://people.seas.harvard.edu/~apw/stress/
# #
CLOUD_FOUNDRY_CLI_URL=http://cli.run.pivotal.io/stable?release=linux64-binary&source=github STRESS_SOURCE_URL=https://people.seas.harvard.edu/~apw/stress/stress-1.0.4.tar.gz
# You can find the latest Open JDK archives here:
#
# http://jdk.java.net/9
#
OPENJDK_URL=http://download.java.net/java/GA/jdk9/9/binaries/jdk-9+181_linux-x64_bin.tar.gz
# You can find the latest util_linux archives here: # You can find the latest util_linux archives here:
# #
@ -104,17 +145,26 @@ OPENJDK_URL=http://download.java.net/java/GA/jdk9/9/binaries/jdk-9+181_linux-x64
# #
UTIL_LINUX_SOURCE_URL=https://www.kernel.org/pub/linux/utils/util-linux/v2.31/util-linux-2.31.tar.gz UTIL_LINUX_SOURCE_URL=https://www.kernel.org/pub/linux/utils/util-linux/v2.31/util-linux-2.31.tar.gz
# You can find the latest vim source bundles here:
#
# https://github.com/vim/vim/releases
#
VIM_SOURCE_URL=https://github.com/vim/vim/archive/v8.0.1298.tar.gz
# You can find the latest ZLIB source bundles here: # You can find the latest ZLIB source bundles here:
# #
# http://zlib.net # http://zlib.net
# #
ZLIB_SOURCE_URL=http://zlib.net/zlib-1.2.11.tar.xz ZLIB_SOURCE_URL=http://zlib.net/zlib-1.2.11.tar.xz
<<<<<<< HEAD
# You can find the latest dialog source bundles here: # You can find the latest dialog source bundles here:
# #
# http://invisible-island.net/dialog/ # http://invisible-island.net/dialog/
# #
DIALOG_SOURCE_URL=ftp://ftp.invisible-island.net/dialog/dialog-1.3-20170509.tgz DIALOG_SOURCE_URL=ftp://ftp.invisible-island.net/dialog/dialog-1.3-20170509.tgz
=======
>>>>>>> 54800aa7c24ba11aedb448524c0314c75104bcc3
#################################################### ####################################################
# # # #
@ -192,26 +242,35 @@ COPY_SOURCE_ISO=true
# Currently available overlay software: # Currently available overlay software:
# #
# glibc_full - all core GNU C libraries (useful if other software is included). # glibc_full - all core GNU C libraries (useful if other software is included).
# links - text browser for the web. # cf_cli - CLoud Foundry CLI (command line interface).
# dropbear - SSH server and client. # coreutils - set of commonly used GNU executable utilities.
# java - installs Oracle's JRE or JDK. Manual preparations are required. # dhcp - DHCP and DNS functionality.
# openjdk - installs Open JDK. All operations are automated.
# felix - Apache Felix OSGi framework.
# mll_utils - set of executable utilities (mll-*).
# ncurses - "GUI-like" API that runs within a terminal emulator
# dialog - shell scripting for ncurses # dialog - shell scripting for ncurses
# lua - scripting language # dropbear - SSH server and client.
# static_get - portable binaries for Linux (http://s.minos.io) # felix - Apache Felix OSGi framework.
# cf_cli - CLoud Foundry CLI (command line interface) # fio - I/O load generator.
# nweb - simple mini http server # java - installs Oracle's JRE or JDK. Manual preparations are required.
# dhcp - DHCP and DNS functionality # kbd - keyboard utilities
# util_linux - standard package distributed by the Linux Kernel Organization. # libevent - event notification library.
# links - text browser for the web.
# lua - scripting language.
# mll_utils - set of executable utilities (mll-*).
# nano - simple command-line text editor with on-screen shortcuts.git
# ncurses - "GUI-like" API that runs within a terminal emulator.
# nweb - simple mini http server.
# openjdk - installs Open JDK. All operations are automated.
# static_get - portable binaries for Linux (http://s.minos.io).
# stress - CPU and RAM load generator.
# util_linux - set of executable utilities distributed by the Linux Kernel Org.
# vim - an advanced text editor.
# zlib - DEFLATE compression/decompression library. # zlib - DEFLATE compression/decompression library.
# #
# Refer to the README file for more information. # Refer to the README file for more information.
# #
#OVERLAY_BUNDLES=glibc_full,links,dropbear,java,felix,mll_utils,lua,static_get,cf_cli,ncurses,dialog,util_linux,nweb,dhcp # The line below is sample which provides Open JDK, Apache Felix and Links.
#OVERLAY_BUNDLES=dhcp,glibc_full,zlib,openjdk,felix,links # There is also DHCP/DNS functionality provided by the 'dhcp' overlay bundle.
#
#OVERLAY_BUNDLES=glibc_full,dhcp,felix,links,openjdk,zlib
# This property enables the standard penguin boot logo in the upper left corner # This property enables the standard penguin boot logo in the upper left corner
# of the screen. The property is used in 'xx_build_kernel.sh'. The default value # of the screen. The property is used in 'xx_build_kernel.sh'. The default value

View File

@ -27,16 +27,13 @@ Currently available overlay bundles:
This overlay bundle depends on the GLIBC build process. This overlay bundle depends on the GLIBC build process.
* ZLIB - Software library used for data compression. * coreutils - set of commonly used GNU executable utilities.
This overlay bundle is self sufficient and doesn't require other * dhcp - DHCP and DNS functionality to connect to the Internet.
overlay bundles.
* Links - text based browser. Requires ~1MB additional space. Use the * dialog - shell scripting library for ncurses
"links" command to activate the browser.
This overlay bundle is self sufficient and doesn't require other This overlay bundle requires ncurses
overlay bundles.
* Dropbear - SSH server/client. Requires ~1MB additional space. The build * Dropbear - SSH server/client. Requires ~1MB additional space. The build
process creates user 'root' with password 'toor'. These are process creates user 'root' with password 'toor'. These are
@ -47,6 +44,15 @@ Currently available overlay bundles:
This overlay bundle requires GLIBC. This overlay bundle requires GLIBC.
* Felix OSGi - Apache Felix OSGi framework. Requires ~2MB additional space. Use
the "felix-start" command to run the Apache Felix OSGi framework.
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
@ -54,14 +60,25 @@ Currently available overlay bundles:
This overlay bundle requires GLIBC. JDK 9 requires ZLIB. This overlay bundle requires GLIBC. JDK 9 requires ZLIB.
* kbd - Keyboard utilities and keymaps, you can for example load
a german keyboard layout:
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.
* Open JDK - The open source JDK. No need for manual steps. * Open JDK - The open source JDK. No need for manual steps.
This overlay bundle requires GLIBC and ZLIB. This overlay bundle requires GLIBC and ZLIB.
* Felix OSGi - Apache Felix OSGi framework. Requires ~2MB additional space. Use * Lua - The Lua Scripting Language 5.3. Requires ~ 800kb additional
the "felix-start" command to run the Apache Felix OSGi framework. space. Use the "lua" command to run an interactive lua
interpreter.
This overlay bundle requires JRE or JDK.
* MLL Utils - Set of experimental shell scripts (mll-*.sh) which provide * MLL Utils - Set of experimental shell scripts (mll-*.sh) which provide
additional functionality, e.g. installer and useful tools. additional functionality, e.g. installer and useful tools.
@ -69,26 +86,34 @@ Currently available overlay bundles:
This overlay bundle is currently experimental and its build This overlay bundle is currently experimental and its build
process depends on the host machine. process depends on the host machine.
* Lua - The Lua Scripting Language 5.3. Requires ~ 800kb additional * nano - Simple command-line text editor with on-screen shortcuts.
space. Use the "lua" command to run an interactive lua interpreter
* ncurses - 'GUI-like' API that runs within a terminal emulator This overlay bundle requires ncurses.
* dialog - shell scripting library for ncurses * nweb - nweb is a very small and easy to use webserver, it is run
automatically on port 80. To portforward port 80 from the
guest (minimal) to port 8080 on the host add
'-net nic,model=e1000 -net user,hostfwd=tcp::8080-:80' to
'cmd' in the qemu.sh file.
This overlay bundle requires ncurses * stress - simple workload generator. Imposes a configurable amount of CPU,
memory, I/O, and disk stress on the system. stress is useful for
troubleshooting CPU and RAM.
* nweb - nweb is a very small and easy to use webserver, it is run automatically on port 80 * util_linux - Set of executable utilities distributed by the Linux Kernel
to portforward port 80 from the guest (minimal) to port 8080 on the host add similar to busybox or GNU Core Utils.
'-net nic,model=e1000 -net user,hostfwd=tcp::8080-:80' to 'cmd' in qemu.sh
* dhcp - DHCP and DNS functionality
* util_linux - util-linux is a standard package distributed by the Linux Kernel
Organization similar to busybox or GNU Core Utils.
Some packages in this overlay bundle require ncurses. Some packages in this overlay bundle require ncurses.
* vim - An advanced text editor that seeks to provide the power of
the de-facto Unix editor 'Vi', with a more complete feature
set.
This package will create symlinks on top of vi.
* ZLIB - Software library used for data compression.
### ### ### ### ### ###
I only provide the build scripts. It's entirely up to you to configure and I only provide the build scripts. It's entirely up to you to configure and

28
src/generate_bundle_skel.sh Executable file
View File

@ -0,0 +1,28 @@
#!/bin/bash
# Generate basic template for a new overlay package
# Rename the package and package version variables and run this script to
# generate a new overlay template
package=test
ver=2.1
packcaps=${package^^}
echo "Generating new overlay bundle template for $package..."
cp -r minimal_overlay/bundles/coreutils minimal_overlay/bundles/$package
sed -i "s/.*Full path.*/# Full path will be something like \'work\/overlay\/$package\/$package-$ver\'./" minimal_overlay/bundles/$package/01_get.sh
sed -i "s/.*Extract coreutils.*/# Extract coreutils to folder \'work\/overlay\/$package\'./" minimal_overlay/bundles/$package/01_get.sh
sed -i "s/COREUTILS/$packcaps/g" minimal_overlay/bundles/$package/01_get.sh
sed -i "s/coreutils/$package/g" minimal_overlay/bundles/$package/01_get.sh
sed -i "s/.*source directory which.*/# Change to the coreutils source directory which ls finds, e.g. \'$package-$ver\'./" minimal_overlay/bundles/$package/02_build.sh
sed -i "s/COREUTILS/$packcaps/g" minimal_overlay/bundles/$package/02_build.sh
sed -i "s/coreutils/$package/g" minimal_overlay/bundles/$package/02_build.sh
echo "Created new overlay bundle for $package."
echo "Update .config with source location and a brief description."
echo "Update README with package description and dependencies."

View File

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

View File

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

View File

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

View File

@ -77,6 +77,8 @@ cp -r $DESTDIR/etc $ROOTFS
cp -r $DESTDIR/usr/bin $ROOTFS/usr cp -r $DESTDIR/usr/bin $ROOTFS/usr
cp -r $DESTDIR/usr/sbin $ROOTFS/usr cp -r $DESTDIR/usr/sbin $ROOTFS/usr
cp -r $DESTDIR/lib $ROOTFS cp -r $DESTDIR/lib $ROOTFS
mkdir -p "$ROOTFS/etc/autorun"
install -m 0755 "$SRC_DIR/20_dropbear.sh" "$ROOTFS/etc/autorun/"
echo "Dropbear has been installed." echo "Dropbear has been installed."

View File

@ -0,0 +1,3 @@
#!/bin/sh
echo "starting dropbear ssh server"
dropbear

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,54 @@
#!/bin/sh
SRC_DIR=$(pwd)
. ../../common.sh
# Grab everything after the '=' character.
DOWNLOAD_URL=$(grep -i KBD_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 kbd source bundle file. The '-c' option allows the download to resume.
echo "Downloading kbd source bundle from $DOWNLOAD_URL"
wget -c $DOWNLOAD_URL
else
echo "Using local kbd source bundle $MAIN_SRC_DIR/source/overlay/$ARCHIVE_FILE"
fi
# Delete folder with previously extracted kbd.
echo "Removing kbd work area. This may take a while..."
rm -rf $WORK_DIR/overlay/kbd
mkdir $WORK_DIR/overlay/kbd
# Extract kbd to folder 'work/overlay/kbd'.
# Full path will be something like 'work/overlay/kbd/kbd-2.04'.
tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/kbd
cd "$WORK_DIR/overlay/kbd"
cd $(ls -d kbd-*)
# rename keymaps with the same name
mv data/keymaps/i386/qwertz/cz.map data/keymaps/i386/qwertz/cz-qwertz.map
mv data/keymaps/i386/olpc/es.map data/keymaps/i386/olpc/es-olpc.map
mv data/keymaps/i386/olpc/pt.map data/keymaps/i386/olpc/pt-olpc.map
mv data/keymaps/i386/dvorak/no.map data/keymaps/i386/dvorak/no-dvorak.map
mv data/keymaps/i386/fgGIod/trf.map data/keymaps/i386/fgGIod/trf-fgGIod.map
mv data/keymaps/i386/colemak/en-latin9.map data/keymaps/i386/colemak/colemak.map
cd $SRC_DIR

View File

@ -0,0 +1,46 @@
#!/bin/sh
SRC_DIR=$(pwd)
. ../../common.sh
cd $WORK_DIR/overlay/kbd
DESTDIR="$PWD/kbd_installed"
# Change to the kbd source directory which ls finds, e.g. 'kbd-2.04'.
cd $(ls -d kbd-*)
echo "Preparing kbd work area. This may take a while..."
make -j $NUM_JOBS clean
rm -rf $DESTDIR
echo "Configuring kbd..."
CFLAGS="$CFLAGS" ./configure \
--prefix=/usr \
--disable-vlock
# vlock requires PAM
echo "Building kbd..."
make -j $NUM_JOBS
echo "Installing kbd..."
make -j $NUM_JOBS install DESTDIR="$DESTDIR"
echo "Reducing kbd size..."
strip -g \
$DESTDIR/usr/bin/* \
$DESTDIR/usr/sbin/* \
$DESTDIR/lib/*
ROOTFS=$WORK_DIR/src/minimal_overlay/rootfs
mkdir -p $ROOTFS/usr
cp -r "$DESTDIR/usr/bin" \
"$DESTDIR/usr/share" \
"$ROOTFS/usr/"
echo "kbd has been installed."
cd $SRC_DIR

View File

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

View File

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

View File

@ -0,0 +1,37 @@
#!/bin/bash
SRC_DIR=$(pwd)
. ../../common.sh
cd $WORK_DIR/overlay/kexec-tools
DESTDIR="$PWD/kexec-tools_installed"
# Change to the kexec-tools source directory which ls finds, e.g. 'kexec-tools-2.0.15'.
cd $(ls -d kexec-tools-*)
echo "Preparing kexec-tools work area. This may take a while..."
make -j $NUM_JOBS clean
rm -rf $DESTDIR
echo "Building kexec-tools..."
CFLAGS="$CFLAGS" ./configure \
--prefix=/usr \
--without-lzama
make -j $NUM_JOBS
make -j $NUM_JOBS install DESTDIR="$DESTDIR"
echo "Reducing kexec-tools size..."
strip -g $DESTDIR/usr/bin/* \
$DESTDIR/usr/lib/* 2>/dev/null
ROOTFS="$WORK_DIR/src/minimal_overlay/rootfs"
mkdir -p $ROOTFS/usr/
cp -r $DESTDIR/usr/* $ROOTFS/usr/
echo "kexec-tools has been installed."
cd $SRC_DIR

View File

@ -0,0 +1,8 @@
#!/bin/sh
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

View File

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

View File

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

View File

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

View File

@ -22,17 +22,20 @@ sed -i '/LIBTOOL_INSTALL/d' c++/Makefile.in
# Configure Ncurses # Configure Ncurses
echo "Configuring Ncurses..." echo "Configuring Ncurses..."
./configure \ CFLAGS="$CFLAGS" ./configure \
--prefix=/usr \ --prefix=/usr \
--with-termlib \ --with-termlib \
--with-shared \
--with-terminfo-dirs=/lib/terminfo \ --with-terminfo-dirs=/lib/terminfo \
--with-default-terminfo-dirs=/lib/terminfo \ --with-default-terminfo-dirs=/lib/terminfo \
--without-normal \ --without-normal \
--without-debug \ --without-debug \
--without-cxx-binding \ --without-cxx-binding \
--with-abi-version=5 \ --with-abi-version=5 \
CFLAGS="-Os -s -fno-stack-protector -U_FORTIFY_SOURCE" \ --enable-widec \
--enable-pc-files \
--with-shared \
CPPFLAGS=-I$PWD/ncurses/widechar \
LDFLAGS=-L$PWD/lib \
CPPFLAGS="-P" CPPFLAGS="-P"
# Most configuration switches are from AwlsomeAlex # Most configuration switches are from AwlsomeAlex
@ -47,6 +50,13 @@ make -j $NUM_JOBS
echo "Installing ncurses..." echo "Installing ncurses..."
make -j $NUM_JOBS install DESTDIR=$DESTDIR make -j $NUM_JOBS install DESTDIR=$DESTDIR
# Symnlink wide character libraries
cd $DESTDIR/usr/lib
ln -s libncursesw.so.5 libncurses.so.5
ln -s libncurses.so.5 libncurses.so
ln -s libtinfow.so.5 libtinfo.so.5
ln -s libtinfo.so.5 libtinfo.so
echo "Reducing ncurses size..." echo "Reducing ncurses size..."
strip -g $DESTDIR/usr/bin/* strip -g $DESTDIR/usr/bin/*

View File

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

View File

@ -0,0 +1,38 @@
#!/bin/bash
SRC_DIR=$(pwd)
. ../../common.sh
cd $WORK_DIR/overlay/stress
DESTDIR="$PWD/stress_installed"
# Change to the stress source directory which ls finds, e.g. 'stress-1.0.4'.
cd $(ls -d stress-*)
echo "Preparing stress work area. This may take a while..."
make -j $NUM_JOBS clean
rm -rf $DESTDIR
echo "Configuring stress..."
CFLAGS="$CFLAGS" ./configure \
--prefix=/usr
echo "Building stress..."
make -j $NUM_JOBS
echo "Installing stress..."
make -j $NUM_JOBS install DESTDIR=$DESTDIR
echo "Reducing stress size..."
strip -g $DESTDIR/usr/bin/*
ROOTFS="$WORK_DIR/src/minimal_overlay/rootfs"
cp -r $DESTDIR/* $ROOTFS
echo "stress 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 VIM_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 vim source bundle file. The '-c' option allows the download to resume.
echo "Downloading vim source bundle from $DOWNLOAD_URL"
wget -c $DOWNLOAD_URL
else
echo "Using local vim source bundle $MAIN_SRC_DIR/source/overlay/$ARCHIVE_FILE"
fi
# Delete folder with previously extracted vim.
echo "Removing vim work area. This may take a while..."
rm -rf $WORK_DIR/overlay/vim
mkdir $WORK_DIR/overlay/vim
# Extract vim to folder 'work/overlay/vim'.
# Full path will be something like 'work/overlay/vim/vim-8.0.1298'.
tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/vim
cd $SRC_DIR

View File

@ -0,0 +1,61 @@
#!/bin/bash
SRC_DIR=$(pwd)
. ../../common.sh
cd $WORK_DIR/overlay/vim
DESTDIR="$PWD/vim_installed"
# Change to the vim source directory which ls finds, e.g. 'vim-8.0.1298'.
cd $(ls -d vim-*)
echo "Preparing vim work area. This may take a while..."
make -j $NUM_JOBS clean
rm -rf $DESTDIR
echo "Setting vimrc location..."
echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h
echo "Configuring vim..."
CFLAGS="$CFLAGS" ./configure \
--prefix=/usr
echo "Building vim..."
make -j $NUM_JOBS
echo "Installing vim..."
make -j $NUM_JOBS install DESTDIR=$DESTDIR
echo "Generating vimrc..."
mkdir -p $DESTDIR/etc
cat > $DESTDIR/etc/vimrc << "EOF"
" Begin /etc/vimrc
set nocompatible
set backspace=2
set mouse=r
syntax on
set background=dark
" End /etc/vimrc
EOF
echo "Symlinking vim to vi..."
ln -sv vim $DESTDIR/usr/bin/vi
mkdir -p $DESTDIR/bin
ln -sv vim $DESTDIR/bin/vi
echo "Reducing vim size..."
strip -g $DESTDIR/usr/bin/*
ROOTFS="$WORK_DIR/src/minimal_overlay/rootfs"
cp -r $DESTDIR/* $ROOTFS
echo "vim 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

@ -7,12 +7,12 @@
::shutdown:echo -e "\n \\e[1mSee you soon!\\e[0m\n" ::shutdown:echo -e "\n \\e[1mSee you soon!\\e[0m\n"
::shutdown:sleep 1 ::shutdown:sleep 1
::ctrlaltdel:/sbin/reboot ::ctrlaltdel:/sbin/reboot
::once:cat /etc/msg/welcome.txt ::once:cat /etc/motd
::respawn:/bin/cttyhack /bin/sh ::respawn:/bin/cttyhack /bin/sh
tty2::once:cat /etc/msg/welcome.txt tty2::once:cat /etc/motd
tty2::respawn:/bin/sh tty2::respawn:/bin/sh
tty3::once:cat /etc/msg/welcome.txt tty3::once:cat /etc/motd
tty3::respawn:/bin/sh tty3::respawn:/bin/sh
tty4::once:cat /etc/msg/welcome.txt tty4::once:cat /etc/motd
tty4::respawn:/bin/sh tty4::respawn:/bin/sh