Merge pull request #110 from bauen1/misc-changes

Misc changes - added deps for some bundles, autorun enhancements, host resolution, code refactoring.
This commit is contained in:
Ivan Davidov 2017-11-18 22:59:03 +02:00 committed by GitHub
commit 23f34f3941
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 164 additions and 143 deletions

View File

@ -238,29 +238,30 @@ COPY_SOURCE_ISO=true
#
# Currently available overlay software:
#
# glibc_full - all core GNU C libraries (useful if other software is included).
# cf_cli - CLoud Foundry CLI (command line interface).
# coreutils - set of commonly used GNU executable utilities.
# dhcp - DHCP and DNS functionality.
# dialog - shell scripting for ncurses
# 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-*).
# 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.
# glibc_full - all core GNU C libraries (useful if other software is included).
# cf_cli - CLoud Foundry CLI (command line interface).
# coreutils - set of commonly used GNU executable utilities.
# dhcp - DHCP and DNS functionality.
# dialog - shell scripting for ncurses
# 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
# kexec-tools - execute another kernel from userspace
# 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.
#
# Refer to the README file for more information.
#

View File

@ -1,12 +1,11 @@
#!/bin/sh
set -e
echo "*** CLEAN BEGIN ***"
echo "Cleaning up the main work area. This may take a while..."
rm -rf work
mkdir work
# -p stops errors if the directory already exists
mkdir -p source
echo "*** CLEAN END ***"

View File

@ -1,4 +1,5 @@
#!/bin/sh
set -e
echo "*** PREPARE SRC BEGIN ***"

View File

@ -1,4 +1,5 @@
#!/bin/sh
set -e
echo "*** GENERATE ROOTFS BEGIN ***"

View File

@ -1,4 +1,5 @@
#!/bin/sh
set -e
echo "*** PACK ROOTFS BEGIN ***"

View File

@ -1,4 +1,5 @@
#!/bin/sh
set -e
echo "*** GET SYSLINUX BEGIN ***"

View File

@ -20,100 +20,102 @@ additional software being downloaded, built and installed on the ISO image.
Currently available overlay bundles:
* GLIBC - Set of all core GNU C libraries packaged together. Requires ~3MB
additional space. This overlay bundle is not host specific and
can always be built. The libraries are useful if you plan to use
more software after boot.
* GLIBC - Set of all core GNU C libraries packaged together. Requires ~3MB
additional space. This overlay bundle is not host specific and
can always be built. The libraries are useful if you plan to use
more software after boot.
This overlay bundle depends on the GLIBC build process.
This overlay bundle depends on the GLIBC build process.
* coreutils - set of commonly used GNU executable utilities.
* coreutils - set of commonly used GNU executable utilities.
* dhcp - DHCP and DNS functionality to connect to the Internet.
* dhcp - DHCP and DNS functionality to connect to the Internet.
* dialog - shell scripting library for ncurses
* dialog - shell scripting library for ncurses
This overlay bundle requires ncurses
This overlay bundle requires ncurses
* Dropbear - SSH server/client. Requires ~1MB additional space. The build
process creates user 'root' with password 'toor'. These are
sample commands which demonstrate how to use Dropbear:
* Dropbear - SSH server/client. Requires ~1MB additional space. The build
process creates user 'root' with password 'toor'. These are
sample commands which demonstrate how to use Dropbear:
SSH server (Alt + F1): dropbear -E -F
SSH client (Alt + F2): dbclient 10.0.2.15 -l root
SSH server (Alt + F1): dropbear -E -F
SSH client (Alt + F2): dbclient 10.0.2.15 -l root
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.
* 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.
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.
* 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
detailed information.
* 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
detailed information.
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:
* kbd - Keyboard utilities and keymaps, you can for example load
a german keyboard layout:
loadkeys de
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.
* 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.
* kexec-tools - Kexec tools, can be used to boot another kernel from userspace
* Open JDK - The open source JDK. No need for manual steps.
* Links - Text based browser. Requires ~1MB additional space. Use the
"links" command to activate the browser.
This overlay bundle requires GLIBC and ZLIB.
* Open JDK - The open source JDK. No need for manual steps.
* Lua - The Lua Scripting Language 5.3. Requires ~ 800kb additional
space. Use the "lua" command to run an interactive lua
interpreter.
This overlay bundle requires GLIBC and ZLIB.
* MLL Utils - Set of experimental shell scripts (mll-*.sh) which provide
additional functionality, e.g. installer and useful tools.
* Lua - The Lua Scripting Language 5.3. Requires ~ 800kb additional
space. Use the "lua" command to run an interactive lua
interpreter.
This overlay bundle is currently experimental and its build
process depends on the host machine.
* MLL Utils - Set of experimental shell scripts (mll-*.sh) which provide
additional functionality, e.g. installer and useful tools.
* nano - Simple command-line text editor with on-screen shortcuts.
This overlay bundle is currently experimental and its build
process depends on the host machine.
This overlay bundle requires ncurses.
* nano - Simple command-line text editor with on-screen shortcuts.
* ncurses - "GUI-like" API that runs within a terminal emulator.
This overlay bundle requires 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.
* ncurses - "GUI-like" API that runs within a terminal emulator.
* 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. 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.
* util_linux - Set of executable utilities distributed by the Linux Kernel
similar to busybox or GNU Core Utils.
* 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.
Some packages in this overlay bundle require ncurses.
* util_linux - Set of executable utilities distributed by the Linux Kernel
similar to busybox or GNU Core Utils.
* vim - An advanced text editor that seeks to provide the power of
the de-facto Unix editor 'Vi', with a more complete feature
set.
Some packages in this overlay bundle require ncurses.
This package will create symlinks on top of vi.
* vim - An advanced text editor that seeks to provide the power of
the de-facto Unix editor 'Vi', with a more complete feature
set.
* ZLIB - Software library used for data compression.
This package will create symlinks on top of vi.
* ZLIB - Software library used for data compression.
### ### ###

View File

@ -13,6 +13,8 @@ DESTDIR="$MAIN_SRC_DIR/work/src/minimal_overlay/rootfs"
mkdir -p "$DESTDIR"
install -d -m755 "$DESTDIR/etc"
install -m644 "$SRC_DIR/hosts" "$DESTDIR/etc/hosts"
install -m644 "$SRC_DIR/nsswitch.conf" "$DESTDIR/etc/nsswitch.conf"
install -m644 "$SRC_DIR/resolv.conf" "$DESTDIR/etc/resolv.conf"
install -d -m755 "$DESTDIR/etc/autorun"
install -m755 "$SRC_DIR/01_network.sh" "$DESTDIR/etc/autorun/01_network.sh"
@ -22,6 +24,7 @@ install -m755 "$SRC_DIR/05_rc.dhcp" "$DESTDIR/etc/05_rc.dhcp"
install -d -m755 "$DESTDIR/lib"
install -m755 "$SYSROOT/lib/libresolv.so.2" "$DESTDIR/lib/libresolv.so.2"
install -m755 "$SYSROOT/lib/libnss_dns.so.2" "$DESTDIR/lib/libnss_dns.so.2"
install -m755 "$SYSROOT/lib/libnss_files.so.2" "$DESTDIR/lib/libnss_files.so.2"
strip -g "$DESTDIR/lib/*" 2>/dev/null
echo "dhcp scripts and libraries have been installed"

View File

@ -0,0 +1,5 @@
# /etc/hosts
127.0.0.1 localhost
# ipv6
::1 localhost ipv6-localhost

View File

@ -0,0 +1 @@
hosts: files dns

View File

@ -0,0 +1 @@
ncurses

View File

@ -0,0 +1 @@
glibc_full

View File

@ -0,0 +1 @@
ncurses

View File

@ -24,7 +24,7 @@ install -m644 "$SRC_DIR/index.html" "$DESTDIR/srv/www/index.html"
install -m644 "$SRC_DIR/favicon.ico" "$DESTDIR/srv/www/favicon.ico"
install -d -m755 "$DESTDIR/etc"
install -d -m755 "$DESTDIR/etc/autorun"
install -m755 "$SRC_DIR/nweb.sh" "$DESTDIR/etc/autorun/90_nweb.sh"
install -m755 "$SRC_DIR/90_nweb.sh" "$DESTDIR/etc/autorun/90_nweb.sh"
echo "nweb has been installed."
echo "It will be autostarted on boot."

View File

@ -0,0 +1 @@
ncurses

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
SRC_DIR=$(pwd)

View File

@ -30,8 +30,10 @@ echo -e "Welcome to \\e[1mMinimal \\e[32mLinux \\e[31mLive\\e[0m (/sbin/init)"
if [ -d /etc/autorun ] ; then
for AUTOSCRIPT in /etc/autorun/*
do
echo -e "Executing \\e[32m$AUTOSCRIPT\\e[0m in subshell."
sh $AUTOSCRIPT
if [ -f "$AUTOSCRIPT" ] && [ -x "$AUTOSCRIPT" ]; then
echo -e "Executing \\e[32m$AUTOSCRIPT\\e[0m in subshell."
$AUTOSCRIPT
fi
done
fi